Skip to content

Commit 9c6f65f

Browse files
committed
minor symfony#14081 [Config][DX] improve file loader error message for missing resource (cordoval)
This PR was merged into the 2.3 branch. Discussion ---------- [Config][DX] improve file loader error message for missing resource |Q |A | |--- |--- | |Bug Fix? |y | |New Feature? |n | |BC Breaks? |n | |Deprecations?|n | |Tests Pass? |y | |Fixed Tickets|symfony#11958| |License |MIT | |Doc PR | | Commits ------- a2deb61 [DX] improve file loader error for router/other resources in bundle
2 parents 8b22526 + a2deb61 commit 9c6f65f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public function __construct($resource, $sourceResource = null, $code = null, $pr
3636
if ('@' === $resource[0]) {
3737
$parts = explode(DIRECTORY_SEPARATOR, $resource);
3838
$bundle = substr($parts[0], 1);
39-
$message .= ' '.sprintf('Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle);
39+
$message .= sprintf(' Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle);
40+
$message .= sprintf(' If the bundle is registered, make sure the bundle path "%s" is not empty.', $resource);
4041
} elseif ($previous) {
4142
// include the previous exception, to help the user see what might be the underlying cause
4243
$message .= ' '.sprintf('(%s)', $previous->getMessage());

0 commit comments

Comments
 (0)