Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes |
RFC? | no |
Symfony version | 3.3.14 |
Hello, while updating a 3.3.13
project to 3.3.14
, I've an issue with the following routing declaration:
my_route:
resource: 'Foo\BarBundle\Controller\UserController'
type: annotation
prefix: /
The error is :
FileLocatorFileNotFoundException
The file "Foo\BarBundle\Controller\UserController" does not exist (in: /srv/app/app/config, /srv/app/app, /srv/app/app/Resources) in Foo\BarBundle\Controller\UserController (which is being imported from "/srv/app/app/config/routing.yml"). Make sure annotations are enabled.
The problem :
The AnnotatedRouteControllerLoader
is called after the AnnotationDirectoryLoader
one, and both can support the (string, 'annotation')
routing entry.
It seems it's caused by the merge of #25113 in the 3.3
branch. This problem can be fixed by sensiolabs/SensioFrameworkExtraBundle#537 , but the commit is only available for the 5.1.3
SensioFrameworkExtraBundle version, whereas the 3.3
symfony branch only requires "sensio/framework-extra-bundle": "^3.0.2"
.
Another PR, the #25231 one, can fix the problem but has been rejected in favor of the SensioFrameworkExtraBundle one.