Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[Book][Routing] Add example about how to match multiple methods#5201
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xelaris commentedApr 21, 2015
| Q | A |
|---|---|
| Doc fix? | no |
| New docs? | yes |
| Applies to | 2.3+ |
| Fixed tickets |
weaverryan commentedMay 23, 2015
I like this, but I'd actually like to solve it in an easier way: add a commented-out example in the previous section: contact_process:path:/contactdefaults:{ _controller: AppBundle:Main:processContact }methods:[POST]# or to match GET *or* POST methods# methods: [GET, POST] What do you think@xelaris? |
javiereguiluz commentedJun 24, 2015
I usually prefer concise explanations, as proposed by@weaverryan. But in this case, I think it could be better to show a verbose explanation as proposed by@xelaris. Adding a comment is not clear enough for me. Let's ask@xabbuh and@wouterj for their opinion about this. Thanks. |
xabbuh commentedJun 24, 2015
I would have said that the example proposed by@weaverryan would be clear enough. @javiereguiluz Do you think from your experience about talking with beginners that this is something not so obvious (even with commented out example)? |
javiereguiluz commentedJun 24, 2015
@xabbuh I don't know which would be the opinion of newcomers. It was just a personal comment. Let me show you a pair of screenshots explainig why I said that. We have this: And Ryan proposes to add a comment: It's not a bad idea at all. But my concern is ... what would happen with the other 3 config formats? For example, consider the case of "annotations": Before: After: But I think we could find a solution: what if we use |
weaverryan commentedJun 25, 2015
I hadn't thought about the annotations format, so I agree with Javier. But making the process handle get or post might be confusing since it has the same URL as the above, and so will never match in GET. I'm in favor of actually merging as is, after making all this fuss (the additions actually small - mostly code block). |
wouterj commentedJun 25, 2015
What about using |
weaverryan commentedJun 25, 2015
Oh, that's a cool idea - I can't believe I didn't think of that! +1 for making the previous example use Post and Put instead of this new section.@xelaris can you make that change? Thanks! |
xabbuh commentedJun 25, 2015
Oh yeah, that's indeed a great idea@wouterj. |
xelaris commentedJul 5, 2015
I like the idea of changing the existing example to demonstrate how to match multiple methods and I changed the PR as suggested by@wouterj. But I have two points about the current state of this PR:
I'm +1 with@javiereguiluz suggestion to change the What are your opinion about this? |
xabbuh commentedJul 7, 2015
@xelaris Good point with the best practices. But wouldn't we then don't have an example with only one allowed method when choosing your solution? |
xelaris commentedJul 7, 2015
@xabbuh The |
xabbuh commentedJul 7, 2015
Good point, looks like a good idea then. |
xelaris commentedJul 15, 2015
I have changed the PR to apply the latest proposal. What do you think about it? |
xabbuh commentedJul 15, 2015
👍 from me |
weaverryan commentedJul 16, 2015
LOVE it. Thanks@xelaris - you rock for your patience and ideas! |
… methods (xelaris)This PR was merged into the 2.3 branch.Discussion----------[Book][Routing] Add example about how to match multiple methods| Q | A| ------------- | ---| Doc fix? | no| New docs? | yes| Applies to | 2.3+| Fixed tickets |Commits-------c1e8453 [Book][Routing] Change example to match multiple methods



