Upgrade framework

This commit is contained in:
2023-11-14 16:54:35 +01:00
parent 1648a5cd42
commit 4fcf6fffcc
10548 changed files with 693138 additions and 466698 deletions

View File

@@ -11,9 +11,10 @@
namespace Symfony\Component\Routing\DependencyInjection;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
/**
* Adds tagged routing.loader services to routing.resolver service.
@@ -22,25 +23,18 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
*/
class RoutingResolverPass implements CompilerPassInterface
{
private $resolverServiceId;
private $loaderTag;
public function __construct($resolverServiceId = 'routing.resolver', $loaderTag = 'routing.loader')
{
$this->resolverServiceId = $resolverServiceId;
$this->loaderTag = $loaderTag;
}
use PriorityTaggedServiceTrait;
public function process(ContainerBuilder $container)
{
if (false === $container->hasDefinition($this->resolverServiceId)) {
if (false === $container->hasDefinition('routing.resolver')) {
return;
}
$definition = $container->getDefinition($this->resolverServiceId);
$definition = $container->getDefinition('routing.resolver');
foreach ($container->findTaggedServiceIds($this->loaderTag, true) as $id => $attributes) {
$definition->addMethodCall('addLoader', array(new Reference($id)));
foreach ($this->findAndSortTaggedServices('routing.loader', $container) as $id) {
$definition->addMethodCall('addLoader', [new Reference($id)]);
}
}
}