-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Regression in matching the earliest route #27512
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
Comments
I tried adding this test case in + public function testStaticThenCatchAll()
+ {
+ $coll = new RouteCollection();
+ $coll->add('a', (new Route('/bulk-delete'))->setMethods('DELETE'));
+ $coll->add('b', (new Route('/{id}'))->setMethods('DELETE'));
+
+ $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'DELETE', '/bulk-delete'));
+ $this->assertSame('a', $matcher->match('/bulk-delete')['_route']);
+ } |
I'll try to create a Symfony project reproducing this bug, will be back in a few minutes. |
Can you check if #27511 fixes the issue? |
@nicolas-grekas it fixes the issue, thank you a lot, looking forward to v4.1.1 🎉 |
fabpot
added a commit
that referenced
this issue
Jun 10, 2018
…n-capturing groups (nicolas-grekas) This PR was merged into the 4.1 branch. Discussion ---------- [Routing] fix matching host patterns, utf8 prefixes and non-capturing groups | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #27448, #27461, #27504, #27512 | License | MIT | Doc PR | - Commits ------- 465b15c [Routing] fix matching host patterns, utf8 prefixes and non-capturing groups
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: 4.1.0
Description & how to reproduce
Having the following routing defined:
After upgrading from the most recent 4.0.x to 4.1.0, the router started to match the second route for a
DELETE /bulk-delete
request, treatingbulk-delete
as{id}
. As mentioned in https://symfony.com/doc/current/routing/requirements.html, the earliest route should be matched.The text was updated successfully, but these errors were encountered: