Update dependencies

This commit is contained in:
Chris Hunt
2024-02-16 21:36:54 +00:00
parent 22d7a59e59
commit d52ae0d3c3
9569 changed files with 460443 additions and 282416 deletions

View File

@@ -0,0 +1,36 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Routing\DependencyInjection;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
/**
* Registers the expression language providers.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class AddExpressionLanguageProvidersPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container): void
{
if (!$container->has('router.default')) {
return;
}
$definition = $container->findDefinition('router.default');
foreach ($container->findTaggedServiceIds('routing.expression_language_provider', true) as $id => $attributes) {
$definition->addMethodCall('addExpressionLanguageProvider', [new Reference($id)]);
}
}
}

View File

@@ -25,28 +25,18 @@ class RoutingResolverPass implements CompilerPassInterface
{
use PriorityTaggedServiceTrait;
private $resolverServiceId;
private $loaderTag;
public function __construct(string $resolverServiceId = 'routing.resolver', string $loaderTag = 'routing.loader')
{
if (0 < \func_num_args()) {
trigger_deprecation('symfony/routing', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
}
$this->resolverServiceId = $resolverServiceId;
$this->loaderTag = $loaderTag;
}
/**
* @return void
*/
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 ($this->findAndSortTaggedServices($this->loaderTag, $container) as $id) {
foreach ($this->findAndSortTaggedServices('routing.loader', $container) as $id) {
$definition->addMethodCall('addLoader', [new Reference($id)]);
}
}