-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Feature request: Stop using service_id:method notation for _controller of routes #2751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
the |
OK, I see. FQCN::method was introduced after Symfony 2.8, which is still .supported But the new problem came with the change in FosUserBundle from 2.0 to 2.1. Before the routes were configured with for example The old notation was resolved to Any other helpful input? I could use custom routes for FosUserBundle actions in my application instead using the new notation. |
Well, we switched to controller defined as services in 2.1 to avoid having to keep all out internal services public in Symfony 4 (where private is the default) just because our controllers were using them. On a side note, you should really avoid calling |
Thanks for this suggestion! I'll implement such a cache warmer then and solve the problem this way. Great idea. |
I'm closing this issue because we cannot switch to the FQCN for now. |
I posted my implementation of a cached route-name-to-controller map as an answer to the stackoverflow question mentioned above: https://stackoverflow.com/a/49170148/2564552 |
Describe the feature:
Hi, since the
bundle:controller:action
andservice:method
notations are deprecated in Symfony 4.1 (see symfony/symfony#26085 for details), I would love to see FOSUserBundle to use theFQCN::method
notation for the_controller
setting of routes (or maybe everywhere).Some background: I implemented a route access checker in my application reading
@Security
-Annotations of the controller actions, so I need to get the controller's class and the action from all routes in my application. At the moment, I have to access the container to get the class for the service of the fos_user_bundle routes (or ignore those routes in my checker). You can read more about this problem in this Stackoverflow question.The text was updated successfully, but these errors were encountered: