mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 14:38:47 +02:00
N°5809 Update Symfony artifacts from 6.4.0 to 6.4.2
symfony/console symfony/dotenv symfony/framework-bundle symfony/http-foundation symfony/http-kernel symfony/var-dumper symfony/web-profiler-bundle
This commit is contained in:
@@ -19,7 +19,7 @@ if (false) {
|
||||
/**
|
||||
* @deprecated since Symfony 6.4, to be removed in 7.0, use {@link AttributeClassLoader} instead
|
||||
*/
|
||||
class AnnotationClassLoader
|
||||
abstract class AnnotationClassLoader extends AttributeClassLoader
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ if (false) {
|
||||
/**
|
||||
* @deprecated since Symfony 6.4, to be removed in 7.0, use {@link AttributeDirectoryLoader} instead
|
||||
*/
|
||||
class AnnotationDirectoryLoader
|
||||
class AnnotationDirectoryLoader extends AttributeDirectoryLoader
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ if (false) {
|
||||
/**
|
||||
* @deprecated since Symfony 6.4, to be removed in 7.0, use {@link AttributeFileLoader} instead
|
||||
*/
|
||||
class AnnotationFileLoader
|
||||
class AnnotationFileLoader extends AttributeFileLoader
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,9 @@ abstract class AttributeClassLoader implements LoaderInterface
|
||||
|
||||
if (1 === $collection->count() - \count($routeNamesBefore)) {
|
||||
$newRouteName = current(array_diff(array_keys($collection->all()), $routeNamesBefore));
|
||||
$collection->addAlias(sprintf('%s::%s', $class->name, $method->name), $newRouteName);
|
||||
if ($newRouteName !== $aliasName = sprintf('%s::%s', $class->name, $method->name)) {
|
||||
$collection->addAlias($aliasName, $newRouteName);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (0 === $collection->count() && $class->hasMethod('__invoke')) {
|
||||
@@ -155,8 +157,14 @@ abstract class AttributeClassLoader implements LoaderInterface
|
||||
}
|
||||
}
|
||||
if ($fqcnAlias && 1 === $collection->count()) {
|
||||
$collection->addAlias($class->name, $invokeRouteName = key($collection->all()));
|
||||
$collection->addAlias(sprintf('%s::__invoke', $class->name), $invokeRouteName);
|
||||
$invokeRouteName = key($collection->all());
|
||||
if ($invokeRouteName !== $class->name) {
|
||||
$collection->addAlias($class->name, $invokeRouteName);
|
||||
}
|
||||
|
||||
if ($invokeRouteName !== $aliasName = sprintf('%s::__invoke', $class->name)) {
|
||||
$collection->addAlias($aliasName, $invokeRouteName);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->hasDeprecatedAnnotations) {
|
||||
|
||||
@@ -147,9 +147,24 @@ class RouteCollection implements \IteratorAggregate, \Countable
|
||||
*/
|
||||
public function remove(string|array $name)
|
||||
{
|
||||
$routes = [];
|
||||
foreach ((array) $name as $n) {
|
||||
if (isset($this->routes[$n])) {
|
||||
$routes[] = $n;
|
||||
}
|
||||
|
||||
unset($this->routes[$n], $this->priorities[$n], $this->aliases[$n]);
|
||||
}
|
||||
|
||||
if (!$routes) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($this->aliases as $k => $alias) {
|
||||
if (\in_array($alias->getId(), $routes, true)) {
|
||||
unset($this->aliases[$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user