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
[RFC] Make the 'Action' suffix optional in controllers-as-services #24976
Comments
IIRC it isn't optional, but it should match the name of the method, so you should/can remove the |
Seems like the doc is wrong indeed, using |
Closing then as a doc issue. Thanks! |
Wait, I believe that what the doc tries to point out is that when using the |
@chalasr beware that this is tricky. The note says: "when using this, you must call your controller methods xxxAction() you cannot remove 'Action' suffix". A different thing is that if you called your action So, the question: must controller methods be called |
…reguiluz) This PR was squashed before being merged into the 2.7 branch (closes #8669). Discussion ---------- Removed a wrong note about controllers as services This is probably wrong. We're discussing about that in symfony/symfony#24976. Commits ------- 669a9f0 Removed a wrong note about controllers as services
In this page: https://symfony.com/doc/current/controller/service.html we explain an alternative syntax to use controllers-as-services in route definitions:
My concern is the note below that example:
If this is still true, isn't it a bit arbitrary? Could we make the
Action
suffix optional?The text was updated successfully, but these errors were encountered: