-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing][2.0] fixed several bugs and applied improvements #3810
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
Conversation
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
b5f51d00598 for 2.0
cf4f39a91388 for 2.0
6bd80a7f0 for 2.0
Closing this as this is too big of a change for 2.0. Only bug fixes should go into 2.0. As 2.1 is approaching fast now, I want to limit the changes made to 2.0. |
Huh, that are bug fixes. #3754 fixes 8 of them. |
fabpot
added a commit
that referenced
this pull request
Apr 11, 2012
Commits ------- 77185e0 [Routing] Allow spaces in the script name for the apache dumper 6465a69 [Routing] Fixes to handle spaces in route pattern Discussion ---------- [Routing] Handling of space characters in the dumpers The compiler was using the 'x' modifier in order to ignore extra spaces and line feeds but the code was flawed: - it was actually ignoring all the spaces, not only the extra ones added by the compiler, - all the spaces were stripped in the php and apache matchers. The proposed fix: - do not use the 'x' modifier any more (and then do no add extra spaces / line feeds), - do not strip the spaces in the matchers, - escapes the spaces (both in regexs and script name) for the apache matcher. It also include [a small optimization](https://github.com/vicb/symfony/pull/new#L9L89) when the only token of a route is an optional variable token - the idea is to make the regex easier to read. --------------------------------------------------------------------------- by vicb at 2012-04-10T13:59:45Z @Baachi fixed now. Thanks. --------------------------------------------------------------------------- by Tobion at 2012-04-10T16:01:31Z +1, I saw no reason for pretty printing the regex in the first place (just for debugging I guess). @vicb since you want to make the regex easier to read, I propose the remove the `P` from the variable regex `?P<bar>`, which is not needed anymore in PHP 5.3 (and we only support PHP 5.3+ anyway). --------------------------------------------------------------------------- by vicb at 2012-04-10T16:08:36Z @Tobion could you make a PR to this branch for the named parameters ? --------------------------------------------------------------------------- by Tobion at 2012-04-10T16:12:34Z I can include it in #3754 because I'm about the add 2 more fixes to it anyway. But when I proposed to apply these fixes to 2.0 Fabien rejected it. So not sure what branch you want me to apply this. --------------------------------------------------------------------------- by vicb at 2012-04-10T16:25:38Z May be the best is to put it on hold while I am reviewing your PRs. There are already enough changes, we'll make an other PR after all have been sorted out. What's the difference between 3754 and 3810 ? (3810 + 3763 = 3754 ?) --------------------------------------------------------------------------- by Tobion at 2012-04-10T16:39:32Z Lol you forget to link the PR numbers. At first sight I thought it's some sort of mathematical riddle. Haha #3810 is for 2.0 = #3763 (already merged) + #3754 for master --------------------------------------------------------------------------- by vicb at 2012-04-10T16:52:18Z I didn't link on purpose... the question is if '=' means strictly or loosely equal (any diffs - beside master vs 2.0) ? --------------------------------------------------------------------------- by Tobion at 2012-04-10T17:06:04Z It just applies my changes to 2.0. Nothing more. So master still differs from 2.0 by the addional features that were already implemented (e.g. `RouteCollection->addCollection` with optional requirements and options). But since my changes are bug fixes (except the performance improvement in #3763 but that doesn't break anything and makes 2.0 easier to maintain) I thought they should go into 2.0 as well. --------------------------------------------------------------------------- by vicb at 2012-04-10T17:14:27Z @Tobion only bug fixes mean "only bug fixes". You should re-open a PR for 2.0 with "only bug fixes", you might want to wait for me to review 3754. --------------------------------------------------------------------------- by Tobion at 2012-04-10T17:21:00Z Without #3763 it's much harder to apply the bug fixes. And now that I found 2 more bugs which requiresome rewriting of the PhpMatcherDumper, I don't want to apply all the commits by hand again for 2.0...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is targeted at 2.0 and includes the fixes and improvements of #3763 and #3754.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes