-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update controllers.rst #4647
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
Update controllers.rst #4647
Conversation
Added in Route/ParamConverter use statements and @ParamConverter annotation
looks like a valid change to me. Btw, this should be merged into 2.3 (as that's the oldest still maintained branch of the docs). You don't have to create a new PR for it, if it doesn't conflict we can easily switch branches when merging. |
@wouterj In regards to the 2.3 merge in your comment does this need to be done by me or someone else? (same thing with the other pull request if I need to do something on my end to merge?) |
@keefekwan when creating a PR, you can change branches (both the branch with changes as the branch the PR is based on). For fixes, the pull request should be based on 2.3 (unless it was introduced in a new version). For now (this PR and the other PRs), you don't have to do anything. The PRs will be merged by @weaverryan and he can take care of this very well :) |
@wouterj Gotcha! Thanks for the information, mate! |
/** | ||
* @Route("/{id}", name="admin_post_show") | ||
* @ParamConverter("post", class="AppBundle:Post") |
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.
hmm, now I think of it, this isn't needed at all. The FrameworkExtraBundle will do this automatically because you typehinted to an entity. Can you please remove this change, leaving only the addition of line 139 in this PR?
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.
Sure thing, removed the annotation.
Removed annotation per request.
@@ -136,6 +136,9 @@ For example: | |||
|
|||
.. code-block:: php | |||
|
|||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
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.
This use
statement is then also not needed.
Removed use statement.
Shall I just close this pull request altogether as no changes were made? |
@keefekwan I think it's good now. The |
Thank you, @keefekwan! Eventhough this might not seem like an important change, it is fixing a code block and it reduces confusion (I'm sure people will be helped by this addition). |
Added in Route/ParamConverter use statements and @ParamConverter annotation