forked from symfony/symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged branch vicb/routingmatcher (PR symfony#4170)
Commits ------- a196ca0 [Routing] Compiler: remove lazy quantifiers with no effect 8232aa1 [Routing] Compiler: fix in the computing of the segment separators Discussion ---------- [Routing] Fix the matching process This PR is based on the PR symfony#3678, symfony#4139. [![Build Status](https://secure.travis-ci.org/vicb/symfony.png?branch=routingmatcher)](http://travis-ci.org/vicb/symfony) **The spec** A pattern is composed of both text and variable segments: `/{variable}-test/{other_variable}`. A variable segment will match anything until a separator is encountered. The separator is the character following the variable segment when available or preceding the variable otherwise (i.e. at the end of the pattern). That is: * the separator is `-` for the `variable`, * the separator is `/` for the `other_variable`. *Note: This default matching behavior can be overridden if a requirement is specified for a variable)* **Fixes** * The current behavior is to consider booth the preceding and following characters as separators (considering availability), * The "preceding" separator of the first variable is always set to `/` whatever the preceding character is (due to `$pos = 0` for the first iteration). **Todo** Update the doc once this is merged
- Loading branch information
Showing
6 changed files
with
74 additions
and
63 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.