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

Skip to content

[Routing] fix setting empty requirement #5426

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

Merged
merged 2 commits into from
Sep 10, 2012

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Sep 4, 2012

First commit: A requirement of "^$" was overlooked and wasn't recognized as empty after stripping it in Route.
Second commit: Fixes a requirement of '0' that was ignored by the Compiler.

@travisbot
Copy link

This pull request passes (merged 1f5b793 into 41ffd00).

@travisbot
Copy link

This pull request passes (merged 02516de into 41ffd00).

fabpot added a commit that referenced this pull request Sep 10, 2012
Commits
-------

02516de [Routing] fix variable with a requirement of '0'
1f5b793 [Routing] fix setting empty requirement in Route

Discussion
----------

[Routing] fix setting empty requirement

First commit: A requirement of "^$" was overlooked and wasn't recognized as empty after stripping it in Route.
Second commit: Fixes a requirement of '0' that was ignored by the Compiler.
@fabpot fabpot merged commit 02516de into symfony:master Sep 10, 2012
@gnutix
Copy link
Contributor

gnutix commented Sep 12, 2012

@Tobion Just a question if I may.. is there a way to set an optional (or default value) variable in the "prefix" (like {_locale} or a custom one, let's say {country}) ?

I want to load an external route file with routes matching either they are or not prefixed by /{country}/{_locale} (example: /US/en/contact or /contact should match). Is it possible in Symfony 2.1 ? Or should I look into JMSI18nRoutingBundle (I've tried it but was stuck for the country part @schmittjoh ).

Sorry if this comment should not be "here", but as the code is very related to my issue.. ^^

@Tobion
Copy link
Contributor Author

Tobion commented Sep 13, 2012

This is currently not possible with symfony. It would be possible if #5424 gets implemented. So if you need it, I welcome you to give thumbs up there. I can image that having 2 optional variables in the prefix can also not be achieved with JMSI18nRoutingBundle.
Btw, this PR here is not at all related to this feature.

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

Successfully merging this pull request may close these issues.

4 participants