Re-dump autoloader and composer.lock

This commit is contained in:
Stephen Abello
2025-09-18 10:26:38 +02:00
parent 7e515e7216
commit edbe4974ac
613 changed files with 5661 additions and 4259 deletions

View File

@@ -41,7 +41,7 @@ class LoggingTranslatorPass implements CompilerPassInterface
$class = $container->getParameterBag()->resolveValue($definition->getClass());
if (!$r = $container->getReflectionClass($class)) {
throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $translatorAlias));
throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $translatorAlias));
}
if ($r->isSubclassOf(TranslatorInterface::class) && $r->isSubclassOf(TranslatorBagInterface::class)) {
$container->getDefinition('translator.logging')->setDecoratedService('translator');

View File

@@ -45,7 +45,7 @@ class ProfilerPass implements CompilerPassInterface
if (isset($attributes[0]['template']) || is_subclass_of($collectorClass, TemplateAwareDataCollectorInterface::class)) {
$idForTemplate = $attributes[0]['id'] ?? $collectorClass;
if (!$idForTemplate) {
throw new InvalidArgumentException(sprintf('Data collector service "%s" must have an id attribute in order to specify a template.', $id));
throw new InvalidArgumentException(\sprintf('Data collector service "%s" must have an id attribute in order to specify a template.', $id));
}
$template = [$idForTemplate, $attributes[0]['template'] ?? $collectorClass::getTemplate()];
}

View File

@@ -132,9 +132,9 @@ class UnusedTagsPass implements CompilerPassInterface
}
$services = array_keys($container->findTaggedServiceIds($tag));
$message = sprintf('Tag "%s" was defined on service(s) "%s", but was never used.', $tag, implode('", "', $services));
$message = \sprintf('Tag "%s" was defined on service(s) "%s", but was never used.', $tag, implode('", "', $services));
if ($candidates) {
$message .= sprintf(' Did you mean "%s"?', implode('", "', $candidates));
$message .= \sprintf(' Did you mean "%s"?', implode('", "', $candidates));
}
$container->log($this, $message);

View File

@@ -45,7 +45,7 @@ class WorkflowGuardListenerPass implements CompilerPassInterface
foreach ($servicesNeeded as $service) {
if (!$container->has($service)) {
throw new LogicException(sprintf('The "%s" service is needed to be able to use the workflow guard listener.', $service));
throw new LogicException(\sprintf('The "%s" service is needed to be able to use the workflow guard listener.', $service));
}
}
}

View File

@@ -45,7 +45,6 @@ use Symfony\Component\Serializer\Encoder\JsonDecode;
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Uid\Factory\UuidFactory;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Validation;
use Symfony\Component\Webhook\Controller\WebhookController;
use Symfony\Component\WebLink\HttpHeaderSerializer;
@@ -374,7 +373,7 @@ class Configuration implements ConfigurationInterface
foreach ($workflows as $key => $workflow) {
if (isset($workflow['enabled']) && false === $workflow['enabled']) {
throw new LogicException(sprintf('Cannot disable a single workflow. Remove the configuration for the workflow "%s" instead.', $key));
throw new LogicException(\sprintf('Cannot disable a single workflow. Remove the configuration for the workflow "%s" instead.', $key));
}
unset($workflows[$key]['enabled']);
@@ -1067,7 +1066,7 @@ class Configuration implements ConfigurationInterface
->validate()->castToArray()->end()
->end()
->scalarNode('translation_domain')->defaultValue('validators')->end()
->enumNode('email_validation_mode')->values(array_merge(class_exists(Email::class) ? Email::VALIDATION_MODES : ['html5-allow-no-tld', 'html5', 'strict'], ['loose']))->end()
->enumNode('email_validation_mode')->values(['html5', 'html5-allow-no-tld', 'strict', 'loose'])->end()
->arrayNode('mapping')
->addDefaultsIfNotSet()
->fixXmlConfig('path')
@@ -1426,7 +1425,7 @@ class Configuration implements ConfigurationInterface
->info('The level of log message. Null to let Symfony decide.')
->validate()
->ifTrue(fn ($v) => null !== $v && !\in_array($v, $logLevels, true))
->thenInvalid(sprintf('The log level is not valid. Pick one among "%s".', implode('", "', $logLevels)))
->thenInvalid(\sprintf('The log level is not valid. Pick one among "%s".', implode('", "', $logLevels)))
->end()
->defaultNull()
->end()
@@ -1594,7 +1593,7 @@ class Configuration implements ConfigurationInterface
->end()
->validate()
->ifTrue(fn ($v) => isset($v['buses']) && null !== $v['default_bus'] && !isset($v['buses'][$v['default_bus']]))
->then(fn ($v) => throw new InvalidConfigurationException(sprintf('The specified default bus "%s" is not configured. Available buses are "%s".', $v['default_bus'], implode('", "', array_keys($v['buses'])))))
->then(fn ($v) => throw new InvalidConfigurationException(\sprintf('The specified default bus "%s" is not configured. Available buses are "%s".', $v['default_bus'], implode('", "', array_keys($v['buses'])))))
->end()
->children()
->arrayNode('routing')

View File

@@ -679,7 +679,7 @@ class FrameworkExtension extends Extension
$tagAttributes = get_object_vars($attribute);
if ($reflector instanceof \ReflectionMethod) {
if (isset($tagAttributes['method'])) {
throw new LogicException(sprintf('AsEventListener attribute cannot declare a method on "%s::%s()".', $reflector->class, $reflector->name));
throw new LogicException(\sprintf('AsEventListener attribute cannot declare a method on "%s::%s()".', $reflector->class, $reflector->name));
}
$tagAttributes['method'] = $reflector->getName();
}
@@ -697,7 +697,7 @@ class FrameworkExtension extends Extension
unset($tagAttributes['fromTransport']);
if ($reflector instanceof \ReflectionMethod) {
if (isset($tagAttributes['method'])) {
throw new LogicException(sprintf('AsMessageHandler attribute cannot declare a method on "%s::%s()".', $reflector->class, $reflector->name));
throw new LogicException(\sprintf('AsMessageHandler attribute cannot declare a method on "%s::%s()".', $reflector->class, $reflector->name));
}
$tagAttributes['method'] = $reflector->getName();
}
@@ -721,7 +721,7 @@ class FrameworkExtension extends Extension
];
if ($reflector instanceof \ReflectionMethod) {
if (isset($tagAttributes['method'])) {
throw new LogicException(sprintf('"%s" attribute cannot declare a method on "%s::%s()".', $attribute::class, $reflector->class, $reflector->name));
throw new LogicException(\sprintf('"%s" attribute cannot declare a method on "%s::%s()".', $attribute::class, $reflector->class, $reflector->name));
}
$tagAttributes['method'] = $reflector->getName();
}
@@ -908,7 +908,7 @@ class FrameworkExtension extends Extension
// Choose storage class based on the DSN
[$class] = explode(':', $config['dsn'], 2);
if ('file' !== $class) {
throw new \LogicException(sprintf('Driver "%s" is not supported for the profiler.', $class));
throw new \LogicException(\sprintf('Driver "%s" is not supported for the profiler.', $class));
}
$container->setParameter('profiler.storage.dsn', $config['dsn']);
@@ -947,7 +947,7 @@ class FrameworkExtension extends Extension
foreach ($config['workflows'] as $name => $workflow) {
$type = $workflow['type'];
$workflowId = sprintf('%s.%s', $type, $name);
$workflowId = \sprintf('%s.%s', $type, $name);
// Process Metadata (workflow + places (transition is done in the "create transition" block))
$metadataStoreDefinition = new Definition(Workflow\Metadata\InMemoryMetadataStore::class, [[], [], null]);
@@ -973,18 +973,18 @@ class FrameworkExtension extends Extension
foreach ($workflow['transitions'] as $transition) {
if ('workflow' === $type) {
$transitionDefinition = new Definition(Workflow\Transition::class, [$transition['name'], $transition['from'], $transition['to']]);
$transitionId = sprintf('.%s.transition.%s', $workflowId, $transitionCounter++);
$transitionId = \sprintf('.%s.transition.%s', $workflowId, $transitionCounter++);
$container->setDefinition($transitionId, $transitionDefinition);
$transitions[] = new Reference($transitionId);
if (isset($transition['guard'])) {
$configuration = new Definition(Workflow\EventListener\GuardExpression::class);
$configuration->addArgument(new Reference($transitionId));
$configuration->addArgument($transition['guard']);
$eventName = sprintf('workflow.%s.guard.%s', $name, $transition['name']);
$eventName = \sprintf('workflow.%s.guard.%s', $name, $transition['name']);
$guardsConfiguration[$eventName][] = $configuration;
}
if ($transition['metadata']) {
$transitionsMetadataDefinition->addMethodCall('attach', [
$transitionsMetadataDefinition->addMethodCall('offsetSet', [
new Reference($transitionId),
$transition['metadata'],
]);
@@ -993,18 +993,18 @@ class FrameworkExtension extends Extension
foreach ($transition['from'] as $from) {
foreach ($transition['to'] as $to) {
$transitionDefinition = new Definition(Workflow\Transition::class, [$transition['name'], $from, $to]);
$transitionId = sprintf('.%s.transition.%s', $workflowId, $transitionCounter++);
$transitionId = \sprintf('.%s.transition.%s', $workflowId, $transitionCounter++);
$container->setDefinition($transitionId, $transitionDefinition);
$transitions[] = new Reference($transitionId);
if (isset($transition['guard'])) {
$configuration = new Definition(Workflow\EventListener\GuardExpression::class);
$configuration->addArgument(new Reference($transitionId));
$configuration->addArgument($transition['guard']);
$eventName = sprintf('workflow.%s.guard.%s', $name, $transition['name']);
$eventName = \sprintf('workflow.%s.guard.%s', $name, $transition['name']);
$guardsConfiguration[$eventName][] = $configuration;
}
if ($transition['metadata']) {
$transitionsMetadataDefinition->addMethodCall('attach', [
$transitionsMetadataDefinition->addMethodCall('offsetSet', [
new Reference($transitionId),
$transition['metadata'],
]);
@@ -1014,7 +1014,7 @@ class FrameworkExtension extends Extension
}
}
$metadataStoreDefinition->replaceArgument(2, $transitionsMetadataDefinition);
$container->setDefinition(sprintf('%s.metadata_store', $workflowId), $metadataStoreDefinition);
$container->setDefinition(\sprintf('%s.metadata_store', $workflowId), $metadataStoreDefinition);
// Create places
$places = array_column($workflow['places'], 'name');
@@ -1025,7 +1025,7 @@ class FrameworkExtension extends Extension
$definitionDefinition->addArgument($places);
$definitionDefinition->addArgument($transitions);
$definitionDefinition->addArgument($initialMarking);
$definitionDefinition->addArgument(new Reference(sprintf('%s.metadata_store', $workflowId)));
$definitionDefinition->addArgument(new Reference(\sprintf('%s.metadata_store', $workflowId)));
// Create MarkingStore
$markingStoreDefinition = null;
@@ -1040,8 +1040,8 @@ class FrameworkExtension extends Extension
}
// Create Workflow
$workflowDefinition = new ChildDefinition(sprintf('%s.abstract', $type));
$workflowDefinition->replaceArgument(0, new Reference(sprintf('%s.definition', $workflowId)));
$workflowDefinition = new ChildDefinition(\sprintf('%s.abstract', $type));
$workflowDefinition->replaceArgument(0, new Reference(\sprintf('%s.definition', $workflowId)));
$workflowDefinition->replaceArgument(1, $markingStoreDefinition);
$workflowDefinition->replaceArgument(3, $name);
$workflowDefinition->replaceArgument(4, $workflow['events_to_dispatch']);
@@ -1055,7 +1055,7 @@ class FrameworkExtension extends Extension
// Store to container
$container->setDefinition($workflowId, $workflowDefinition);
$container->setDefinition(sprintf('%s.definition', $workflowId), $definitionDefinition);
$container->setDefinition(\sprintf('%s.definition', $workflowId), $definitionDefinition);
$container->registerAliasForArgument($workflowId, WorkflowInterface::class, $name.'.'.$type);
$container->registerAliasForArgument($workflowId, WorkflowInterface::class, $name);
@@ -1084,11 +1084,11 @@ class FrameworkExtension extends Extension
if ($workflow['audit_trail']['enabled']) {
$listener = new Definition(Workflow\EventListener\AuditTrailListener::class);
$listener->addTag('monolog.logger', ['channel' => 'workflow']);
$listener->addTag('kernel.event_listener', ['event' => sprintf('workflow.%s.leave', $name), 'method' => 'onLeave']);
$listener->addTag('kernel.event_listener', ['event' => sprintf('workflow.%s.transition', $name), 'method' => 'onTransition']);
$listener->addTag('kernel.event_listener', ['event' => sprintf('workflow.%s.enter', $name), 'method' => 'onEnter']);
$listener->addTag('kernel.event_listener', ['event' => \sprintf('workflow.%s.leave', $name), 'method' => 'onLeave']);
$listener->addTag('kernel.event_listener', ['event' => \sprintf('workflow.%s.transition', $name), 'method' => 'onTransition']);
$listener->addTag('kernel.event_listener', ['event' => \sprintf('workflow.%s.enter', $name), 'method' => 'onEnter']);
$listener->addArgument(new Reference('logger'));
$container->setDefinition(sprintf('.%s.listener.audit_trail', $workflowId), $listener);
$container->setDefinition(\sprintf('.%s.listener.audit_trail', $workflowId), $listener);
}
// Add Guard Listener
@@ -1116,7 +1116,7 @@ class FrameworkExtension extends Extension
$guard->addTag('kernel.event_listener', ['event' => $eventName, 'method' => 'onTransition']);
}
$container->setDefinition(sprintf('.%s.listener.guard', $workflowId), $guard);
$container->setDefinition(\sprintf('.%s.listener.guard', $workflowId), $guard);
$container->setParameter('workflow.has_guard_listeners', true);
}
}
@@ -1136,7 +1136,7 @@ class FrameworkExtension extends Extension
$tagAttributes = get_object_vars($attribute);
if ($reflector instanceof \ReflectionMethod) {
if (isset($tagAttributes['method'])) {
throw new LogicException(sprintf('"%s" attribute cannot declare a method on "%s::%s()".', $attribute::class, $reflector->class, $reflector->name));
throw new LogicException(\sprintf('"%s" attribute cannot declare a method on "%s::%s()".', $attribute::class, $reflector->class, $reflector->name));
}
$tagAttributes['method'] = $reflector->getName();
}
@@ -1349,7 +1349,7 @@ class FrameworkExtension extends Extension
$paths = $config['paths'];
foreach ($container->getParameter('kernel.bundles_metadata') as $name => $bundle) {
if ($container->fileExists($dir = $bundle['path'].'/Resources/public') || $container->fileExists($dir = $bundle['path'].'/public')) {
$paths[$dir] = sprintf('bundles/%s', preg_replace('/bundle$/', '', strtolower($name)));
$paths[$dir] = \sprintf('bundles/%s', preg_replace('/bundle$/', '', strtolower($name)));
}
}
$excludedPathPatterns = [];
@@ -1525,7 +1525,7 @@ class FrameworkExtension extends Extension
if ($container->fileExists($dir)) {
$dirs[] = $transPaths[] = $dir;
} else {
throw new \UnexpectedValueException(sprintf('"%s" defined in translator.paths does not exist or is not a directory.', $dir));
throw new \UnexpectedValueException(\sprintf('"%s" defined in translator.paths does not exist or is not a directory.', $dir));
}
}
@@ -1609,7 +1609,7 @@ class FrameworkExtension extends Extension
foreach ($classToServices as $class => $service) {
$package = substr($service, \strlen('translation.provider_factory.'));
if (!$container->hasDefinition('http_client') || !ContainerBuilder::willBeAvailable(sprintf('symfony/%s-translation-provider', $package), $class, $parentPackages)) {
if (!$container->hasDefinition('http_client') || !ContainerBuilder::willBeAvailable(\sprintf('symfony/%s-translation-provider', $package), $class, $parentPackages)) {
$container->removeDefinition($service);
}
}
@@ -1770,11 +1770,11 @@ class FrameworkExtension extends Extension
$container->addResource(new DirectoryResource($path, '/^$/'));
} elseif ($container->fileExists($path, false)) {
if (!preg_match('/\.(xml|ya?ml)$/', $path, $matches)) {
throw new \RuntimeException(sprintf('Unsupported mapping type in "%s", supported types are XML & Yaml.', $path));
throw new \RuntimeException(\sprintf('Unsupported mapping type in "%s", supported types are XML & Yaml.', $path));
}
$fileRecorder($matches[1], $path);
} else {
throw new \RuntimeException(sprintf('Could not open file or directory "%s".', $path));
throw new \RuntimeException(\sprintf('Could not open file or directory "%s".', $path));
}
}
}
@@ -1810,7 +1810,7 @@ class FrameworkExtension extends Extension
$cacheDir = $container->getParameterBag()->resolveValue($config['file_cache_dir']);
if (!is_dir($cacheDir) && false === @mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) {
throw new \RuntimeException(sprintf('Could not create cache directory "%s".', $cacheDir));
throw new \RuntimeException(\sprintf('Could not create cache directory "%s".', $cacheDir));
}
$container
@@ -1882,7 +1882,7 @@ class FrameworkExtension extends Extension
if ($config['decryption_env_var']) {
if (!preg_match('/^(?:[-.\w\\\\]*+:)*+\w++$/', $config['decryption_env_var'])) {
throw new InvalidArgumentException(sprintf('Invalid value "%s" set as "decryption_env_var": only "word" characters are allowed.', $config['decryption_env_var']));
throw new InvalidArgumentException(\sprintf('Invalid value "%s" set as "decryption_env_var": only "word" characters are allowed.', $config['decryption_env_var']));
}
if (ContainerBuilder::willBeAvailable('symfony/string', LazyString::class, ['symfony/framework-bundle'])) {
@@ -2260,7 +2260,7 @@ class FrameworkExtension extends Extension
$failureTransports = [];
if ($config['failure_transport']) {
if (!isset($config['transports'][$config['failure_transport']])) {
throw new LogicException(sprintf('Invalid Messenger configuration: the failure transport "%s" is not a valid transport or service id.', $config['failure_transport']));
throw new LogicException(\sprintf('Invalid Messenger configuration: the failure transport "%s" is not a valid transport or service id.', $config['failure_transport']));
}
$container->setAlias('messenger.failure_transports.default', 'messenger.transport.'.$config['failure_transport']);
@@ -2300,7 +2300,7 @@ class FrameworkExtension extends Extension
if (null !== $transport['retry_strategy']['service']) {
$transportRetryReferences[$name] = new Reference($transport['retry_strategy']['service']);
} else {
$retryServiceId = sprintf('messenger.retry.multiplier_retry_strategy.%s', $name);
$retryServiceId = \sprintf('messenger.retry.multiplier_retry_strategy.%s', $name);
$retryDefinition = new ChildDefinition('messenger.retry.abstract_multiplier_retry_strategy');
$retryDefinition
->replaceArgument(0, $transport['retry_strategy']['max_retries'])
@@ -2334,7 +2334,7 @@ class FrameworkExtension extends Extension
foreach ($config['transports'] as $name => $transport) {
if ($transport['failure_transport']) {
if (!isset($senderReferences[$transport['failure_transport']])) {
throw new LogicException(sprintf('Invalid Messenger configuration: the failure transport "%s" is not a valid transport or service id.', $transport['failure_transport']));
throw new LogicException(\sprintf('Invalid Messenger configuration: the failure transport "%s" is not a valid transport or service id.', $transport['failure_transport']));
}
}
}
@@ -2345,16 +2345,16 @@ class FrameworkExtension extends Extension
foreach ($config['routing'] as $message => $messageConfiguration) {
if ('*' !== $message && !class_exists($message) && !interface_exists($message, false) && !preg_match('/^(?:[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+\\\\)++\*$/', $message)) {
if (str_contains($message, '*')) {
throw new LogicException(sprintf('Invalid Messenger routing configuration: invalid namespace "%s" wildcard.', $message));
throw new LogicException(\sprintf('Invalid Messenger routing configuration: invalid namespace "%s" wildcard.', $message));
}
throw new LogicException(sprintf('Invalid Messenger routing configuration: class or interface "%s" not found.', $message));
throw new LogicException(\sprintf('Invalid Messenger routing configuration: class or interface "%s" not found.', $message));
}
// make sure senderAliases contains all senders
foreach ($messageConfiguration['senders'] as $sender) {
if (!isset($senderReferences[$sender])) {
throw new LogicException(sprintf('Invalid Messenger routing configuration: the "%s" class is being routed to a sender called "%s". This is not a valid transport or service id.', $message, $sender));
throw new LogicException(\sprintf('Invalid Messenger routing configuration: the "%s" class is being routed to a sender called "%s". This is not a valid transport or service id.', $message, $sender));
}
}
@@ -2555,7 +2555,7 @@ class FrameworkExtension extends Extension
foreach ($config['scoped_clients'] as $name => $scopeConfig) {
if ($container->has($name)) {
throw new InvalidArgumentException(sprintf('Invalid scope name: "%s" is reserved.', $name));
throw new InvalidArgumentException(\sprintf('Invalid scope name: "%s" is reserved.', $name));
}
$scope = $scopeConfig['scope'] ?? null;
@@ -2692,7 +2692,7 @@ class FrameworkExtension extends Extension
foreach ($classToServices as $class => $service) {
$package = substr($service, \strlen('mailer.transport_factory.'));
if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-mailer', 'gmail' === $package ? 'google' : $package), $class, ['symfony/framework-bundle', 'symfony/mailer'])) {
if (!ContainerBuilder::willBeAvailable(\sprintf('symfony/%s-mailer', 'gmail' === $package ? 'google' : $package), $class, ['symfony/framework-bundle', 'symfony/mailer'])) {
$container->removeDefinition($service);
}
}
@@ -2709,7 +2709,7 @@ class FrameworkExtension extends Extension
foreach ($webhookRequestParsers as $class => $service) {
$package = substr($service, \strlen('mailer.webhook.request_parser.'));
if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-mailer', 'gmail' === $package ? 'google' : $package), $class, ['symfony/framework-bundle', 'symfony/mailer'])) {
if (!ContainerBuilder::willBeAvailable(\sprintf('symfony/%s-mailer', 'gmail' === $package ? 'google' : $package), $class, ['symfony/framework-bundle', 'symfony/mailer'])) {
$container->removeDefinition($service);
}
}
@@ -2882,7 +2882,7 @@ class FrameworkExtension extends Extension
foreach ($classToServices as $class => $service) {
$package = substr($service, \strlen('notifier.transport_factory.'));
if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-notifier', $package), $class, $parentPackages)) {
if (!ContainerBuilder::willBeAvailable(\sprintf('symfony/%s-notifier', $package), $class, $parentPackages)) {
$container->removeDefinition($service);
}
}
@@ -2938,7 +2938,7 @@ class FrameworkExtension extends Extension
foreach ($webhookRequestParsers as $class => $service) {
$package = substr($service, \strlen('notifier.webhook.request_parser.'));
if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-notifier', $package), $class, ['symfony/framework-bundle', 'symfony/notifier'])) {
if (!ContainerBuilder::willBeAvailable(\sprintf('symfony/%s-notifier', $package), $class, ['symfony/framework-bundle', 'symfony/notifier'])) {
$container->removeDefinition($service);
}
}
@@ -2987,11 +2987,11 @@ class FrameworkExtension extends Extension
if (null !== $limiterConfig['lock_factory']) {
if (!interface_exists(LockInterface::class)) {
throw new LogicException(sprintf('Rate limiter "%s" requires the Lock component to be installed. Try running "composer require symfony/lock".', $name));
throw new LogicException(\sprintf('Rate limiter "%s" requires the Lock component to be installed. Try running "composer require symfony/lock".', $name));
}
if (!$this->isInitializedConfigEnabled('lock')) {
throw new LogicException(sprintf('Rate limiter "%s" requires the Lock component to be configured.', $name));
throw new LogicException(\sprintf('Rate limiter "%s" requires the Lock component to be configured.', $name));
}
$limiter->replaceArgument(2, new Reference($limiterConfig['lock_factory']));
@@ -3028,10 +3028,10 @@ class FrameworkExtension extends Extension
if (null !== $limiterConfig['lock_factory']) {
if (!interface_exists(LockInterface::class)) {
throw new LogicException(sprintf('Rate limiter "%s" requires the Lock component to be installed. Try running "composer require symfony/lock".', $name));
throw new LogicException(\sprintf('Rate limiter "%s" requires the Lock component to be installed. Try running "composer require symfony/lock".', $name));
}
if (!$container->hasDefinition('lock.factory.abstract')) {
throw new LogicException(sprintf('Rate limiter "%s" requires the Lock component to be configured.', $name));
throw new LogicException(\sprintf('Rate limiter "%s" requires the Lock component to be configured.', $name));
}
$limiter->replaceArgument(2, new Reference($limiterConfig['lock_factory']));
@@ -3196,7 +3196,7 @@ class FrameworkExtension extends Extension
return $this->configsEnabled[$path];
}
throw new LogicException(sprintf('Can not read config enabled at "%s" because it has not been initialized.', $path));
throw new LogicException(\sprintf('Can not read config enabled at "%s" because it has not been initialized.', $path));
}
private function readConfigEnabled(string $path, ContainerBuilder $container, array $config): bool