Skip to content

Commit 6a89ac7

Browse files
Update src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
1 parent 4da1d65 commit 6a89ac7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Routing/Loader/AttributeClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ protected function addRoute(RouteCollection $collection, object $attr, array $gl
228228
break;
229229
}
230230

231-
if (preg_match(\sprintf('/\{(?<argName>[^\:]+):%s(?:(\.[^\}]+)?)\}/', preg_quote($param->name)), $path, $matches)) {
231+
if (preg_match(\sprintf('/\{(?|([^\:]++):%s(?:\.[^\}<]++)?|(%1$s))(?:<.*?>)?\}/', preg_quote($param->name)), $path, $matches)) {
232232
$defaults[$matches['argName']] = $param->getDefaultValue();
233233
break;
234234
}

0 commit comments

Comments
 (0)