8000 minor #24638 Improving annotation loader message (weaverryan) · symfony/symfony@c3617bd · GitHub
[go: up one dir, main page]

Skip to content

Commit c3617bd

Browse files
committed
minor #24638 Improving annotation loader message (weaverryan)
This PR was merged into the 3.4 branch. Discussion ---------- Improving annotation loader message | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | not needed This is the error that happens with Flex when you try to load annotation routes, but you don't have annotations installed/enabled yet. Fabien created this error message to help with this exact situation. For Flex users, the real solution is to run `composer require annotation`. This at least *somewhat* hints that even better. Commits ------- ce4cf47 Improving annotation loader message
2 parents 744021b + ce4cf47 commit c3617bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Config/Exception/FileLoaderLoadException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function __construct($resource, $sourceResource = null, $code = null, $pr
6464
} elseif (null !== $type) {
6565
// maybe there is no loader for this specific type
6666
if ('annotation' === $type) {
67-
$message .= ' Make sure annotations are enabled.';
67+
$message .= ' Make sure annotations are installed and enabled.';
6868
} else {
6969
$message .= sprintf(' Make sure there is a loader supporting the "%s" type.', $type);
7070
}

src/Symfony/Component/Config/Tests/Exception/FileLoaderLoadExceptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testMessageCannotLoadResourceWithType()
3131
public function testMessageCannotLoadResourceWithAnnotationType()
3232
{
3333
$exception = new FileLoaderLoadException('resource', null, null, null, 'annotation');
34-
$this->assertEquals('Cannot load resource "resource". Make sure annotations are enabled.', $exception->getMessage());
34+
$this->assertEquals('Cannot load resource "resource". Make sure annotations are installed and enabled.', $exception->getMessage());
3535
}
3636

3737
public function testMessageCannotImportResourceFromSource()

0 commit comments

Comments
 (0)
0