Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
@@ -13,6 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
class AddConstraintValidatorsPass implements CompilerPassInterface
{
@@ -28,7 +29,17 @@ class AddConstraintValidatorsPass implements CompilerPassInterface
$validators[$attributes[0]['alias']] = $id;
}
$validators[$container->getDefinition($id)->getClass()] = $id;
$definition = $container->getDefinition($id);
if (!$definition->isPublic()) {
throw new InvalidArgumentException(sprintf('The service "%s" must be public as it can be lazy-loaded.', $id));
}
if ($definition->isAbstract()) {
throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as it can be lazy-loaded.', $id));
}
$validators[$definition->getClass()] = $id;
}
$container->getDefinition('validator.validator_factory')->replaceArgument(1, $validators);