composer update
This commit is contained in:
10
vendor/symfony/routing/RouteCompiler.php
vendored
10
vendor/symfony/routing/RouteCompiler.php
vendored
@@ -61,6 +61,14 @@ class RouteCompiler implements RouteCompilerInterface
|
||||
$hostRegex = $result['regex'];
|
||||
}
|
||||
|
||||
$locale = $route->getDefault('_locale');
|
||||
if (null !== $locale && null !== $route->getDefault('_canonical_route') && preg_quote($locale, self::REGEX_DELIMITER) === $route->getRequirement('_locale')) {
|
||||
$requirements = $route->getRequirements();
|
||||
unset($requirements['_locale']);
|
||||
$route->setRequirements($requirements);
|
||||
$route->setPath(str_replace('{_locale}', $locale, $route->getPath()));
|
||||
}
|
||||
|
||||
$path = $route->getPath();
|
||||
|
||||
$result = self::compilePattern($route, $path, false);
|
||||
@@ -139,7 +147,7 @@ class RouteCompiler implements RouteCompilerInterface
|
||||
}
|
||||
|
||||
if (\strlen($varName) > self::VARIABLE_MAXIMUM_LENGTH) {
|
||||
throw new \DomainException(sprintf('Variable name "%s" cannot be longer than %s characters in route pattern "%s". Please use a shorter name.', $varName, self::VARIABLE_MAXIMUM_LENGTH, $pattern));
|
||||
throw new \DomainException(sprintf('Variable name "%s" cannot be longer than %d characters in route pattern "%s". Please use a shorter name.', $varName, self::VARIABLE_MAXIMUM_LENGTH, $pattern));
|
||||
}
|
||||
|
||||
if ($isSeparator && $precedingText !== $precedingChar) {
|
||||
|
||||
Reference in New Issue
Block a user