Skip to content

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

Closed
wants to merge 3 commits into from
Closed

Update controllers.rst #4647

wants to merge 3 commits into from

Conversation

keefekwan
Copy link
Contributor

Added in Route/ParamConverter use statements and @ParamConverter annotation

Added in Route/ParamConverter use statements and @ParamConverter annotation
@wouterj
Copy link
Member

wouterj commented Dec 13, 2014

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.

@keefekwan
Copy link
Contributor Author

@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?)

@wouterj
Copy link
Member

wouterj commented Dec 13, 2014

@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 :)

@keefekwan
Copy link
Contributor Author

@wouterj Gotcha! Thanks for the information, mate!

/**
* @Route("/{id}", name="admin_post_show")
* @ParamConverter("post", class="AppBundle:Post")
Copy link
Member

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?

Copy link
Contributor Author

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;
Copy link
Member

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.
@keefekwan
Copy link
Contributor Author

Shall I just close this pull request altogether as no changes were made?

@xabbuh
Copy link
Member

xabbuh commented Dec 16, 2014

@keefekwan I think it's good now. The use statement for the Route annotation was not present before. 👍

@wouterj
Copy link
Member

wouterj commented Dec 16, 2014

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).

wouterj added a commit that referenced this pull request Dec 16, 2014
This PR was submitted for the 2.6 branch but it was merged into the 2.3 branch instead (closes #4647).

Discussion
----------

Update controllers.rst

Added in Route/ParamConverter use statements and @ParamConverter annotation

Commits
-------

1a0534d Update controllers.rst
@wouterj wouterj closed this Dec 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants