Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c3617bd

Browse filesBrowse 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
Copy full SHA for c3617bd

File tree

2 files changed

+2
-2
lines changed
Filter options

2 files changed

+2
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Exception/FileLoaderLoadException.php
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Tests/Exception/FileLoaderLoadExceptionTest.php
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.