You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Until Symfony 4.4, when making a syntax error in a file, you would get a ParseError. But since 4.4, you get a LoaderLoadException saying : Expected to find class "App/Controller/Controller" in file "/src/Controller/Controller.php" while importing services from resource "../src/*", but it was not found! Check the namespace prefix used with the resource in /config/services.yaml (which is loaded in resource "/config/services.yaml").
The message isn't very helpful. We can only know there is something wrong somewhere in the given class. As a developper, I would expect a meaningful exception message, just like in previous versions. I couldn't test this on version 5 though.
Symfony version(s) affected: 4.4
Description
Until Symfony 4.4, when making a syntax error in a file, you would get a
ParseError
. But since 4.4, you get aLoaderLoadException
saying :Expected to find class "App/Controller/Controller" in file "/src/Controller/Controller.php" while importing services from resource "../src/*", but it was not found! Check the namespace prefix used with the resource in /config/services.yaml (which is loaded in resource "/config/services.yaml").
The message isn't very helpful. We can only know there is something wrong somewhere in the given class. As a developper, I would expect a meaningful exception message, just like in previous versions. I couldn't test this on version 5 though.
How to reproduce
Additional context
Seems to affect autowired classes. If you make a syntax error in the Kernel.php file, the exception is a
ParseError
as expected.The text was updated successfully, but these errors were encountered: