Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Clarify routing documentation on trailing optional parameters #1872

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
chrismcmacken opened this issue Oct 31, 2012 · 2 comments
Closed

Clarify routing documentation on trailing optional parameters #1872

chrismcmacken opened this issue Oct 31, 2012 · 2 comments

Comments

@chrismcmacken
Copy link
Contributor

As noted in issue symfony/symfony#5869 the Routing documentation is a little unclear as to when routes with optional parameters at the end are matched.

my_test_homepage:
    pattern:  /hello/{name}
    defaults: { _controller: MyTestBundle:Default:index, name: DefaultName }

The above route will only match on /hello and /hello/name, it will not match /hello/. I would like to clarify this in the documentation to avoid any confusion in the future.

@chrismcmacken
Copy link
Contributor Author

@chrismcmacken
Copy link
Contributor Author

closing this, added it in a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant