Closed ghost closed 3 weeks ago
Any news on this? It also fails when any first parameter contains any regex.
$route = new Route('GET', '/date/{year:\d+}/{month}', static function () { });
$path = $route->getPath([
'year' => 2000,
'month' => 1
]); // returns just "date/2000"
This is especially unfortunate if you want to use localized urls like this:
$route = new Route('GET', '/lang/{lang:(?:de|en))}/test/{foo}', static function () { });
$path = $route->getPath([
'lang' => 'en',
'foo' => 42
]); // returns just "lang/en"
Sorry for the delay, been dealing with some health issues.
Planning a merge/release session next week so will sort then.
Do you have any update on this issue at all? It seems to be caused when there is more than one wildcard with a matcher.
$route = new \League\Route\Route('GET', '/a/{wildcard}/and/{wildcardWithMatcher:uuid}/and/{anotherWildcardWithMatcher:uuid}', static function () {
});
$path = $route->getPath([
'wildcard' => 'replaced-wildcard',
'wildcardWithMatcher' => 'replaced-wildcard-with-matcher',
'anotherWildcardWithMatcher' => 'replaced-another-wildcard-with-matcher'
]); // returns just "/a/replaced-wildcard/and/replaced-wildcard-with-matcher"
Merged #333, a tag on 5.x will arrive early next week and will be merged in to 6.x branch too
/test/{id:\d+}/test/{domainId:\d+}/delete
see PR #314 for a failing test