Created
December 2, 2010 23:11
-
-
Save jmikola/726295 to your computer and use it in GitHub Desktop.
Symfony 2 routing bugs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _view.router.generate('check') | |
| check: | |
| pattern: /check.:_format | |
| defaults: { _controller: Bundle:Module:check, _format: json } | |
| requirements: { _format: json } | |
| route gets generated without ".json" at the end, defaults are ignored | |
| See UrlGenerator::doGenerate() | |
| module_view: | |
| pattern: /path/:slug | |
| defaults: { _controller: Bundle:Module:view, slug: ~ } | |
| options: { segment_separators: [/] } | |
| Should be able to access /path or /path/foo with this single routing rule; segment separator should be stripped automatically when matching or generating |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment