composer update
This commit is contained in:
2
vendor/symfony/routing/Annotation/Route.php
vendored
2
vendor/symfony/routing/Annotation/Route.php
vendored
@@ -64,7 +64,7 @@ class Route
|
||||
}
|
||||
|
||||
if (isset($data['utf8'])) {
|
||||
$data['options']['utf8'] = filter_var($data['utf8'], FILTER_VALIDATE_BOOLEAN) ?: false;
|
||||
$data['options']['utf8'] = filter_var($data['utf8'], \FILTER_VALIDATE_BOOLEAN) ?: false;
|
||||
unset($data['utf8']);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class CompiledUrlGenerator extends UrlGenerator
|
||||
throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name));
|
||||
}
|
||||
|
||||
list($variables, $defaults, $requirements, $tokens, $hostTokens, $requiredSchemes) = $this->compiledRoutes[$name];
|
||||
[$variables, $defaults, $requirements, $tokens, $hostTokens, $requiredSchemes] = $this->compiledRoutes[$name];
|
||||
|
||||
if (isset($defaults['_canonical_route']) && isset($defaults['_locale'])) {
|
||||
if (!\in_array('_locale', $variables, true)) {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Routing\Generator\Dumper;
|
||||
|
||||
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "CompiledUrlGeneratorDumper" instead.', PhpGeneratorDumper::class), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "CompiledUrlGeneratorDumper" instead.', PhpGeneratorDumper::class), \E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper;
|
||||
|
||||
|
||||
@@ -302,7 +302,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt
|
||||
unset($extra['_fragment']);
|
||||
}
|
||||
|
||||
if ($extra && $query = http_build_query($extra, '', '&', PHP_QUERY_RFC3986)) {
|
||||
if ($extra && $query = http_build_query($extra, '', '&', \PHP_QUERY_RFC3986)) {
|
||||
$url .= '?'.strtr($query, self::QUERY_FRAGMENT_DECODED);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Component\Routing\RouteCompiler;
|
||||
/**
|
||||
* AnnotationClassLoader loads routing information from a PHP class and its methods.
|
||||
*
|
||||
* You need to define an implementation for the getRouteDefaults() method. Most of the
|
||||
* You need to define an implementation for the configureRoute() method. Most of the
|
||||
* time, this method should define some PHP callable to be called for the route
|
||||
* (a controller in MVC speak).
|
||||
*
|
||||
@@ -147,7 +147,7 @@ abstract class AnnotationClassLoader implements LoaderInterface
|
||||
|
||||
foreach ($requirements as $placeholder => $requirement) {
|
||||
if (\is_int($placeholder)) {
|
||||
@trigger_error(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s::%s()"?', $placeholder, $requirement, $name, $class->getName(), $method->getName()), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s::%s()"?', $placeholder, $requirement, $name, $class->getName(), $method->getName()), \E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ abstract class AnnotationClassLoader implements LoaderInterface
|
||||
|
||||
foreach ($globals['requirements'] as $placeholder => $requirement) {
|
||||
if (\is_int($placeholder)) {
|
||||
@trigger_error(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" in "%s"?', $placeholder, $requirement, $class->getName()), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" in "%s"?', $placeholder, $requirement, $class->getName()), \E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class AnnotationFileLoader extends FileLoader
|
||||
*/
|
||||
public function supports($resource, $type = null)
|
||||
{
|
||||
return \is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'annotation' === $type);
|
||||
return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'annotation' === $type);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,10 +91,15 @@ class AnnotationFileLoader extends FileLoader
|
||||
$namespace = false;
|
||||
$tokens = token_get_all(file_get_contents($file));
|
||||
|
||||
if (1 === \count($tokens) && T_INLINE_HTML === $tokens[0][0]) {
|
||||
if (1 === \count($tokens) && \T_INLINE_HTML === $tokens[0][0]) {
|
||||
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain PHP code. Did you forgot to add the "<?php" start tag at the beginning of the file?', $file));
|
||||
}
|
||||
|
||||
$nsTokens = [\T_NS_SEPARATOR => true, \T_STRING => true];
|
||||
if (\defined('T_NAME_QUALIFIED')) {
|
||||
$nsTokens[T_NAME_QUALIFIED] = true;
|
||||
}
|
||||
|
||||
for ($i = 0; isset($tokens[$i]); ++$i) {
|
||||
$token = $tokens[$i];
|
||||
|
||||
@@ -102,19 +107,19 @@ class AnnotationFileLoader extends FileLoader
|
||||
continue;
|
||||
}
|
||||
|
||||
if (true === $class && T_STRING === $token[0]) {
|
||||
if (true === $class && \T_STRING === $token[0]) {
|
||||
return $namespace.'\\'.$token[1];
|
||||
}
|
||||
|
||||
if (true === $namespace && T_STRING === $token[0]) {
|
||||
if (true === $namespace && isset($nsTokens[$token[0]])) {
|
||||
$namespace = $token[1];
|
||||
while (isset($tokens[++$i][1]) && \in_array($tokens[$i][0], [T_NS_SEPARATOR, T_STRING])) {
|
||||
while (isset($tokens[++$i][1], $nsTokens[$tokens[$i][0]])) {
|
||||
$namespace .= $tokens[$i][1];
|
||||
}
|
||||
$token = $tokens[$i];
|
||||
}
|
||||
|
||||
if (T_CLASS === $token[0]) {
|
||||
if (\T_CLASS === $token[0]) {
|
||||
// Skip usage of ::class constant and anonymous classes
|
||||
$skipClassToken = false;
|
||||
for ($j = $i - 1; $j > 0; --$j) {
|
||||
@@ -122,10 +127,10 @@ class AnnotationFileLoader extends FileLoader
|
||||
break;
|
||||
}
|
||||
|
||||
if (T_DOUBLE_COLON === $tokens[$j][0] || T_NEW === $tokens[$j][0]) {
|
||||
if (\T_DOUBLE_COLON === $tokens[$j][0] || \T_NEW === $tokens[$j][0]) {
|
||||
$skipClassToken = true;
|
||||
break;
|
||||
} elseif (!\in_array($tokens[$j][0], [T_WHITESPACE, T_DOC_COMMENT, T_COMMENT])) {
|
||||
} elseif (!\in_array($tokens[$j][0], [\T_WHITESPACE, \T_DOC_COMMENT, \T_COMMENT])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -135,7 +140,7 @@ class AnnotationFileLoader extends FileLoader
|
||||
}
|
||||
}
|
||||
|
||||
if (T_NAMESPACE === $token[0]) {
|
||||
if (\T_NAMESPACE === $token[0]) {
|
||||
$namespace = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ use Psr\Container\ContainerInterface;
|
||||
use Symfony\Component\Routing\Loader\ContainerLoader;
|
||||
use Symfony\Component\Routing\Loader\ObjectRouteLoader;
|
||||
|
||||
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "%s" instead.', ServiceRouterLoader::class, ContainerLoader::class), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "%s" instead.', ServiceRouterLoader::class, ContainerLoader::class), \E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* A route loader that executes a service to load the routes.
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract class ObjectLoader extends Loader
|
||||
|
||||
if (1 === substr_count($resource, ':')) {
|
||||
$resource = str_replace(':', '::', $resource);
|
||||
@trigger_error(sprintf('Referencing object route loaders with a single colon is deprecated since Symfony 4.1. Use %s instead.', $resource), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Referencing object route loaders with a single colon is deprecated since Symfony 4.1. Use %s instead.', $resource), \E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$parts = explode('::', $resource);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Routing\Loader;
|
||||
|
||||
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "%s" instead.', ObjectRouteLoader::class, ObjectLoader::class), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "%s" instead.', ObjectRouteLoader::class, ObjectLoader::class), \E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* A route loader that calls a method on an object to load the routes.
|
||||
|
||||
@@ -63,7 +63,7 @@ class PhpFileLoader extends FileLoader
|
||||
*/
|
||||
public function supports($resource, $type = null)
|
||||
{
|
||||
return \is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'php' === $type);
|
||||
return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'php' === $type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
14
vendor/symfony/routing/Loader/XmlFileLoader.php
vendored
14
vendor/symfony/routing/Loader/XmlFileLoader.php
vendored
@@ -93,7 +93,7 @@ class XmlFileLoader extends FileLoader
|
||||
*/
|
||||
public function supports($resource, $type = null)
|
||||
{
|
||||
return \is_string($resource) && 'xml' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'xml' === $type);
|
||||
return \is_string($resource) && 'xml' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'xml' === $type);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,10 +110,10 @@ class XmlFileLoader extends FileLoader
|
||||
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" must have an "id" attribute.', $path));
|
||||
}
|
||||
|
||||
$schemes = preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, PREG_SPLIT_NO_EMPTY);
|
||||
$methods = preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, PREG_SPLIT_NO_EMPTY);
|
||||
$schemes = preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, \PREG_SPLIT_NO_EMPTY);
|
||||
$methods = preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, \PREG_SPLIT_NO_EMPTY);
|
||||
|
||||
list($defaults, $requirements, $options, $condition, $paths) = $this->parseConfigs($node, $path);
|
||||
[$defaults, $requirements, $options, $condition, $paths] = $this->parseConfigs($node, $path);
|
||||
|
||||
if (!$paths && '' === $node->getAttribute('path')) {
|
||||
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" must have a "path" attribute or <path> child nodes.', $path));
|
||||
@@ -155,11 +155,11 @@ class XmlFileLoader extends FileLoader
|
||||
$type = $node->getAttribute('type');
|
||||
$prefix = $node->getAttribute('prefix');
|
||||
$host = $node->hasAttribute('host') ? $node->getAttribute('host') : null;
|
||||
$schemes = $node->hasAttribute('schemes') ? preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, PREG_SPLIT_NO_EMPTY) : null;
|
||||
$methods = $node->hasAttribute('methods') ? preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, PREG_SPLIT_NO_EMPTY) : null;
|
||||
$schemes = $node->hasAttribute('schemes') ? preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, \PREG_SPLIT_NO_EMPTY) : null;
|
||||
$methods = $node->hasAttribute('methods') ? preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, \PREG_SPLIT_NO_EMPTY) : null;
|
||||
$trailingSlashOnRoot = $node->hasAttribute('trailing-slash-on-root') ? XmlUtils::phpize($node->getAttribute('trailing-slash-on-root')) : true;
|
||||
|
||||
list($defaults, $requirements, $options, $condition, /* $paths */, $prefixes) = $this->parseConfigs($node, $path);
|
||||
[$defaults, $requirements, $options, $condition, /* $paths */, $prefixes] = $this->parseConfigs($node, $path);
|
||||
|
||||
if ('' !== $prefix && $prefixes) {
|
||||
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" must not have both a "prefix" attribute and <prefix> child nodes.', $path));
|
||||
|
||||
@@ -62,7 +62,7 @@ class YamlFileLoader extends FileLoader
|
||||
try {
|
||||
$parsedConfig = $this->yamlParser->parseFile($path, Yaml::PARSE_CONSTANT);
|
||||
} catch (ParseException $e) {
|
||||
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e);
|
||||
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: ', $path).$e->getMessage(), 0, $e);
|
||||
}
|
||||
|
||||
$collection = new RouteCollection();
|
||||
@@ -96,7 +96,7 @@ class YamlFileLoader extends FileLoader
|
||||
*/
|
||||
public function supports($resource, $type = null)
|
||||
{
|
||||
return \is_string($resource) && \in_array(pathinfo($resource, PATHINFO_EXTENSION), ['yml', 'yaml'], true) && (!$type || 'yaml' === $type);
|
||||
return \is_string($resource) && \in_array(pathinfo($resource, \PATHINFO_EXTENSION), ['yml', 'yaml'], true) && (!$type || 'yaml' === $type);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,7 +118,7 @@ class YamlFileLoader extends FileLoader
|
||||
|
||||
foreach ($requirements as $placeholder => $requirement) {
|
||||
if (\is_int($placeholder)) {
|
||||
@trigger_error(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s"?', $placeholder, $requirement, $name, $path), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s"?', $placeholder, $requirement, $name, $path), \E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,6 @@ class CompiledUrlMatcher extends UrlMatcher
|
||||
public function __construct(array $compiledRoutes, RequestContext $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
list($this->matchHost, $this->staticRoutes, $this->regexpList, $this->dynamicRoutes, $this->checkCondition) = $compiledRoutes;
|
||||
[$this->matchHost, $this->staticRoutes, $this->regexpList, $this->dynamicRoutes, $this->checkCondition] = $compiledRoutes;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ EOF;
|
||||
$routes = $this->getRoutes();
|
||||
}
|
||||
|
||||
list($staticRoutes, $dynamicRoutes) = $this->groupStaticRoutes($routes);
|
||||
[$staticRoutes, $dynamicRoutes] = $this->groupStaticRoutes($routes);
|
||||
|
||||
$conditions = [null];
|
||||
$compiledRoutes[] = $this->compileStaticRoutes($staticRoutes, $conditions);
|
||||
@@ -131,7 +131,7 @@ EOF;
|
||||
|
||||
private function generateCompiledRoutes(): string
|
||||
{
|
||||
list($matchHost, $staticRoutes, $regexpCode, $dynamicRoutes, $checkConditionCode) = $this->getCompiledRoutes(true);
|
||||
[$matchHost, $staticRoutes, $regexpCode, $dynamicRoutes, $checkConditionCode] = $this->getCompiledRoutes(true);
|
||||
|
||||
$code = self::export($matchHost).', // $matchHost'."\n";
|
||||
|
||||
@@ -186,7 +186,7 @@ EOF;
|
||||
if ($hasTrailingSlash) {
|
||||
$url = substr($url, 0, -1);
|
||||
}
|
||||
foreach ($dynamicRegex as list($hostRx, $rx, $prefix)) {
|
||||
foreach ($dynamicRegex as [$hostRx, $rx, $prefix]) {
|
||||
if (('' === $prefix || 0 === strpos($url, $prefix)) && (preg_match($rx, $url) || preg_match($rx, $url.'/')) && (!$host || !$hostRx || preg_match($hostRx, $host))) {
|
||||
$dynamicRegex[] = [$hostRegex, $regex, $staticPrefix];
|
||||
$dynamicRoutes->add($name, $route);
|
||||
@@ -221,7 +221,7 @@ EOF;
|
||||
|
||||
foreach ($staticRoutes as $url => $routes) {
|
||||
$compiledRoutes[$url] = [];
|
||||
foreach ($routes as $name => list($route, $hasTrailingSlash)) {
|
||||
foreach ($routes as $name => [$route, $hasTrailingSlash]) {
|
||||
$compiledRoutes[$url][] = $this->compileRoute($route, $name, (!$route->compile()->getHostVariables() ? $route->getHost() : $route->compile()->getHostRegex()) ?: null, $hasTrailingSlash, false, $conditions);
|
||||
}
|
||||
}
|
||||
@@ -242,9 +242,9 @@ EOF;
|
||||
* Paths that can match two or more routes, or have user-specified conditions are put in separate switch's cases.
|
||||
*
|
||||
* Last but not least:
|
||||
* - Because it is not possibe to mix unicode/non-unicode patterns in a single regexp, several of them can be generated.
|
||||
* - Because it is not possible to mix unicode/non-unicode patterns in a single regexp, several of them can be generated.
|
||||
* - The same regexp can be used several times when the logic in the switch rejects the match. When this happens, the
|
||||
* matching-but-failing subpattern is blacklisted by replacing its name by "(*F)", which forces a failure-to-match.
|
||||
* matching-but-failing subpattern is excluded by replacing its name by "(*F)", which forces a failure-to-match.
|
||||
* To ease this backlisting operation, the name of subpatterns is also the string offset where the replacement should occur.
|
||||
*/
|
||||
private function compileDynamicRoutes(RouteCollection $collection, bool $matchHost, int $chunkLimit, array &$conditions): array
|
||||
@@ -287,7 +287,7 @@ EOF;
|
||||
$routes->add($name, $route);
|
||||
}
|
||||
|
||||
foreach ($perModifiers as list($modifiers, $routes)) {
|
||||
foreach ($perModifiers as [$modifiers, $routes]) {
|
||||
$prev = false;
|
||||
$perHost = [];
|
||||
foreach ($routes->all() as $name => $route) {
|
||||
@@ -306,7 +306,7 @@ EOF;
|
||||
$state->mark += \strlen($rx);
|
||||
$state->regex = $rx;
|
||||
|
||||
foreach ($perHost as list($hostRegex, $routes)) {
|
||||
foreach ($perHost as [$hostRegex, $routes]) {
|
||||
if ($matchHost) {
|
||||
if ($hostRegex) {
|
||||
preg_match('#^.\^(.*)\$.[a-zA-Z]*$#', $hostRegex, $rx);
|
||||
@@ -391,7 +391,7 @@ EOF;
|
||||
continue;
|
||||
}
|
||||
|
||||
list($name, $regex, $vars, $route, $hasTrailingSlash, $hasTrailingVar) = $route;
|
||||
[$name, $regex, $vars, $route, $hasTrailingSlash, $hasTrailingVar] = $route;
|
||||
$compiledRoute = $route->compile();
|
||||
$vars = array_merge($state->hostVars, $vars);
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ trait CompiledUrlMatcherTrait
|
||||
}
|
||||
$supportsRedirections = 'GET' === $canonicalMethod && $this instanceof RedirectableUrlMatcherInterface;
|
||||
|
||||
foreach ($this->staticRoutes[$trimmedPathinfo] ?? [] as list($ret, $requiredHost, $requiredMethods, $requiredSchemes, $hasTrailingSlash, , $condition)) {
|
||||
foreach ($this->staticRoutes[$trimmedPathinfo] ?? [] as [$ret, $requiredHost, $requiredMethods, $requiredSchemes, $hasTrailingSlash, , $condition]) {
|
||||
if ($condition && !($this->checkCondition)($condition, $context, 0 < $condition ? $request ?? $request = $this->request ?: $this->createRequest($pathinfo) : null)) {
|
||||
continue;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ trait CompiledUrlMatcherTrait
|
||||
|
||||
foreach ($this->regexpList as $offset => $regex) {
|
||||
while (preg_match($regex, $matchedPathinfo, $matches)) {
|
||||
foreach ($this->dynamicRoutes[$m = (int) $matches['MARK']] as list($ret, $vars, $requiredMethods, $requiredSchemes, $hasTrailingSlash, $hasTrailingVar, $condition)) {
|
||||
foreach ($this->dynamicRoutes[$m = (int) $matches['MARK']] as [$ret, $vars, $requiredMethods, $requiredSchemes, $hasTrailingSlash, $hasTrailingVar, $condition]) {
|
||||
if (null !== $condition) {
|
||||
if (0 === $condition) { // marks the last route in the regexp
|
||||
continue 3;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Routing\Matcher\Dumper;
|
||||
|
||||
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "CompiledUrlMatcherDumper" instead.', PhpMatcherDumper::class), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "CompiledUrlMatcherDumper" instead.', PhpMatcherDumper::class), \E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* PhpMatcherDumper creates a PHP class able to match URLs for a given set of routes.
|
||||
|
||||
@@ -65,12 +65,12 @@ class StaticPrefixCollection
|
||||
*/
|
||||
public function addRoute(string $prefix, $route)
|
||||
{
|
||||
list($prefix, $staticPrefix) = $this->getCommonPrefix($prefix, $prefix);
|
||||
[$prefix, $staticPrefix] = $this->getCommonPrefix($prefix, $prefix);
|
||||
|
||||
for ($i = \count($this->items) - 1; 0 <= $i; --$i) {
|
||||
$item = $this->items[$i];
|
||||
|
||||
list($commonPrefix, $commonStaticPrefix) = $this->getCommonPrefix($prefix, $this->prefixes[$i]);
|
||||
[$commonPrefix, $commonStaticPrefix] = $this->getCommonPrefix($prefix, $this->prefixes[$i]);
|
||||
|
||||
if ($this->prefix === $commonPrefix) {
|
||||
// the new route and a previous one have no common prefix, let's see if they are exclusive to each others
|
||||
@@ -104,8 +104,8 @@ class StaticPrefixCollection
|
||||
} else {
|
||||
// the new route and a previous one have a common prefix, let's merge them
|
||||
$child = new self($commonPrefix);
|
||||
list($child->prefixes[0], $child->staticPrefixes[0]) = $child->getCommonPrefix($this->prefixes[$i], $this->prefixes[$i]);
|
||||
list($child->prefixes[1], $child->staticPrefixes[1]) = $child->getCommonPrefix($prefix, $prefix);
|
||||
[$child->prefixes[0], $child->staticPrefixes[0]] = $child->getCommonPrefix($this->prefixes[$i], $this->prefixes[$i]);
|
||||
[$child->prefixes[1], $child->staticPrefixes[1]] = $child->getCommonPrefix($prefix, $prefix);
|
||||
$child->items = [$this->items[$i], $route];
|
||||
|
||||
$this->staticPrefixes[$i] = $commonStaticPrefix;
|
||||
|
||||
2
vendor/symfony/routing/Route.php
vendored
2
vendor/symfony/routing/Route.php
vendored
@@ -137,7 +137,7 @@ class Route implements \Serializable
|
||||
public function setPath($pattern)
|
||||
{
|
||||
if (false !== strpbrk($pattern, '?<')) {
|
||||
$pattern = preg_replace_callback('#\{(\w++)(<.*?>)?(\?[^\}]*+)?\}#', function ($m) {
|
||||
$pattern = preg_replace_callback('#\{(!?\w++)(<.*?>)?(\?[^\}]*+)?\}#', function ($m) {
|
||||
if (isset($m[3][0])) {
|
||||
$this->setDefault($m[1], '?' !== $m[3] ? substr($m[3], 1) : null);
|
||||
}
|
||||
|
||||
2
vendor/symfony/routing/RouteCollection.php
vendored
2
vendor/symfony/routing/RouteCollection.php
vendored
@@ -140,7 +140,7 @@ class RouteCollection implements \IteratorAggregate, \Countable
|
||||
public function addPrefix($prefix, array $defaults = [], array $requirements = [])
|
||||
{
|
||||
if (null === $prefix) {
|
||||
@trigger_error(sprintf('Passing null as $prefix to %s is deprecated in Symfony 4.4 and will trigger a TypeError in 5.0.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Passing null as $prefix to %s is deprecated in Symfony 4.4 and will trigger a TypeError in 5.0.', __METHOD__), \E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$prefix = trim(trim($prefix), '/');
|
||||
|
||||
4
vendor/symfony/routing/RouteCompiler.php
vendored
4
vendor/symfony/routing/RouteCompiler.php
vendored
@@ -119,7 +119,7 @@ class RouteCompiler implements RouteCompilerInterface
|
||||
|
||||
// Match all variables enclosed in "{}" and iterate over them. But we only want to match the innermost variable
|
||||
// in case of nested "{}", e.g. {foo{bar}}. This in ensured because \w does not match "{" or "}" itself.
|
||||
preg_match_all('#\{(!)?(\w+)\}#', $pattern, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
|
||||
preg_match_all('#\{(!)?(\w+)\}#', $pattern, $matches, \PREG_OFFSET_CAPTURE | \PREG_SET_ORDER);
|
||||
foreach ($matches as $match) {
|
||||
$important = $match[1][1] >= 0;
|
||||
$varName = $match[2][0];
|
||||
@@ -207,7 +207,7 @@ class RouteCompiler implements RouteCompilerInterface
|
||||
}
|
||||
|
||||
// find the first optional token
|
||||
$firstOptional = PHP_INT_MAX;
|
||||
$firstOptional = \PHP_INT_MAX;
|
||||
if (!$isHost) {
|
||||
for ($i = \count($tokens) - 1; $i >= 0; --$i) {
|
||||
$token = $tokens[$i];
|
||||
|
||||
4
vendor/symfony/routing/Router.php
vendored
4
vendor/symfony/routing/Router.php
vendored
@@ -433,13 +433,13 @@ class Router implements RouterInterface, RequestMatcherInterface
|
||||
case 'generator_cache_class':
|
||||
case 'matcher_base_class':
|
||||
case 'matcher_cache_class':
|
||||
@trigger_error(sprintf('Option "%s" given to router %s is deprecated since Symfony 4.3.', $key, static::class), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Option "%s" given to router %s is deprecated since Symfony 4.3.', $key, static::class), \E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
|
||||
private static function getCompiledRoutes(string $path): array
|
||||
{
|
||||
if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), FILTER_VALIDATE_BOOLEAN))) {
|
||||
if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) {
|
||||
self::$cache = null;
|
||||
}
|
||||
|
||||
|
||||
9
vendor/symfony/routing/composer.json
vendored
9
vendor/symfony/routing/composer.json
vendored
@@ -16,7 +16,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.1.3"
|
||||
"php": ">=7.1.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": "^4.2|^5.0",
|
||||
@@ -45,10 +45,5 @@
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.4-dev"
|
||||
}
|
||||
}
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user