-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Removed a wrong note about controllers as services #8669
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
Conversation
I would reword the note a bit. Its initial goal was to say that you cannot drop the |
Agree with @xabbuh |
controller/service.rst
Outdated
|
||
Unlike the traditional ``Bundle:Controller:method`` notation, when using | ||
this syntax the method name must match the original controller method name, | ||
so you cannot remove the ``Action`` suffix if the method includes it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make this a new sentence
@@ -104,8 +104,9 @@ defined above with the id ``app.hello_controller``:: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but I think we should remove the forward
example entirely and just keep the routing example (and probably move the note below the routing example).
controller/service.rst
Outdated
syntax. | ||
Unlike the traditional ``Bundle:Controller:method`` notation, when using | ||
this syntax the method name must match the original controller method name, | ||
so you cannot remove the ``Action`` suffix if the method includes it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this wording?
Make sure the method name in your route (e.g. ``indexAction``) matches the method name exactly.
Unlike the traditional ``Bundle:Controller:method`` notation, the `Action` suffix is not automatically
added for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like your proposal. Much better. Thanks!
Thank you @javiereguiluz. |
…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
This is probably wrong. We're discussing about that in symfony/symfony#24976.