diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6a3604dff7aad..72ea7cfa3e9c0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ | Q | A | ------------- | --- -| Branch? | 6.3 for features / 5.4, 6.0, 6.1, or 6.2 for bug fixes +| Branch? | 6.3 for features / 5.4 or 6.2 for bug fixes | Bug fix? | yes/no | New feature? | yes/no | Deprecations? | yes/no diff --git a/.github/expected-missing-return-types.diff b/.github/expected-missing-return-types.diff index c248018a4b9f6..ee5f8a0b05775 100644 --- a/.github/expected-missing-return-types.diff +++ b/.github/expected-missing-return-types.diff @@ -3,1094 +3,13882 @@ sed -i 's/ *"\*\*\/Tests\/"//' composer.json composer u -o SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.1' php .github/patch-types.php head=$(sed '/^diff /Q' .github/expected-missing-return-types.diff) +git checkout src/Symfony/Contracts/Service/ResetInterface.php (echo "$head" && echo && git diff -U2 src/) > .github/expected-missing-return-types.diff git checkout composer.json src/ -diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php -index bb5560a7b5..be86cbf98e 100644 ---- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php -+++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php -@@ -88,5 +88,5 @@ abstract class KernelTestCase extends TestCase - * @return Container +diff --git a/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php b/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php +index ada5fcbd49..51af652f08 100644 +--- a/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php ++++ b/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php +@@ -51,5 +51,5 @@ class DoctrineDataCollector extends DataCollector + * @return void */ -- protected static function getContainer(): ContainerInterface -+ protected static function getContainer(): Container +- public function addLogger(string $name, DebugStack $logger) ++ public function addLogger(string $name, DebugStack $logger): void { - if (!static::$booted) { -diff --git a/src/Symfony/Component/BrowserKit/AbstractBrowser.php b/src/Symfony/Component/BrowserKit/AbstractBrowser.php -index b27ca37529..5b80175850 100644 ---- a/src/Symfony/Component/BrowserKit/AbstractBrowser.php -+++ b/src/Symfony/Component/BrowserKit/AbstractBrowser.php -@@ -408,5 +408,5 @@ abstract class AbstractBrowser - * @throws \RuntimeException When processing returns exit code + $this->loggers[$name] = $logger; +@@ -59,5 +59,5 @@ class DoctrineDataCollector extends DataCollector + * @return void */ -- protected function doRequestInProcess(object $request) -+ protected function doRequestInProcess(object $request): object +- public function collect(Request $request, Response $response, \Throwable $exception = null) ++ public function collect(Request $request, Response $response, \Throwable $exception = null): void { - $deprecationsFile = tempnam(sys_get_temp_dir(), 'deprec'); -@@ -441,5 +441,5 @@ abstract class AbstractBrowser - * @return object + $this->data = [ +@@ -90,5 +90,5 @@ class DoctrineDataCollector extends DataCollector + * @return void */ -- abstract protected function doRequest(object $request); -+ abstract protected function doRequest(object $request): object; - - /** -@@ -460,5 +460,5 @@ abstract class AbstractBrowser - * @return object +- public function reset() ++ public function reset(): void + { + $this->data = []; +@@ -119,5 +119,5 @@ class DoctrineDataCollector extends DataCollector + * @return int */ -- protected function filterRequest(Request $request) -+ protected function filterRequest(Request $request): object +- public function getQueryCount() ++ public function getQueryCount(): int { - return $request; -@@ -470,5 +470,5 @@ abstract class AbstractBrowser - * @return Response + return array_sum(array_map('count', $this->data['queries'])); +diff --git a/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php b/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php +index 4fa5057fe2..9e111adac5 100644 +--- a/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php ++++ b/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php +@@ -36,5 +36,5 @@ class ContainerAwareLoader extends Loader + * @return void */ -- protected function filterResponse(object $response) -+ protected function filterResponse(object $response): Response +- public function addFixture(FixtureInterface $fixture) ++ public function addFixture(FixtureInterface $fixture): void { - return $response; -diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php -index 7cda0bc7d8..b2311826f4 100644 ---- a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php -+++ b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php -@@ -111,5 +111,5 @@ class NodeBuilder implements NodeParentInterface - * @return NodeDefinition&ParentNodeDefinitionInterface + if ($fixture instanceof ContainerAwareInterface) { +diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +index 56b108942e..20761fcc26 100644 +--- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php ++++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +@@ -43,5 +43,5 @@ abstract class AbstractDoctrineExtension extends Extension + * @throws \InvalidArgumentException */ -- public function end() -+ public function end(): NodeDefinition&ParentNodeDefinitionInterface +- protected function loadMappingInformation(array $objectManager, ContainerBuilder $container) ++ protected function loadMappingInformation(array $objectManager, ContainerBuilder $container): void { - return $this->parent; -diff --git a/src/Symfony/Component/Config/Definition/ConfigurationInterface.php b/src/Symfony/Component/Config/Definition/ConfigurationInterface.php -index 7b5d443fe6..d64ae0d024 100644 ---- a/src/Symfony/Component/Config/Definition/ConfigurationInterface.php -+++ b/src/Symfony/Component/Config/Definition/ConfigurationInterface.php -@@ -26,4 +26,4 @@ interface ConfigurationInterface - * @return TreeBuilder + if ($objectManager['auto_mapping']) { +@@ -111,5 +111,5 @@ abstract class AbstractDoctrineExtension extends Extension + * @return void */ -- public function getConfigTreeBuilder(); -+ public function getConfigTreeBuilder(): TreeBuilder; - } -diff --git a/src/Symfony/Component/Config/FileLocator.php b/src/Symfony/Component/Config/FileLocator.php -index ab18232db1..bc5af7f89c 100644 ---- a/src/Symfony/Component/Config/FileLocator.php -+++ b/src/Symfony/Component/Config/FileLocator.php -@@ -31,5 +31,5 @@ class FileLocator implements FileLocatorInterface +- protected function setMappingDriverAlias(array $mappingConfig, string $mappingName) ++ protected function setMappingDriverAlias(array $mappingConfig, string $mappingName): void + { + if (isset($mappingConfig['alias'])) { +@@ -127,5 +127,5 @@ abstract class AbstractDoctrineExtension extends Extension + * @throws \InvalidArgumentException + */ +- protected function setMappingDriverConfig(array $mappingConfig, string $mappingName) ++ protected function setMappingDriverConfig(array $mappingConfig, string $mappingName): void + { + $mappingDirectory = $mappingConfig['dir']; +@@ -182,5 +182,5 @@ abstract class AbstractDoctrineExtension extends Extension + * @return void + */ +- protected function registerMappingDrivers(array $objectManager, ContainerBuilder $container) ++ protected function registerMappingDrivers(array $objectManager, ContainerBuilder $container): void + { + // configure metadata driver for each bundle based on the type of mapping files found +@@ -240,5 +240,5 @@ abstract class AbstractDoctrineExtension extends Extension + * @throws \InvalidArgumentException + */ +- protected function assertValidMappingConfiguration(array $mappingConfig, string $objectManagerName) ++ protected function assertValidMappingConfiguration(array $mappingConfig, string $objectManagerName): void + { + if (!$mappingConfig['type'] || !$mappingConfig['dir'] || !$mappingConfig['prefix']) { +@@ -330,5 +330,5 @@ abstract class AbstractDoctrineExtension extends Extension + * @throws \InvalidArgumentException in case of unknown driver type + */ +- protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, string $cacheName) ++ protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, string $cacheName): void + { + $this->loadCacheDriver($cacheName, $objectManager['name'], $objectManager[$cacheName.'_driver'], $container); +diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php +index 83bfffaf27..acbd7e4bc7 100644 +--- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php ++++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php +@@ -32,5 +32,5 @@ class DoctrineValidationPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $this->updateValidatorMappingFiles($container, 'xml', 'xml'); +diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php +index bf68ec0dcc..509e5f1b0c 100644 +--- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php ++++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php +@@ -54,5 +54,5 @@ class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface } -- public function locate(string $name, string $currentPath = null, bool $first = true) -+ public function locate(string $name, string $currentPath = null, bool $first = true): string|array +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void { - if ('' === $name) { -diff --git a/src/Symfony/Component/Config/FileLocatorInterface.php b/src/Symfony/Component/Config/FileLocatorInterface.php -index e3ca1d49c4..526d350484 100644 ---- a/src/Symfony/Component/Config/FileLocatorInterface.php -+++ b/src/Symfony/Component/Config/FileLocatorInterface.php -@@ -31,4 +31,4 @@ interface FileLocatorInterface - * @throws FileLocatorFileNotFoundException If a file is not found + if (!$container->hasParameter($this->connectionsParameter)) { +diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php +index 1a3f227c6d..daf6634922 100644 +--- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php ++++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php +@@ -134,5 +134,5 @@ abstract class RegisterMappingsPass implements CompilerPassInterface + * @return void */ -- public function locate(string $name, string $currentPath = null, bool $first = true); -+ public function locate(string $name, string $currentPath = null, bool $first = true): string|array; - } -diff --git a/src/Symfony/Component/Config/Loader/FileLoader.php b/src/Symfony/Component/Config/Loader/FileLoader.php -index 30034e55a5..d6a57be190 100644 ---- a/src/Symfony/Component/Config/Loader/FileLoader.php -+++ b/src/Symfony/Component/Config/Loader/FileLoader.php -@@ -67,5 +67,5 @@ abstract class FileLoader extends Loader - * @throws FileLocatorFileNotFoundException +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$this->enabled($container)) { +diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php +index 80ee258438..e2c51954d0 100644 +--- a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php ++++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php +@@ -37,5 +37,5 @@ class EntityFactory implements UserProviderFactoryInterface + * @return void */ -- public function import(mixed $resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null, string|array $exclude = null) -+ public function import(mixed $resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null, string|array $exclude = null): mixed +- public function create(ContainerBuilder $container, string $id, array $config) ++ public function create(ContainerBuilder $container, string $id, array $config): void { - if (\is_string($resource) && \strlen($resource) !== ($i = strcspn($resource, '*?{[')) && !str_contains($resource, "\n")) { -diff --git a/src/Symfony/Component/Config/Loader/Loader.php b/src/Symfony/Component/Config/Loader/Loader.php -index 2ab50b021b..b64e1e1055 100644 ---- a/src/Symfony/Component/Config/Loader/Loader.php -+++ b/src/Symfony/Component/Config/Loader/Loader.php -@@ -44,5 +44,5 @@ abstract class Loader implements LoaderInterface - * @return mixed + $container +@@ -50,5 +50,5 @@ class EntityFactory implements UserProviderFactoryInterface + * @return string */ -- public function import(mixed $resource, string $type = null) -+ public function import(mixed $resource, string $type = null): mixed +- public function getKey() ++ public function getKey(): string { - return $this->resolve($resource, $type)->load($resource, $type); -diff --git a/src/Symfony/Component/Config/Loader/LoaderInterface.php b/src/Symfony/Component/Config/Loader/LoaderInterface.php -index b94a4378f5..db502e12a7 100644 ---- a/src/Symfony/Component/Config/Loader/LoaderInterface.php -+++ b/src/Symfony/Component/Config/Loader/LoaderInterface.php -@@ -26,5 +26,5 @@ interface LoaderInterface - * @throws \Exception If something went wrong + return $this->key; +@@ -58,5 +58,5 @@ class EntityFactory implements UserProviderFactoryInterface + * @return void */ -- public function load(mixed $resource, string $type = null); -+ public function load(mixed $resource, string $type = null): mixed; - - /** -@@ -35,5 +35,5 @@ interface LoaderInterface - * @return bool +- public function addConfiguration(NodeDefinition $node) ++ public function addConfiguration(NodeDefinition $node): void + { + $node +diff --git a/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php b/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php +index cff8b3b156..51e1f32e97 100644 +--- a/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php ++++ b/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php +@@ -42,5 +42,5 @@ class MergeDoctrineCollectionListener implements EventSubscriberInterface + * @return void */ -- public function supports(mixed $resource, string $type = null); -+ public function supports(mixed $resource, string $type = null): bool; - - /** -@@ -42,5 +42,5 @@ interface LoaderInterface - * @return LoaderResolverInterface +- public function onSubmit(FormEvent $event) ++ public function onSubmit(FormEvent $event): void + { + $collection = $event->getForm()->getData(); +diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php +index d1d72ef75a..68a437e8d7 100644 +--- a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php ++++ b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php +@@ -101,5 +101,5 @@ abstract class DoctrineType extends AbstractType implements ResetInterface + * @return void */ -- public function getResolver(); -+ public function getResolver(): LoaderResolverInterface; - - /** -diff --git a/src/Symfony/Component/Config/ResourceCheckerInterface.php b/src/Symfony/Component/Config/ResourceCheckerInterface.php -index 6b1c6c5fbe..bb80ed461e 100644 ---- a/src/Symfony/Component/Config/ResourceCheckerInterface.php -+++ b/src/Symfony/Component/Config/ResourceCheckerInterface.php -@@ -33,5 +33,5 @@ interface ResourceCheckerInterface - * @return bool +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if ($options['multiple'] && interface_exists(Collection::class)) { +@@ -114,5 +114,5 @@ abstract class DoctrineType extends AbstractType implements ResetInterface + * @return void */ -- public function supports(ResourceInterface $metadata); -+ public function supports(ResourceInterface $metadata): bool; - - /** -@@ -42,4 +42,4 @@ interface ResourceCheckerInterface - * @return bool +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $choiceLoader = function (Options $options) { +@@ -242,5 +242,5 @@ abstract class DoctrineType extends AbstractType implements ResetInterface + * @return void */ -- public function isFresh(ResourceInterface $resource, int $timestamp); -+ public function isFresh(ResourceInterface $resource, int $timestamp): bool; - } -diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php -index 3a3d4da744..0a825fc1ee 100644 ---- a/src/Symfony/Component/Console/Application.php -+++ b/src/Symfony/Component/Console/Application.php -@@ -215,5 +215,5 @@ class Application implements ResetInterface - * @return int 0 if everything went fine, or an error code +- public function reset() ++ public function reset(): void + { + $this->idReaders = []; +diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php +index c096b558db..8d584900a9 100644 +--- a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php ++++ b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php +@@ -25,5 +25,5 @@ class EntityType extends DoctrineType + * @return void */ -- public function doRun(InputInterface $input, OutputInterface $output) -+ public function doRun(InputInterface $input, OutputInterface $output): int +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void { - if (true === $input->hasParameterOption(['--version', '-V'], true)) { -@@ -462,5 +462,5 @@ class Application implements ResetInterface - * @return string + parent::configureOptions($resolver); +diff --git a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php +index b2369e95d6..c33484608e 100644 +--- a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php ++++ b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php +@@ -52,5 +52,5 @@ class DbalLogger implements SQLLogger + * @return void */ -- public function getLongVersion() -+ public function getLongVersion(): string +- protected function log(string $message, array $params) ++ protected function log(string $message, array $params): void { - if ('UNKNOWN' !== $this->getName()) { -@@ -505,5 +505,5 @@ class Application implements ResetInterface - * @return Command|null + $this->logger->debug($message, $params); +diff --git a/src/Symfony/Bridge/Doctrine/Messenger/DoctrineClearEntityManagerWorkerSubscriber.php b/src/Symfony/Bridge/Doctrine/Messenger/DoctrineClearEntityManagerWorkerSubscriber.php +index 38618fc15e..eb599eb0b4 100644 +--- a/src/Symfony/Bridge/Doctrine/Messenger/DoctrineClearEntityManagerWorkerSubscriber.php ++++ b/src/Symfony/Bridge/Doctrine/Messenger/DoctrineClearEntityManagerWorkerSubscriber.php +@@ -34,5 +34,5 @@ class DoctrineClearEntityManagerWorkerSubscriber implements EventSubscriberInter + * @return void */ -- public function add(Command $command) -+ public function add(Command $command): ?Command +- public function onWorkerMessageHandled() ++ public function onWorkerMessageHandled(): void { - $this->init(); -@@ -542,5 +542,5 @@ class Application implements ResetInterface - * @throws CommandNotFoundException When given command name does not exist + $this->clearEntityManagers(); +@@ -42,5 +42,5 @@ class DoctrineClearEntityManagerWorkerSubscriber implements EventSubscriberInter + * @return void */ -- public function get(string $name) -+ public function get(string $name): Command +- public function onWorkerMessageFailed() ++ public function onWorkerMessageFailed(): void { - $this->init(); -@@ -649,5 +649,5 @@ class Application implements ResetInterface - * @throws CommandNotFoundException When command name is incorrect or ambiguous + $this->clearEntityManagers(); +diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php +index 9d61be61bd..e89985de26 100644 +--- a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php ++++ b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php +@@ -70,5 +70,5 @@ class DoctrineTokenProvider implements TokenProviderInterface, TokenVerifierInte + * @return void */ -- public function find(string $name) -+ public function find(string $name): Command +- public function deleteTokenBySeries(string $series) ++ public function deleteTokenBySeries(string $series): void { - $this->init(); -@@ -759,5 +759,5 @@ class Application implements ResetInterface - * @return Command[] + $sql = 'DELETE FROM rememberme_token WHERE series=:series'; +@@ -85,5 +85,5 @@ class DoctrineTokenProvider implements TokenProviderInterface, TokenVerifierInte + * @return void */ -- public function all(string $namespace = null) -+ public function all(string $namespace = null): array +- public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTime $lastUsed) ++ public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTime $lastUsed): void { - $this->init(); -@@ -968,5 +968,5 @@ class Application implements ResetInterface - * @return int 0 if everything went fine, or an error code + $sql = 'UPDATE rememberme_token SET value=:value, lastUsed=:lastUsed WHERE series=:series'; +@@ -111,5 +111,5 @@ class DoctrineTokenProvider implements TokenProviderInterface, TokenVerifierInte + * @return void */ -- protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) -+ protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output): int +- public function createNewToken(PersistentTokenInterface $token) ++ public function createNewToken(PersistentTokenInterface $token): void { - foreach ($command->getHelperSet() as $helper) { -diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php -index 1e3c1a5a2b..923ab29a4d 100644 ---- a/src/Symfony/Component/Console/Command/Command.php -+++ b/src/Symfony/Component/Console/Command/Command.php -@@ -192,5 +192,5 @@ class Command - * @return bool + $sql = 'INSERT INTO rememberme_token (class, username, series, value, lastUsed) VALUES (:class, :username, :series, :value, :lastUsed)'; +diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php +index 67575134b6..09a3926120 100644 +--- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php ++++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php +@@ -43,5 +43,5 @@ class UniqueEntityValidator extends ConstraintValidator + * @throws ConstraintDefinitionException */ -- public function isEnabled() -+ public function isEnabled(): bool +- public function validate(mixed $entity, Constraint $constraint) ++ public function validate(mixed $entity, Constraint $constraint): void { - return true; -@@ -218,5 +218,5 @@ class Command - * @see setCode() + if (!$constraint instanceof UniqueEntity) { +diff --git a/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php b/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php +index bf8a5feb9f..e346c8b17c 100644 +--- a/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php ++++ b/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php +@@ -32,5 +32,5 @@ class DoctrineInitializer implements ObjectInitializerInterface + * @return void */ -- protected function execute(InputInterface $input, OutputInterface $output) -+ protected function execute(InputInterface $input, OutputInterface $output): int +- public function initialize(object $object) ++ public function initialize(object $object): void { - throw new LogicException('You must override the execute() method in the concrete command class.'); -@@ -687,5 +687,5 @@ class Command - * @throws InvalidArgumentException if the helper is not defined + $this->registry->getManagerForClass($object::class)?->initializeObject($object); +diff --git a/src/Symfony/Bridge/Monolog/Command/ServerLogCommand.php b/src/Symfony/Bridge/Monolog/Command/ServerLogCommand.php +index 9975c46cba..c7bbad69b2 100644 +--- a/src/Symfony/Bridge/Monolog/Command/ServerLogCommand.php ++++ b/src/Symfony/Bridge/Monolog/Command/ServerLogCommand.php +@@ -54,5 +54,5 @@ class ServerLogCommand extends Command + * @return void */ -- public function getHelper(string $name): mixed -+ public function getHelper(string $name): HelperInterface +- protected function configure() ++ protected function configure(): void { - if (null === $this->helperSet) { -diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatter.php b/src/Symfony/Component/Console/Formatter/OutputFormatter.php -index 38e75c3178..e5db4d626e 100644 ---- a/src/Symfony/Component/Console/Formatter/OutputFormatter.php -+++ b/src/Symfony/Component/Console/Formatter/OutputFormatter.php -@@ -116,5 +116,5 @@ class OutputFormatter implements WrappableOutputFormatterInterface - } - -- public function formatAndWrap(?string $message, int $width) -+ public function formatAndWrap(?string $message, int $width): string + if (!class_exists(ConsoleFormatter::class)) { +diff --git a/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php b/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php +index 718be59c13..091f24a8f8 100644 +--- a/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php ++++ b/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php +@@ -81,5 +81,5 @@ class MailerHandler extends AbstractProcessingHandler + * @return void + */ +- protected function send(string $content, array $records) ++ protected function send(string $content, array $records): void { - if (null === $message) { -diff --git a/src/Symfony/Component/Console/Formatter/WrappableOutputFormatterInterface.php b/src/Symfony/Component/Console/Formatter/WrappableOutputFormatterInterface.php -index 746cd27e79..52c61429cf 100644 ---- a/src/Symfony/Component/Console/Formatter/WrappableOutputFormatterInterface.php -+++ b/src/Symfony/Component/Console/Formatter/WrappableOutputFormatterInterface.php -@@ -24,4 +24,4 @@ interface WrappableOutputFormatterInterface extends OutputFormatterInterface - * @return string + $this->mailer->send($this->buildMessage($content, $records)); +diff --git a/src/Symfony/Bridge/Monolog/Logger.php b/src/Symfony/Bridge/Monolog/Logger.php +index 367b3351ff..fb603e74ba 100644 +--- a/src/Symfony/Bridge/Monolog/Logger.php ++++ b/src/Symfony/Bridge/Monolog/Logger.php +@@ -44,5 +44,5 @@ class Logger extends BaseLogger implements DebugLoggerInterface, ResetInterface + * @return void */ -- public function formatAndWrap(?string $message, int $width); -+ public function formatAndWrap(?string $message, int $width): string; - } -diff --git a/src/Symfony/Component/Console/Helper/HelperInterface.php b/src/Symfony/Component/Console/Helper/HelperInterface.php -index 2762cdf05c..737334268a 100644 ---- a/src/Symfony/Component/Console/Helper/HelperInterface.php -+++ b/src/Symfony/Component/Console/Helper/HelperInterface.php -@@ -34,4 +34,4 @@ interface HelperInterface - * @return string +- public function clear() ++ public function clear(): void + { + if ($logger = $this->getDebugLogger()) { +@@ -63,5 +63,5 @@ class Logger extends BaseLogger implements DebugLoggerInterface, ResetInterface + * @return void */ -- public function getName(); -+ public function getName(): string; - } -diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php -index 893b3192e9..94822ed191 100644 ---- a/src/Symfony/Component/Console/Helper/Table.php -+++ b/src/Symfony/Component/Console/Helper/Table.php -@@ -193,5 +193,5 @@ class Table - * @return $this +- public function removeDebugLogger() ++ public function removeDebugLogger(): void + { + foreach ($this->processors as $k => $processor) { +diff --git a/src/Symfony/Bridge/Monolog/Processor/ConsoleCommandProcessor.php b/src/Symfony/Bridge/Monolog/Processor/ConsoleCommandProcessor.php +index df2a718720..2ccab3649f 100644 +--- a/src/Symfony/Bridge/Monolog/Processor/ConsoleCommandProcessor.php ++++ b/src/Symfony/Bridge/Monolog/Processor/ConsoleCommandProcessor.php +@@ -51,5 +51,5 @@ class ConsoleCommandProcessor implements EventSubscriberInterface, ResetInterfac + * @return void */ -- public function setRows(array $rows) -+ public function setRows(array $rows): static +- public function reset() ++ public function reset(): void { - $this->rows = []; -diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php -index 3af991a76f..742e2508f3 100644 ---- a/src/Symfony/Component/Console/Input/InputInterface.php -+++ b/src/Symfony/Component/Console/Input/InputInterface.php -@@ -57,5 +57,5 @@ interface InputInterface - * @return mixed + unset($this->commandData); +@@ -59,5 +59,5 @@ class ConsoleCommandProcessor implements EventSubscriberInterface, ResetInterfac + * @return void */ -- public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false); -+ public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false): mixed; - - /** -@@ -87,5 +87,5 @@ interface InputInterface - * @throws InvalidArgumentException When argument given doesn't exist +- public function addCommandData(ConsoleEvent $event) ++ public function addCommandData(ConsoleEvent $event): void + { + $this->commandData = [ +diff --git a/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php b/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php +index c1ce2898da..7a9bf04e18 100644 +--- a/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php ++++ b/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php +@@ -94,5 +94,5 @@ class DebugProcessor implements DebugLoggerInterface, ResetInterface + * @return void */ -- public function getArgument(string $name); -+ public function getArgument(string $name): mixed; - - /** -@@ -115,5 +115,5 @@ interface InputInterface - * @throws InvalidArgumentException When option given doesn't exist +- public function clear() ++ public function clear(): void + { + $this->records = []; +@@ -103,5 +103,5 @@ class DebugProcessor implements DebugLoggerInterface, ResetInterface + * @return void */ -- public function getOption(string $name); -+ public function getOption(string $name): mixed; - - /** -diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php -index 08bab02ee4..1181f0795e 100644 ---- a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php -+++ b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php -@@ -68,5 +68,5 @@ abstract class AbstractRecursivePass implements CompilerPassInterface - * @return mixed +- public function reset() ++ public function reset(): void + { + $this->clear(); +diff --git a/src/Symfony/Bridge/Twig/AppVariable.php b/src/Symfony/Bridge/Twig/AppVariable.php +index 6ce2278c53..27b05b5815 100644 +--- a/src/Symfony/Bridge/Twig/AppVariable.php ++++ b/src/Symfony/Bridge/Twig/AppVariable.php +@@ -34,5 +34,5 @@ class AppVariable + * @return void */ -- protected function processValue(mixed $value, bool $isRoot = false) -+ protected function processValue(mixed $value, bool $isRoot = false): mixed +- public function setTokenStorage(TokenStorageInterface $tokenStorage) ++ public function setTokenStorage(TokenStorageInterface $tokenStorage): void { - if (\is_array($value)) { -diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php -index 9c830e77c8..e530cafb43 100644 ---- a/src/Symfony/Component/DependencyInjection/Container.php -+++ b/src/Symfony/Component/DependencyInjection/Container.php -@@ -109,5 +109,5 @@ class Container implements ContainerInterface, ResetInterface - * @throws ParameterNotFoundException if the parameter is not defined + $this->tokenStorage = $tokenStorage; +@@ -42,5 +42,5 @@ class AppVariable + * @return void */ -- public function getParameter(string $name) -+ public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null +- public function setRequestStack(RequestStack $requestStack) ++ public function setRequestStack(RequestStack $requestStack): void { - return $this->parameterBag->get($name); -diff --git a/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/src/Symfony/Component/DependencyInjection/ContainerInterface.php -index 9e97fb71fc..1cda97c611 100644 ---- a/src/Symfony/Component/DependencyInjection/ContainerInterface.php -+++ b/src/Symfony/Component/DependencyInjection/ContainerInterface.php -@@ -53,5 +53,5 @@ interface ContainerInterface extends PsrContainerInterface - * @throws ParameterNotFoundException if the parameter is not defined + $this->requestStack = $requestStack; +@@ -50,5 +50,5 @@ class AppVariable + * @return void */ -- public function getParameter(string $name); -+ public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null; - - public function hasParameter(string $name): bool; -diff --git a/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php -index a42967f4da..4e86e16f9d 100644 ---- a/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php -+++ b/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php -@@ -27,4 +27,4 @@ interface ConfigurationExtensionInterface - * @return ConfigurationInterface|null +- public function setEnvironment(string $environment) ++ public function setEnvironment(string $environment): void + { + $this->environment = $environment; +@@ -58,5 +58,5 @@ class AppVariable + * @return void */ -- public function getConfiguration(array $config, ContainerBuilder $container); -+ public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface; - } -diff --git a/src/Symfony/Component/DependencyInjection/Extension/Extension.php b/src/Symfony/Component/DependencyInjection/Extension/Extension.php -index 00192d0da5..620efa4fd1 100644 ---- a/src/Symfony/Component/DependencyInjection/Extension/Extension.php -+++ b/src/Symfony/Component/DependencyInjection/Extension/Extension.php -@@ -29,10 +29,10 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn - private array $processedConfigs = []; - -- public function getXsdValidationBasePath() -+ public function getXsdValidationBasePath(): string|false +- public function setDebug(bool $debug) ++ public function setDebug(bool $debug): void { - return false; - } - -- public function getNamespace() -+ public function getNamespace(): string + $this->debug = $debug; +diff --git a/src/Symfony/Bridge/Twig/Command/DebugCommand.php b/src/Symfony/Bridge/Twig/Command/DebugCommand.php +index cec031127b..167f26d846 100644 +--- a/src/Symfony/Bridge/Twig/Command/DebugCommand.php ++++ b/src/Symfony/Bridge/Twig/Command/DebugCommand.php +@@ -63,5 +63,5 @@ class DebugCommand extends Command + * @return void + */ +- protected function configure() ++ protected function configure(): void { - return 'http://example.org/schema/dic/'.$this->getAlias(); -@@ -68,5 +68,5 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn - } - -- public function getConfiguration(array $config, ContainerBuilder $container) -+ public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface + $this +diff --git a/src/Symfony/Bridge/Twig/Command/LintCommand.php b/src/Symfony/Bridge/Twig/Command/LintCommand.php +index 05f6319b39..7f10935866 100644 +--- a/src/Symfony/Bridge/Twig/Command/LintCommand.php ++++ b/src/Symfony/Bridge/Twig/Command/LintCommand.php +@@ -52,5 +52,5 @@ class LintCommand extends Command + * @return void + */ +- protected function configure() ++ protected function configure(): void { - $class = static::class; -diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php -index 11cda00cc5..07b4990160 100644 ---- a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php -+++ b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php -@@ -35,5 +35,5 @@ interface ExtensionInterface - * @return string + $this +diff --git a/src/Symfony/Bridge/Twig/EventListener/TemplateAttributeListener.php b/src/Symfony/Bridge/Twig/EventListener/TemplateAttributeListener.php +index ef0f9ba954..16240deb4a 100644 +--- a/src/Symfony/Bridge/Twig/EventListener/TemplateAttributeListener.php ++++ b/src/Symfony/Bridge/Twig/EventListener/TemplateAttributeListener.php +@@ -32,5 +32,5 @@ class TemplateAttributeListener implements EventSubscriberInterface + * @return void */ -- public function getNamespace(); -+ public function getNamespace(): string; - - /** -@@ -42,5 +42,5 @@ interface ExtensionInterface - * @return string|false +- public function onKernelView(ViewEvent $event) ++ public function onKernelView(ViewEvent $event): void + { + $parameters = $event->getControllerResult(); +diff --git a/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php b/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php +index fbe8e0b3e4..6e7fefc70d 100644 +--- a/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php ++++ b/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php +@@ -136,5 +136,5 @@ class TwigRendererEngine extends AbstractRendererEngine + * @return void */ -- public function getXsdValidationBasePath(); -+ public function getXsdValidationBasePath(): string|false; - - /** -@@ -51,4 +51,4 @@ interface ExtensionInterface - * @return string +- protected function loadResourcesFromTheme(string $cacheKey, mixed &$theme) ++ protected function loadResourcesFromTheme(string $cacheKey, mixed &$theme): void + { + if (!$theme instanceof Template) { +diff --git a/src/Symfony/Bridge/Twig/Translation/TwigExtractor.php b/src/Symfony/Bridge/Twig/Translation/TwigExtractor.php +index 2b44c5ef8d..05b4428490 100644 +--- a/src/Symfony/Bridge/Twig/Translation/TwigExtractor.php ++++ b/src/Symfony/Bridge/Twig/Translation/TwigExtractor.php +@@ -49,5 +49,5 @@ class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface + * @return void */ -- public function getAlias(); -+ public function getAlias(): string; - } -diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php -index f4c6b29258..1402331f9e 100644 ---- a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php -+++ b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php -@@ -31,4 +31,4 @@ interface InstantiatorInterface - * @return object +- public function extract($resource, MessageCatalogue $catalogue) ++ public function extract($resource, MessageCatalogue $catalogue): void + { + foreach ($this->extractFiles($resource) as $file) { +@@ -63,5 +63,5 @@ class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface + * @return void */ -- public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator); -+ public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator): object; - } -diff --git a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php -index 2085e428e9..ca0d6964e5 100644 ---- a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php -+++ b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php -@@ -46,4 +46,4 @@ interface EventSubscriberInterface - * @return array> +- public function setPrefix(string $prefix) ++ public function setPrefix(string $prefix): void + { + $this->prefix = $prefix; +@@ -71,5 +71,5 @@ class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface + * @return void */ -- public static function getSubscribedEvents(); -+ public static function getSubscribedEvents(): array; - } -diff --git a/src/Symfony/Component/ExpressionLanguage/ExpressionFunctionProviderInterface.php b/src/Symfony/Component/ExpressionLanguage/ExpressionFunctionProviderInterface.php -index 479aeef880..272954c082 100644 ---- a/src/Symfony/Component/ExpressionLanguage/ExpressionFunctionProviderInterface.php -+++ b/src/Symfony/Component/ExpressionLanguage/ExpressionFunctionProviderInterface.php -@@ -20,4 +20,4 @@ interface ExpressionFunctionProviderInterface - * @return ExpressionFunction[] +- protected function extractTemplate(string $template, MessageCatalogue $catalogue) ++ protected function extractTemplate(string $template, MessageCatalogue $catalogue): void + { + $visitor = $this->twig->getExtension(TranslationExtension::class)->getTranslationNodeVisitor(); +diff --git a/src/Symfony/Bundle/DebugBundle/DebugBundle.php b/src/Symfony/Bundle/DebugBundle/DebugBundle.php +index a24321e229..1e9e893142 100644 +--- a/src/Symfony/Bundle/DebugBundle/DebugBundle.php ++++ b/src/Symfony/Bundle/DebugBundle/DebugBundle.php +@@ -26,5 +26,5 @@ class DebugBundle extends Bundle + * @return void */ -- public function getFunctions(); -+ public function getFunctions(): array; - } -diff --git a/src/Symfony/Component/Form/AbstractExtension.php b/src/Symfony/Component/Form/AbstractExtension.php -index 5d3c1a8480..7eb6bba474 100644 ---- a/src/Symfony/Component/Form/AbstractExtension.php -+++ b/src/Symfony/Component/Form/AbstractExtension.php -@@ -99,5 +99,5 @@ abstract class AbstractExtension implements FormExtensionInterface - * @return FormTypeInterface[] +- public function boot() ++ public function boot(): void + { + if ($this->container->getParameter('kernel.debug')) { +@@ -51,5 +51,5 @@ class DebugBundle extends Bundle + * @return void */ -- protected function loadTypes() -+ protected function loadTypes(): array +- public function build(ContainerBuilder $container) ++ public function build(ContainerBuilder $container): void { - return []; -@@ -119,5 +119,5 @@ abstract class AbstractExtension implements FormExtensionInterface - * @return FormTypeGuesserInterface|null + parent::build($container); +@@ -61,5 +61,5 @@ class DebugBundle extends Bundle + * @return void */ -- protected function loadTypeGuesser() -+ protected function loadTypeGuesser(): ?FormTypeGuesserInterface +- public function registerCommands(Application $application) ++ public function registerCommands(Application $application): void { - return null; -diff --git a/src/Symfony/Component/Form/AbstractRendererEngine.php b/src/Symfony/Component/Form/AbstractRendererEngine.php -index f79f1c1338..c74c4bf2f1 100644 ---- a/src/Symfony/Component/Form/AbstractRendererEngine.php -+++ b/src/Symfony/Component/Form/AbstractRendererEngine.php -@@ -125,5 +125,5 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface, Re - * @return bool + // noop +diff --git a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php +index cecce87c4a..7c6d738481 100644 +--- a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php ++++ b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php +@@ -26,5 +26,5 @@ class DumpDataCollectorPass implements CompilerPassInterface + * @return void */ -- abstract protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName); -+ abstract protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName): bool; - - /** -diff --git a/src/Symfony/Component/Form/AbstractType.php b/src/Symfony/Component/Form/AbstractType.php -index da401930d7..15d6219259 100644 ---- a/src/Symfony/Component/Form/AbstractType.php -+++ b/src/Symfony/Component/Form/AbstractType.php -@@ -37,10 +37,10 @@ abstract class AbstractType implements FormTypeInterface - } - -- public function getBlockPrefix() -+ public function getBlockPrefix(): string +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void { - return StringUtil::fqcnToBlockPrefix(static::class) ?: ''; - } - -- public function getParent() -+ public function getParent(): ?string + if (!$container->hasDefinition('data_collector.dump')) { +diff --git a/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php b/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php +index eadeafba55..4f1ca3bfef 100644 +--- a/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php ++++ b/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php +@@ -33,5 +33,5 @@ class DebugExtension extends Extension + * @return void + */ +- public function load(array $configs, ContainerBuilder $container) ++ public function load(array $configs, ContainerBuilder $container): void { - return FormType::class; -diff --git a/src/Symfony/Component/Form/DataTransformerInterface.php b/src/Symfony/Component/Form/DataTransformerInterface.php -index 85fb99d218..6cc654f681 100644 ---- a/src/Symfony/Component/Form/DataTransformerInterface.php -+++ b/src/Symfony/Component/Form/DataTransformerInterface.php -@@ -65,5 +65,5 @@ interface DataTransformerInterface - * @throws TransformationFailedException when the transformation fails + $configuration = new Configuration(); +diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php +index cdbb90a3a9..b137a12012 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php ++++ b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php +@@ -56,5 +56,5 @@ class Application extends BaseApplication + * @return void */ -- public function transform(mixed $value); -+ public function transform(mixed $value): mixed; - - /** -@@ -96,4 +96,4 @@ interface DataTransformerInterface - * @throws TransformationFailedException when the transformation fails +- public function reset() ++ public function reset(): void + { + if ($this->kernel->getContainer()->has('services_resetter')) { +@@ -144,5 +144,5 @@ class Application extends BaseApplication + * @return void */ -- public function reverseTransform(mixed $value); -+ public function reverseTransform(mixed $value): mixed; - } -diff --git a/src/Symfony/Component/Form/FormRendererEngineInterface.php b/src/Symfony/Component/Form/FormRendererEngineInterface.php -index aa249270a0..3c9d04ff9a 100644 ---- a/src/Symfony/Component/Form/FormRendererEngineInterface.php -+++ b/src/Symfony/Component/Form/FormRendererEngineInterface.php -@@ -131,4 +131,4 @@ interface FormRendererEngineInterface - * @return string +- protected function registerCommands() ++ protected function registerCommands(): void + { + if ($this->commandsRegistered) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DataCollector/RouterDataCollector.php b/src/Symfony/Bundle/FrameworkBundle/DataCollector/RouterDataCollector.php +index ccb61b1286..700d0f22d4 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DataCollector/RouterDataCollector.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DataCollector/RouterDataCollector.php +@@ -23,5 +23,5 @@ use Symfony\Component\HttpKernel\DataCollector\RouterDataCollector as BaseRouter + class RouterDataCollector extends BaseRouterDataCollector + { +- public function guessRoute(Request $request, mixed $controller) ++ public function guessRoute(Request $request, mixed $controller): string + { + if (\is_array($controller)) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php +index d0aca7a06b..aee4af1a43 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php +@@ -21,5 +21,5 @@ class AddDebugLogProcessorPass implements CompilerPassInterface + * @return void */ -- public function renderBlock(FormView $view, mixed $resource, string $blockName, array $variables = []); -+ public function renderBlock(FormView $view, mixed $resource, string $blockName, array $variables = []): string; - } -diff --git a/src/Symfony/Component/Form/FormTypeGuesserInterface.php b/src/Symfony/Component/Form/FormTypeGuesserInterface.php -index 61e2c5f80d..4d6b335474 100644 ---- a/src/Symfony/Component/Form/FormTypeGuesserInterface.php -+++ b/src/Symfony/Component/Form/FormTypeGuesserInterface.php -@@ -22,5 +22,5 @@ interface FormTypeGuesserInterface - * @return Guess\TypeGuess|null +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('profiler')) { +@@ -41,5 +41,5 @@ class AddDebugLogProcessorPass implements CompilerPassInterface + * @return void */ -- public function guessType(string $class, string $property); -+ public function guessType(string $class, string $property): ?Guess\TypeGuess; - - /** -@@ -29,5 +29,5 @@ interface FormTypeGuesserInterface - * @return Guess\ValueGuess|null +- public static function configureLogger(mixed $logger) ++ public static function configureLogger(mixed $logger): void + { + if (\is_object($logger) && method_exists($logger, 'removeDebugLogger') && \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +index 5442b27734..9ed6cf284c 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +@@ -26,5 +26,5 @@ class AddExpressionLanguageProvidersPass implements CompilerPassInterface + * @return void */ -- public function guessRequired(string $class, string $property); -+ public function guessRequired(string $class, string $property): ?Guess\ValueGuess; - - /** -@@ -36,5 +36,5 @@ interface FormTypeGuesserInterface - * @return Guess\ValueGuess|null +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + // routing +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AssetsContextPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AssetsContextPass.php +index e8c2ad3a0e..d8b3b64f5d 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AssetsContextPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AssetsContextPass.php +@@ -22,5 +22,5 @@ class AssetsContextPass implements CompilerPassInterface + * @return void */ -- public function guessMaxLength(string $class, string $property); -+ public function guessMaxLength(string $class, string $property): ?Guess\ValueGuess; - - /** -@@ -50,4 +50,4 @@ interface FormTypeGuesserInterface - * @return Guess\ValueGuess|null +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('assets.context')) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php +index 1e08ef3149..530bbdc4cd 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php +@@ -29,5 +29,5 @@ class ContainerBuilderDebugDumpPass implements CompilerPassInterface + * @return void */ -- public function guessPattern(string $class, string $property); -+ public function guessPattern(string $class, string $property): ?Guess\ValueGuess; - } -diff --git a/src/Symfony/Component/Form/FormTypeInterface.php b/src/Symfony/Component/Form/FormTypeInterface.php -index 2b9066a511..1c9e9f5a26 100644 ---- a/src/Symfony/Component/Form/FormTypeInterface.php -+++ b/src/Symfony/Component/Form/FormTypeInterface.php -@@ -77,5 +77,5 @@ interface FormTypeInterface +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->getParameter('debug.container.dump')) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php +index e66e98b451..7714d62f3e 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php +@@ -24,5 +24,5 @@ class DataCollectorTranslatorPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->has('translator')) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php +index b7cb920bf7..76b5dace0f 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php +@@ -26,5 +26,5 @@ class LoggingTranslatorPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasAlias('logger') || !$container->hasAlias('translator')) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ProfilerPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ProfilerPass.php +index c2d669fe1c..322f3eaeee 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ProfilerPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ProfilerPass.php +@@ -28,5 +28,5 @@ class ProfilerPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (false === $container->hasDefinition('profiler')) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php +index fedc30d06e..bb934fe1f6 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php +@@ -23,5 +23,5 @@ class RemoveUnusedSessionMarshallingHandlerPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('session.marshalling_handler')) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php +index 09f272daa9..1fd0608bde 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php +@@ -25,5 +25,5 @@ class TestServiceContainerRealRefPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('test.private_services_locator')) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php +index 6e7669a710..27517d34ae 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php +@@ -25,5 +25,5 @@ class TestServiceContainerWeakRefPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('test.private_services_locator')) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php +index d846bc6882..21ee26b1f3 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php +@@ -106,5 +106,5 @@ class UnusedTagsPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $tags = array_unique(array_merge($container->findTags(), self::KNOWN_TAGS)); +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php +index bda9ca9515..c0d1f91339 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php +@@ -25,5 +25,5 @@ class WorkflowGuardListenerPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasParameter('workflow.has_guard_listeners')) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +index 8cb557fb7d..7a7830c7df 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php ++++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +@@ -279,5 +279,5 @@ class FrameworkExtension extends Extension + * @throws LogicException + */ +- public function load(array $configs, ContainerBuilder $container) ++ public function load(array $configs, ContainerBuilder $container): void + { + $loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config')); +@@ -2812,5 +2812,5 @@ class FrameworkExtension extends Extension + * @return void + */ +- public static function registerRateLimiter(ContainerBuilder $container, string $name, array $limiterConfig) ++ public static function registerRateLimiter(ContainerBuilder $container, string $name, array $limiterConfig): void + { + trigger_deprecation('symfony/framework-bundle', '6.2', 'The "%s()" method is deprecated.', __METHOD__); +diff --git a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php +index 7f48810e50..f85b13d818 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php ++++ b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php +@@ -93,5 +93,5 @@ class FrameworkBundle extends Bundle + * @return void + */ +- public function boot() ++ public function boot(): void + { + $handler = ErrorHandler::register(null, false); +@@ -110,5 +110,5 @@ class FrameworkBundle extends Bundle + * @return void + */ +- public function build(ContainerBuilder $container) ++ public function build(ContainerBuilder $container): void + { + parent::build($container); +diff --git a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php +index 3ab28a1f81..2ace764149 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php ++++ b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php +@@ -132,5 +132,5 @@ trait MicroKernelTrait + * @return void + */ +- public function registerContainerConfiguration(LoaderInterface $loader) ++ public function registerContainerConfiguration(LoaderInterface $loader): void + { + $loader->load(function (ContainerBuilder $container) use ($loader) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php b/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php +index 1f484c1b84..67dba6fc40 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php ++++ b/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php +@@ -77,5 +77,5 @@ class KernelBrowser extends HttpKernelBrowser + * @return void + */ +- public function enableProfiler() ++ public function enableProfiler(): void + { + if ($this->getContainer()->has('profiler')) { +@@ -92,5 +92,5 @@ class KernelBrowser extends HttpKernelBrowser + * @return void + */ +- public function disableReboot() ++ public function disableReboot(): void + { + $this->reboot = false; +@@ -102,5 +102,5 @@ class KernelBrowser extends HttpKernelBrowser + * @return void + */ +- public function enableReboot() ++ public function enableReboot(): void + { + $this->reboot = true; +diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/AnnotatedRouteControllerLoader.php b/src/Symfony/Bundle/FrameworkBundle/Routing/AnnotatedRouteControllerLoader.php +index ec03f84979..498dc24d1c 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/Routing/AnnotatedRouteControllerLoader.php ++++ b/src/Symfony/Bundle/FrameworkBundle/Routing/AnnotatedRouteControllerLoader.php +@@ -28,5 +28,5 @@ class AnnotatedRouteControllerLoader extends AnnotationClassLoader + * @return void + */ +- protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot) ++ protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot): void + { + if ('__invoke' === $method->getName()) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/Secrets/AbstractVault.php b/src/Symfony/Bundle/FrameworkBundle/Secrets/AbstractVault.php +index b3eb0c6bc3..c47152f219 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/Secrets/AbstractVault.php ++++ b/src/Symfony/Bundle/FrameworkBundle/Secrets/AbstractVault.php +@@ -44,5 +44,5 @@ abstract class AbstractVault * @return string */ -- public function getBlockPrefix(); -+ public function getBlockPrefix(): string; - - /** -@@ -84,4 +84,4 @@ interface FormTypeInterface - * @return string|null +- protected function getPrettyPath(string $path) ++ protected function getPrettyPath(string $path): string + { + return str_replace(getcwd().\DIRECTORY_SEPARATOR, '', $path); +diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +index bb5560a7b5..be86cbf98e 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php ++++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +@@ -88,5 +88,5 @@ abstract class KernelTestCase extends TestCase + * @return Container */ -- public function getParent(); -+ public function getParent(): ?string; - } -diff --git a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php -index 1f1740b7e2..22dc8ea26a 100644 ---- a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php -+++ b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php -@@ -29,4 +29,4 @@ interface CacheWarmerInterface extends WarmableInterface - * @return bool +- protected static function getContainer(): ContainerInterface ++ protected static function getContainer(): Container + { + if (!static::$booted) { +diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php +index dac3b6394f..d319cb0824 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php ++++ b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php +@@ -122,5 +122,5 @@ class Translator extends BaseTranslator implements WarmableInterface + * @return void */ -- public function isOptional(); -+ public function isOptional(): bool; - } -diff --git a/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php b/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php -index 2f442cb536..d98909cfae 100644 ---- a/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php -+++ b/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php -@@ -24,4 +24,4 @@ interface WarmableInterface - * @return string[] A list of classes or files to preload on PHP 7.4+ +- public function addResource(string $format, mixed $resource, string $locale, string $domain = null) ++ public function addResource(string $format, mixed $resource, string $locale, string $domain = null): void + { + if ($this->resourceFiles) { +@@ -133,5 +133,5 @@ class Translator extends BaseTranslator implements WarmableInterface + * @return void */ -- public function warmUp(string $cacheDir); -+ public function warmUp(string $cacheDir): array; - } -diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php -index 3a3be3af49..971560c07b 100644 ---- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php +- protected function initializeCatalogue(string $locale) ++ protected function initializeCatalogue(string $locale): void + { + $this->initialize(); +@@ -155,5 +155,5 @@ class Translator extends BaseTranslator implements WarmableInterface + * @return void + */ +- protected function initialize() ++ protected function initialize(): void + { + if ($this->resourceFiles) { +diff --git a/src/Symfony/Bundle/SecurityBundle/Debug/TraceableFirewallListener.php b/src/Symfony/Bundle/SecurityBundle/Debug/TraceableFirewallListener.php +index bb5fe03096..e756cd7957 100644 +--- a/src/Symfony/Bundle/SecurityBundle/Debug/TraceableFirewallListener.php ++++ b/src/Symfony/Bundle/SecurityBundle/Debug/TraceableFirewallListener.php +@@ -32,5 +32,5 @@ final class TraceableFirewallListener extends FirewallListener + * @return array + */ +- public function getWrappedListeners() ++ public function getWrappedListeners(): array + { + return $this->wrappedListeners; +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +index 08d7fd9213..8bacecce11 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +@@ -26,5 +26,5 @@ class AddExpressionLanguageProvidersPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if ($container->has('security.expression_language')) { +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php +index ccf474087a..f9e4b0622f 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php +@@ -33,5 +33,5 @@ class AddSecurityVotersPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('security.access.decision_manager')) { +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php +index 9a7a94ca08..bc4baa0f65 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php +@@ -25,5 +25,5 @@ class AddSessionDomainConstraintPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasParameter('session.storage.options') || !$container->has('security.http_utils')) { +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php +index 2041a36b38..d54311d5de 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php +@@ -25,5 +25,5 @@ class CleanRememberMeVerifierPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('cache.system')) { +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/MakeFirewallsEventDispatcherTraceablePass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/MakeFirewallsEventDispatcherTraceablePass.php +index e7c77d1ec3..419e18f6f0 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/MakeFirewallsEventDispatcherTraceablePass.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/MakeFirewallsEventDispatcherTraceablePass.php +@@ -26,5 +26,5 @@ class MakeFirewallsEventDispatcherTraceablePass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->has('event_dispatcher') || !$container->hasParameter('security.firewalls')) { +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterEntryPointPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterEntryPointPass.php +index 3ca2a70acb..2ba4a41499 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterEntryPointPass.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterEntryPointPass.php +@@ -27,5 +27,5 @@ class RegisterEntryPointPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasParameter('security.firewalls')) { +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php +index 24eb1377c5..6367585643 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php +@@ -56,5 +56,5 @@ abstract class AbstractFactory implements AuthenticatorFactoryInterface + * @return void + */ +- public function addConfiguration(NodeDefinition $node) ++ public function addConfiguration(NodeDefinition $node): void + { + $builder = $node->children(); +@@ -79,5 +79,5 @@ abstract class AbstractFactory implements AuthenticatorFactoryInterface + * @return string + */ +- protected function createAuthenticationSuccessHandler(ContainerBuilder $container, string $id, array $config) ++ protected function createAuthenticationSuccessHandler(ContainerBuilder $container, string $id, array $config): string + { + $successHandlerId = $this->getSuccessHandlerId($id); +@@ -101,5 +101,5 @@ abstract class AbstractFactory implements AuthenticatorFactoryInterface + * @return string + */ +- protected function createAuthenticationFailureHandler(ContainerBuilder $container, string $id, array $config) ++ protected function createAuthenticationFailureHandler(ContainerBuilder $container, string $id, array $config): string + { + $id = $this->getFailureHandlerId($id); +@@ -121,5 +121,5 @@ abstract class AbstractFactory implements AuthenticatorFactoryInterface + * @return string + */ +- protected function getSuccessHandlerId(string $id) ++ protected function getSuccessHandlerId(string $id): string + { + return 'security.authentication.success_handler.'.$id.'.'.str_replace('-', '_', $this->getKey()); +@@ -129,5 +129,5 @@ abstract class AbstractFactory implements AuthenticatorFactoryInterface + * @return string + */ +- protected function getFailureHandlerId(string $id) ++ protected function getFailureHandlerId(string $id): string + { + return 'security.authentication.failure_handler.'.$id.'.'.str_replace('-', '_', $this->getKey()); +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php +index 764e7d35c3..20442e08a0 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php +@@ -34,5 +34,5 @@ interface AuthenticatorFactoryInterface + * @return void + */ +- public function addConfiguration(NodeDefinition $builder); ++ public function addConfiguration(NodeDefinition $builder): void; + + /** +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php +index 936f58a084..1a3c89381b 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php +@@ -28,5 +28,5 @@ class InMemoryFactory implements UserProviderFactoryInterface + * @return void + */ +- public function create(ContainerBuilder $container, string $id, array $config) ++ public function create(ContainerBuilder $container, string $id, array $config): void + { + $definition = $container->setDefinition($id, new ChildDefinition('security.user.provider.in_memory')); +@@ -44,5 +44,5 @@ class InMemoryFactory implements UserProviderFactoryInterface + * @return string + */ +- public function getKey() ++ public function getKey(): string + { + return 'memory'; +@@ -52,5 +52,5 @@ class InMemoryFactory implements UserProviderFactoryInterface + * @return void + */ +- public function addConfiguration(NodeDefinition $node) ++ public function addConfiguration(NodeDefinition $node): void + { + $node +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php +index 2f4dca01d1..ca99ad286f 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php +@@ -28,5 +28,5 @@ class LdapFactory implements UserProviderFactoryInterface + * @return void + */ +- public function create(ContainerBuilder $container, string $id, array $config) ++ public function create(ContainerBuilder $container, string $id, array $config): void + { + $container +@@ -47,5 +47,5 @@ class LdapFactory implements UserProviderFactoryInterface + * @return string + */ +- public function getKey() ++ public function getKey(): string + { + return 'ldap'; +@@ -55,5 +55,5 @@ class LdapFactory implements UserProviderFactoryInterface + * @return void + */ +- public function addConfiguration(NodeDefinition $node) ++ public function addConfiguration(NodeDefinition $node): void + { + $node +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php +index a2c5815e4b..1c9721ccc6 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php +@@ -26,14 +26,14 @@ interface UserProviderFactoryInterface + * @return void + */ +- public function create(ContainerBuilder $container, string $id, array $config); ++ public function create(ContainerBuilder $container, string $id, array $config): void; + + /** + * @return string + */ +- public function getKey(); ++ public function getKey(): string; + + /** + * @return void + */ +- public function addConfiguration(NodeDefinition $builder); ++ public function addConfiguration(NodeDefinition $builder): void; + } +diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +index 37978b285f..ca1f5ae517 100644 +--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php ++++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +@@ -82,5 +82,5 @@ class SecurityExtension extends Extension implements PrependExtensionInterface + * @return void + */ +- public function prepend(ContainerBuilder $container) ++ public function prepend(ContainerBuilder $container): void + { + foreach ($this->getSortedFactories() as $factory) { +@@ -94,5 +94,5 @@ class SecurityExtension extends Extension implements PrependExtensionInterface + * @return void + */ +- public function load(array $configs, ContainerBuilder $container) ++ public function load(array $configs, ContainerBuilder $container): void + { + if (!array_filter($configs)) { +diff --git a/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php b/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php +index 0c703f79cf..7d9e956580 100644 +--- a/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php ++++ b/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php +@@ -40,5 +40,5 @@ class FirewallListener extends Firewall + * @return void + */ +- public function configureLogoutUrlGenerator(RequestEvent $event) ++ public function configureLogoutUrlGenerator(RequestEvent $event): void + { + if (!$event->isMainRequest()) { +@@ -54,5 +54,5 @@ class FirewallListener extends Firewall + * @return void + */ +- public function onKernelFinishRequest(FinishRequestEvent $event) ++ public function onKernelFinishRequest(FinishRequestEvent $event): void + { + if ($event->isMainRequest()) { +diff --git a/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php b/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php +index 5077c6768d..bd741840f4 100644 +--- a/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php ++++ b/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php +@@ -42,5 +42,5 @@ class FirewallContext + * @return FirewallConfig|null + */ +- public function getConfig() ++ public function getConfig(): ?FirewallConfig + { + return $this->config; +@@ -58,5 +58,5 @@ class FirewallContext + * @return ExceptionListener|null + */ +- public function getExceptionListener() ++ public function getExceptionListener(): ?ExceptionListener + { + return $this->exceptionListener; +@@ -66,5 +66,5 @@ class FirewallContext + * @return LogoutListener|null + */ +- public function getLogoutListener() ++ public function getLogoutListener(): ?LogoutListener + { + return $this->logoutListener; +diff --git a/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php b/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php +index bf30dafbee..47fe692328 100644 +--- a/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php ++++ b/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php +@@ -57,5 +57,5 @@ class SecurityBundle extends Bundle + * @return void + */ +- public function build(ContainerBuilder $container) ++ public function build(ContainerBuilder $container): void + { + parent::build($container); +diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php +index 5c3cff66fc..6c867b1e76 100644 +--- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php ++++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php +@@ -29,5 +29,5 @@ class ExtensionPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!class_exists(Packages::class)) { +diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php +index ecb99ce20e..212ebbc96f 100644 +--- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php ++++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php +@@ -25,5 +25,5 @@ class RuntimeLoaderPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('twig.runtime_loader')) { +diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php +index 99b975edea..2c9e2d326d 100644 +--- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php ++++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php +@@ -28,5 +28,5 @@ class TwigEnvironmentPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (false === $container->hasDefinition('twig')) { +diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php +index 1da7e86797..eb6df32373 100644 +--- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php ++++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php +@@ -27,5 +27,5 @@ class TwigLoaderPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (false === $container->hasDefinition('twig')) { +diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php +index b3eec9ff60..742be71a64 100644 +--- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php ++++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php +@@ -46,5 +46,5 @@ class EnvironmentConfigurator + * @return void + */ +- public function configure(Environment $environment) ++ public function configure(Environment $environment): void + { + $environment->getExtension(CoreExtension::class)->setDateFormat($this->dateFormat, $this->intervalFormat); +diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +index 101dbf699a..81f5a7fc4c 100644 +--- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php ++++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +@@ -39,5 +39,5 @@ class TwigExtension extends Extension + * @return void + */ +- public function load(array $configs, ContainerBuilder $container) ++ public function load(array $configs, ContainerBuilder $container): void + { + $loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); +diff --git a/src/Symfony/Bundle/TwigBundle/TwigBundle.php b/src/Symfony/Bundle/TwigBundle/TwigBundle.php +index 802cb536d1..d7e1017875 100644 +--- a/src/Symfony/Bundle/TwigBundle/TwigBundle.php ++++ b/src/Symfony/Bundle/TwigBundle/TwigBundle.php +@@ -31,5 +31,5 @@ class TwigBundle extends Bundle + * @return void + */ +- public function build(ContainerBuilder $container) ++ public function build(ContainerBuilder $container): void + { + parent::build($container); +@@ -45,5 +45,5 @@ class TwigBundle extends Bundle + * @return void + */ +- public function registerCommands(Application $application) ++ public function registerCommands(Application $application): void + { + // noop +diff --git a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php +index 16e6db29ee..1420b29c99 100644 +--- a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php ++++ b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php +@@ -41,5 +41,5 @@ class WebProfilerExtension extends Extension + * @return void + */ +- public function load(array $configs, ContainerBuilder $container) ++ public function load(array $configs, ContainerBuilder $container): void + { + $configuration = $this->getConfiguration($configs, $container); +diff --git a/src/Symfony/Bundle/WebProfilerBundle/WebProfilerBundle.php b/src/Symfony/Bundle/WebProfilerBundle/WebProfilerBundle.php +index 264b26c925..2dbc40c735 100644 +--- a/src/Symfony/Bundle/WebProfilerBundle/WebProfilerBundle.php ++++ b/src/Symfony/Bundle/WebProfilerBundle/WebProfilerBundle.php +@@ -22,5 +22,5 @@ class WebProfilerBundle extends Bundle + * @return void + */ +- public function boot() ++ public function boot(): void + { + if ('prod' === $this->container->getParameter('kernel.environment')) { +diff --git a/src/Symfony/Component/Asset/Packages.php b/src/Symfony/Component/Asset/Packages.php +index cffea43c49..0645fbd756 100644 +--- a/src/Symfony/Component/Asset/Packages.php ++++ b/src/Symfony/Component/Asset/Packages.php +@@ -41,5 +41,5 @@ class Packages + * @return void + */ +- public function setDefaultPackage(PackageInterface $defaultPackage) ++ public function setDefaultPackage(PackageInterface $defaultPackage): void + { + $this->defaultPackage = $defaultPackage; +@@ -49,5 +49,5 @@ class Packages + * @return void + */ +- public function addPackage(string $name, PackageInterface $package) ++ public function addPackage(string $name, PackageInterface $package): void + { + $this->packages[$name] = $package; +diff --git a/src/Symfony/Component/BrowserKit/AbstractBrowser.php b/src/Symfony/Component/BrowserKit/AbstractBrowser.php +index bf5ff90e5d..fe656cac5c 100644 +--- a/src/Symfony/Component/BrowserKit/AbstractBrowser.php ++++ b/src/Symfony/Component/BrowserKit/AbstractBrowser.php +@@ -64,5 +64,5 @@ abstract class AbstractBrowser + * @return void + */ +- public function followRedirects(bool $followRedirects = true) ++ public function followRedirects(bool $followRedirects = true): void + { + $this->followRedirects = $followRedirects; +@@ -74,5 +74,5 @@ abstract class AbstractBrowser + * @return void + */ +- public function followMetaRefresh(bool $followMetaRefresh = true) ++ public function followMetaRefresh(bool $followMetaRefresh = true): void + { + $this->followMetaRefresh = $followMetaRefresh; +@@ -92,5 +92,5 @@ abstract class AbstractBrowser + * @return void + */ +- public function setMaxRedirects(int $maxRedirects) ++ public function setMaxRedirects(int $maxRedirects): void + { + $this->maxRedirects = $maxRedirects < 0 ? -1 : $maxRedirects; +@@ -113,5 +113,5 @@ abstract class AbstractBrowser + * @throws \RuntimeException When Symfony Process Component is not installed + */ +- public function insulate(bool $insulated = true) ++ public function insulate(bool $insulated = true): void + { + if ($insulated && !class_exists(\Symfony\Component\Process\Process::class)) { +@@ -127,5 +127,5 @@ abstract class AbstractBrowser + * @return void + */ +- public function setServerParameters(array $server) ++ public function setServerParameters(array $server): void + { + $this->server = array_merge([ +@@ -139,5 +139,5 @@ abstract class AbstractBrowser + * @return void + */ +- public function setServerParameter(string $key, string $value) ++ public function setServerParameter(string $key, string $value): void + { + $this->server[$key] = $value; +@@ -433,5 +433,5 @@ abstract class AbstractBrowser + * @throws \RuntimeException When processing returns exit code + */ +- protected function doRequestInProcess(object $request) ++ protected function doRequestInProcess(object $request): object + { + $deprecationsFile = tempnam(sys_get_temp_dir(), 'deprec'); +@@ -466,5 +466,5 @@ abstract class AbstractBrowser + * @return object + */ +- abstract protected function doRequest(object $request); ++ abstract protected function doRequest(object $request): object; + + /** +@@ -485,5 +485,5 @@ abstract class AbstractBrowser + * @return object + */ +- protected function filterRequest(Request $request) ++ protected function filterRequest(Request $request): object + { + return $request; +@@ -495,5 +495,5 @@ abstract class AbstractBrowser + * @return Response + */ +- protected function filterResponse(object $response) ++ protected function filterResponse(object $response): Response + { + return $response; +@@ -620,5 +620,5 @@ abstract class AbstractBrowser + * @return void + */ +- public function restart() ++ public function restart(): void + { + $this->cookieJar->clear(); +diff --git a/src/Symfony/Component/BrowserKit/CookieJar.php b/src/Symfony/Component/BrowserKit/CookieJar.php +index 9753d305d9..081d621068 100644 +--- a/src/Symfony/Component/BrowserKit/CookieJar.php ++++ b/src/Symfony/Component/BrowserKit/CookieJar.php +@@ -24,5 +24,5 @@ class CookieJar + * @return void + */ +- public function set(Cookie $cookie) ++ public function set(Cookie $cookie): void + { + $this->cookieJar[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; +@@ -71,5 +71,5 @@ class CookieJar + * @return void + */ +- public function expire(string $name, ?string $path = '/', string $domain = null) ++ public function expire(string $name, ?string $path = '/', string $domain = null): void + { + $path ??= '/'; +@@ -101,5 +101,5 @@ class CookieJar + * @return void + */ +- public function clear() ++ public function clear(): void + { + $this->cookieJar = []; +@@ -113,5 +113,5 @@ class CookieJar + * @return void + */ +- public function updateFromSetCookie(array $setCookies, string $uri = null) ++ public function updateFromSetCookie(array $setCookies, string $uri = null): void + { + $cookies = []; +@@ -141,5 +141,5 @@ class CookieJar + * @return void + */ +- public function updateFromResponse(Response $response, string $uri = null) ++ public function updateFromResponse(Response $response, string $uri = null): void + { + $this->updateFromSetCookie($response->getHeader('Set-Cookie', false), $uri); +@@ -215,5 +215,5 @@ class CookieJar + * @return void + */ +- public function flushExpiredCookies() ++ public function flushExpiredCookies(): void + { + foreach ($this->cookieJar as $domain => $pathCookies) { +diff --git a/src/Symfony/Component/BrowserKit/History.php b/src/Symfony/Component/BrowserKit/History.php +index 01f5e80382..20c3349c14 100644 +--- a/src/Symfony/Component/BrowserKit/History.php ++++ b/src/Symfony/Component/BrowserKit/History.php +@@ -27,5 +27,5 @@ class History + * @return void + */ +- public function clear() ++ public function clear(): void + { + $this->stack = []; +@@ -38,5 +38,5 @@ class History + * @return void + */ +- public function add(Request $request) ++ public function add(Request $request): void + { + $this->stack = \array_slice($this->stack, 0, $this->position + 1); +diff --git a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php +index 3dc93fd541..8a7df7a19b 100644 +--- a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php ++++ b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php +@@ -51,5 +51,5 @@ class ApcuAdapter extends AbstractAdapter + * @return bool + */ +- public static function isSupported() ++ public static function isSupported(): bool + { + return \function_exists('apcu_fetch') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL); +diff --git a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php +index ca5bcaded8..90c2bf5080 100644 +--- a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php ++++ b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php +@@ -264,5 +264,5 @@ class ArrayAdapter implements AdapterInterface, CacheInterface, LoggerAwareInter + * @return void + */ +- public function reset() ++ public function reset(): void + { + $this->clear(); +diff --git a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php +index 07ef47f5eb..ea659c2fb4 100644 +--- a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php ++++ b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php +@@ -284,5 +284,5 @@ class ChainAdapter implements AdapterInterface, CacheInterface, PruneableInterfa + * @return void + */ +- public function reset() ++ public function reset(): void + { + foreach ($this->adapters as $adapter) { +diff --git a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php +index d447e9f2fd..1f99e0725e 100644 +--- a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php ++++ b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php +@@ -71,5 +71,5 @@ class MemcachedAdapter extends AbstractAdapter + * @return bool + */ +- public static function isSupported() ++ public static function isSupported(): bool + { + return \extension_loaded('memcached') && version_compare(phpversion('memcached'), '3.1.6', '>='); +diff --git a/src/Symfony/Component/Cache/Adapter/PdoAdapter.php b/src/Symfony/Component/Cache/Adapter/PdoAdapter.php +index 8efbe06efd..b73690d91a 100644 +--- a/src/Symfony/Component/Cache/Adapter/PdoAdapter.php ++++ b/src/Symfony/Component/Cache/Adapter/PdoAdapter.php +@@ -101,5 +101,5 @@ class PdoAdapter extends AbstractAdapter implements PruneableInterface + * @throws \DomainException When an unsupported PDO driver is used + */ +- public function createTable() ++ public function createTable(): void + { + // connect if we are not yet +diff --git a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php +index d104530c0d..a1845d3ae9 100644 +--- a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php ++++ b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php +@@ -58,5 +58,5 @@ class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface + * @return bool + */ +- public static function isSupported() ++ public static function isSupported(): bool + { + self::$startTime ??= $_SERVER['REQUEST_TIME'] ?? time(); +@@ -281,5 +281,5 @@ class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface + * @return bool + */ +- protected function doUnlink(string $file) ++ protected function doUnlink(string $file): bool + { + unset(self::$valuesCache[$file]); +diff --git a/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php +index 7525632e91..cfe5cd863d 100644 +--- a/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php ++++ b/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php +@@ -283,5 +283,5 @@ class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterfac + * @return void + */ +- public function reset() ++ public function reset(): void + { + $this->commit(); +diff --git a/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php b/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php +index 118b009099..ba388b3ad8 100644 +--- a/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php ++++ b/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php +@@ -196,5 +196,5 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt + * @return void + */ +- public function reset() ++ public function reset(): void + { + if ($this->pool instanceof ResetInterface) { +@@ -218,5 +218,5 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt + * @return array + */ +- public function getCalls() ++ public function getCalls(): array + { + return $this->calls; +@@ -226,5 +226,5 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt + * @return void + */ +- public function clearCalls() ++ public function clearCalls(): void + { + $this->calls = []; +@@ -239,5 +239,5 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt + * @return TraceableAdapterEvent + */ +- protected function start(string $name) ++ protected function start(string $name): TraceableAdapterEvent + { + $this->calls[] = $event = new TraceableAdapterEvent(); +diff --git a/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php b/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php +index b50ca12308..6c39f61e89 100644 +--- a/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php ++++ b/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php +@@ -30,5 +30,5 @@ class CacheCollectorPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('data_collector.cache')) { +diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php +index 6793bea94c..230575ef42 100644 +--- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php ++++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php +@@ -24,5 +24,5 @@ class CachePoolClearerPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $container->getParameterBag()->remove('cache.prefix.seed'); +diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php +index 3a9d4f23db..8e9253824d 100644 +--- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php ++++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php +@@ -30,5 +30,5 @@ use Symfony\Component\DependencyInjection\Reference; + class CachePoolPass implements CompilerPassInterface + { +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if ($container->hasParameter('cache.prefix.seed')) { +diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php +index 00e912686b..58872ec2bc 100644 +--- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php ++++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php +@@ -27,5 +27,5 @@ class CachePoolPrunerPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('console.command.cache_pool_prune')) { +diff --git a/src/Symfony/Component/Cache/Traits/FilesystemCommonTrait.php b/src/Symfony/Component/Cache/Traits/FilesystemCommonTrait.php +index 2ee96e9b37..f49ed24f68 100644 +--- a/src/Symfony/Component/Cache/Traits/FilesystemCommonTrait.php ++++ b/src/Symfony/Component/Cache/Traits/FilesystemCommonTrait.php +@@ -81,5 +81,5 @@ trait FilesystemCommonTrait + * @return bool + */ +- protected function doUnlink(string $file) ++ protected function doUnlink(string $file): bool + { + return @unlink($file); +diff --git a/src/Symfony/Component/Config/ConfigCacheInterface.php b/src/Symfony/Component/Config/ConfigCacheInterface.php +index be7f0986c3..fa5347e34b 100644 +--- a/src/Symfony/Component/Config/ConfigCacheInterface.php ++++ b/src/Symfony/Component/Config/ConfigCacheInterface.php +@@ -44,4 +44,4 @@ interface ConfigCacheInterface + * @throws \RuntimeException When the cache file cannot be written + */ +- public function write(string $content, array $metadata = null); ++ public function write(string $content, array $metadata = null): void; + } +diff --git a/src/Symfony/Component/Config/Definition/ArrayNode.php b/src/Symfony/Component/Config/Definition/ArrayNode.php +index 1448220cdd..12935fb079 100644 +--- a/src/Symfony/Component/Config/Definition/ArrayNode.php ++++ b/src/Symfony/Component/Config/Definition/ArrayNode.php +@@ -36,5 +36,5 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setNormalizeKeys(bool $normalizeKeys) ++ public function setNormalizeKeys(bool $normalizeKeys): void + { + $this->normalizeKeys = $normalizeKeys; +@@ -84,5 +84,5 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setXmlRemappings(array $remappings) ++ public function setXmlRemappings(array $remappings): void + { + $this->xmlRemappings = $remappings; +@@ -105,5 +105,5 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setAddIfNotSet(bool $boolean) ++ public function setAddIfNotSet(bool $boolean): void + { + $this->addIfNotSet = $boolean; +@@ -115,5 +115,5 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setAllowFalse(bool $allow) ++ public function setAllowFalse(bool $allow): void + { + $this->allowFalse = $allow; +@@ -125,5 +125,5 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setAllowNewKeys(bool $allow) ++ public function setAllowNewKeys(bool $allow): void + { + $this->allowNewKeys = $allow; +@@ -135,5 +135,5 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setPerformDeepMerging(bool $boolean) ++ public function setPerformDeepMerging(bool $boolean): void + { + $this->performDeepMerging = $boolean; +@@ -148,5 +148,5 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setIgnoreExtraKeys(bool $boolean, bool $remove = true) ++ public function setIgnoreExtraKeys(bool $boolean, bool $remove = true): void + { + $this->ignoreExtraKeys = $boolean; +@@ -165,5 +165,5 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + $this->name = $name; +@@ -199,5 +199,5 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface + * @throws \InvalidArgumentException when the child node's name is not unique + */ +- public function addChild(NodeInterface $node) ++ public function addChild(NodeInterface $node): void + { + $name = $node->getName(); +@@ -262,5 +262,5 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- protected function validateType(mixed $value) ++ protected function validateType(mixed $value): void + { + if (!\is_array($value) && (!$this->allowFalse || false !== $value)) { +diff --git a/src/Symfony/Component/Config/Definition/BaseNode.php b/src/Symfony/Component/Config/Definition/BaseNode.php +index f2e32384a9..b42bc8d3c7 100644 +--- a/src/Symfony/Component/Config/Definition/BaseNode.php ++++ b/src/Symfony/Component/Config/Definition/BaseNode.php +@@ -102,5 +102,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function setAttribute(string $key, mixed $value) ++ public function setAttribute(string $key, mixed $value): void + { + $this->attributes[$key] = $value; +@@ -125,5 +125,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function setAttributes(array $attributes) ++ public function setAttributes(array $attributes): void + { + $this->attributes = $attributes; +@@ -133,5 +133,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function removeAttribute(string $key) ++ public function removeAttribute(string $key): void + { + unset($this->attributes[$key]); +@@ -143,5 +143,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function setInfo(string $info) ++ public function setInfo(string $info): void + { + $this->setAttribute('info', $info); +@@ -161,5 +161,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function setExample(string|array $example) ++ public function setExample(string|array $example): void + { + $this->setAttribute('example', $example); +@@ -179,5 +179,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function addEquivalentValue(mixed $originalValue, mixed $equivalentValue) ++ public function addEquivalentValue(mixed $originalValue, mixed $equivalentValue): void + { + $this->equivalentValues[] = [$originalValue, $equivalentValue]; +@@ -189,5 +189,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function setRequired(bool $boolean) ++ public function setRequired(bool $boolean): void + { + $this->required = $boolean; +@@ -206,5 +206,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function setDeprecated(string $package, string $version, string $message = 'The child node "%node%" at path "%path%" is deprecated.') ++ public function setDeprecated(string $package, string $version, string $message = 'The child node "%node%" at path "%path%" is deprecated.'): void + { + $this->deprecation = [ +@@ -220,5 +220,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function setAllowOverwrite(bool $allow) ++ public function setAllowOverwrite(bool $allow): void + { + $this->allowOverwrite = $allow; +@@ -232,5 +232,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function setNormalizationClosures(array $closures) ++ public function setNormalizationClosures(array $closures): void + { + $this->normalizationClosures = $closures; +@@ -244,5 +244,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function setNormalizedTypes(array $types) ++ public function setNormalizedTypes(array $types): void + { + $this->normalizedTypes = $types; +@@ -266,5 +266,5 @@ abstract class BaseNode implements NodeInterface + * @return void + */ +- public function setFinalValidationClosures(array $closures) ++ public function setFinalValidationClosures(array $closures): void + { + $this->finalValidationClosures = $closures; +diff --git a/src/Symfony/Component/Config/Definition/BooleanNode.php b/src/Symfony/Component/Config/Definition/BooleanNode.php +index 7ec903cd67..9a86de2559 100644 +--- a/src/Symfony/Component/Config/Definition/BooleanNode.php ++++ b/src/Symfony/Component/Config/Definition/BooleanNode.php +@@ -24,5 +24,5 @@ class BooleanNode extends ScalarNode + * @return void + */ +- protected function validateType(mixed $value) ++ protected function validateType(mixed $value): void + { + if (!\is_bool($value)) { +diff --git a/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php +index 0110f0502f..a5754c1464 100644 +--- a/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php ++++ b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php +@@ -49,5 +49,5 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition + * @return void + */ +- public function setBuilder(NodeBuilder $builder) ++ public function setBuilder(NodeBuilder $builder): void + { + $this->nodeBuilder = $builder; +@@ -430,5 +430,5 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition + * @throws InvalidDefinitionException + */ +- protected function validateConcreteNode(ArrayNode $node) ++ protected function validateConcreteNode(ArrayNode $node): void + { + $path = $node->getPath(); +@@ -462,5 +462,5 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition + * @throws InvalidDefinitionException + */ +- protected function validatePrototypeNode(PrototypedArrayNode $node) ++ protected function validatePrototypeNode(PrototypedArrayNode $node): void + { + $path = $node->getPath(); +diff --git a/src/Symfony/Component/Config/Definition/Builder/BuilderAwareInterface.php b/src/Symfony/Component/Config/Definition/Builder/BuilderAwareInterface.php +index bb40307e17..998fb85b27 100644 +--- a/src/Symfony/Component/Config/Definition/Builder/BuilderAwareInterface.php ++++ b/src/Symfony/Component/Config/Definition/Builder/BuilderAwareInterface.php +@@ -24,4 +24,4 @@ interface BuilderAwareInterface + * @return void + */ +- public function setBuilder(NodeBuilder $builder); ++ public function setBuilder(NodeBuilder $builder): void; + } +diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php +index 7cda0bc7d8..b2311826f4 100644 +--- a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php ++++ b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php +@@ -111,5 +111,5 @@ class NodeBuilder implements NodeParentInterface + * @return NodeDefinition&ParentNodeDefinitionInterface + */ +- public function end() ++ public function end(): NodeDefinition&ParentNodeDefinitionInterface + { + return $this->parent; +diff --git a/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php +index 4f868f7031..190b720b61 100644 +--- a/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php ++++ b/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php +@@ -55,5 +55,5 @@ class TreeBuilder implements NodeParentInterface + * @return void + */ +- public function setPathSeparator(string $separator) ++ public function setPathSeparator(string $separator): void + { + // unset last built as changing path separator changes all nodes +diff --git a/src/Symfony/Component/Config/Definition/ConfigurationInterface.php b/src/Symfony/Component/Config/Definition/ConfigurationInterface.php +index 7b5d443fe6..d64ae0d024 100644 +--- a/src/Symfony/Component/Config/Definition/ConfigurationInterface.php ++++ b/src/Symfony/Component/Config/Definition/ConfigurationInterface.php +@@ -26,4 +26,4 @@ interface ConfigurationInterface + * @return TreeBuilder + */ +- public function getConfigTreeBuilder(); ++ public function getConfigTreeBuilder(): TreeBuilder; + } +diff --git a/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php b/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php +index 34f93ce07d..0e7f1317d3 100644 +--- a/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php ++++ b/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php +@@ -35,5 +35,5 @@ class XmlReferenceDumper + * @return string + */ +- public function dump(ConfigurationInterface $configuration, string $namespace = null) ++ public function dump(ConfigurationInterface $configuration, string $namespace = null): string + { + return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree(), $namespace); +@@ -43,5 +43,5 @@ class XmlReferenceDumper + * @return string + */ +- public function dumpNode(NodeInterface $node, string $namespace = null) ++ public function dumpNode(NodeInterface $node, string $namespace = null): string + { + $this->reference = ''; +diff --git a/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php b/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php +index 97a391adab..1a59318a40 100644 +--- a/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php ++++ b/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php +@@ -34,5 +34,5 @@ class YamlReferenceDumper + * @return string + */ +- public function dump(ConfigurationInterface $configuration) ++ public function dump(ConfigurationInterface $configuration): string + { + return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree()); +@@ -42,5 +42,5 @@ class YamlReferenceDumper + * @return string + */ +- public function dumpAtPath(ConfigurationInterface $configuration, string $path) ++ public function dumpAtPath(ConfigurationInterface $configuration, string $path): string + { + $rootNode = $node = $configuration->getConfigTreeBuilder()->buildTree(); +@@ -71,5 +71,5 @@ class YamlReferenceDumper + * @return string + */ +- public function dumpNode(NodeInterface $node) ++ public function dumpNode(NodeInterface $node): string + { + $this->reference = ''; +diff --git a/src/Symfony/Component/Config/Definition/EnumNode.php b/src/Symfony/Component/Config/Definition/EnumNode.php +index 4edeae9040..d562308fa2 100644 +--- a/src/Symfony/Component/Config/Definition/EnumNode.php ++++ b/src/Symfony/Component/Config/Definition/EnumNode.php +@@ -50,5 +50,5 @@ class EnumNode extends ScalarNode + * @return array + */ +- public function getValues() ++ public function getValues(): array + { + return $this->values; +@@ -72,5 +72,5 @@ class EnumNode extends ScalarNode + * @return void + */ +- protected function validateType(mixed $value) ++ protected function validateType(mixed $value): void + { + if ($value instanceof \UnitEnum) { +diff --git a/src/Symfony/Component/Config/Definition/Exception/InvalidConfigurationException.php b/src/Symfony/Component/Config/Definition/Exception/InvalidConfigurationException.php +index 794447bf8d..42db1e5a40 100644 +--- a/src/Symfony/Component/Config/Definition/Exception/InvalidConfigurationException.php ++++ b/src/Symfony/Component/Config/Definition/Exception/InvalidConfigurationException.php +@@ -26,5 +26,5 @@ class InvalidConfigurationException extends Exception + * @return void + */ +- public function setPath(string $path) ++ public function setPath(string $path): void + { + $this->path = $path; +@@ -41,5 +41,5 @@ class InvalidConfigurationException extends Exception + * @return void + */ +- public function addHint(string $hint) ++ public function addHint(string $hint): void + { + if (!$this->containsHints) { +diff --git a/src/Symfony/Component/Config/Definition/FloatNode.php b/src/Symfony/Component/Config/Definition/FloatNode.php +index ce4193e09c..64344cadb6 100644 +--- a/src/Symfony/Component/Config/Definition/FloatNode.php ++++ b/src/Symfony/Component/Config/Definition/FloatNode.php +@@ -24,5 +24,5 @@ class FloatNode extends NumericNode + * @return void + */ +- protected function validateType(mixed $value) ++ protected function validateType(mixed $value): void + { + // Integers are also accepted, we just cast them +diff --git a/src/Symfony/Component/Config/Definition/IntegerNode.php b/src/Symfony/Component/Config/Definition/IntegerNode.php +index 4a3e3253ce..09957cd846 100644 +--- a/src/Symfony/Component/Config/Definition/IntegerNode.php ++++ b/src/Symfony/Component/Config/Definition/IntegerNode.php +@@ -24,5 +24,5 @@ class IntegerNode extends NumericNode + * @return void + */ +- protected function validateType(mixed $value) ++ protected function validateType(mixed $value): void + { + if (!\is_int($value)) { +diff --git a/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php b/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php +index 9dce7444b0..46ab38e3ff 100644 +--- a/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php ++++ b/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php +@@ -24,4 +24,4 @@ interface PrototypeNodeInterface extends NodeInterface + * @return void + */ +- public function setName(string $name); ++ public function setName(string $name): void; + } +diff --git a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php +index 11910fb338..58489913ce 100644 +--- a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php ++++ b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php +@@ -41,5 +41,5 @@ class PrototypedArrayNode extends ArrayNode + * @return void + */ +- public function setMinNumberOfElements(int $number) ++ public function setMinNumberOfElements(int $number): void + { + $this->minNumberOfElements = $number; +@@ -72,5 +72,5 @@ class PrototypedArrayNode extends ArrayNode + * @return void + */ +- public function setKeyAttribute(string $attribute, bool $remove = true) ++ public function setKeyAttribute(string $attribute, bool $remove = true): void + { + $this->keyAttribute = $attribute; +@@ -91,5 +91,5 @@ class PrototypedArrayNode extends ArrayNode + * @return void + */ +- public function setDefaultValue(array $value) ++ public function setDefaultValue(array $value): void + { + $this->defaultValue = $value; +@@ -108,5 +108,5 @@ class PrototypedArrayNode extends ArrayNode + * @return void + */ +- public function setAddChildrenIfNoneSet(int|string|array|null $children = ['defaults']) ++ public function setAddChildrenIfNoneSet(int|string|array|null $children = ['defaults']): void + { + if (null === $children) { +@@ -141,5 +141,5 @@ class PrototypedArrayNode extends ArrayNode + * @return void + */ +- public function setPrototype(PrototypeNodeInterface $node) ++ public function setPrototype(PrototypeNodeInterface $node): void + { + $this->prototype = $node; +@@ -159,5 +159,5 @@ class PrototypedArrayNode extends ArrayNode + * @throws Exception + */ +- public function addChild(NodeInterface $node) ++ public function addChild(NodeInterface $node): void + { + throw new Exception('A prototyped array node cannot have concrete children.'); +diff --git a/src/Symfony/Component/Config/Definition/ScalarNode.php b/src/Symfony/Component/Config/Definition/ScalarNode.php +index e11fa1ee1c..ee27f874d0 100644 +--- a/src/Symfony/Component/Config/Definition/ScalarNode.php ++++ b/src/Symfony/Component/Config/Definition/ScalarNode.php +@@ -31,5 +31,5 @@ class ScalarNode extends VariableNode + * @return void + */ +- protected function validateType(mixed $value) ++ protected function validateType(mixed $value): void + { + if (!\is_scalar($value) && null !== $value) { +diff --git a/src/Symfony/Component/Config/Definition/VariableNode.php b/src/Symfony/Component/Config/Definition/VariableNode.php +index 6bdc65b4e7..c5a3fb4f6f 100644 +--- a/src/Symfony/Component/Config/Definition/VariableNode.php ++++ b/src/Symfony/Component/Config/Definition/VariableNode.php +@@ -31,5 +31,5 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setDefaultValue(mixed $value) ++ public function setDefaultValue(mixed $value): void + { + $this->defaultValueSet = true; +@@ -56,5 +56,5 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setAllowEmptyValue(bool $boolean) ++ public function setAllowEmptyValue(bool $boolean): void + { + $this->allowEmptyValue = $boolean; +@@ -64,5 +64,5 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + $this->name = $name; +@@ -72,5 +72,5 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface + * @return void + */ +- protected function validateType(mixed $value) ++ protected function validateType(mixed $value): void + { + } +diff --git a/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php b/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php +index c5173ae580..1f5aa3616e 100644 +--- a/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php ++++ b/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php +@@ -31,5 +31,5 @@ class FileLocatorFileNotFoundException extends \InvalidArgumentException + * @return array + */ +- public function getPaths() ++ public function getPaths(): array + { + return $this->paths; +diff --git a/src/Symfony/Component/Config/Exception/LoaderLoadException.php b/src/Symfony/Component/Config/Exception/LoaderLoadException.php +index 57afd6a8db..3d662340ea 100644 +--- a/src/Symfony/Component/Config/Exception/LoaderLoadException.php ++++ b/src/Symfony/Component/Config/Exception/LoaderLoadException.php +@@ -80,5 +80,5 @@ class LoaderLoadException extends \Exception + * @return string + */ +- protected function varToString(mixed $var) ++ protected function varToString(mixed $var): string + { + if (\is_object($var)) { +diff --git a/src/Symfony/Component/Config/FileLocator.php b/src/Symfony/Component/Config/FileLocator.php +index ab18232db1..bc5af7f89c 100644 +--- a/src/Symfony/Component/Config/FileLocator.php ++++ b/src/Symfony/Component/Config/FileLocator.php +@@ -31,5 +31,5 @@ class FileLocator implements FileLocatorInterface + } + +- public function locate(string $name, string $currentPath = null, bool $first = true) ++ public function locate(string $name, string $currentPath = null, bool $first = true): string|array + { + if ('' === $name) { +diff --git a/src/Symfony/Component/Config/FileLocatorInterface.php b/src/Symfony/Component/Config/FileLocatorInterface.php +index e3ca1d49c4..526d350484 100644 +--- a/src/Symfony/Component/Config/FileLocatorInterface.php ++++ b/src/Symfony/Component/Config/FileLocatorInterface.php +@@ -31,4 +31,4 @@ interface FileLocatorInterface + * @throws FileLocatorFileNotFoundException If a file is not found + */ +- public function locate(string $name, string $currentPath = null, bool $first = true); ++ public function locate(string $name, string $currentPath = null, bool $first = true): string|array; + } +diff --git a/src/Symfony/Component/Config/Loader/FileLoader.php b/src/Symfony/Component/Config/Loader/FileLoader.php +index 3f06f0c38c..ce0fd1d76d 100644 +--- a/src/Symfony/Component/Config/Loader/FileLoader.php ++++ b/src/Symfony/Component/Config/Loader/FileLoader.php +@@ -67,5 +67,5 @@ abstract class FileLoader extends Loader + * @throws FileLocatorFileNotFoundException + */ +- public function import(mixed $resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null, string|array $exclude = null) ++ public function import(mixed $resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null, string|array $exclude = null): mixed + { + if (\is_string($resource) && \strlen($resource) !== ($i = strcspn($resource, '*?{[')) && !str_contains($resource, "\n")) { +diff --git a/src/Symfony/Component/Config/Loader/Loader.php b/src/Symfony/Component/Config/Loader/Loader.php +index 36e85ad346..bb6d9ca2fe 100644 +--- a/src/Symfony/Component/Config/Loader/Loader.php ++++ b/src/Symfony/Component/Config/Loader/Loader.php +@@ -37,5 +37,5 @@ abstract class Loader implements LoaderInterface + * @return void + */ +- public function setResolver(LoaderResolverInterface $resolver) ++ public function setResolver(LoaderResolverInterface $resolver): void + { + $this->resolver = $resolver; +@@ -47,5 +47,5 @@ abstract class Loader implements LoaderInterface + * @return mixed + */ +- public function import(mixed $resource, string $type = null) ++ public function import(mixed $resource, string $type = null): mixed + { + return $this->resolve($resource, $type)->load($resource, $type); +diff --git a/src/Symfony/Component/Config/Loader/LoaderInterface.php b/src/Symfony/Component/Config/Loader/LoaderInterface.php +index 4e0746d4d6..c080bd63a9 100644 +--- a/src/Symfony/Component/Config/Loader/LoaderInterface.php ++++ b/src/Symfony/Component/Config/Loader/LoaderInterface.php +@@ -26,5 +26,5 @@ interface LoaderInterface + * @throws \Exception If something went wrong + */ +- public function load(mixed $resource, string $type = null); ++ public function load(mixed $resource, string $type = null): mixed; + + /** +@@ -35,5 +35,5 @@ interface LoaderInterface + * @return bool + */ +- public function supports(mixed $resource, string $type = null); ++ public function supports(mixed $resource, string $type = null): bool; + + /** +@@ -42,5 +42,5 @@ interface LoaderInterface + * @return LoaderResolverInterface + */ +- public function getResolver(); ++ public function getResolver(): LoaderResolverInterface; + + /** +@@ -49,4 +49,4 @@ interface LoaderInterface + * @return void + */ +- public function setResolver(LoaderResolverInterface $resolver); ++ public function setResolver(LoaderResolverInterface $resolver): void; + } +diff --git a/src/Symfony/Component/Config/Loader/LoaderResolver.php b/src/Symfony/Component/Config/Loader/LoaderResolver.php +index 670e320122..134e4069e7 100644 +--- a/src/Symfony/Component/Config/Loader/LoaderResolver.php ++++ b/src/Symfony/Component/Config/Loader/LoaderResolver.php +@@ -51,5 +51,5 @@ class LoaderResolver implements LoaderResolverInterface + * @return void + */ +- public function addLoader(LoaderInterface $loader) ++ public function addLoader(LoaderInterface $loader): void + { + $this->loaders[] = $loader; +diff --git a/src/Symfony/Component/Config/ResourceCheckerConfigCache.php b/src/Symfony/Component/Config/ResourceCheckerConfigCache.php +index 93e5c44d39..e00acc3d7f 100644 +--- a/src/Symfony/Component/Config/ResourceCheckerConfigCache.php ++++ b/src/Symfony/Component/Config/ResourceCheckerConfigCache.php +@@ -110,5 +110,5 @@ class ResourceCheckerConfigCache implements ConfigCacheInterface + * @throws \RuntimeException When cache file can't be written + */ +- public function write(string $content, array $metadata = null) ++ public function write(string $content, array $metadata = null): void + { + $mode = 0666; +diff --git a/src/Symfony/Component/Config/ResourceCheckerInterface.php b/src/Symfony/Component/Config/ResourceCheckerInterface.php +index 6b1c6c5fbe..bb80ed461e 100644 +--- a/src/Symfony/Component/Config/ResourceCheckerInterface.php ++++ b/src/Symfony/Component/Config/ResourceCheckerInterface.php +@@ -33,5 +33,5 @@ interface ResourceCheckerInterface + * @return bool + */ +- public function supports(ResourceInterface $metadata); ++ public function supports(ResourceInterface $metadata): bool; + + /** +@@ -42,4 +42,4 @@ interface ResourceCheckerInterface + * @return bool + */ +- public function isFresh(ResourceInterface $resource, int $timestamp); ++ public function isFresh(ResourceInterface $resource, int $timestamp): bool; + } +diff --git a/src/Symfony/Component/Config/Util/XmlUtils.php b/src/Symfony/Component/Config/Util/XmlUtils.php +index cc024da461..00b79e915f 100644 +--- a/src/Symfony/Component/Config/Util/XmlUtils.php ++++ b/src/Symfony/Component/Config/Util/XmlUtils.php +@@ -242,5 +242,5 @@ class XmlUtils + * @return array + */ +- protected static function getXmlErrors(bool $internalErrors) ++ protected static function getXmlErrors(bool $internalErrors): array + { + $errors = []; +diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php +index 28fec5fdec..e8994f2a90 100644 +--- a/src/Symfony/Component/Console/Application.php ++++ b/src/Symfony/Component/Console/Application.php +@@ -114,5 +114,5 @@ class Application implements ResetInterface + * @return void + */ +- public function setCommandLoader(CommandLoaderInterface $commandLoader) ++ public function setCommandLoader(CommandLoaderInterface $commandLoader): void + { + $this->commandLoader = $commandLoader; +@@ -131,5 +131,5 @@ class Application implements ResetInterface + * @return void + */ +- public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent) ++ public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent): void + { + $this->signalsToDispatchEvent = $signalsToDispatchEvent; +@@ -221,5 +221,5 @@ class Application implements ResetInterface + * @return int 0 if everything went fine, or an error code + */ +- public function doRun(InputInterface $input, OutputInterface $output) ++ public function doRun(InputInterface $input, OutputInterface $output): int + { + if (true === $input->hasParameterOption(['--version', '-V'], true)) { +@@ -327,5 +327,5 @@ class Application implements ResetInterface + * @return void + */ +- public function reset() ++ public function reset(): void + { + } +@@ -334,5 +334,5 @@ class Application implements ResetInterface + * @return void + */ +- public function setHelperSet(HelperSet $helperSet) ++ public function setHelperSet(HelperSet $helperSet): void + { + $this->helperSet = $helperSet; +@@ -350,5 +350,5 @@ class Application implements ResetInterface + * @return void + */ +- public function setDefinition(InputDefinition $definition) ++ public function setDefinition(InputDefinition $definition): void + { + $this->definition = $definition; +@@ -423,5 +423,5 @@ class Application implements ResetInterface + * @return void + */ +- public function setCatchExceptions(bool $boolean) ++ public function setCatchExceptions(bool $boolean): void + { + $this->catchExceptions = $boolean; +@@ -441,5 +441,5 @@ class Application implements ResetInterface + * @return void + */ +- public function setAutoExit(bool $boolean) ++ public function setAutoExit(bool $boolean): void + { + $this->autoExit = $boolean; +@@ -459,5 +459,5 @@ class Application implements ResetInterface + * @return void + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + $this->name = $name; +@@ -477,5 +477,5 @@ class Application implements ResetInterface + * @return void + */ +- public function setVersion(string $version) ++ public function setVersion(string $version): void + { + $this->version = $version; +@@ -487,5 +487,5 @@ class Application implements ResetInterface + * @return string + */ +- public function getLongVersion() ++ public function getLongVersion(): string + { + if ('UNKNOWN' !== $this->getName()) { +@@ -517,5 +517,5 @@ class Application implements ResetInterface + * @return void + */ +- public function addCommands(array $commands) ++ public function addCommands(array $commands): void + { + foreach ($commands as $command) { +@@ -532,5 +532,5 @@ class Application implements ResetInterface + * @return Command|null + */ +- public function add(Command $command) ++ public function add(Command $command): ?Command + { + $this->init(); +@@ -569,5 +569,5 @@ class Application implements ResetInterface + * @throws CommandNotFoundException When given command name does not exist + */ +- public function get(string $name) ++ public function get(string $name): Command + { + $this->init(); +@@ -676,5 +676,5 @@ class Application implements ResetInterface + * @throws CommandNotFoundException When command name is incorrect or ambiguous + */ +- public function find(string $name) ++ public function find(string $name): Command + { + $this->init(); +@@ -784,5 +784,5 @@ class Application implements ResetInterface + * @return Command[] + */ +- public function all(string $namespace = null) ++ public function all(string $namespace = null): array + { + $this->init(); +@@ -928,5 +928,5 @@ class Application implements ResetInterface + * @return void + */ +- protected function configureIO(InputInterface $input, OutputInterface $output) ++ protected function configureIO(InputInterface $input, OutputInterface $output): void + { + if (true === $input->hasParameterOption(['--ansi'], true)) { +@@ -993,5 +993,5 @@ class Application implements ResetInterface + * @return int 0 if everything went fine, or an error code + */ +- protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) ++ protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output): int + { + foreach ($command->getHelperSet() as $helper) { +diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php +index 704b112d1a..b296bffcbd 100644 +--- a/src/Symfony/Component/Console/Command/Command.php ++++ b/src/Symfony/Component/Console/Command/Command.php +@@ -145,5 +145,5 @@ class Command + * @return void + */ +- public function ignoreValidationErrors() ++ public function ignoreValidationErrors(): void + { + $this->ignoreValidationErrors = true; +@@ -153,5 +153,5 @@ class Command + * @return void + */ +- public function setApplication(Application $application = null) ++ public function setApplication(Application $application = null): void + { + if (1 > \func_num_args()) { +@@ -171,5 +171,5 @@ class Command + * @return void + */ +- public function setHelperSet(HelperSet $helperSet) ++ public function setHelperSet(HelperSet $helperSet): void + { + $this->helperSet = $helperSet; +@@ -200,5 +200,5 @@ class Command + * @return bool + */ +- public function isEnabled() ++ public function isEnabled(): bool + { + return true; +@@ -210,5 +210,5 @@ class Command + * @return void + */ +- protected function configure() ++ protected function configure(): void + { + } +@@ -228,5 +228,5 @@ class Command + * @see setCode() + */ +- protected function execute(InputInterface $input, OutputInterface $output) ++ protected function execute(InputInterface $input, OutputInterface $output): int + { + throw new LogicException('You must override the execute() method in the concrete command class.'); +@@ -242,5 +242,5 @@ class Command + * @return void + */ +- protected function interact(InputInterface $input, OutputInterface $output) ++ protected function interact(InputInterface $input, OutputInterface $output): void + { + } +@@ -258,5 +258,5 @@ class Command + * @return void + */ +- protected function initialize(InputInterface $input, OutputInterface $output) ++ protected function initialize(InputInterface $input, OutputInterface $output): void + { + } +@@ -701,5 +701,5 @@ class Command + * @throws InvalidArgumentException if the helper is not defined + */ +- public function getHelper(string $name): mixed ++ public function getHelper(string $name): HelperInterface + { + if (null === $this->helperSet) { +diff --git a/src/Symfony/Component/Console/Command/HelpCommand.php b/src/Symfony/Component/Console/Command/HelpCommand.php +index e6447b0506..be85331bc3 100644 +--- a/src/Symfony/Component/Console/Command/HelpCommand.php ++++ b/src/Symfony/Component/Console/Command/HelpCommand.php +@@ -31,5 +31,5 @@ class HelpCommand extends Command + * @return void + */ +- protected function configure() ++ protected function configure(): void + { + $this->ignoreValidationErrors(); +@@ -61,5 +61,5 @@ EOF + * @return void + */ +- public function setCommand(Command $command) ++ public function setCommand(Command $command): void + { + $this->command = $command; +diff --git a/src/Symfony/Component/Console/Command/ListCommand.php b/src/Symfony/Component/Console/Command/ListCommand.php +index 5850c3d7b8..e2371f88fd 100644 +--- a/src/Symfony/Component/Console/Command/ListCommand.php ++++ b/src/Symfony/Component/Console/Command/ListCommand.php +@@ -29,5 +29,5 @@ class ListCommand extends Command + * @return void + */ +- protected function configure() ++ protected function configure(): void + { + $this +diff --git a/src/Symfony/Component/Console/Command/SignalableCommandInterface.php b/src/Symfony/Component/Console/Command/SignalableCommandInterface.php +index 4d0876003d..d33732acb6 100644 +--- a/src/Symfony/Component/Console/Command/SignalableCommandInterface.php ++++ b/src/Symfony/Component/Console/Command/SignalableCommandInterface.php +@@ -31,4 +31,4 @@ interface SignalableCommandInterface + * @return int|false The exit code to return or false to continue the normal execution + */ +- public function handleSignal(int $signal, /* int|false $previousExitCode = 0 */); ++ public function handleSignal(int $signal, /* int|false $previousExitCode = 0 */): int|false; + } +diff --git a/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php b/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php +index 27705ddb63..1b25473f75 100644 +--- a/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php ++++ b/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php +@@ -33,5 +33,5 @@ class AddConsoleCommandPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $commandServices = $container->findTaggedServiceIds('console.command', true); +diff --git a/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php b/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php +index ab468a2562..e20f80d56b 100644 +--- a/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php ++++ b/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php +@@ -24,4 +24,4 @@ interface DescriptorInterface + * @return void + */ +- public function describe(OutputInterface $output, object $object, array $options = []); ++ public function describe(OutputInterface $output, object $object, array $options = []): void; + } +diff --git a/src/Symfony/Component/Console/EventListener/ErrorListener.php b/src/Symfony/Component/Console/EventListener/ErrorListener.php +index 9925a5f746..e72fb5fc89 100644 +--- a/src/Symfony/Component/Console/EventListener/ErrorListener.php ++++ b/src/Symfony/Component/Console/EventListener/ErrorListener.php +@@ -35,5 +35,5 @@ class ErrorListener implements EventSubscriberInterface + * @return void + */ +- public function onConsoleError(ConsoleErrorEvent $event) ++ public function onConsoleError(ConsoleErrorEvent $event): void + { + if (null === $this->logger) { +@@ -55,5 +55,5 @@ class ErrorListener implements EventSubscriberInterface + * @return void + */ +- public function onConsoleTerminate(ConsoleTerminateEvent $event) ++ public function onConsoleTerminate(ConsoleTerminateEvent $event): void + { + if (null === $this->logger) { +diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatter.php b/src/Symfony/Component/Console/Formatter/OutputFormatter.php +index 88519f725d..8d728257fe 100644 +--- a/src/Symfony/Component/Console/Formatter/OutputFormatter.php ++++ b/src/Symfony/Component/Console/Formatter/OutputFormatter.php +@@ -85,5 +85,5 @@ class OutputFormatter implements WrappableOutputFormatterInterface + * @return void + */ +- public function setDecorated(bool $decorated) ++ public function setDecorated(bool $decorated): void + { + $this->decorated = $decorated; +@@ -98,5 +98,5 @@ class OutputFormatter implements WrappableOutputFormatterInterface + * @return void + */ +- public function setStyle(string $name, OutputFormatterStyleInterface $style) ++ public function setStyle(string $name, OutputFormatterStyleInterface $style): void + { + $this->styles[strtolower($name)] = $style; +@@ -122,5 +122,5 @@ class OutputFormatter implements WrappableOutputFormatterInterface + } + +- public function formatAndWrap(?string $message, int $width) ++ public function formatAndWrap(?string $message, int $width): string + { + if (null === $message) { +diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php b/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php +index 433cd41978..02187a7ffc 100644 +--- a/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php ++++ b/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php +@@ -24,5 +24,5 @@ interface OutputFormatterInterface + * @return void + */ +- public function setDecorated(bool $decorated); ++ public function setDecorated(bool $decorated): void; + + /** +@@ -36,5 +36,5 @@ interface OutputFormatterInterface + * @return void + */ +- public function setStyle(string $name, OutputFormatterStyleInterface $style); ++ public function setStyle(string $name, OutputFormatterStyleInterface $style): void; + + /** +diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +index 9f1601d16d..68bfe5e98b 100644 +--- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php ++++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +@@ -42,5 +42,5 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface + * @return void + */ +- public function setForeground(string $color = null) ++ public function setForeground(string $color = null): void + { + if (1 > \func_num_args()) { +@@ -53,5 +53,5 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface + * @return void + */ +- public function setBackground(string $color = null) ++ public function setBackground(string $color = null): void + { + if (1 > \func_num_args()) { +@@ -69,5 +69,5 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface + * @return void + */ +- public function setOption(string $option) ++ public function setOption(string $option): void + { + $this->options[] = $option; +@@ -78,5 +78,5 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface + * @return void + */ +- public function unsetOption(string $option) ++ public function unsetOption(string $option): void + { + $pos = array_search($option, $this->options); +@@ -91,5 +91,5 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface + * @return void + */ +- public function setOptions(array $options) ++ public function setOptions(array $options): void + { + $this->color = new Color($this->foreground, $this->background, $this->options = $options); +diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php +index 3b15098cbe..3f850e129b 100644 +--- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php ++++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php +@@ -24,5 +24,5 @@ interface OutputFormatterStyleInterface + * @return void + */ +- public function setForeground(?string $color); ++ public function setForeground(?string $color): void; + + /** +@@ -31,5 +31,5 @@ interface OutputFormatterStyleInterface + * @return void + */ +- public function setBackground(?string $color); ++ public function setBackground(?string $color): void; + + /** +@@ -38,5 +38,5 @@ interface OutputFormatterStyleInterface + * @return void + */ +- public function setOption(string $option); ++ public function setOption(string $option): void; + + /** +@@ -45,5 +45,5 @@ interface OutputFormatterStyleInterface + * @return void + */ +- public function unsetOption(string $option); ++ public function unsetOption(string $option): void; + + /** +@@ -52,5 +52,5 @@ interface OutputFormatterStyleInterface + * @return void + */ +- public function setOptions(array $options); ++ public function setOptions(array $options): void; + + /** +diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php +index f98c2eff7c..5d9c2c246f 100644 +--- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php ++++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php +@@ -38,5 +38,5 @@ class OutputFormatterStyleStack implements ResetInterface + * @return void + */ +- public function reset() ++ public function reset(): void + { + $this->styles = []; +@@ -48,5 +48,5 @@ class OutputFormatterStyleStack implements ResetInterface + * @return void + */ +- public function push(OutputFormatterStyleInterface $style) ++ public function push(OutputFormatterStyleInterface $style): void + { + $this->styles[] = $style; +diff --git a/src/Symfony/Component/Console/Formatter/WrappableOutputFormatterInterface.php b/src/Symfony/Component/Console/Formatter/WrappableOutputFormatterInterface.php +index 746cd27e79..52c61429cf 100644 +--- a/src/Symfony/Component/Console/Formatter/WrappableOutputFormatterInterface.php ++++ b/src/Symfony/Component/Console/Formatter/WrappableOutputFormatterInterface.php +@@ -24,4 +24,4 @@ interface WrappableOutputFormatterInterface extends OutputFormatterInterface + * @return string + */ +- public function formatAndWrap(?string $message, int $width); ++ public function formatAndWrap(?string $message, int $width): string; + } +diff --git a/src/Symfony/Component/Console/Helper/DescriptorHelper.php b/src/Symfony/Component/Console/Helper/DescriptorHelper.php +index eb32bce8fc..57edd56954 100644 +--- a/src/Symfony/Component/Console/Helper/DescriptorHelper.php ++++ b/src/Symfony/Component/Console/Helper/DescriptorHelper.php +@@ -55,5 +55,5 @@ class DescriptorHelper extends Helper + * @throws InvalidArgumentException when the given format is not supported + */ +- public function describe(OutputInterface $output, ?object $object, array $options = []) ++ public function describe(OutputInterface $output, ?object $object, array $options = []): void + { + $options = array_merge([ +diff --git a/src/Symfony/Component/Console/Helper/Helper.php b/src/Symfony/Component/Console/Helper/Helper.php +index 51fd11b260..3acfc88c9a 100644 +--- a/src/Symfony/Component/Console/Helper/Helper.php ++++ b/src/Symfony/Component/Console/Helper/Helper.php +@@ -27,5 +27,5 @@ abstract class Helper implements HelperInterface + * @return void + */ +- public function setHelperSet(HelperSet $helperSet = null) ++ public function setHelperSet(HelperSet $helperSet = null): void + { + if (1 > \func_num_args()) { +@@ -124,5 +124,5 @@ abstract class Helper implements HelperInterface + * @return string + */ +- public static function formatMemory(int $memory) ++ public static function formatMemory(int $memory): string + { + if ($memory >= 1024 * 1024 * 1024) { +@@ -144,5 +144,5 @@ abstract class Helper implements HelperInterface + * @return string + */ +- public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string) ++ public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string): string + { + $isDecorated = $formatter->isDecorated(); +diff --git a/src/Symfony/Component/Console/Helper/HelperInterface.php b/src/Symfony/Component/Console/Helper/HelperInterface.php +index ab626c9385..d9d069d3e5 100644 +--- a/src/Symfony/Component/Console/Helper/HelperInterface.php ++++ b/src/Symfony/Component/Console/Helper/HelperInterface.php +@@ -24,5 +24,5 @@ interface HelperInterface + * @return void + */ +- public function setHelperSet(?HelperSet $helperSet); ++ public function setHelperSet(?HelperSet $helperSet): void; + + /** +@@ -36,4 +36,4 @@ interface HelperInterface + * @return string + */ +- public function getName(); ++ public function getName(): string; + } +diff --git a/src/Symfony/Component/Console/Helper/HelperSet.php b/src/Symfony/Component/Console/Helper/HelperSet.php +index dc5d499caa..e19192da81 100644 +--- a/src/Symfony/Component/Console/Helper/HelperSet.php ++++ b/src/Symfony/Component/Console/Helper/HelperSet.php +@@ -39,5 +39,5 @@ class HelperSet implements \IteratorAggregate + * @return void + */ +- public function set(HelperInterface $helper, string $alias = null) ++ public function set(HelperInterface $helper, string $alias = null): void + { + $this->helpers[$helper->getName()] = $helper; +diff --git a/src/Symfony/Component/Console/Helper/InputAwareHelper.php b/src/Symfony/Component/Console/Helper/InputAwareHelper.php +index 6f8225973c..5f3640c346 100644 +--- a/src/Symfony/Component/Console/Helper/InputAwareHelper.php ++++ b/src/Symfony/Component/Console/Helper/InputAwareHelper.php +@@ -27,5 +27,5 @@ abstract class InputAwareHelper extends Helper implements InputAwareInterface + * @return void + */ +- public function setInput(InputInterface $input) ++ public function setInput(InputInterface $input): void + { + $this->input = $input; +diff --git a/src/Symfony/Component/Console/Helper/ProgressIndicator.php b/src/Symfony/Component/Console/Helper/ProgressIndicator.php +index 84dbef950c..5a38c8c28a 100644 +--- a/src/Symfony/Component/Console/Helper/ProgressIndicator.php ++++ b/src/Symfony/Component/Console/Helper/ProgressIndicator.php +@@ -74,5 +74,5 @@ class ProgressIndicator + * @return void + */ +- public function setMessage(?string $message) ++ public function setMessage(?string $message): void + { + $this->message = $message; +@@ -86,5 +86,5 @@ class ProgressIndicator + * @return void + */ +- public function start(string $message) ++ public function start(string $message): void + { + if ($this->started) { +@@ -106,5 +106,5 @@ class ProgressIndicator + * @return void + */ +- public function advance() ++ public function advance(): void + { + if (!$this->started) { +@@ -133,5 +133,5 @@ class ProgressIndicator + * @return void + */ +- public function finish(string $message) ++ public function finish(string $message): void + { + if (!$this->started) { +@@ -160,5 +160,5 @@ class ProgressIndicator + * @return void + */ +- public static function setPlaceholderFormatterDefinition(string $name, callable $callable) ++ public static function setPlaceholderFormatterDefinition(string $name, callable $callable): void + { + self::$formatters ??= self::initPlaceholderFormatters(); +diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php +index 40c6a65663..8a65738606 100644 +--- a/src/Symfony/Component/Console/Helper/QuestionHelper.php ++++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php +@@ -93,5 +93,5 @@ class QuestionHelper extends Helper + * @return void + */ +- public static function disableStty() ++ public static function disableStty(): void + { + self::$stty = false; +@@ -183,5 +183,5 @@ class QuestionHelper extends Helper + * @return void + */ +- protected function writePrompt(OutputInterface $output, Question $question) ++ protected function writePrompt(OutputInterface $output, Question $question): void + { + $message = $question->getQuestion(); +@@ -221,5 +221,5 @@ class QuestionHelper extends Helper + * @return void + */ +- protected function writeError(OutputInterface $output, \Exception $error) ++ protected function writeError(OutputInterface $output, \Exception $error): void + { + if (null !== $this->getHelperSet() && $this->getHelperSet()->has('formatter')) { +diff --git a/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php b/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php +index 8ebc84376b..4af2691707 100644 +--- a/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php ++++ b/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php +@@ -29,5 +29,5 @@ class SymfonyQuestionHelper extends QuestionHelper + * @return void + */ +- protected function writePrompt(OutputInterface $output, Question $question) ++ protected function writePrompt(OutputInterface $output, Question $question): void + { + $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion()); +@@ -87,5 +87,5 @@ class SymfonyQuestionHelper extends QuestionHelper + * @return void + */ +- protected function writeError(OutputInterface $output, \Exception $error) ++ protected function writeError(OutputInterface $output, \Exception $error): void + { + if ($output instanceof SymfonyStyle) { +diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php +index 7d31794be3..1c311aded2 100644 +--- a/src/Symfony/Component/Console/Helper/Table.php ++++ b/src/Symfony/Component/Console/Helper/Table.php +@@ -193,5 +193,5 @@ class Table + * @return $this + */ +- public function setRows(array $rows) ++ public function setRows(array $rows): static + { + $this->rows = []; +diff --git a/src/Symfony/Component/Console/Input/ArgvInput.php b/src/Symfony/Component/Console/Input/ArgvInput.php +index 59f9217ec5..77b402b7d7 100644 +--- a/src/Symfony/Component/Console/Input/ArgvInput.php ++++ b/src/Symfony/Component/Console/Input/ArgvInput.php +@@ -59,5 +59,5 @@ class ArgvInput extends Input + * @return void + */ +- protected function setTokens(array $tokens) ++ protected function setTokens(array $tokens): void + { + $this->tokens = $tokens; +@@ -67,5 +67,5 @@ class ArgvInput extends Input + * @return void + */ +- protected function parse() ++ protected function parse(): void + { + $parseOptions = true; +diff --git a/src/Symfony/Component/Console/Input/ArrayInput.php b/src/Symfony/Component/Console/Input/ArrayInput.php +index 355de61dd6..c6b82a2886 100644 +--- a/src/Symfony/Component/Console/Input/ArrayInput.php ++++ b/src/Symfony/Component/Console/Input/ArrayInput.php +@@ -117,5 +117,5 @@ class ArrayInput extends Input + * @return void + */ +- protected function parse() ++ protected function parse(): void + { + foreach ($this->parameters as $key => $value) { +diff --git a/src/Symfony/Component/Console/Input/Input.php b/src/Symfony/Component/Console/Input/Input.php +index 22ede15e11..d8e5f58b74 100644 +--- a/src/Symfony/Component/Console/Input/Input.php ++++ b/src/Symfony/Component/Console/Input/Input.php +@@ -47,5 +47,5 @@ abstract class Input implements InputInterface, StreamableInputInterface + * @return void + */ +- public function bind(InputDefinition $definition) ++ public function bind(InputDefinition $definition): void + { + $this->arguments = []; +@@ -64,5 +64,5 @@ abstract class Input implements InputInterface, StreamableInputInterface + * @return void + */ +- public function validate() ++ public function validate(): void + { + $definition = $this->definition; +@@ -84,5 +84,5 @@ abstract class Input implements InputInterface, StreamableInputInterface + * @return void + */ +- public function setInteractive(bool $interactive) ++ public function setInteractive(bool $interactive): void + { + $this->interactive = $interactive; +@@ -106,5 +106,5 @@ abstract class Input implements InputInterface, StreamableInputInterface + * @return void + */ +- public function setArgument(string $name, mixed $value) ++ public function setArgument(string $name, mixed $value): void + { + if (!$this->definition->hasArgument($name)) { +@@ -145,5 +145,5 @@ abstract class Input implements InputInterface, StreamableInputInterface + * @return void + */ +- public function setOption(string $name, mixed $value) ++ public function setOption(string $name, mixed $value): void + { + if ($this->definition->hasNegation($name)) { +@@ -174,5 +174,5 @@ abstract class Input implements InputInterface, StreamableInputInterface + * @return void + */ +- public function setStream($stream) ++ public function setStream($stream): void + { + $this->stream = $stream; +diff --git a/src/Symfony/Component/Console/Input/InputArgument.php b/src/Symfony/Component/Console/Input/InputArgument.php +index 0db0c7709b..5fbca28f99 100644 +--- a/src/Symfony/Component/Console/Input/InputArgument.php ++++ b/src/Symfony/Component/Console/Input/InputArgument.php +@@ -96,5 +96,5 @@ class InputArgument + * @throws LogicException When incorrect default value is given + */ +- public function setDefault(string|bool|int|float|array $default = null) ++ public function setDefault(string|bool|int|float|array $default = null): void + { + if (1 > \func_num_args()) { +diff --git a/src/Symfony/Component/Console/Input/InputAwareInterface.php b/src/Symfony/Component/Console/Input/InputAwareInterface.php +index 0ad27b4558..f5e544930e 100644 +--- a/src/Symfony/Component/Console/Input/InputAwareInterface.php ++++ b/src/Symfony/Component/Console/Input/InputAwareInterface.php +@@ -25,4 +25,4 @@ interface InputAwareInterface + * @return void + */ +- public function setInput(InputInterface $input); ++ public function setInput(InputInterface $input): void; + } +diff --git a/src/Symfony/Component/Console/Input/InputDefinition.php b/src/Symfony/Component/Console/Input/InputDefinition.php +index b7162d7706..3d41be7340 100644 +--- a/src/Symfony/Component/Console/Input/InputDefinition.php ++++ b/src/Symfony/Component/Console/Input/InputDefinition.php +@@ -50,5 +50,5 @@ class InputDefinition + * @return void + */ +- public function setDefinition(array $definition) ++ public function setDefinition(array $definition): void + { + $arguments = []; +@@ -73,5 +73,5 @@ class InputDefinition + * @return void + */ +- public function setArguments(array $arguments = []) ++ public function setArguments(array $arguments = []): void + { + $this->arguments = []; +@@ -89,5 +89,5 @@ class InputDefinition + * @return void + */ +- public function addArguments(?array $arguments = []) ++ public function addArguments(?array $arguments = []): void + { + if (null !== $arguments) { +@@ -103,5 +103,5 @@ class InputDefinition + * @throws LogicException When incorrect argument is given + */ +- public function addArgument(InputArgument $argument) ++ public function addArgument(InputArgument $argument): void + { + if (isset($this->arguments[$argument->getName()])) { +@@ -202,5 +202,5 @@ class InputDefinition + * @return void + */ +- public function setOptions(array $options = []) ++ public function setOptions(array $options = []): void + { + $this->options = []; +@@ -217,5 +217,5 @@ class InputDefinition + * @return void + */ +- public function addOptions(array $options = []) ++ public function addOptions(array $options = []): void + { + foreach ($options as $option) { +@@ -229,5 +229,5 @@ class InputDefinition + * @throws LogicException When option given already exist + */ +- public function addOption(InputOption $option) ++ public function addOption(InputOption $option): void + { + if (isset($this->options[$option->getName()]) && !$option->equals($this->options[$option->getName()])) { +diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php +index aaed5fd01d..e7de9bcdec 100644 +--- a/src/Symfony/Component/Console/Input/InputInterface.php ++++ b/src/Symfony/Component/Console/Input/InputInterface.php +@@ -57,5 +57,5 @@ interface InputInterface + * @return mixed + */ +- public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false); ++ public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false): mixed; + + /** +@@ -66,5 +66,5 @@ interface InputInterface + * @throws RuntimeException + */ +- public function bind(InputDefinition $definition); ++ public function bind(InputDefinition $definition): void; + + /** +@@ -75,5 +75,5 @@ interface InputInterface + * @throws RuntimeException When not enough arguments are given + */ +- public function validate(); ++ public function validate(): void; + + /** +@@ -91,5 +91,5 @@ interface InputInterface + * @throws InvalidArgumentException When argument given doesn't exist + */ +- public function getArgument(string $name); ++ public function getArgument(string $name): mixed; + + /** +@@ -100,5 +100,5 @@ interface InputInterface + * @throws InvalidArgumentException When argument given doesn't exist + */ +- public function setArgument(string $name, mixed $value); ++ public function setArgument(string $name, mixed $value): void; + + /** +@@ -121,5 +121,5 @@ interface InputInterface + * @throws InvalidArgumentException When option given doesn't exist + */ +- public function getOption(string $name); ++ public function getOption(string $name): mixed; + + /** +@@ -130,5 +130,5 @@ interface InputInterface + * @throws InvalidArgumentException When option given doesn't exist + */ +- public function setOption(string $name, mixed $value); ++ public function setOption(string $name, mixed $value): void; + + /** +@@ -147,4 +147,4 @@ interface InputInterface + * @return void + */ +- public function setInteractive(bool $interactive); ++ public function setInteractive(bool $interactive): void; + } +diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php +index fdf88dcc27..cf7a71a3c4 100644 +--- a/src/Symfony/Component/Console/Input/InputOption.php ++++ b/src/Symfony/Component/Console/Input/InputOption.php +@@ -182,5 +182,5 @@ class InputOption + * @return void + */ +- public function setDefault(string|bool|int|float|array $default = null) ++ public function setDefault(string|bool|int|float|array $default = null): void + { + if (1 > \func_num_args()) { +diff --git a/src/Symfony/Component/Console/Input/StreamableInputInterface.php b/src/Symfony/Component/Console/Input/StreamableInputInterface.php +index 4b95fcb11e..b95fab2601 100644 +--- a/src/Symfony/Component/Console/Input/StreamableInputInterface.php ++++ b/src/Symfony/Component/Console/Input/StreamableInputInterface.php +@@ -29,5 +29,5 @@ interface StreamableInputInterface extends InputInterface + * @return void + */ +- public function setStream($stream); ++ public function setStream($stream): void; + + /** +diff --git a/src/Symfony/Component/Console/Output/BufferedOutput.php b/src/Symfony/Component/Console/Output/BufferedOutput.php +index ef5099bfd6..8fb59d794d 100644 +--- a/src/Symfony/Component/Console/Output/BufferedOutput.php ++++ b/src/Symfony/Component/Console/Output/BufferedOutput.php +@@ -33,5 +33,5 @@ class BufferedOutput extends Output + * @return void + */ +- protected function doWrite(string $message, bool $newline) ++ protected function doWrite(string $message, bool $newline): void + { + $this->buffer .= $message; +diff --git a/src/Symfony/Component/Console/Output/ConsoleOutput.php b/src/Symfony/Component/Console/Output/ConsoleOutput.php +index c1eb7cd14b..c7fc040bb4 100644 +--- a/src/Symfony/Component/Console/Output/ConsoleOutput.php ++++ b/src/Symfony/Component/Console/Output/ConsoleOutput.php +@@ -68,5 +68,5 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface + * @return void + */ +- public function setDecorated(bool $decorated) ++ public function setDecorated(bool $decorated): void + { + parent::setDecorated($decorated); +@@ -77,5 +77,5 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface + * @return void + */ +- public function setFormatter(OutputFormatterInterface $formatter) ++ public function setFormatter(OutputFormatterInterface $formatter): void + { + parent::setFormatter($formatter); +@@ -86,5 +86,5 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface + * @return void + */ +- public function setVerbosity(int $level) ++ public function setVerbosity(int $level): void + { + parent::setVerbosity($level); +@@ -100,5 +100,5 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface + * @return void + */ +- public function setErrorOutput(OutputInterface $error) ++ public function setErrorOutput(OutputInterface $error): void + { + $this->stderr = $error; +diff --git a/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php b/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php +index 9c0049c8f9..6ab9a753d5 100644 +--- a/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php ++++ b/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php +@@ -28,5 +28,5 @@ interface ConsoleOutputInterface extends OutputInterface + * @return void + */ +- public function setErrorOutput(OutputInterface $error); ++ public function setErrorOutput(OutputInterface $error): void; + + public function section(): ConsoleSectionOutput; +diff --git a/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php b/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php +index 3f3f1434be..594880b9e3 100644 +--- a/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php ++++ b/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php +@@ -64,5 +64,5 @@ class ConsoleSectionOutput extends StreamOutput + * @return void + */ +- public function clear(int $lines = null) ++ public function clear(int $lines = null): void + { + if (empty($this->content) || !$this->isDecorated()) { +@@ -87,5 +87,5 @@ class ConsoleSectionOutput extends StreamOutput + * @return void + */ +- public function overwrite(string|iterable $message) ++ public function overwrite(string|iterable $message): void + { + $this->clear(); +@@ -167,5 +167,5 @@ class ConsoleSectionOutput extends StreamOutput + * @return void + */ +- protected function doWrite(string $message, bool $newline) ++ protected function doWrite(string $message, bool $newline): void + { + if (!$this->isDecorated()) { +diff --git a/src/Symfony/Component/Console/Output/NullOutput.php b/src/Symfony/Component/Console/Output/NullOutput.php +index f3aa15b1d4..206df78910 100644 +--- a/src/Symfony/Component/Console/Output/NullOutput.php ++++ b/src/Symfony/Component/Console/Output/NullOutput.php +@@ -30,5 +30,5 @@ class NullOutput implements OutputInterface + * @return void + */ +- public function setFormatter(OutputFormatterInterface $formatter) ++ public function setFormatter(OutputFormatterInterface $formatter): void + { + // do nothing +@@ -44,5 +44,5 @@ class NullOutput implements OutputInterface + * @return void + */ +- public function setDecorated(bool $decorated) ++ public function setDecorated(bool $decorated): void + { + // do nothing +@@ -57,5 +57,5 @@ class NullOutput implements OutputInterface + * @return void + */ +- public function setVerbosity(int $level) ++ public function setVerbosity(int $level): void + { + // do nothing +@@ -90,5 +90,5 @@ class NullOutput implements OutputInterface + * @return void + */ +- public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL) ++ public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL): void + { + // do nothing +@@ -98,5 +98,5 @@ class NullOutput implements OutputInterface + * @return void + */ +- public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL) ++ public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL): void + { + // do nothing +diff --git a/src/Symfony/Component/Console/Output/Output.php b/src/Symfony/Component/Console/Output/Output.php +index 29761351f9..0a599c6042 100644 +--- a/src/Symfony/Component/Console/Output/Output.php ++++ b/src/Symfony/Component/Console/Output/Output.php +@@ -48,5 +48,5 @@ abstract class Output implements OutputInterface + * @return void + */ +- public function setFormatter(OutputFormatterInterface $formatter) ++ public function setFormatter(OutputFormatterInterface $formatter): void + { + $this->formatter = $formatter; +@@ -61,5 +61,5 @@ abstract class Output implements OutputInterface + * @return void + */ +- public function setDecorated(bool $decorated) ++ public function setDecorated(bool $decorated): void + { + $this->formatter->setDecorated($decorated); +@@ -74,5 +74,5 @@ abstract class Output implements OutputInterface + * @return void + */ +- public function setVerbosity(int $level) ++ public function setVerbosity(int $level): void + { + $this->verbosity = $level; +@@ -107,5 +107,5 @@ abstract class Output implements OutputInterface + * @return void + */ +- public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL) ++ public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL): void + { + $this->write($messages, true, $options); +@@ -115,5 +115,5 @@ abstract class Output implements OutputInterface + * @return void + */ +- public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL) ++ public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL): void + { + if (!is_iterable($messages)) { +diff --git a/src/Symfony/Component/Console/Output/OutputInterface.php b/src/Symfony/Component/Console/Output/OutputInterface.php +index f5ab9182f6..c4b59f487a 100644 +--- a/src/Symfony/Component/Console/Output/OutputInterface.php ++++ b/src/Symfony/Component/Console/Output/OutputInterface.php +@@ -40,5 +40,5 @@ interface OutputInterface + * @return void + */ +- public function write(string|iterable $messages, bool $newline = false, int $options = 0); ++ public function write(string|iterable $messages, bool $newline = false, int $options = 0): void; + + /** +@@ -50,5 +50,5 @@ interface OutputInterface + * @return void + */ +- public function writeln(string|iterable $messages, int $options = 0); ++ public function writeln(string|iterable $messages, int $options = 0): void; + + /** +@@ -57,5 +57,5 @@ interface OutputInterface + * @return void + */ +- public function setVerbosity(int $level); ++ public function setVerbosity(int $level): void; + + /** +@@ -97,5 +97,5 @@ interface OutputInterface + * @return void + */ +- public function setFormatter(OutputFormatterInterface $formatter); ++ public function setFormatter(OutputFormatterInterface $formatter): void; + + /** +diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php +index 155066ea0e..85e07025bc 100644 +--- a/src/Symfony/Component/Console/Output/StreamOutput.php ++++ b/src/Symfony/Component/Console/Output/StreamOutput.php +@@ -66,5 +66,5 @@ class StreamOutput extends Output + * @return void + */ +- protected function doWrite(string $message, bool $newline) ++ protected function doWrite(string $message, bool $newline): void + { + if ($newline) { +diff --git a/src/Symfony/Component/Console/Output/TrimmedBufferOutput.php b/src/Symfony/Component/Console/Output/TrimmedBufferOutput.php +index b00445ece8..5e9b1086b0 100644 +--- a/src/Symfony/Component/Console/Output/TrimmedBufferOutput.php ++++ b/src/Symfony/Component/Console/Output/TrimmedBufferOutput.php +@@ -49,5 +49,5 @@ class TrimmedBufferOutput extends Output + * @return void + */ +- protected function doWrite(string $message, bool $newline) ++ protected function doWrite(string $message, bool $newline): void + { + $this->buffer .= $message; +diff --git a/src/Symfony/Component/Console/Question/Question.php b/src/Symfony/Component/Console/Question/Question.php +index e1f981bc1e..f701cb549d 100644 +--- a/src/Symfony/Component/Console/Question/Question.php ++++ b/src/Symfony/Component/Console/Question/Question.php +@@ -269,5 +269,5 @@ class Question + * @return bool + */ +- protected function isAssoc(array $array) ++ protected function isAssoc(array $array): bool + { + return (bool) \count(array_filter(array_keys($array), 'is_string')); +diff --git a/src/Symfony/Component/Console/Style/OutputStyle.php b/src/Symfony/Component/Console/Style/OutputStyle.php +index ddfa8decc2..e67453d9fe 100644 +--- a/src/Symfony/Component/Console/Style/OutputStyle.php ++++ b/src/Symfony/Component/Console/Style/OutputStyle.php +@@ -34,5 +34,5 @@ abstract class OutputStyle implements OutputInterface, StyleInterface + * @return void + */ +- public function newLine(int $count = 1) ++ public function newLine(int $count = 1): void + { + $this->output->write(str_repeat(\PHP_EOL, $count)); +@@ -47,5 +47,5 @@ abstract class OutputStyle implements OutputInterface, StyleInterface + * @return void + */ +- public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL) ++ public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL): void + { + $this->output->write($messages, $newline, $type); +@@ -55,5 +55,5 @@ abstract class OutputStyle implements OutputInterface, StyleInterface + * @return void + */ +- public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL) ++ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL): void + { + $this->output->writeln($messages, $type); +@@ -63,5 +63,5 @@ abstract class OutputStyle implements OutputInterface, StyleInterface + * @return void + */ +- public function setVerbosity(int $level) ++ public function setVerbosity(int $level): void + { + $this->output->setVerbosity($level); +@@ -76,5 +76,5 @@ abstract class OutputStyle implements OutputInterface, StyleInterface + * @return void + */ +- public function setDecorated(bool $decorated) ++ public function setDecorated(bool $decorated): void + { + $this->output->setDecorated($decorated); +@@ -89,5 +89,5 @@ abstract class OutputStyle implements OutputInterface, StyleInterface + * @return void + */ +- public function setFormatter(OutputFormatterInterface $formatter) ++ public function setFormatter(OutputFormatterInterface $formatter): void + { + $this->output->setFormatter($formatter); +@@ -122,5 +122,5 @@ abstract class OutputStyle implements OutputInterface, StyleInterface + * @return OutputInterface + */ +- protected function getErrorOutput() ++ protected function getErrorOutput(): OutputInterface + { + if (!$this->output instanceof ConsoleOutputInterface) { +diff --git a/src/Symfony/Component/Console/Style/StyleInterface.php b/src/Symfony/Component/Console/Style/StyleInterface.php +index e25a65bd24..1d4bb7fe71 100644 +--- a/src/Symfony/Component/Console/Style/StyleInterface.php ++++ b/src/Symfony/Component/Console/Style/StyleInterface.php +@@ -24,5 +24,5 @@ interface StyleInterface + * @return void + */ +- public function title(string $message); ++ public function title(string $message): void; + + /** +@@ -31,5 +31,5 @@ interface StyleInterface + * @return void + */ +- public function section(string $message); ++ public function section(string $message): void; + + /** +@@ -38,5 +38,5 @@ interface StyleInterface + * @return void + */ +- public function listing(array $elements); ++ public function listing(array $elements): void; + + /** +@@ -45,5 +45,5 @@ interface StyleInterface + * @return void + */ +- public function text(string|array $message); ++ public function text(string|array $message): void; + + /** +@@ -52,5 +52,5 @@ interface StyleInterface + * @return void + */ +- public function success(string|array $message); ++ public function success(string|array $message): void; + + /** +@@ -59,5 +59,5 @@ interface StyleInterface + * @return void + */ +- public function error(string|array $message); ++ public function error(string|array $message): void; + + /** +@@ -66,5 +66,5 @@ interface StyleInterface + * @return void + */ +- public function warning(string|array $message); ++ public function warning(string|array $message): void; + + /** +@@ -73,5 +73,5 @@ interface StyleInterface + * @return void + */ +- public function note(string|array $message); ++ public function note(string|array $message): void; + + /** +@@ -80,5 +80,5 @@ interface StyleInterface + * @return void + */ +- public function caution(string|array $message); ++ public function caution(string|array $message): void; + + /** +@@ -87,5 +87,5 @@ interface StyleInterface + * @return void + */ +- public function table(array $headers, array $rows); ++ public function table(array $headers, array $rows): void; + + /** +@@ -114,5 +114,5 @@ interface StyleInterface + * @return void + */ +- public function newLine(int $count = 1); ++ public function newLine(int $count = 1): void; + + /** +@@ -121,5 +121,5 @@ interface StyleInterface + * @return void + */ +- public function progressStart(int $max = 0); ++ public function progressStart(int $max = 0): void; + + /** +@@ -128,5 +128,5 @@ interface StyleInterface + * @return void + */ +- public function progressAdvance(int $step = 1); ++ public function progressAdvance(int $step = 1): void; + + /** +@@ -135,4 +135,4 @@ interface StyleInterface + * @return void + */ +- public function progressFinish(); ++ public function progressFinish(): void; + } +diff --git a/src/Symfony/Component/Console/Style/SymfonyStyle.php b/src/Symfony/Component/Console/Style/SymfonyStyle.php +index cecce6c01b..f2e0c7fdf5 100644 +--- a/src/Symfony/Component/Console/Style/SymfonyStyle.php ++++ b/src/Symfony/Component/Console/Style/SymfonyStyle.php +@@ -64,5 +64,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function block(string|array $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true) ++ public function block(string|array $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true): void + { + $messages = \is_array($messages) ? array_values($messages) : [$messages]; +@@ -76,5 +76,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function title(string $message) ++ public function title(string $message): void + { + $this->autoPrependBlock(); +@@ -89,5 +89,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function section(string $message) ++ public function section(string $message): void + { + $this->autoPrependBlock(); +@@ -102,5 +102,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function listing(array $elements) ++ public function listing(array $elements): void + { + $this->autoPrependText(); +@@ -114,5 +114,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function text(string|array $message) ++ public function text(string|array $message): void + { + $this->autoPrependText(); +@@ -129,5 +129,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function comment(string|array $message) ++ public function comment(string|array $message): void + { + $this->block($message, null, null, ' // ', false, false); +@@ -137,5 +137,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function success(string|array $message) ++ public function success(string|array $message): void + { + $this->block($message, 'OK', 'fg=black;bg=green', ' ', true); +@@ -145,5 +145,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function error(string|array $message) ++ public function error(string|array $message): void + { + $this->block($message, 'ERROR', 'fg=white;bg=red', ' ', true); +@@ -153,5 +153,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function warning(string|array $message) ++ public function warning(string|array $message): void + { + $this->block($message, 'WARNING', 'fg=black;bg=yellow', ' ', true); +@@ -161,5 +161,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function note(string|array $message) ++ public function note(string|array $message): void + { + $this->block($message, 'NOTE', 'fg=yellow', ' ! '); +@@ -171,5 +171,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function info(string|array $message) ++ public function info(string|array $message): void + { + $this->block($message, 'INFO', 'fg=green', ' ', true); +@@ -179,5 +179,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function caution(string|array $message) ++ public function caution(string|array $message): void + { + $this->block($message, 'CAUTION', 'fg=white;bg=red', ' ! ', true); +@@ -187,5 +187,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function table(array $headers, array $rows) ++ public function table(array $headers, array $rows): void + { + $this->createTable() +@@ -203,5 +203,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function horizontalTable(array $headers, array $rows) ++ public function horizontalTable(array $headers, array $rows): void + { + $this->createTable() +@@ -225,5 +225,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function definitionList(string|array|TableSeparator ...$list) ++ public function definitionList(string|array|TableSeparator ...$list): void + { + $headers = []; +@@ -289,5 +289,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function progressStart(int $max = 0) ++ public function progressStart(int $max = 0): void + { + $this->progressBar = $this->createProgressBar($max); +@@ -298,5 +298,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function progressAdvance(int $step = 1) ++ public function progressAdvance(int $step = 1): void + { + $this->getProgressBar()->advance($step); +@@ -306,5 +306,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function progressFinish() ++ public function progressFinish(): void + { + $this->getProgressBar()->finish(); +@@ -362,5 +362,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL) ++ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL): void + { + if (!is_iterable($messages)) { +@@ -377,5 +377,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL) ++ public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL): void + { + if (!is_iterable($messages)) { +@@ -392,5 +392,5 @@ class SymfonyStyle extends OutputStyle + * @return void + */ +- public function newLine(int $count = 1) ++ public function newLine(int $count = 1): void + { + parent::newLine($count); +diff --git a/src/Symfony/Component/CssSelector/Parser/Reader.php b/src/Symfony/Component/CssSelector/Parser/Reader.php +index 7f6ae7a600..d79db02567 100644 +--- a/src/Symfony/Component/CssSelector/Parser/Reader.php ++++ b/src/Symfony/Component/CssSelector/Parser/Reader.php +@@ -57,5 +57,5 @@ class Reader + * @return int|false + */ +- public function getOffset(string $string): int|bool ++ public function getOffset(string $string): int|false + { + $position = strpos($this->source, $string, $this->position); +diff --git a/src/Symfony/Component/DependencyInjection/Argument/ArgumentInterface.php b/src/Symfony/Component/DependencyInjection/Argument/ArgumentInterface.php +index 3b39f36625..de2d7f2536 100644 +--- a/src/Symfony/Component/DependencyInjection/Argument/ArgumentInterface.php ++++ b/src/Symfony/Component/DependencyInjection/Argument/ArgumentInterface.php +@@ -24,4 +24,4 @@ interface ArgumentInterface + * @return void + */ +- public function setValues(array $values); ++ public function setValues(array $values): void; + } +diff --git a/src/Symfony/Component/DependencyInjection/Argument/IteratorArgument.php b/src/Symfony/Component/DependencyInjection/Argument/IteratorArgument.php +index aedd1e659e..92aff35b84 100644 +--- a/src/Symfony/Component/DependencyInjection/Argument/IteratorArgument.php ++++ b/src/Symfony/Component/DependencyInjection/Argument/IteratorArgument.php +@@ -34,5 +34,5 @@ class IteratorArgument implements ArgumentInterface + * @return void + */ +- public function setValues(array $values) ++ public function setValues(array $values): void + { + $this->values = $values; +diff --git a/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php b/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php +index be86412bcb..28f53536bc 100644 +--- a/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php ++++ b/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php +@@ -36,5 +36,5 @@ class ServiceClosureArgument implements ArgumentInterface + * @return void + */ +- public function setValues(array $values) ++ public function setValues(array $values): void + { + if ([0] !== array_keys($values)) { +diff --git a/src/Symfony/Component/DependencyInjection/Argument/ServiceLocatorArgument.php b/src/Symfony/Component/DependencyInjection/Argument/ServiceLocatorArgument.php +index de533fcca6..ed25852022 100644 +--- a/src/Symfony/Component/DependencyInjection/Argument/ServiceLocatorArgument.php ++++ b/src/Symfony/Component/DependencyInjection/Argument/ServiceLocatorArgument.php +@@ -45,5 +45,5 @@ class ServiceLocatorArgument implements ArgumentInterface + * @return void + */ +- public function setValues(array $values) ++ public function setValues(array $values): void + { + $this->values = $values; +diff --git a/src/Symfony/Component/DependencyInjection/Argument/TaggedIteratorArgument.php b/src/Symfony/Component/DependencyInjection/Argument/TaggedIteratorArgument.php +index b4e982c457..521a9531f8 100644 +--- a/src/Symfony/Component/DependencyInjection/Argument/TaggedIteratorArgument.php ++++ b/src/Symfony/Component/DependencyInjection/Argument/TaggedIteratorArgument.php +@@ -56,5 +56,5 @@ class TaggedIteratorArgument extends IteratorArgument + * @return string + */ +- public function getTag() ++ public function getTag(): string + { + return $this->tag; +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php +index 95251dec82..74c2b38eb8 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php +@@ -40,5 +40,5 @@ abstract class AbstractRecursivePass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $this->container = $container; +@@ -54,5 +54,5 @@ abstract class AbstractRecursivePass implements CompilerPassInterface + * @return void + */ +- protected function enableExpressionProcessing() ++ protected function enableExpressionProcessing(): void + { + $this->processExpressions = true; +@@ -74,5 +74,5 @@ abstract class AbstractRecursivePass implements CompilerPassInterface + * @return mixed + */ +- protected function processValue(mixed $value, bool $isRoot = false) ++ protected function processValue(mixed $value, bool $isRoot = false): mixed + { + if (\is_array($value)) { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php +index de033d9847..e515b6344c 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php +@@ -58,5 +58,5 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $this->container = $container; +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php +index 3f070dcc0c..aa0e5186bf 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php +@@ -24,5 +24,5 @@ class AutoAliasServicePass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + foreach ($container->findTaggedServiceIds('auto_alias') as $serviceId => $tags) { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +index 6cb09ccdfe..85380018ce 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +@@ -61,5 +61,5 @@ class AutowirePass extends AbstractRecursivePass + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + try { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php +index 1fb8935c3e..1cfccaa671 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php +@@ -35,5 +35,5 @@ class CheckCircularReferencesPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $graph = $container->getCompiler()->getServiceReferenceGraph(); +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php +index c62345f26e..098772e2ef 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php +@@ -38,5 +38,5 @@ class CheckDefinitionValidityPass implements CompilerPassInterface + * @throws RuntimeException When the Definition is invalid + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + foreach ($container->getDefinitions() as $id => $definition) { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php +index 8f828d3221..fb41bd49a3 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php +@@ -29,5 +29,5 @@ class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $this->serviceLocatorContextIds = []; +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php +index c8cbccb4b9..0446970598 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php +@@ -45,5 +45,5 @@ class Compiler + * @return void + */ +- public function addPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) ++ public function addPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): void + { + $this->passConfig->addPass($pass, $type, $priority); +@@ -55,5 +55,5 @@ class Compiler + * @return void + */ +- public function log(CompilerPassInterface $pass, string $message) ++ public function log(CompilerPassInterface $pass, string $message): void + { + if (str_contains($message, "\n")) { +@@ -74,5 +74,5 @@ class Compiler + * @return void + */ +- public function compile(ContainerBuilder $container) ++ public function compile(ContainerBuilder $container): void + { + try { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php b/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php +index 2ad4a048ba..719267be1e 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php +@@ -26,4 +26,4 @@ interface CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container); ++ public function process(ContainerBuilder $container): void; + } +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php b/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php +index c38bfa7744..10d999f093 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php +@@ -31,5 +31,5 @@ class DecoratorServicePass extends AbstractRecursivePass + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $definitions = new \SplPriorityQueue(); +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php +index 953b7f942e..96912701e5 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php +@@ -25,5 +25,5 @@ class ExtensionCompilerPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + foreach ($container->getExtensions() as $extension) { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php +index f4eb931412..0e5448aa91 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php +@@ -41,5 +41,5 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $this->container = $container; +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php +index cd8ebfe0f7..36cd2b93a4 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php +@@ -33,5 +33,5 @@ class MergeExtensionConfigurationPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $parameters = $container->getParameterBag()->all(); +@@ -169,10 +169,10 @@ class MergeExtensionConfigurationContainerBuilder extends ContainerBuilder + } + +- public function registerExtension(ExtensionInterface $extension) ++ public function registerExtension(ExtensionInterface $extension): void + { + throw new LogicException(sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.', get_debug_type($extension), $this->extensionClass)); + } + +- public function compile(bool $resolveEnvPlaceholders = false) ++ public function compile(bool $resolveEnvPlaceholders = false): void + { + throw new LogicException(sprintf('Cannot compile the container in extension "%s".', $this->extensionClass)); +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php b/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php +index 16b24cc710..c8296e7c1d 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php +@@ -126,5 +126,5 @@ class PassConfig + * @throws InvalidArgumentException when a pass type doesn't exist + */ +- public function addPass(CompilerPassInterface $pass, string $type = self::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) ++ public function addPass(CompilerPassInterface $pass, string $type = self::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): void + { + $property = $type.'Passes'; +@@ -202,5 +202,5 @@ class PassConfig + * @return void + */ +- public function setMergePass(CompilerPassInterface $pass) ++ public function setMergePass(CompilerPassInterface $pass): void + { + $this->mergePass = $pass; +@@ -214,5 +214,5 @@ class PassConfig + * @return void + */ +- public function setAfterRemovingPasses(array $passes) ++ public function setAfterRemovingPasses(array $passes): void + { + $this->afterRemovingPasses = [$passes]; +@@ -226,5 +226,5 @@ class PassConfig + * @return void + */ +- public function setBeforeOptimizationPasses(array $passes) ++ public function setBeforeOptimizationPasses(array $passes): void + { + $this->beforeOptimizationPasses = [$passes]; +@@ -238,5 +238,5 @@ class PassConfig + * @return void + */ +- public function setBeforeRemovingPasses(array $passes) ++ public function setBeforeRemovingPasses(array $passes): void + { + $this->beforeRemovingPasses = [$passes]; +@@ -250,5 +250,5 @@ class PassConfig + * @return void + */ +- public function setOptimizationPasses(array $passes) ++ public function setOptimizationPasses(array $passes): void + { + $this->optimizationPasses = [$passes]; +@@ -262,5 +262,5 @@ class PassConfig + * @return void + */ +- public function setRemovingPasses(array $passes) ++ public function setRemovingPasses(array $passes): void + { + $this->removingPasses = [$passes]; +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php +index 2a706bfe5e..68f25a4ff8 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php +@@ -31,5 +31,5 @@ class RegisterEnvVarProcessorsPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $bag = $container->getParameterBag(); +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RegisterReverseContainerPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RegisterReverseContainerPass.php +index aa4cca3571..4365ecffde 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/RegisterReverseContainerPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/RegisterReverseContainerPass.php +@@ -33,5 +33,5 @@ class RegisterReverseContainerPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('reverse_container')) { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php +index d0ebfcc509..9b50d622aa 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php +@@ -24,5 +24,5 @@ class RemoveAbstractDefinitionsPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + foreach ($container->getDefinitions() as $id => $definition) { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RemoveBuildParametersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RemoveBuildParametersPass.php +index 75e714475c..e5bb34a465 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/RemoveBuildParametersPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/RemoveBuildParametersPass.php +@@ -24,5 +24,5 @@ class RemoveBuildParametersPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $parameterBag = $container->getParameterBag(); +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php +index 93c3fd2672..250a640d63 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php +@@ -28,5 +28,5 @@ class RemovePrivateAliasesPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + foreach ($container->getAliases() as $id => $alias) { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php +index df97a62f7e..60126d8d06 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php +@@ -30,5 +30,5 @@ class RemoveUnusedDefinitionsPass extends AbstractRecursivePass + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + try { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php +index 808cde2081..83063d607d 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php +@@ -34,5 +34,5 @@ class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass + * @throws InvalidArgumentException if the service definition does not exist + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + // First collect all alias targets that need to be replaced +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php +index 55a358efdf..be943ae655 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php +@@ -36,5 +36,5 @@ class ResolveBindingsPass extends AbstractRecursivePass + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $this->usedBindings = $container->getRemovedBindingIds(); +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php +index 468837672e..bdfa98bfa6 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php +@@ -24,5 +24,5 @@ class ResolveClassPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + foreach ($container->getDefinitions() as $id => $definition) { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveDecoratorStackPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveDecoratorStackPass.php +index da02622b21..395c5a1de6 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveDecoratorStackPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveDecoratorStackPass.php +@@ -28,5 +28,5 @@ class ResolveDecoratorStackPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $stacks = []; +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php +index bffb9dab85..40e484f5a5 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php +@@ -29,5 +29,5 @@ class ResolveHotPathPass extends AbstractRecursivePass + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + try { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php +index 88d6fa01fd..d057c13802 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php +@@ -28,5 +28,5 @@ class ResolveInstanceofConditionalsPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + foreach ($container->getAutoconfiguredInstanceof() as $interface => $definition) { +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php +index 7a2a69aa6a..7a265cc8aa 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php +@@ -39,5 +39,5 @@ class ResolveInvalidReferencesPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $this->container = $container; +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php +index 3302dd2cd2..459c22434b 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php +@@ -30,5 +30,5 @@ class ResolveNoPreloadPass extends AbstractRecursivePass + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $this->container = $container; +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php +index c4a1412ff2..2bb03c253e 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php +@@ -37,5 +37,5 @@ class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass + * @throws ParameterNotFoundException + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $this->bag = $container->getParameterBag(); +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php +index 3176d405f8..0bbc25ba9e 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php +@@ -26,5 +26,5 @@ class ResolveReferencesToAliasesPass extends AbstractRecursivePass + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + parent::process($container); +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php +index e7f42f87db..8c995103ad 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php +@@ -38,5 +38,5 @@ class ServiceReferenceGraphNode + * @return void + */ +- public function addInEdge(ServiceReferenceGraphEdge $edge) ++ public function addInEdge(ServiceReferenceGraphEdge $edge): void + { + $this->inEdges[] = $edge; +@@ -46,5 +46,5 @@ class ServiceReferenceGraphNode + * @return void + */ +- public function addOutEdge(ServiceReferenceGraphEdge $edge) ++ public function addOutEdge(ServiceReferenceGraphEdge $edge): void + { + $this->outEdges[] = $edge; +@@ -108,5 +108,5 @@ class ServiceReferenceGraphNode + * @return void + */ +- public function clear() ++ public function clear(): void + { + $this->inEdges = $this->outEdges = []; +diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ValidateEnvPlaceholdersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ValidateEnvPlaceholdersPass.php +index 2d6542660b..20287f9286 100644 +--- a/src/Symfony/Component/DependencyInjection/Compiler/ValidateEnvPlaceholdersPass.php ++++ b/src/Symfony/Component/DependencyInjection/Compiler/ValidateEnvPlaceholdersPass.php +@@ -34,5 +34,5 @@ class ValidateEnvPlaceholdersPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $this->extensionConfig = []; +diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php +index 2bdc9e7d96..4489ecbc12 100644 +--- a/src/Symfony/Component/DependencyInjection/Container.php ++++ b/src/Symfony/Component/DependencyInjection/Container.php +@@ -83,5 +83,5 @@ class Container implements ContainerInterface, ResetInterface + * @return void + */ +- public function compile() ++ public function compile(): void + { + $this->parameterBag->resolve(); +@@ -118,5 +118,5 @@ class Container implements ContainerInterface, ResetInterface + * @throws ParameterNotFoundException if the parameter is not defined + */ +- public function getParameter(string $name) ++ public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null + { + return $this->parameterBag->get($name); +@@ -131,5 +131,5 @@ class Container implements ContainerInterface, ResetInterface + * @return void + */ +- public function setParameter(string $name, array|bool|string|int|float|\UnitEnum|null $value) ++ public function setParameter(string $name, array|bool|string|int|float|\UnitEnum|null $value): void + { + $this->parameterBag->set($name, $value); +@@ -144,5 +144,5 @@ class Container implements ContainerInterface, ResetInterface + * @return void + */ +- public function set(string $id, ?object $service) ++ public function set(string $id, ?object $service): void + { + // Runs the internal initializer; used by the dumped container to include always-needed files +@@ -287,5 +287,5 @@ class Container implements ContainerInterface, ResetInterface + * @return void + */ +- public function reset() ++ public function reset(): void + { + $services = $this->services + $this->privates; +diff --git a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php +index 084a321ab5..09fb37f3aa 100644 +--- a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php ++++ b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php +@@ -24,4 +24,4 @@ interface ContainerAwareInterface + * @return void + */ +- public function setContainer(?ContainerInterface $container); ++ public function setContainer(?ContainerInterface $container): void; + } +diff --git a/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php b/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php +index ac67b468c5..bc1e395810 100644 +--- a/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php ++++ b/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php +@@ -27,5 +27,5 @@ trait ContainerAwareTrait + * @return void + */ +- public function setContainer(ContainerInterface $container = null) ++ public function setContainer(ContainerInterface $container = null): void + { + if (1 > \func_num_args()) { +diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +index e920980b28..83a3221b97 100644 +--- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php ++++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +@@ -178,5 +178,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function setResourceTracking(bool $track) ++ public function setResourceTracking(bool $track): void + { + $this->trackResources = $track; +@@ -196,5 +196,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function setProxyInstantiator(InstantiatorInterface $proxyInstantiator) ++ public function setProxyInstantiator(InstantiatorInterface $proxyInstantiator): void + { + $this->proxyInstantiator = $proxyInstantiator; +@@ -204,5 +204,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function registerExtension(ExtensionInterface $extension) ++ public function registerExtension(ExtensionInterface $extension): void + { + $this->extensions[$extension->getAlias()] = $extension; +@@ -486,5 +486,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @throws BadMethodCallException When this ContainerBuilder is compiled + */ +- public function set(string $id, ?object $service) ++ public function set(string $id, ?object $service): void + { + if ($this->isCompiled() && (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic())) { +@@ -503,5 +503,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function removeDefinition(string $id) ++ public function removeDefinition(string $id): void + { + if (isset($this->definitions[$id])) { +@@ -615,5 +615,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @throws BadMethodCallException When this ContainerBuilder is compiled + */ +- public function merge(self $container) ++ public function merge(self $container): void + { + if ($this->isCompiled()) { +@@ -707,5 +707,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function prependExtensionConfig(string $name, array $config) ++ public function prependExtensionConfig(string $name, array $config): void + { + if (!isset($this->extensionConfigs[$name])) { +@@ -751,5 +751,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function compile(bool $resolveEnvPlaceholders = false) ++ public function compile(bool $resolveEnvPlaceholders = false): void + { + $compiler = $this->getCompiler(); +@@ -815,5 +815,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function addAliases(array $aliases) ++ public function addAliases(array $aliases): void + { + foreach ($aliases as $alias => $id) { +@@ -829,5 +829,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function setAliases(array $aliases) ++ public function setAliases(array $aliases): void + { + $this->aliasDefinitions = []; +@@ -863,5 +863,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function removeAlias(string $alias) ++ public function removeAlias(string $alias): void + { + if (isset($this->aliasDefinitions[$alias])) { +@@ -925,5 +925,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function addDefinitions(array $definitions) ++ public function addDefinitions(array $definitions): void + { + foreach ($definitions as $id => $definition) { +@@ -939,5 +939,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function setDefinitions(array $definitions) ++ public function setDefinitions(array $definitions): void + { + $this->definitions = []; +@@ -1311,5 +1311,5 @@ class ContainerBuilder extends Container implements TaggedContainerInterface + * @return void + */ +- public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) ++ public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider): void + { + $this->expressionLanguageProviders[] = $provider; +diff --git a/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/src/Symfony/Component/DependencyInjection/ContainerInterface.php +index d2f4c343a1..92771c9628 100644 +--- a/src/Symfony/Component/DependencyInjection/ContainerInterface.php ++++ b/src/Symfony/Component/DependencyInjection/ContainerInterface.php +@@ -34,5 +34,5 @@ interface ContainerInterface extends PsrContainerInterface + * @return void + */ +- public function set(string $id, ?object $service); ++ public function set(string $id, ?object $service): void; + + /** +@@ -56,5 +56,5 @@ interface ContainerInterface extends PsrContainerInterface + * @throws ParameterNotFoundException if the parameter is not defined + */ +- public function getParameter(string $name); ++ public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null; + + public function hasParameter(string $name): bool; +@@ -63,4 +63,4 @@ interface ContainerInterface extends PsrContainerInterface + * @return void + */ +- public function setParameter(string $name, array|bool|string|int|float|\UnitEnum|null $value); ++ public function setParameter(string $name, array|bool|string|int|float|\UnitEnum|null $value): void; + } +diff --git a/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php b/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php +index 5f22fa53b6..2ebf0e385d 100644 +--- a/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php ++++ b/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php +@@ -71,5 +71,5 @@ class AutowiringFailedException extends RuntimeException + * @return string + */ +- public function getServiceId() ++ public function getServiceId(): string + { + return $this->serviceId; +diff --git a/src/Symfony/Component/DependencyInjection/Exception/ParameterCircularReferenceException.php b/src/Symfony/Component/DependencyInjection/Exception/ParameterCircularReferenceException.php +index 9fc3b50b62..a6c1469c2d 100644 +--- a/src/Symfony/Component/DependencyInjection/Exception/ParameterCircularReferenceException.php ++++ b/src/Symfony/Component/DependencyInjection/Exception/ParameterCircularReferenceException.php +@@ -31,5 +31,5 @@ class ParameterCircularReferenceException extends RuntimeException + * @return array + */ +- public function getParameters() ++ public function getParameters(): array + { + return $this->parameters; +diff --git a/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php b/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php +index 69f7b3a50c..654537df61 100644 +--- a/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php ++++ b/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php +@@ -51,5 +51,5 @@ class ParameterNotFoundException extends InvalidArgumentException implements Not + * @return void + */ +- public function updateRepr() ++ public function updateRepr(): void + { + if (null !== $this->sourceId) { +@@ -78,5 +78,5 @@ class ParameterNotFoundException extends InvalidArgumentException implements Not + * @return string + */ +- public function getKey() ++ public function getKey(): string + { + return $this->key; +@@ -86,5 +86,5 @@ class ParameterNotFoundException extends InvalidArgumentException implements Not + * @return string|null + */ +- public function getSourceId() ++ public function getSourceId(): ?string + { + return $this->sourceId; +@@ -94,5 +94,5 @@ class ParameterNotFoundException extends InvalidArgumentException implements Not + * @return string|null + */ +- public function getSourceKey() ++ public function getSourceKey(): ?string + { + return $this->sourceKey; +@@ -102,5 +102,5 @@ class ParameterNotFoundException extends InvalidArgumentException implements Not + * @return void + */ +- public function setSourceId(?string $sourceId) ++ public function setSourceId(?string $sourceId): void + { + $this->sourceId = $sourceId; +@@ -112,5 +112,5 @@ class ParameterNotFoundException extends InvalidArgumentException implements Not + * @return void + */ +- public function setSourceKey(?string $sourceKey) ++ public function setSourceKey(?string $sourceKey): void + { + $this->sourceKey = $sourceKey; +diff --git a/src/Symfony/Component/DependencyInjection/Exception/ServiceCircularReferenceException.php b/src/Symfony/Component/DependencyInjection/Exception/ServiceCircularReferenceException.php +index d62c22567b..085d5fa167 100644 +--- a/src/Symfony/Component/DependencyInjection/Exception/ServiceCircularReferenceException.php ++++ b/src/Symfony/Component/DependencyInjection/Exception/ServiceCircularReferenceException.php +@@ -33,5 +33,5 @@ class ServiceCircularReferenceException extends RuntimeException + * @return string + */ +- public function getServiceId() ++ public function getServiceId(): string + { + return $this->serviceId; +@@ -41,5 +41,5 @@ class ServiceCircularReferenceException extends RuntimeException + * @return array + */ +- public function getPath() ++ public function getPath(): array + { + return $this->path; +diff --git a/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php b/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php +index d56db7727f..90da421299 100644 +--- a/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php ++++ b/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php +@@ -54,5 +54,5 @@ class ServiceNotFoundException extends InvalidArgumentException implements NotFo + * @return string + */ +- public function getId() ++ public function getId(): string + { + return $this->id; +@@ -62,5 +62,5 @@ class ServiceNotFoundException extends InvalidArgumentException implements NotFo + * @return string|null + */ +- public function getSourceId() ++ public function getSourceId(): ?string + { + return $this->sourceId; +@@ -70,5 +70,5 @@ class ServiceNotFoundException extends InvalidArgumentException implements NotFo + * @return array + */ +- public function getAlternatives() ++ public function getAlternatives(): array + { + return $this->alternatives; +diff --git a/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php +index a42967f4da..4e86e16f9d 100644 +--- a/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php ++++ b/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php +@@ -27,4 +27,4 @@ interface ConfigurationExtensionInterface + * @return ConfigurationInterface|null + */ +- public function getConfiguration(array $config, ContainerBuilder $container); ++ public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface; + } +diff --git a/src/Symfony/Component/DependencyInjection/Extension/Extension.php b/src/Symfony/Component/DependencyInjection/Extension/Extension.php +index 00192d0da5..620efa4fd1 100644 +--- a/src/Symfony/Component/DependencyInjection/Extension/Extension.php ++++ b/src/Symfony/Component/DependencyInjection/Extension/Extension.php +@@ -29,10 +29,10 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn + private array $processedConfigs = []; + +- public function getXsdValidationBasePath() ++ public function getXsdValidationBasePath(): string|false + { + return false; + } + +- public function getNamespace() ++ public function getNamespace(): string + { + return 'http://example.org/schema/dic/'.$this->getAlias(); +@@ -68,5 +68,5 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn + } + +- public function getConfiguration(array $config, ContainerBuilder $container) ++ public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface + { + $class = static::class; +diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php +index bd57eef733..3284e19ede 100644 +--- a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php ++++ b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php +@@ -30,5 +30,5 @@ interface ExtensionInterface + * @throws \InvalidArgumentException When provided tag is not defined in this extension + */ +- public function load(array $configs, ContainerBuilder $container); ++ public function load(array $configs, ContainerBuilder $container): void; + + /** +@@ -37,5 +37,5 @@ interface ExtensionInterface + * @return string + */ +- public function getNamespace(); ++ public function getNamespace(): string; + + /** +@@ -44,5 +44,5 @@ interface ExtensionInterface + * @return string|false + */ +- public function getXsdValidationBasePath(); ++ public function getXsdValidationBasePath(): string|false; + + /** +@@ -53,4 +53,4 @@ interface ExtensionInterface + * @return string + */ +- public function getAlias(); ++ public function getAlias(): string; + } +diff --git a/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php +index 0df94e1092..061e7d7fd9 100644 +--- a/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php ++++ b/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php +@@ -21,4 +21,4 @@ interface PrependExtensionInterface + * @return void + */ +- public function prepend(ContainerBuilder $container); ++ public function prepend(ContainerBuilder $container): void; + } +diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php +index f4c6b29258..1402331f9e 100644 +--- a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php ++++ b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php +@@ -31,4 +31,4 @@ interface InstantiatorInterface + * @return object + */ +- public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator); ++ public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator): object; + } +diff --git a/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php +index 62ac252dd7..466206277a 100644 +--- a/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php ++++ b/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php +@@ -99,5 +99,5 @@ abstract class FileLoader extends BaseFileLoader + * @return void + */ +- public function registerClasses(Definition $prototype, string $namespace, string $resource, string|array $exclude = null/* , string $source = null */) ++ public function registerClasses(Definition $prototype, string $namespace, string $resource, string|array $exclude = null/* , string $source = null */): void + { + if (!str_ends_with($namespace, '\\')) { +@@ -191,5 +191,5 @@ abstract class FileLoader extends BaseFileLoader + * @return void + */ +- public function registerAliasesForSinglyImplementedInterfaces() ++ public function registerAliasesForSinglyImplementedInterfaces(): void + { + foreach ($this->interfaces as $interface) { +@@ -207,5 +207,5 @@ abstract class FileLoader extends BaseFileLoader + * @return void + */ +- protected function setDefinition(string $id, Definition $definition) ++ protected function setDefinition(string $id, Definition $definition): void + { + $this->container->removeBindings($id); +diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBagInterface.php b/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBagInterface.php +index eeff6538c5..8ac7149b37 100644 +--- a/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBagInterface.php ++++ b/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBagInterface.php +@@ -40,5 +40,5 @@ interface ContainerBagInterface extends ContainerInterface + * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist + */ +- public function resolveValue(mixed $value); ++ public function resolveValue(mixed $value): mixed; + + /** +diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php +index 9c66e1f944..619e44fc73 100644 +--- a/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php ++++ b/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php +@@ -91,5 +91,5 @@ class EnvPlaceholderParameterBag extends ParameterBag + * @return void + */ +- public function clearUnusedEnvPlaceholders() ++ public function clearUnusedEnvPlaceholders(): void + { + $this->unusedEnvPlaceholders = []; +@@ -101,5 +101,5 @@ class EnvPlaceholderParameterBag extends ParameterBag + * @return void + */ +- public function mergeEnvPlaceholders(self $bag) ++ public function mergeEnvPlaceholders(self $bag): void + { + if ($newPlaceholders = $bag->getEnvPlaceholders()) { +@@ -125,5 +125,5 @@ class EnvPlaceholderParameterBag extends ParameterBag + * @return void + */ +- public function setProvidedTypes(array $providedTypes) ++ public function setProvidedTypes(array $providedTypes): void + { + $this->providedTypes = $providedTypes; +@@ -143,5 +143,5 @@ class EnvPlaceholderParameterBag extends ParameterBag + * @return void + */ +- public function resolve() ++ public function resolve(): void + { + if ($this->resolved) { +diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php +index d4933af33e..47b4778c26 100644 +--- a/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php ++++ b/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php +@@ -35,25 +35,25 @@ class FrozenParameterBag extends ParameterBag + } + +- public function clear() ++ public function clear(): void + { + throw new LogicException('Impossible to call clear() on a frozen ParameterBag.'); + } + +- public function add(array $parameters) ++ public function add(array $parameters): void + { + throw new LogicException('Impossible to call add() on a frozen ParameterBag.'); + } + +- public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value) ++ public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value): void + { + throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); + } + +- public function deprecate(string $name, string $package, string $version, string $message = 'The parameter "%s" is deprecated.') ++ public function deprecate(string $name, string $package, string $version, string $message = 'The parameter "%s" is deprecated.'): void + { + throw new LogicException('Impossible to call deprecate() on a frozen ParameterBag.'); + } + +- public function remove(string $name) ++ public function remove(string $name): void + { + throw new LogicException('Impossible to call remove() on a frozen ParameterBag.'); +diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php +index 4a420464ec..d28df164f5 100644 +--- a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php ++++ b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php +@@ -35,5 +35,5 @@ class ParameterBag implements ParameterBagInterface + * @return void + */ +- public function clear() ++ public function clear(): void + { + $this->parameters = []; +@@ -43,5 +43,5 @@ class ParameterBag implements ParameterBagInterface + * @return void + */ +- public function add(array $parameters) ++ public function add(array $parameters): void + { + foreach ($parameters as $key => $value) { +@@ -104,5 +104,5 @@ class ParameterBag implements ParameterBagInterface + * @return void + */ +- public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value) ++ public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value): void + { + if (is_numeric($name)) { +@@ -122,5 +122,5 @@ class ParameterBag implements ParameterBagInterface + * @throws ParameterNotFoundException if the parameter is not defined + */ +- public function deprecate(string $name, string $package, string $version, string $message = 'The parameter "%s" is deprecated.') ++ public function deprecate(string $name, string $package, string $version, string $message = 'The parameter "%s" is deprecated.'): void + { + if (!\array_key_exists($name, $this->parameters)) { +@@ -139,5 +139,5 @@ class ParameterBag implements ParameterBagInterface + * @return void + */ +- public function remove(string $name) ++ public function remove(string $name): void + { + unset($this->parameters[$name], $this->deprecatedParameters[$name]); +@@ -147,5 +147,5 @@ class ParameterBag implements ParameterBagInterface + * @return void + */ +- public function resolve() ++ public function resolve(): void + { + if ($this->resolved) { +diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php +index 18ddfde147..b8651648bd 100644 +--- a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php ++++ b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php +@@ -29,5 +29,5 @@ interface ParameterBagInterface + * @throws LogicException if the ParameterBagInterface cannot be cleared + */ +- public function clear(); ++ public function clear(): void; + + /** +@@ -38,5 +38,5 @@ interface ParameterBagInterface + * @throws LogicException if the parameter cannot be added + */ +- public function add(array $parameters); ++ public function add(array $parameters): void; + + /** +@@ -57,5 +57,5 @@ interface ParameterBagInterface + * @return void + */ +- public function remove(string $name); ++ public function remove(string $name): void; + + /** +@@ -66,5 +66,5 @@ interface ParameterBagInterface + * @throws LogicException if the parameter cannot be set + */ +- public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value); ++ public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value): void; + + /** +@@ -78,5 +78,5 @@ interface ParameterBagInterface + * @return void + */ +- public function resolve(); ++ public function resolve(): void; + + /** +@@ -87,5 +87,5 @@ interface ParameterBagInterface + * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist + */ +- public function resolveValue(mixed $value); ++ public function resolveValue(mixed $value): mixed; + + /** +diff --git a/src/Symfony/Component/DependencyInjection/TypedReference.php b/src/Symfony/Component/DependencyInjection/TypedReference.php +index 9b431cd65b..5fdb0643cd 100644 +--- a/src/Symfony/Component/DependencyInjection/TypedReference.php ++++ b/src/Symfony/Component/DependencyInjection/TypedReference.php +@@ -41,5 +41,5 @@ class TypedReference extends Reference + * @return string + */ +- public function getType() ++ public function getType(): string + { + return $this->type; +diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php +index 59eec3068c..b750e80938 100644 +--- a/src/Symfony/Component/DomCrawler/Crawler.php ++++ b/src/Symfony/Component/DomCrawler/Crawler.php +@@ -96,5 +96,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @return void + */ +- public function clear() ++ public function clear(): void + { + $this->nodes = []; +@@ -115,5 +115,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @throws \InvalidArgumentException when node is not the expected type + */ +- public function add(\DOMNodeList|\DOMNode|array|string|null $node) ++ public function add(\DOMNodeList|\DOMNode|array|string|null $node): void + { + if ($node instanceof \DOMNodeList) { +@@ -139,5 +139,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @return void + */ +- public function addContent(string $content, string $type = null) ++ public function addContent(string $content, string $type = null): void + { + if (empty($type)) { +@@ -181,5 +181,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @return void + */ +- public function addHtmlContent(string $content, string $charset = 'UTF-8') ++ public function addHtmlContent(string $content, string $charset = 'UTF-8'): void + { + $dom = $this->parseHtmlString($content, $charset); +@@ -217,5 +217,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @return void + */ +- public function addXmlContent(string $content, string $charset = 'UTF-8', int $options = \LIBXML_NONET) ++ public function addXmlContent(string $content, string $charset = 'UTF-8', int $options = \LIBXML_NONET): void + { + // remove the default namespace if it's the only namespace to make XPath expressions simpler +@@ -247,5 +247,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @return void + */ +- public function addDocument(\DOMDocument $dom) ++ public function addDocument(\DOMDocument $dom): void + { + if ($dom->documentElement) { +@@ -261,5 +261,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @return void + */ +- public function addNodeList(\DOMNodeList $nodes) ++ public function addNodeList(\DOMNodeList $nodes): void + { + foreach ($nodes as $node) { +@@ -277,5 +277,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @return void + */ +- public function addNodes(array $nodes) ++ public function addNodes(array $nodes): void + { + foreach ($nodes as $node) { +@@ -291,5 +291,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @return void + */ +- public function addNode(\DOMNode $node) ++ public function addNode(\DOMNode $node): void + { + if ($node instanceof \DOMDocument) { +@@ -885,5 +885,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @return void + */ +- public function setDefaultNamespacePrefix(string $prefix) ++ public function setDefaultNamespacePrefix(string $prefix): void + { + $this->defaultNamespacePrefix = $prefix; +@@ -893,5 +893,5 @@ class Crawler implements \Countable, \IteratorAggregate + * @return void + */ +- public function registerNamespace(string $prefix, string $namespace) ++ public function registerNamespace(string $prefix, string $namespace): void + { + $this->namespaces[$prefix] = $namespace; +diff --git a/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php b/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php +index dcae5490ad..4357de8275 100644 +--- a/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php ++++ b/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php +@@ -64,5 +64,5 @@ class ChoiceFormField extends FormField + * @return void + */ +- public function select(string|array|bool $value) ++ public function select(string|array|bool $value): void + { + $this->setValue($value); +@@ -76,5 +76,5 @@ class ChoiceFormField extends FormField + * @throws \LogicException When the type provided is not correct + */ +- public function tick() ++ public function tick(): void + { + if ('checkbox' !== $this->type) { +@@ -92,5 +92,5 @@ class ChoiceFormField extends FormField + * @throws \LogicException When the type provided is not correct + */ +- public function untick() ++ public function untick(): void + { + if ('checkbox' !== $this->type) { +@@ -108,5 +108,5 @@ class ChoiceFormField extends FormField + * @throws \InvalidArgumentException When value type provided is not correct + */ +- public function setValue(string|array|bool|null $value) ++ public function setValue(string|array|bool|null $value): void + { + if ('checkbox' === $this->type && false === $value) { +@@ -187,5 +187,5 @@ class ChoiceFormField extends FormField + * @throws \LogicException When node type is incorrect + */ +- protected function initialize() ++ protected function initialize(): void + { + if ('input' !== $this->node->nodeName && 'select' !== $this->node->nodeName) { +diff --git a/src/Symfony/Component/DomCrawler/Field/FileFormField.php b/src/Symfony/Component/DomCrawler/Field/FileFormField.php +index 4ebe766f0b..eca59a131d 100644 +--- a/src/Symfony/Component/DomCrawler/Field/FileFormField.php ++++ b/src/Symfony/Component/DomCrawler/Field/FileFormField.php +@@ -28,5 +28,5 @@ class FileFormField extends FormField + * @throws \InvalidArgumentException When error code doesn't exist + */ +- public function setErrorCode(int $error) ++ public function setErrorCode(int $error): void + { + $codes = [\UPLOAD_ERR_INI_SIZE, \UPLOAD_ERR_FORM_SIZE, \UPLOAD_ERR_PARTIAL, \UPLOAD_ERR_NO_FILE, \UPLOAD_ERR_NO_TMP_DIR, \UPLOAD_ERR_CANT_WRITE, \UPLOAD_ERR_EXTENSION]; +@@ -43,5 +43,5 @@ class FileFormField extends FormField + * @return void + */ +- public function upload(?string $value) ++ public function upload(?string $value): void + { + $this->setValue($value); +@@ -53,5 +53,5 @@ class FileFormField extends FormField + * @return void + */ +- public function setValue(?string $value) ++ public function setValue(?string $value): void + { + if (null !== $value && is_readable($value)) { +@@ -86,5 +86,5 @@ class FileFormField extends FormField + * @return void + */ +- public function setFilePath(string $path) ++ public function setFilePath(string $path): void + { + parent::setValue($path); +@@ -98,5 +98,5 @@ class FileFormField extends FormField + * @throws \LogicException When node type is incorrect + */ +- protected function initialize() ++ protected function initialize(): void + { + if ('input' !== $this->node->nodeName) { +diff --git a/src/Symfony/Component/DomCrawler/Field/FormField.php b/src/Symfony/Component/DomCrawler/Field/FormField.php +index 483b08f089..f0f7d96f67 100644 +--- a/src/Symfony/Component/DomCrawler/Field/FormField.php ++++ b/src/Symfony/Component/DomCrawler/Field/FormField.php +@@ -96,5 +96,5 @@ abstract class FormField + * @return void + */ +- public function setValue(?string $value) ++ public function setValue(?string $value): void + { + $this->value = $value ?? ''; +diff --git a/src/Symfony/Component/DomCrawler/Field/InputFormField.php b/src/Symfony/Component/DomCrawler/Field/InputFormField.php +index 19d77352fc..ece901b578 100644 +--- a/src/Symfony/Component/DomCrawler/Field/InputFormField.php ++++ b/src/Symfony/Component/DomCrawler/Field/InputFormField.php +@@ -29,5 +29,5 @@ class InputFormField extends FormField + * @throws \LogicException When node type is incorrect + */ +- protected function initialize() ++ protected function initialize(): void + { + if ('input' !== $this->node->nodeName && 'button' !== $this->node->nodeName) { +diff --git a/src/Symfony/Component/DomCrawler/Field/TextareaFormField.php b/src/Symfony/Component/DomCrawler/Field/TextareaFormField.php +index 5168c52251..cf22473776 100644 +--- a/src/Symfony/Component/DomCrawler/Field/TextareaFormField.php ++++ b/src/Symfony/Component/DomCrawler/Field/TextareaFormField.php +@@ -26,5 +26,5 @@ class TextareaFormField extends FormField + * @throws \LogicException When node type is incorrect + */ +- protected function initialize() ++ protected function initialize(): void + { + if ('textarea' !== $this->node->nodeName) { +diff --git a/src/Symfony/Component/DomCrawler/Form.php b/src/Symfony/Component/DomCrawler/Form.php +index 9e53bbb680..51477a8ed7 100644 +--- a/src/Symfony/Component/DomCrawler/Form.php ++++ b/src/Symfony/Component/DomCrawler/Form.php +@@ -249,5 +249,5 @@ class Form extends Link implements \ArrayAccess + * @return void + */ +- public function remove(string $name) ++ public function remove(string $name): void + { + $this->fields->remove($name); +@@ -271,5 +271,5 @@ class Form extends Link implements \ArrayAccess + * @return void + */ +- public function set(FormField $field) ++ public function set(FormField $field): void + { + $this->fields->add($field); +@@ -358,5 +358,5 @@ class Form extends Link implements \ArrayAccess + * @throws \LogicException If given node is not a button or input or does not have a form ancestor + */ +- protected function setNode(\DOMElement $node) ++ protected function setNode(\DOMElement $node): void + { + $this->button = $node; +diff --git a/src/Symfony/Component/DomCrawler/Image.php b/src/Symfony/Component/DomCrawler/Image.php +index 725e3aea38..9ada91a4be 100644 +--- a/src/Symfony/Component/DomCrawler/Image.php ++++ b/src/Symfony/Component/DomCrawler/Image.php +@@ -30,5 +30,5 @@ class Image extends AbstractUriElement + * @return void + */ +- protected function setNode(\DOMElement $node) ++ protected function setNode(\DOMElement $node): void + { + if ('img' !== $node->nodeName) { +diff --git a/src/Symfony/Component/DomCrawler/Link.php b/src/Symfony/Component/DomCrawler/Link.php +index 681a2f7a23..07ca3531a1 100644 +--- a/src/Symfony/Component/DomCrawler/Link.php ++++ b/src/Symfony/Component/DomCrawler/Link.php +@@ -27,5 +27,5 @@ class Link extends AbstractUriElement + * @return void + */ +- protected function setNode(\DOMElement $node) ++ protected function setNode(\DOMElement $node): void + { + if ('a' !== $node->nodeName && 'area' !== $node->nodeName && 'link' !== $node->nodeName) { +diff --git a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php +index f1b982315c..ed8ad1fab4 100644 +--- a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php ++++ b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php +@@ -55,5 +55,5 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa + * @return void + */ +- public function addListener(string $eventName, callable|array $listener, int $priority = 0) ++ public function addListener(string $eventName, callable|array $listener, int $priority = 0): void + { + $this->dispatcher->addListener($eventName, $listener, $priority); +@@ -63,5 +63,5 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa + * @return void + */ +- public function addSubscriber(EventSubscriberInterface $subscriber) ++ public function addSubscriber(EventSubscriberInterface $subscriber): void + { + $this->dispatcher->addSubscriber($subscriber); +@@ -71,5 +71,5 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa + * @return void + */ +- public function removeListener(string $eventName, callable|array $listener) ++ public function removeListener(string $eventName, callable|array $listener): void + { + if (isset($this->wrappedListeners[$eventName])) { +@@ -89,5 +89,5 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa + * @return void + */ +- public function removeSubscriber(EventSubscriberInterface $subscriber) ++ public function removeSubscriber(EventSubscriberInterface $subscriber): void + { + $this->dispatcher->removeSubscriber($subscriber); +@@ -230,5 +230,5 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa + * @return void + */ +- public function reset() ++ public function reset(): void + { + $this->callStack = null; +@@ -253,5 +253,5 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa + * @return void + */ +- protected function beforeDispatch(string $eventName, object $event) ++ protected function beforeDispatch(string $eventName, object $event): void + { + } +@@ -262,5 +262,5 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa + * @return void + */ +- protected function afterDispatch(string $eventName, object $event) ++ protected function afterDispatch(string $eventName, object $event): void + { + } +diff --git a/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php b/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php +index c86f438d41..3bfb39db57 100644 +--- a/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php ++++ b/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php +@@ -52,5 +52,5 @@ class RegisterListenersPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('event_dispatcher') && !$container->hasAlias('event_dispatcher')) { +diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcher.php b/src/Symfony/Component/EventDispatcher/EventDispatcher.php +index 327803af67..2466d748ec 100644 +--- a/src/Symfony/Component/EventDispatcher/EventDispatcher.php ++++ b/src/Symfony/Component/EventDispatcher/EventDispatcher.php +@@ -127,5 +127,5 @@ class EventDispatcher implements EventDispatcherInterface + * @return void + */ +- public function addListener(string $eventName, callable|array $listener, int $priority = 0) ++ public function addListener(string $eventName, callable|array $listener, int $priority = 0): void + { + $this->listeners[$eventName][$priority][] = $listener; +@@ -136,5 +136,5 @@ class EventDispatcher implements EventDispatcherInterface + * @return void + */ +- public function removeListener(string $eventName, callable|array $listener) ++ public function removeListener(string $eventName, callable|array $listener): void + { + if (empty($this->listeners[$eventName])) { +@@ -167,5 +167,5 @@ class EventDispatcher implements EventDispatcherInterface + * @return void + */ +- public function addSubscriber(EventSubscriberInterface $subscriber) ++ public function addSubscriber(EventSubscriberInterface $subscriber): void + { + foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { +@@ -185,5 +185,5 @@ class EventDispatcher implements EventDispatcherInterface + * @return void + */ +- public function removeSubscriber(EventSubscriberInterface $subscriber) ++ public function removeSubscriber(EventSubscriberInterface $subscriber): void + { + foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { +@@ -210,5 +210,5 @@ class EventDispatcher implements EventDispatcherInterface + * @return void + */ +- protected function callListeners(iterable $listeners, string $eventName, object $event) ++ protected function callListeners(iterable $listeners, string $eventName, object $event): void + { + $stoppable = $event instanceof StoppableEventInterface; +diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php b/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php +index 3cd94c9388..c423905c11 100644 +--- a/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php ++++ b/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php +@@ -31,5 +31,5 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface + * @return void + */ +- public function addListener(string $eventName, callable $listener, int $priority = 0); ++ public function addListener(string $eventName, callable $listener, int $priority = 0): void; + + /** +@@ -41,5 +41,5 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface + * @return void + */ +- public function addSubscriber(EventSubscriberInterface $subscriber); ++ public function addSubscriber(EventSubscriberInterface $subscriber): void; + + /** +@@ -48,10 +48,10 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface + * @return void + */ +- public function removeListener(string $eventName, callable $listener); ++ public function removeListener(string $eventName, callable $listener): void; + + /** + * @return void + */ +- public function removeSubscriber(EventSubscriberInterface $subscriber); ++ public function removeSubscriber(EventSubscriberInterface $subscriber): void; + + /** +diff --git a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php +index 2085e428e9..ca0d6964e5 100644 +--- a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php ++++ b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php +@@ -46,4 +46,4 @@ interface EventSubscriberInterface + * @return array> + */ +- public static function getSubscribedEvents(); ++ public static function getSubscribedEvents(): array; + } +diff --git a/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php b/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php +index d385d3f833..1fc9f23ea0 100644 +--- a/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php ++++ b/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php +@@ -34,5 +34,5 @@ class ImmutableEventDispatcher implements EventDispatcherInterface + * @return never + */ +- public function addListener(string $eventName, callable|array $listener, int $priority = 0) ++ public function addListener(string $eventName, callable|array $listener, int $priority = 0): never + { + throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); +@@ -42,5 +42,5 @@ class ImmutableEventDispatcher implements EventDispatcherInterface + * @return never + */ +- public function addSubscriber(EventSubscriberInterface $subscriber) ++ public function addSubscriber(EventSubscriberInterface $subscriber): never + { + throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); +@@ -50,5 +50,5 @@ class ImmutableEventDispatcher implements EventDispatcherInterface + * @return never + */ +- public function removeListener(string $eventName, callable|array $listener) ++ public function removeListener(string $eventName, callable|array $listener): never + { + throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); +@@ -58,5 +58,5 @@ class ImmutableEventDispatcher implements EventDispatcherInterface + * @return never + */ +- public function removeSubscriber(EventSubscriberInterface $subscriber) ++ public function removeSubscriber(EventSubscriberInterface $subscriber): never + { + throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); +diff --git a/src/Symfony/Component/ExpressionLanguage/Compiler.php b/src/Symfony/Component/ExpressionLanguage/Compiler.php +index 66471d29ff..98f2f1eab2 100644 +--- a/src/Symfony/Component/ExpressionLanguage/Compiler.php ++++ b/src/Symfony/Component/ExpressionLanguage/Compiler.php +@@ -67,5 +67,5 @@ class Compiler implements ResetInterface + * @return string + */ +- public function subcompile(Node\Node $node) ++ public function subcompile(Node\Node $node): string + { + $current = $this->source; +diff --git a/src/Symfony/Component/ExpressionLanguage/ExpressionFunctionProviderInterface.php b/src/Symfony/Component/ExpressionLanguage/ExpressionFunctionProviderInterface.php +index 479aeef880..272954c082 100644 +--- a/src/Symfony/Component/ExpressionLanguage/ExpressionFunctionProviderInterface.php ++++ b/src/Symfony/Component/ExpressionLanguage/ExpressionFunctionProviderInterface.php +@@ -20,4 +20,4 @@ interface ExpressionFunctionProviderInterface + * @return ExpressionFunction[] + */ +- public function getFunctions(); ++ public function getFunctions(): array; + } +diff --git a/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php b/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php +index 9e107401a2..7f92321a2b 100644 +--- a/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php ++++ b/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php +@@ -117,5 +117,5 @@ class ExpressionLanguage + * @see ExpressionFunction + */ +- public function register(string $name, callable $compiler, callable $evaluator) ++ public function register(string $name, callable $compiler, callable $evaluator): void + { + if (isset($this->parser)) { +@@ -129,5 +129,5 @@ class ExpressionLanguage + * @return void + */ +- public function addFunction(ExpressionFunction $function) ++ public function addFunction(ExpressionFunction $function): void + { + $this->register($function->getName(), $function->getCompiler(), $function->getEvaluator()); +@@ -137,5 +137,5 @@ class ExpressionLanguage + * @return void + */ +- public function registerProvider(ExpressionFunctionProviderInterface $provider) ++ public function registerProvider(ExpressionFunctionProviderInterface $provider): void + { + foreach ($provider->getFunctions() as $function) { +@@ -147,5 +147,5 @@ class ExpressionLanguage + * @return void + */ +- protected function registerFunctions() ++ protected function registerFunctions(): void + { + $this->addFunction(ExpressionFunction::fromPhp('constant')); +diff --git a/src/Symfony/Component/ExpressionLanguage/Node/ConditionalNode.php b/src/Symfony/Component/ExpressionLanguage/Node/ConditionalNode.php +index fec02abaae..7d02544275 100644 +--- a/src/Symfony/Component/ExpressionLanguage/Node/ConditionalNode.php ++++ b/src/Symfony/Component/ExpressionLanguage/Node/ConditionalNode.php +@@ -41,5 +41,5 @@ class ConditionalNode extends Node + } + +- public function evaluate(array $functions, array $values) ++ public function evaluate(array $functions, array $values): mixed + { + if ($this->nodes['expr1']->evaluate($functions, $values)) { +diff --git a/src/Symfony/Component/ExpressionLanguage/Node/FunctionNode.php b/src/Symfony/Component/ExpressionLanguage/Node/FunctionNode.php +index d4ab3e0922..811fec7e2e 100644 +--- a/src/Symfony/Component/ExpressionLanguage/Node/FunctionNode.php ++++ b/src/Symfony/Component/ExpressionLanguage/Node/FunctionNode.php +@@ -41,5 +41,5 @@ class FunctionNode extends Node + } + +- public function evaluate(array $functions, array $values) ++ public function evaluate(array $functions, array $values): mixed + { + $arguments = [$values]; +@@ -54,5 +54,5 @@ class FunctionNode extends Node + * @return array + */ +- public function toArray() ++ public function toArray(): array + { + $array = []; +diff --git a/src/Symfony/Component/ExpressionLanguage/Node/Node.php b/src/Symfony/Component/ExpressionLanguage/Node/Node.php +index f6fff09b1e..4661f7d165 100644 +--- a/src/Symfony/Component/ExpressionLanguage/Node/Node.php ++++ b/src/Symfony/Component/ExpressionLanguage/Node/Node.php +@@ -61,5 +61,5 @@ class Node + * @return void + */ +- public function compile(Compiler $compiler) ++ public function compile(Compiler $compiler): void + { + foreach ($this->nodes as $node) { +@@ -71,5 +71,5 @@ class Node + * @return mixed + */ +- public function evaluate(array $functions, array $values) ++ public function evaluate(array $functions, array $values): mixed + { + $results = []; +@@ -89,5 +89,5 @@ class Node + * @return string + */ +- public function dump() ++ public function dump(): string + { + $dump = ''; +@@ -103,5 +103,5 @@ class Node + * @return string + */ +- protected function dumpString(string $value) ++ protected function dumpString(string $value): string + { + return sprintf('"%s"', addcslashes($value, "\0\t\"\\")); +@@ -111,5 +111,5 @@ class Node + * @return bool + */ +- protected function isHash(array $value) ++ protected function isHash(array $value): bool + { + $expectedKey = 0; +diff --git a/src/Symfony/Component/ExpressionLanguage/Node/UnaryNode.php b/src/Symfony/Component/ExpressionLanguage/Node/UnaryNode.php +index 580ee13095..55e2121fcf 100644 +--- a/src/Symfony/Component/ExpressionLanguage/Node/UnaryNode.php ++++ b/src/Symfony/Component/ExpressionLanguage/Node/UnaryNode.php +@@ -46,5 +46,5 @@ class UnaryNode extends Node + } + +- public function evaluate(array $functions, array $values) ++ public function evaluate(array $functions, array $values): mixed + { + $value = $this->nodes['node']->evaluate($functions, $values); +diff --git a/src/Symfony/Component/ExpressionLanguage/ParsedExpression.php b/src/Symfony/Component/ExpressionLanguage/ParsedExpression.php +index 239624ec2c..3b497d5ccf 100644 +--- a/src/Symfony/Component/ExpressionLanguage/ParsedExpression.php ++++ b/src/Symfony/Component/ExpressionLanguage/ParsedExpression.php +@@ -33,5 +33,5 @@ class ParsedExpression extends Expression + * @return Node + */ +- public function getNodes() ++ public function getNodes(): Node + { + return $this->nodes; +diff --git a/src/Symfony/Component/ExpressionLanguage/Parser.php b/src/Symfony/Component/ExpressionLanguage/Parser.php +index a2911686f0..8f19254f51 100644 +--- a/src/Symfony/Component/ExpressionLanguage/Parser.php ++++ b/src/Symfony/Component/ExpressionLanguage/Parser.php +@@ -178,5 +178,5 @@ class Parser + * @return Node\Node + */ +- protected function parseConditionalExpression(Node\Node $expr) ++ protected function parseConditionalExpression(Node\Node $expr): Node\Node + { + while ($this->stream->current->test(Token::PUNCTUATION_TYPE, '??')) { +@@ -212,5 +212,5 @@ class Parser + * @return Node\Node + */ +- public function parsePrimaryExpression() ++ public function parsePrimaryExpression(): Node\Node + { + $token = $this->stream->current; +@@ -280,5 +280,5 @@ class Parser + * @return Node\ArrayNode + */ +- public function parseArrayExpression() ++ public function parseArrayExpression(): Node\ArrayNode + { + $this->stream->expect(Token::PUNCTUATION_TYPE, '[', 'An array element was expected'); +@@ -307,5 +307,5 @@ class Parser + * @return Node\ArrayNode + */ +- public function parseHashExpression() ++ public function parseHashExpression(): Node\ArrayNode + { + $this->stream->expect(Token::PUNCTUATION_TYPE, '{', 'A hash element was expected'); +@@ -354,5 +354,5 @@ class Parser + * @return Node\GetAttrNode|Node\Node + */ +- public function parsePostfixExpression(Node\Node $node) ++ public function parsePostfixExpression(Node\Node $node): Node\GetAttrNode|Node\Node + { + $token = $this->stream->current; +@@ -417,5 +417,5 @@ class Parser + * @return Node\Node + */ +- public function parseArguments() ++ public function parseArguments(): Node\Node + { + $args = []; +diff --git a/src/Symfony/Component/ExpressionLanguage/SerializedParsedExpression.php b/src/Symfony/Component/ExpressionLanguage/SerializedParsedExpression.php +index 56207b0985..133a3a1061 100644 +--- a/src/Symfony/Component/ExpressionLanguage/SerializedParsedExpression.php ++++ b/src/Symfony/Component/ExpressionLanguage/SerializedParsedExpression.php +@@ -12,4 +12,5 @@ + namespace Symfony\Component\ExpressionLanguage; + ++use Symfony\Component\ExpressionLanguage\Node\Node; + /** + * Represents an already parsed expression. +@@ -31,5 +32,5 @@ class SerializedParsedExpression extends ParsedExpression + } + +- public function getNodes() ++ public function getNodes(): Node + { + return unserialize($this->nodes); +diff --git a/src/Symfony/Component/ExpressionLanguage/TokenStream.php b/src/Symfony/Component/ExpressionLanguage/TokenStream.php +index 241725b9c5..420932897f 100644 +--- a/src/Symfony/Component/ExpressionLanguage/TokenStream.php ++++ b/src/Symfony/Component/ExpressionLanguage/TokenStream.php +@@ -45,5 +45,5 @@ class TokenStream + * @return void + */ +- public function next() ++ public function next(): void + { + ++$this->position; +@@ -61,5 +61,5 @@ class TokenStream + * @return void + */ +- public function expect(string $type, string $value = null, string $message = null) ++ public function expect(string $type, string $value = null, string $message = null): void + { + $token = $this->current; +diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php +index f7b839898f..32fa8eac6d 100644 +--- a/src/Symfony/Component/Filesystem/Filesystem.php ++++ b/src/Symfony/Component/Filesystem/Filesystem.php +@@ -37,5 +37,5 @@ class Filesystem + * @throws IOException When copy fails + */ +- public function copy(string $originFile, string $targetFile, bool $overwriteNewerFiles = false) ++ public function copy(string $originFile, string $targetFile, bool $overwriteNewerFiles = false): void + { + $originIsLocal = stream_is_local($originFile) || 0 === stripos($originFile, 'file://'); +@@ -89,5 +89,5 @@ class Filesystem + * @throws IOException On any directory creation failure + */ +- public function mkdir(string|iterable $dirs, int $mode = 0777) ++ public function mkdir(string|iterable $dirs, int $mode = 0777): void + { + foreach ($this->toIterable($dirs) as $dir) { +@@ -132,5 +132,5 @@ class Filesystem + * @throws IOException When touch fails + */ +- public function touch(string|iterable $files, int $time = null, int $atime = null) ++ public function touch(string|iterable $files, int $time = null, int $atime = null): void + { + foreach ($this->toIterable($files) as $file) { +@@ -148,5 +148,5 @@ class Filesystem + * @throws IOException When removal fails + */ +- public function remove(string|iterable $files) ++ public function remove(string|iterable $files): void + { + if ($files instanceof \Traversable) { +@@ -216,5 +216,5 @@ class Filesystem + * @throws IOException When the change fails + */ +- public function chmod(string|iterable $files, int $mode, int $umask = 0000, bool $recursive = false) ++ public function chmod(string|iterable $files, int $mode, int $umask = 0000, bool $recursive = false): void + { + foreach ($this->toIterable($files) as $file) { +@@ -238,5 +238,5 @@ class Filesystem + * @throws IOException When the change fails + */ +- public function chown(string|iterable $files, string|int $user, bool $recursive = false) ++ public function chown(string|iterable $files, string|int $user, bool $recursive = false): void + { + foreach ($this->toIterable($files) as $file) { +@@ -266,5 +266,5 @@ class Filesystem + * @throws IOException When the change fails + */ +- public function chgrp(string|iterable $files, string|int $group, bool $recursive = false) ++ public function chgrp(string|iterable $files, string|int $group, bool $recursive = false): void + { + foreach ($this->toIterable($files) as $file) { +@@ -292,5 +292,5 @@ class Filesystem + * @throws IOException When origin cannot be renamed + */ +- public function rename(string $origin, string $target, bool $overwrite = false) ++ public function rename(string $origin, string $target, bool $overwrite = false): void + { + // we check that target does not exist +@@ -334,5 +334,5 @@ class Filesystem + * @throws IOException When symlink fails + */ +- public function symlink(string $originDir, string $targetDir, bool $copyOnWindows = false) ++ public function symlink(string $originDir, string $targetDir, bool $copyOnWindows = false): void + { + self::assertFunctionExists('symlink'); +@@ -373,5 +373,5 @@ class Filesystem + * @throws IOException When link fails, including if link already exists + */ +- public function hardlink(string $originFile, string|iterable $targetFiles) ++ public function hardlink(string $originFile, string|iterable $targetFiles): void + { + self::assertFunctionExists('link'); +@@ -531,5 +531,5 @@ class Filesystem + * @throws IOException When file type is unknown + */ +- public function mirror(string $originDir, string $targetDir, \Traversable $iterator = null, array $options = []) ++ public function mirror(string $originDir, string $targetDir, \Traversable $iterator = null, array $options = []): void + { + $targetDir = rtrim($targetDir, '/\\'); +@@ -657,5 +657,5 @@ class Filesystem + * @throws IOException if the file cannot be written to + */ +- public function dumpFile(string $filename, $content) ++ public function dumpFile(string $filename, $content): void + { + if (\is_array($content)) { +@@ -698,5 +698,5 @@ class Filesystem + * @throws IOException If the file is not writable + */ +- public function appendToFile(string $filename, $content/* , bool $lock = false */) ++ public function appendToFile(string $filename, $content/* , bool $lock = false */): void + { + if (\is_array($content)) { +diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php +index 62c3f9e24f..f5055abd0c 100644 +--- a/src/Symfony/Component/Finder/Finder.php ++++ b/src/Symfony/Component/Finder/Finder.php +@@ -400,5 +400,5 @@ class Finder implements \IteratorAggregate, \Countable + * @return void + */ +- public static function addVCSPattern(string|array $pattern) ++ public static function addVCSPattern(string|array $pattern): void + { + foreach ((array) $pattern as $p) { +diff --git a/src/Symfony/Component/Form/AbstractExtension.php b/src/Symfony/Component/Form/AbstractExtension.php +index cffca7d398..f528c135a2 100644 +--- a/src/Symfony/Component/Form/AbstractExtension.php ++++ b/src/Symfony/Component/Form/AbstractExtension.php +@@ -99,5 +99,5 @@ abstract class AbstractExtension implements FormExtensionInterface + * @return FormTypeInterface[] + */ +- protected function loadTypes() ++ protected function loadTypes(): array + { + return []; +@@ -119,5 +119,5 @@ abstract class AbstractExtension implements FormExtensionInterface + * @return FormTypeGuesserInterface|null + */ +- protected function loadTypeGuesser() ++ protected function loadTypeGuesser(): ?FormTypeGuesserInterface + { + return null; +diff --git a/src/Symfony/Component/Form/AbstractRendererEngine.php b/src/Symfony/Component/Form/AbstractRendererEngine.php +index 3f1ab79c26..bddb459b86 100644 +--- a/src/Symfony/Component/Form/AbstractRendererEngine.php ++++ b/src/Symfony/Component/Form/AbstractRendererEngine.php +@@ -65,5 +65,5 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface, Re + * @return void + */ +- public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true) ++ public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true): void + { + $cacheKey = $view->vars[self::CACHE_KEY_VAR]; +@@ -128,5 +128,5 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface, Re + * @return bool + */ +- abstract protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName); ++ abstract protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName): bool; + + /** +diff --git a/src/Symfony/Component/Form/AbstractType.php b/src/Symfony/Component/Form/AbstractType.php +index b163506132..d8f2cc5d49 100644 +--- a/src/Symfony/Component/Form/AbstractType.php ++++ b/src/Symfony/Component/Form/AbstractType.php +@@ -24,5 +24,5 @@ abstract class AbstractType implements FormTypeInterface + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + } +@@ -31,5 +31,5 @@ abstract class AbstractType implements FormTypeInterface + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + } +@@ -38,5 +38,5 @@ abstract class AbstractType implements FormTypeInterface + * @return void + */ +- public function finishView(FormView $view, FormInterface $form, array $options) ++ public function finishView(FormView $view, FormInterface $form, array $options): void + { + } +@@ -45,14 +45,14 @@ abstract class AbstractType implements FormTypeInterface + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + } + +- public function getBlockPrefix() ++ public function getBlockPrefix(): string + { + return StringUtil::fqcnToBlockPrefix(static::class) ?: ''; + } + +- public function getParent() ++ public function getParent(): ?string + { + return FormType::class; +diff --git a/src/Symfony/Component/Form/AbstractTypeExtension.php b/src/Symfony/Component/Form/AbstractTypeExtension.php +index 422f28bf33..b1d608fd4d 100644 +--- a/src/Symfony/Component/Form/AbstractTypeExtension.php ++++ b/src/Symfony/Component/Form/AbstractTypeExtension.php +@@ -22,5 +22,5 @@ abstract class AbstractTypeExtension implements FormTypeExtensionInterface + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + } +@@ -29,5 +29,5 @@ abstract class AbstractTypeExtension implements FormTypeExtensionInterface + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + } +@@ -36,5 +36,5 @@ abstract class AbstractTypeExtension implements FormTypeExtensionInterface + * @return void + */ +- public function finishView(FormView $view, FormInterface $form, array $options) ++ public function finishView(FormView $view, FormInterface $form, array $options): void + { + } +@@ -43,5 +43,5 @@ abstract class AbstractTypeExtension implements FormTypeExtensionInterface + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + } +diff --git a/src/Symfony/Component/Form/ButtonBuilder.php b/src/Symfony/Component/Form/ButtonBuilder.php +index 9cc32888e1..0fa604ceec 100644 +--- a/src/Symfony/Component/Form/ButtonBuilder.php ++++ b/src/Symfony/Component/Form/ButtonBuilder.php +@@ -327,5 +327,5 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface + * @throws BadMethodCallException + */ +- public function setFormFactory(FormFactoryInterface $formFactory) ++ public function setFormFactory(FormFactoryInterface $formFactory): static + { + throw new BadMethodCallException('Buttons do not support form factories.'); +diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php b/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php +index 304105cbc2..8268ca39fe 100644 +--- a/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php ++++ b/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php +@@ -218,5 +218,5 @@ class CachingFactoryDecorator implements ChoiceListFactoryInterface, ResetInterf + * @return void + */ +- public function reset() ++ public function reset(): void + { + $this->lists = []; +diff --git a/src/Symfony/Component/Form/Command/DebugCommand.php b/src/Symfony/Component/Form/Command/DebugCommand.php +index 9b6b830341..9c656316e4 100644 +--- a/src/Symfony/Component/Form/Command/DebugCommand.php ++++ b/src/Symfony/Component/Form/Command/DebugCommand.php +@@ -58,5 +58,5 @@ class DebugCommand extends Command + * @return void + */ +- protected function configure() ++ protected function configure(): void + { + $this +diff --git a/src/Symfony/Component/Form/DataMapperInterface.php b/src/Symfony/Component/Form/DataMapperInterface.php +index f04137aec6..4e874c8730 100644 +--- a/src/Symfony/Component/Form/DataMapperInterface.php ++++ b/src/Symfony/Component/Form/DataMapperInterface.php +@@ -30,5 +30,5 @@ interface DataMapperInterface + * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported + */ +- public function mapDataToForms(mixed $viewData, \Traversable $forms); ++ public function mapDataToForms(mixed $viewData, \Traversable $forms): void; + + /** +@@ -63,4 +63,4 @@ interface DataMapperInterface + * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported + */ +- public function mapFormsToData(\Traversable $forms, mixed &$viewData); ++ public function mapFormsToData(\Traversable $forms, mixed &$viewData): void; + } +diff --git a/src/Symfony/Component/Form/DataTransformerInterface.php b/src/Symfony/Component/Form/DataTransformerInterface.php +index 85fb99d218..6cc654f681 100644 +--- a/src/Symfony/Component/Form/DataTransformerInterface.php ++++ b/src/Symfony/Component/Form/DataTransformerInterface.php +@@ -65,5 +65,5 @@ interface DataTransformerInterface + * @throws TransformationFailedException when the transformation fails + */ +- public function transform(mixed $value); ++ public function transform(mixed $value): mixed; + + /** +@@ -96,4 +96,4 @@ interface DataTransformerInterface + * @throws TransformationFailedException when the transformation fails + */ +- public function reverseTransform(mixed $value); ++ public function reverseTransform(mixed $value): mixed; + } +diff --git a/src/Symfony/Component/Form/DependencyInjection/FormPass.php b/src/Symfony/Component/Form/DependencyInjection/FormPass.php +index efb6d5c8bb..ab3befa3f0 100644 +--- a/src/Symfony/Component/Form/DependencyInjection/FormPass.php ++++ b/src/Symfony/Component/Form/DependencyInjection/FormPass.php +@@ -34,5 +34,5 @@ class FormPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('form.extension')) { +diff --git a/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php b/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php +index 119c81107d..cf9f6f16af 100644 +--- a/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php ++++ b/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php +@@ -29,5 +29,5 @@ class CheckboxListMapper implements DataMapperInterface + * @return void + */ +- public function mapDataToForms(mixed $choices, \Traversable $checkboxes) ++ public function mapDataToForms(mixed $choices, \Traversable $checkboxes): void + { + if (!\is_array($choices ??= [])) { +@@ -44,5 +44,5 @@ class CheckboxListMapper implements DataMapperInterface + * @return void + */ +- public function mapFormsToData(\Traversable $checkboxes, mixed &$choices) ++ public function mapFormsToData(\Traversable $checkboxes, mixed &$choices): void + { + if (!\is_array($choices)) { +diff --git a/src/Symfony/Component/Form/Extension/Core/DataMapper/RadioListMapper.php b/src/Symfony/Component/Form/Extension/Core/DataMapper/RadioListMapper.php +index 37fdba0c35..ed6557a3d8 100644 +--- a/src/Symfony/Component/Form/Extension/Core/DataMapper/RadioListMapper.php ++++ b/src/Symfony/Component/Form/Extension/Core/DataMapper/RadioListMapper.php +@@ -29,5 +29,5 @@ class RadioListMapper implements DataMapperInterface + * @return void + */ +- public function mapDataToForms(mixed $choice, \Traversable $radios) ++ public function mapDataToForms(mixed $choice, \Traversable $radios): void + { + if (!\is_string($choice)) { +@@ -44,5 +44,5 @@ class RadioListMapper implements DataMapperInterface + * @return void + */ +- public function mapFormsToData(\Traversable $radios, mixed &$choice) ++ public function mapFormsToData(\Traversable $radios, mixed &$choice): void + { + if (null !== $choice && !\is_string($choice)) { +diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php +index 7189977549..29ec9e3efc 100644 +--- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php ++++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php +@@ -36,5 +36,5 @@ class FixUrlProtocolListener implements EventSubscriberInterface + * @return void + */ +- public function onSubmit(FormEvent $event) ++ public function onSubmit(FormEvent $event): void + { + $data = $event->getData(); +diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php +index 62cd0a42a7..55ab20aabc 100644 +--- a/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php ++++ b/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php +@@ -45,5 +45,5 @@ class MergeCollectionListener implements EventSubscriberInterface + * @return void + */ +- public function onSubmit(FormEvent $event) ++ public function onSubmit(FormEvent $event): void + { + $dataToMergeInto = $event->getForm()->getNormData(); +diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +index 4c06342e54..ccb381629d 100644 +--- a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php ++++ b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +@@ -54,5 +54,5 @@ class ResizeFormListener implements EventSubscriberInterface + * @return void + */ +- public function preSetData(FormEvent $event) ++ public function preSetData(FormEvent $event): void + { + $form = $event->getForm(); +@@ -79,5 +79,5 @@ class ResizeFormListener implements EventSubscriberInterface + * @return void + */ +- public function preSubmit(FormEvent $event) ++ public function preSubmit(FormEvent $event): void + { + $form = $event->getForm(); +@@ -112,5 +112,5 @@ class ResizeFormListener implements EventSubscriberInterface + * @return void + */ +- public function onSubmit(FormEvent $event) ++ public function onSubmit(FormEvent $event): void + { + $form = $event->getForm(); +diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/TransformationFailureListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/TransformationFailureListener.php +index c9c216b59f..82b8cfb33b 100644 +--- a/src/Symfony/Component/Form/Extension/Core/EventListener/TransformationFailureListener.php ++++ b/src/Symfony/Component/Form/Extension/Core/EventListener/TransformationFailureListener.php +@@ -40,5 +40,5 @@ class TransformationFailureListener implements EventSubscriberInterface + * @return void + */ +- public function convertTransformationFailureToFormError(FormEvent $event) ++ public function convertTransformationFailureToFormError(FormEvent $event): void + { + $form = $event->getForm(); +diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php +index 81a55f3cb0..ea669fb590 100644 +--- a/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php ++++ b/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php +@@ -27,5 +27,5 @@ class TrimListener implements EventSubscriberInterface + * @return void + */ +- public function preSubmit(FormEvent $event) ++ public function preSubmit(FormEvent $event): void + { + $data = $event->getData(); +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php b/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php +index 5e2ae22481..760cb1a132 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php +@@ -33,5 +33,5 @@ abstract class BaseType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder->setDisabled($options['disabled']); +@@ -42,5 +42,5 @@ abstract class BaseType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $name = $form->getName(); +@@ -129,5 +129,5 @@ abstract class BaseType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/BirthdayType.php b/src/Symfony/Component/Form/Extension/Core/Type/BirthdayType.php +index fa60d016eb..fdb786cc61 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/BirthdayType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/BirthdayType.php +@@ -20,5 +20,5 @@ class BirthdayType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php b/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php +index d710546407..5ff4dc9989 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php +@@ -35,5 +35,5 @@ class ButtonType extends BaseType implements ButtonTypeInterface + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + parent::configureOptions($resolver); +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php b/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php +index b261f926bb..52634b0db7 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php +@@ -24,5 +24,5 @@ class CheckboxType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + // Unlike in other types, where the data is NULL by default, it +@@ -39,5 +39,5 @@ class CheckboxType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $view->vars = array_replace($view->vars, [ +@@ -50,5 +50,5 @@ class CheckboxType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $emptyData = fn (FormInterface $form, $viewData) => $viewData; +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php +index 9694ed750a..0a4187c162 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php +@@ -63,5 +63,5 @@ class ChoiceType extends AbstractType + } + +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $unknownValues = []; +@@ -215,5 +215,5 @@ class ChoiceType extends AbstractType + } + +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $choiceTranslationDomain = $options['choice_translation_domain']; +@@ -267,5 +267,5 @@ class ChoiceType extends AbstractType + } + +- public function finishView(FormView $view, FormInterface $form, array $options) ++ public function finishView(FormView $view, FormInterface $form, array $options): void + { + if ($options['expanded']) { +@@ -284,5 +284,5 @@ class ChoiceType extends AbstractType + } + +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $emptyData = function (Options $options) { +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php b/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php +index 1654d379a8..66ea974d31 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php +@@ -25,5 +25,5 @@ class CollectionType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if ($options['allow_add'] && $options['prototype']) { +@@ -55,5 +55,5 @@ class CollectionType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $view->vars = array_replace($view->vars, [ +@@ -71,5 +71,5 @@ class CollectionType extends AbstractType + * @return void + */ +- public function finishView(FormView $view, FormInterface $form, array $options) ++ public function finishView(FormView $view, FormInterface $form, array $options): void + { + $prefixOffset = -2; +@@ -105,5 +105,5 @@ class CollectionType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $entryOptionsNormalizer = function (Options $options, $value) { +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ColorType.php b/src/Symfony/Component/Form/Extension/Core/Type/ColorType.php +index 6e205fcbc9..f99464a9e7 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/ColorType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/ColorType.php +@@ -37,5 +37,5 @@ class ColorType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if (!$options['html5']) { +@@ -66,5 +66,5 @@ class ColorType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php b/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php +index b647284904..64566e5b64 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php +@@ -26,5 +26,5 @@ class CountryType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php b/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php +index 1c0ac471b8..64e6dea662 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php +@@ -26,5 +26,5 @@ class CurrencyType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php +index 0e4a7555a0..9f0cc46353 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php +@@ -47,5 +47,5 @@ class DateIntervalType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if (!$options['with_years'] && !$options['with_months'] && !$options['with_weeks'] && !$options['with_days'] && !$options['with_hours'] && !$options['with_minutes'] && !$options['with_seconds']) { +@@ -152,5 +152,5 @@ class DateIntervalType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $vars = [ +@@ -167,5 +167,5 @@ class DateIntervalType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $compound = fn (Options $options) => 'single_text' !== $options['widget']; +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +index ae47519c53..18a007ba32 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +@@ -51,5 +51,5 @@ class DateTimeType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $parts = ['year', 'month', 'day', 'hour']; +@@ -204,5 +204,5 @@ class DateTimeType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $view->vars['widget'] = $options['widget']; +@@ -228,5 +228,5 @@ class DateTimeType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $compound = fn (Options $options) => 'single_text' !== $options['widget']; +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +index b08a4dd834..e889f1de28 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +@@ -44,5 +44,5 @@ class DateType extends AbstractType + ]; + +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $dateFormat = \is_int($options['format']) ? $options['format'] : self::DEFAULT_FORMAT; +@@ -178,5 +178,5 @@ class DateType extends AbstractType + } + +- public function finishView(FormView $view, FormInterface $form, array $options) ++ public function finishView(FormView $view, FormInterface $form, array $options): void + { + $view->vars['widget'] = $options['widget']; +@@ -215,5 +215,5 @@ class DateType extends AbstractType + } + +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $compound = fn (Options $options) => 'single_text' !== $options['widget']; +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/EmailType.php b/src/Symfony/Component/Form/Extension/Core/Type/EmailType.php +index 64d01ee67a..0cd6cd3b79 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/EmailType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/EmailType.php +@@ -20,5 +20,5 @@ class EmailType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FileType.php b/src/Symfony/Component/Form/Extension/Core/Type/FileType.php +index 16d212ef0f..55960608f8 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/FileType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/FileType.php +@@ -42,5 +42,5 @@ class FileType extends AbstractType + } + +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + // Ensure that submitted data is always an uploaded file or an array of some +@@ -83,5 +83,5 @@ class FileType extends AbstractType + } + +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + if ($options['multiple']) { +@@ -96,10 +96,10 @@ class FileType extends AbstractType + } + +- public function finishView(FormView $view, FormInterface $form, array $options) ++ public function finishView(FormView $view, FormInterface $form, array $options): void + { + $view->vars['multipart'] = true; + } + +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $dataClass = null; +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php +index 560d1e2cb3..b683c2ef8d 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php +@@ -42,5 +42,5 @@ class FormType extends BaseType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + parent::buildForm($builder, $options); +@@ -73,5 +73,5 @@ class FormType extends BaseType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + parent::buildView($view, $form, $options); +@@ -115,5 +115,5 @@ class FormType extends BaseType + * @return void + */ +- public function finishView(FormView $view, FormInterface $form, array $options) ++ public function finishView(FormView $view, FormInterface $form, array $options): void + { + $multipart = false; +@@ -132,5 +132,5 @@ class FormType extends BaseType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + parent::configureOptions($resolver); +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php b/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php +index c4e5eb2ccf..495525f889 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php +@@ -20,5 +20,5 @@ class HiddenType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php b/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php +index a287b66b7c..12dc4a1f71 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php +@@ -24,5 +24,5 @@ class IntegerType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder->addViewTransformer(new IntegerToLocalizedStringTransformer($options['grouping'], $options['rounding_mode'], !$options['grouping'] ? 'en' : null)); +@@ -32,5 +32,5 @@ class IntegerType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + if ($options['grouping']) { +@@ -42,5 +42,5 @@ class IntegerType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php b/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php +index 0c6faafec6..8fac78ae1a 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php +@@ -27,5 +27,5 @@ class LanguageType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php b/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php +index 5086b0b0e6..662244cf46 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php +@@ -26,5 +26,5 @@ class LocaleType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php b/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php +index aea35410c1..03a13b5a52 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php +@@ -28,5 +28,5 @@ class MoneyType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + // Values used in HTML5 number inputs should be formatted as in "1234.5", ie. 'en' format without grouping, +@@ -46,5 +46,5 @@ class MoneyType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $view->vars['money_pattern'] = self::getPattern($options['currency']); +@@ -58,5 +58,5 @@ class MoneyType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php b/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php +index 3ddfbfeb1c..309f8dd641 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php +@@ -27,5 +27,5 @@ class NumberType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder->addViewTransformer(new NumberToLocalizedStringTransformer( +@@ -44,5 +44,5 @@ class NumberType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + if ($options['html5']) { +@@ -60,5 +60,5 @@ class NumberType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php b/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php +index 0c247f0f30..08d7cefb9a 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php +@@ -22,5 +22,5 @@ class PasswordType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + if ($options['always_empty'] || !$form->isSubmitted()) { +@@ -32,5 +32,5 @@ class PasswordType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php b/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php +index f71e288b3e..30fad82d81 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php +@@ -24,5 +24,5 @@ class PercentType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder->addViewTransformer(new PercentToLocalizedStringTransformer( +@@ -37,5 +37,5 @@ class PercentType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $view->vars['symbol'] = $options['symbol']; +@@ -49,5 +49,5 @@ class PercentType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php b/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php +index 4b97b0ae21..1889bb0e1e 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php +@@ -20,5 +20,5 @@ class RadioType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/RangeType.php b/src/Symfony/Component/Form/Extension/Core/Type/RangeType.php +index 2e33a977d9..ed7e88b5af 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/RangeType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/RangeType.php +@@ -20,5 +20,5 @@ class RangeType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php b/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php +index 4176f93e52..8f133ee41d 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php +@@ -22,5 +22,5 @@ class RepeatedType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + // Overwrite required option for child fields +@@ -48,5 +48,5 @@ class RepeatedType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/SearchType.php b/src/Symfony/Component/Form/Extension/Core/Type/SearchType.php +index 0dca6e42a8..aa51e40efa 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/SearchType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/SearchType.php +@@ -20,5 +20,5 @@ class SearchType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/SubmitType.php b/src/Symfony/Component/Form/Extension/Core/Type/SubmitType.php +index 3f1b5f95c9..d586bb1463 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/SubmitType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/SubmitType.php +@@ -28,5 +28,5 @@ class SubmitType extends AbstractType implements SubmitButtonTypeInterface + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $view->vars['clicked'] = $form->isClicked(); +@@ -40,5 +40,5 @@ class SubmitType extends AbstractType implements SubmitButtonTypeInterface + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefault('validate', true); +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TelType.php b/src/Symfony/Component/Form/Extension/Core/Type/TelType.php +index 05fdd41626..b6565675ee 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/TelType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/TelType.php +@@ -20,5 +20,5 @@ class TelType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TextType.php b/src/Symfony/Component/Form/Extension/Core/Type/TextType.php +index 479ce054d8..e909f2fa3b 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/TextType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/TextType.php +@@ -22,5 +22,5 @@ class TextType extends AbstractType implements DataTransformerInterface + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + // When empty_data is explicitly set to an empty string, +@@ -37,5 +37,5 @@ class TextType extends AbstractType implements DataTransformerInterface + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php b/src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php +index 40e7580d80..18c58e30c0 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php +@@ -21,5 +21,5 @@ class TextareaType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $view->vars['pattern'] = null; +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php +index a22f2122cd..7d5ff334a3 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php +@@ -38,5 +38,5 @@ class TimeType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $parts = ['hour']; +@@ -214,5 +214,5 @@ class TimeType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $view->vars = array_replace($view->vars, [ +@@ -241,5 +241,5 @@ class TimeType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $compound = fn (Options $options) => 'single_text' !== $options['widget']; +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php +index 0827fcfc5a..b3b56c1ce2 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php +@@ -29,5 +29,5 @@ class TimezoneType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if ('datetimezone' === $options['input']) { +@@ -41,5 +41,5 @@ class TimezoneType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TransformationFailureExtension.php b/src/Symfony/Component/Form/Extension/Core/Type/TransformationFailureExtension.php +index 029ad4d439..3814f6ada0 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/TransformationFailureExtension.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/TransformationFailureExtension.php +@@ -32,5 +32,5 @@ class TransformationFailureExtension extends AbstractTypeExtension + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if (!isset($options['constraints'])) { +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/UlidType.php b/src/Symfony/Component/Form/Extension/Core/Type/UlidType.php +index ea3da07c02..78b57ad153 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/UlidType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/UlidType.php +@@ -25,5 +25,5 @@ class UlidType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder +@@ -35,5 +35,5 @@ class UlidType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php b/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php +index 385c7a25fa..4a8fcc71f2 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php +@@ -24,5 +24,5 @@ class UrlType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if (null !== $options['default_protocol']) { +@@ -34,5 +34,5 @@ class UrlType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + if ($options['default_protocol']) { +@@ -45,5 +45,5 @@ class UrlType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/UuidType.php b/src/Symfony/Component/Form/Extension/Core/Type/UuidType.php +index 7c0f65b9a0..d79b4d30e6 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/UuidType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/UuidType.php +@@ -25,5 +25,5 @@ class UuidType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder +@@ -35,5 +35,5 @@ class UuidType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Core/Type/WeekType.php b/src/Symfony/Component/Form/Extension/Core/Type/WeekType.php +index f0d8f96467..3fa585b583 100644 +--- a/src/Symfony/Component/Form/Extension/Core/Type/WeekType.php ++++ b/src/Symfony/Component/Form/Extension/Core/Type/WeekType.php +@@ -32,5 +32,5 @@ class WeekType extends AbstractType + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if ('string' === $options['input']) { +@@ -87,5 +87,5 @@ class WeekType extends AbstractType + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $view->vars['widget'] = $options['widget']; +@@ -99,5 +99,5 @@ class WeekType extends AbstractType + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $compound = fn (Options $options) => 'single_text' !== $options['widget']; +diff --git a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php +index eca450a165..72330772b9 100644 +--- a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php ++++ b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php +@@ -55,5 +55,5 @@ class CsrfValidationListener implements EventSubscriberInterface + * @return void + */ +- public function preSubmit(FormEvent $event) ++ public function preSubmit(FormEvent $event): void + { + $form = $event->getForm(); +diff --git a/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php b/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php +index 8c3d45dec0..ff7934deed 100644 +--- a/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php ++++ b/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php +@@ -51,5 +51,5 @@ class FormTypeCsrfExtension extends AbstractTypeExtension + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if (!$options['csrf_protection']) { +@@ -75,5 +75,5 @@ class FormTypeCsrfExtension extends AbstractTypeExtension + * @return void + */ +- public function finishView(FormView $view, FormInterface $form, array $options) ++ public function finishView(FormView $view, FormInterface $form, array $options): void + { + if ($options['csrf_protection'] && !$view->parent && $options['compound']) { +@@ -94,5 +94,5 @@ class FormTypeCsrfExtension extends AbstractTypeExtension + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php b/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php +index 41a52e091e..fce936b740 100644 +--- a/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php ++++ b/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php +@@ -47,5 +47,5 @@ class DataCollectorListener implements EventSubscriberInterface + * @return void + */ +- public function postSetData(FormEvent $event) ++ public function postSetData(FormEvent $event): void + { + if ($event->getForm()->isRoot()) { +@@ -63,5 +63,5 @@ class DataCollectorListener implements EventSubscriberInterface + * @return void + */ +- public function postSubmit(FormEvent $event) ++ public function postSubmit(FormEvent $event): void + { + if ($event->getForm()->isRoot()) { +diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php +index 346c101fe3..40ed4b5e8f 100644 +--- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php ++++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php +@@ -29,5 +29,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface + * @return void + */ +- public function collectConfiguration(FormInterface $form); ++ public function collectConfiguration(FormInterface $form): void; + + /** +@@ -36,5 +36,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface + * @return void + */ +- public function collectDefaultData(FormInterface $form); ++ public function collectDefaultData(FormInterface $form): void; + + /** +@@ -43,5 +43,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface + * @return void + */ +- public function collectSubmittedData(FormInterface $form); ++ public function collectSubmittedData(FormInterface $form): void; + + /** +@@ -50,5 +50,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface + * @return void + */ +- public function collectViewVariables(FormView $view); ++ public function collectViewVariables(FormView $view): void; + + /** +@@ -57,5 +57,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface + * @return void + */ +- public function associateFormWithView(FormInterface $form, FormView $view); ++ public function associateFormWithView(FormInterface $form, FormView $view): void; + + /** +@@ -67,5 +67,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface + * @return void + */ +- public function buildPreliminaryFormTree(FormInterface $form); ++ public function buildPreliminaryFormTree(FormInterface $form): void; + + /** +@@ -89,5 +89,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface + * @return void + */ +- public function buildFinalFormTree(FormInterface $form, FormView $view); ++ public function buildFinalFormTree(FormInterface $form, FormView $view): void; + + /** +diff --git a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php +index 6c8cf3ee24..0d8fba357e 100644 +--- a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php ++++ b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php +@@ -75,5 +75,5 @@ class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $this->proxiedType->buildForm($builder, $options); +@@ -83,5 +83,5 @@ class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $this->proxiedType->buildView($view, $form, $options); +@@ -91,5 +91,5 @@ class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface + * @return void + */ +- public function finishView(FormView $view, FormInterface $form, array $options) ++ public function finishView(FormView $view, FormInterface $form, array $options): void + { + $this->proxiedType->finishView($view, $form, $options); +diff --git a/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php b/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php +index f1e3c903ec..20721f3040 100644 +--- a/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php ++++ b/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php +@@ -36,5 +36,5 @@ class DataCollectorTypeExtension extends AbstractTypeExtension + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder->addEventSubscriber($this->listener); +diff --git a/src/Symfony/Component/Form/Extension/HtmlSanitizer/Type/TextTypeHtmlSanitizerExtension.php b/src/Symfony/Component/Form/Extension/HtmlSanitizer/Type/TextTypeHtmlSanitizerExtension.php +index 8e92ea74a5..633d1985db 100644 +--- a/src/Symfony/Component/Form/Extension/HtmlSanitizer/Type/TextTypeHtmlSanitizerExtension.php ++++ b/src/Symfony/Component/Form/Extension/HtmlSanitizer/Type/TextTypeHtmlSanitizerExtension.php +@@ -39,5 +39,5 @@ class TextTypeHtmlSanitizerExtension extends AbstractTypeExtension + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver +@@ -51,5 +51,5 @@ class TextTypeHtmlSanitizerExtension extends AbstractTypeExtension + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if (!$options['sanitize_html']) { +diff --git a/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php b/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php +index b4e835c95a..9cbcc28e31 100644 +--- a/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php ++++ b/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php +@@ -39,5 +39,5 @@ class HttpFoundationRequestHandler implements RequestHandlerInterface + * @return void + */ +- public function handleRequest(FormInterface $form, mixed $request = null) ++ public function handleRequest(FormInterface $form, mixed $request = null): void + { + if (!$request instanceof Request) { +diff --git a/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php b/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php +index cc3e5e1207..f9c85b9a0a 100644 +--- a/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php ++++ b/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php +@@ -33,5 +33,5 @@ class FormTypeHttpFoundationExtension extends AbstractTypeExtension + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder->setRequestHandler($this->requestHandler); +diff --git a/src/Symfony/Component/Form/Extension/PasswordHasher/EventListener/PasswordHasherListener.php b/src/Symfony/Component/Form/Extension/PasswordHasher/EventListener/PasswordHasherListener.php +index 4854dd3e73..b61c5664f6 100644 +--- a/src/Symfony/Component/Form/Extension/PasswordHasher/EventListener/PasswordHasherListener.php ++++ b/src/Symfony/Component/Form/Extension/PasswordHasher/EventListener/PasswordHasherListener.php +@@ -39,5 +39,5 @@ class PasswordHasherListener + * @return void + */ +- public function registerPassword(FormEvent $event) ++ public function registerPassword(FormEvent $event): void + { + if (null === $event->getData() || '' === $event->getData()) { +@@ -57,5 +57,5 @@ class PasswordHasherListener + * @return void + */ +- public function hashPasswords(FormEvent $event) ++ public function hashPasswords(FormEvent $event): void + { + $form = $event->getForm(); +diff --git a/src/Symfony/Component/Form/Extension/PasswordHasher/Type/FormTypePasswordHasherExtension.php b/src/Symfony/Component/Form/Extension/PasswordHasher/Type/FormTypePasswordHasherExtension.php +index 5308992863..e799b6ba31 100644 +--- a/src/Symfony/Component/Form/Extension/PasswordHasher/Type/FormTypePasswordHasherExtension.php ++++ b/src/Symfony/Component/Form/Extension/PasswordHasher/Type/FormTypePasswordHasherExtension.php +@@ -31,5 +31,5 @@ class FormTypePasswordHasherExtension extends AbstractTypeExtension + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder->addEventListener(FormEvents::POST_SUBMIT, [$this->passwordHasherListener, 'hashPasswords']); +diff --git a/src/Symfony/Component/Form/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtension.php b/src/Symfony/Component/Form/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtension.php +index 6f022fb1bf..aede2bbb52 100644 +--- a/src/Symfony/Component/Form/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtension.php ++++ b/src/Symfony/Component/Form/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtension.php +@@ -33,5 +33,5 @@ class PasswordTypePasswordHasherExtension extends AbstractTypeExtension + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + if ($options['hash_property_path']) { +@@ -43,5 +43,5 @@ class PasswordTypePasswordHasherExtension extends AbstractTypeExtension + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ +diff --git a/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php b/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php +index d664e9b500..fbff1c16bf 100644 +--- a/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php ++++ b/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php +@@ -33,5 +33,5 @@ class FormValidator extends ConstraintValidator + * @return void + */ +- public function validate(mixed $form, Constraint $formConstraint) ++ public function validate(mixed $form, Constraint $formConstraint): void + { + if (!$formConstraint instanceof Form) { +diff --git a/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php b/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php +index e2d4357622..ed84c8b4cf 100644 +--- a/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php ++++ b/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php +@@ -41,5 +41,5 @@ class ValidationListener implements EventSubscriberInterface + * @return void + */ +- public function validateForm(FormEvent $event) ++ public function validateForm(FormEvent $event): void + { + $form = $event->getForm(); +diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php +index 2abc466fe3..3534aa7744 100644 +--- a/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php ++++ b/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php +@@ -28,5 +28,5 @@ abstract class BaseValidatorExtension extends AbstractTypeExtension + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + // Make sure that validation groups end up as null, closure or array +diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php +index 4602918c3a..5edcb58ec6 100644 +--- a/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php ++++ b/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php +@@ -41,5 +41,5 @@ class FormTypeValidatorExtension extends BaseValidatorExtension + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder->addEventSubscriber(new ValidationListener($this->validator, $this->violationMapper)); +@@ -49,5 +49,5 @@ class FormTypeValidatorExtension extends BaseValidatorExtension + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + parent::configureOptions($resolver); +diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php +index 2e2c21426a..b11c6159ad 100644 +--- a/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php ++++ b/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php +@@ -25,5 +25,5 @@ class RepeatedTypeValidatorExtension extends AbstractTypeExtension + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + // Map errors to the first field +diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php +index 70034135bf..246957f8f7 100644 +--- a/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php ++++ b/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php +@@ -36,5 +36,5 @@ class UploadValidatorExtension extends AbstractTypeExtension + * @return void + */ +- public function configureOptions(OptionsResolver $resolver) ++ public function configureOptions(OptionsResolver $resolver): void + { + $translator = $this->translator; +diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php +index 2f2ccefd30..689a6d5cab 100644 +--- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php ++++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php +@@ -42,5 +42,5 @@ class ViolationMapper implements ViolationMapperInterface + * @return void + */ +- public function mapViolation(ConstraintViolation $violation, FormInterface $form, bool $allowNonSynchronized = false) ++ public function mapViolation(ConstraintViolation $violation, FormInterface $form, bool $allowNonSynchronized = false): void + { + $this->allowNonSynchronized = $allowNonSynchronized; +diff --git a/src/Symfony/Component/Form/FormConfigBuilder.php b/src/Symfony/Component/Form/FormConfigBuilder.php +index 9fed3d1a0a..5cd4eb5f16 100644 +--- a/src/Symfony/Component/Form/FormConfigBuilder.php ++++ b/src/Symfony/Component/Form/FormConfigBuilder.php +@@ -537,5 +537,5 @@ class FormConfigBuilder implements FormConfigBuilderInterface + * @return $this + */ +- public function setFormFactory(FormFactoryInterface $formFactory) ++ public function setFormFactory(FormFactoryInterface $formFactory): static + { + if ($this->locked) { +diff --git a/src/Symfony/Component/Form/FormConfigBuilderInterface.php b/src/Symfony/Component/Form/FormConfigBuilderInterface.php +index 09b9149801..6b22b9f9e8 100644 +--- a/src/Symfony/Component/Form/FormConfigBuilderInterface.php ++++ b/src/Symfony/Component/Form/FormConfigBuilderInterface.php +@@ -209,5 +209,5 @@ interface FormConfigBuilderInterface extends FormConfigInterface + * @return $this + */ +- public function setFormFactory(FormFactoryInterface $formFactory); ++ public function setFormFactory(FormFactoryInterface $formFactory): static; + + /** +diff --git a/src/Symfony/Component/Form/FormError.php b/src/Symfony/Component/Form/FormError.php +index 572783c7ac..37d609af00 100644 +--- a/src/Symfony/Component/Form/FormError.php ++++ b/src/Symfony/Component/Form/FormError.php +@@ -104,5 +104,5 @@ class FormError + * @throws BadMethodCallException If the method is called more than once + */ +- public function setOrigin(FormInterface $origin) ++ public function setOrigin(FormInterface $origin): void + { + if (null !== $this->origin) { +diff --git a/src/Symfony/Component/Form/FormEvent.php b/src/Symfony/Component/Form/FormEvent.php +index 1e6aa34d63..3f05ff971a 100644 +--- a/src/Symfony/Component/Form/FormEvent.php ++++ b/src/Symfony/Component/Form/FormEvent.php +@@ -49,5 +49,5 @@ class FormEvent extends Event + * @return void + */ +- public function setData(mixed $data) ++ public function setData(mixed $data): void + { + $this->data = $data; +diff --git a/src/Symfony/Component/Form/FormRenderer.php b/src/Symfony/Component/Form/FormRenderer.php +index 18dec4946b..9272277b5c 100644 +--- a/src/Symfony/Component/Form/FormRenderer.php ++++ b/src/Symfony/Component/Form/FormRenderer.php +@@ -46,5 +46,5 @@ class FormRenderer implements FormRendererInterface + * @return void + */ +- public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true) ++ public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true): void + { + $this->engine->setTheme($view, $themes, $useDefaultThemes); +diff --git a/src/Symfony/Component/Form/FormRendererEngineInterface.php b/src/Symfony/Component/Form/FormRendererEngineInterface.php +index e7de3544a1..739c7b835e 100644 +--- a/src/Symfony/Component/Form/FormRendererEngineInterface.php ++++ b/src/Symfony/Component/Form/FormRendererEngineInterface.php +@@ -28,5 +28,5 @@ interface FormRendererEngineInterface + * @return void + */ +- public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true); ++ public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true): void; + + /** +@@ -133,4 +133,4 @@ interface FormRendererEngineInterface + * @return string + */ +- public function renderBlock(FormView $view, mixed $resource, string $blockName, array $variables = []); ++ public function renderBlock(FormView $view, mixed $resource, string $blockName, array $variables = []): string; + } +diff --git a/src/Symfony/Component/Form/FormRendererInterface.php b/src/Symfony/Component/Form/FormRendererInterface.php +index 8e805727ce..188a668c77 100644 +--- a/src/Symfony/Component/Form/FormRendererInterface.php ++++ b/src/Symfony/Component/Form/FormRendererInterface.php +@@ -35,5 +35,5 @@ interface FormRendererInterface + * @return void + */ +- public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true); ++ public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true): void; + + /** +diff --git a/src/Symfony/Component/Form/FormTypeExtensionInterface.php b/src/Symfony/Component/Form/FormTypeExtensionInterface.php +index 1937834515..25712a13d7 100644 +--- a/src/Symfony/Component/Form/FormTypeExtensionInterface.php ++++ b/src/Symfony/Component/Form/FormTypeExtensionInterface.php +@@ -31,5 +31,5 @@ interface FormTypeExtensionInterface + * @see FormTypeInterface::buildForm() + */ +- public function buildForm(FormBuilderInterface $builder, array $options); ++ public function buildForm(FormBuilderInterface $builder, array $options): void; + + /** +@@ -45,5 +45,5 @@ interface FormTypeExtensionInterface + * @see FormTypeInterface::buildView() + */ +- public function buildView(FormView $view, FormInterface $form, array $options); ++ public function buildView(FormView $view, FormInterface $form, array $options): void; + + /** +@@ -59,10 +59,10 @@ interface FormTypeExtensionInterface + * @see FormTypeInterface::finishView() + */ +- public function finishView(FormView $view, FormInterface $form, array $options); ++ public function finishView(FormView $view, FormInterface $form, array $options): void; + + /** + * @return void + */ +- public function configureOptions(OptionsResolver $resolver); ++ public function configureOptions(OptionsResolver $resolver): void; + + /** +diff --git a/src/Symfony/Component/Form/FormTypeGuesserInterface.php b/src/Symfony/Component/Form/FormTypeGuesserInterface.php +index 61e2c5f80d..4d6b335474 100644 +--- a/src/Symfony/Component/Form/FormTypeGuesserInterface.php ++++ b/src/Symfony/Component/Form/FormTypeGuesserInterface.php +@@ -22,5 +22,5 @@ interface FormTypeGuesserInterface + * @return Guess\TypeGuess|null + */ +- public function guessType(string $class, string $property); ++ public function guessType(string $class, string $property): ?Guess\TypeGuess; + + /** +@@ -29,5 +29,5 @@ interface FormTypeGuesserInterface + * @return Guess\ValueGuess|null + */ +- public function guessRequired(string $class, string $property); ++ public function guessRequired(string $class, string $property): ?Guess\ValueGuess; + + /** +@@ -36,5 +36,5 @@ interface FormTypeGuesserInterface + * @return Guess\ValueGuess|null + */ +- public function guessMaxLength(string $class, string $property); ++ public function guessMaxLength(string $class, string $property): ?Guess\ValueGuess; + + /** +@@ -50,4 +50,4 @@ interface FormTypeGuesserInterface + * @return Guess\ValueGuess|null + */ +- public function guessPattern(string $class, string $property); ++ public function guessPattern(string $class, string $property): ?Guess\ValueGuess; + } +diff --git a/src/Symfony/Component/Form/FormTypeInterface.php b/src/Symfony/Component/Form/FormTypeInterface.php +index 0c586d3f71..6c625cf403 100644 +--- a/src/Symfony/Component/Form/FormTypeInterface.php ++++ b/src/Symfony/Component/Form/FormTypeInterface.php +@@ -31,5 +31,5 @@ interface FormTypeInterface + * @see FormTypeExtensionInterface::buildForm() + */ +- public function buildForm(FormBuilderInterface $builder, array $options); ++ public function buildForm(FormBuilderInterface $builder, array $options): void; + + /** +@@ -49,5 +49,5 @@ interface FormTypeInterface + * @see FormTypeExtensionInterface::buildView() + */ +- public function buildView(FormView $view, FormInterface $form, array $options); ++ public function buildView(FormView $view, FormInterface $form, array $options): void; + + /** +@@ -68,5 +68,5 @@ interface FormTypeInterface + * @see FormTypeExtensionInterface::finishView() + */ +- public function finishView(FormView $view, FormInterface $form, array $options); ++ public function finishView(FormView $view, FormInterface $form, array $options): void; + + /** +@@ -75,5 +75,5 @@ interface FormTypeInterface + * @return void + */ +- public function configureOptions(OptionsResolver $resolver); ++ public function configureOptions(OptionsResolver $resolver): void; + + /** +@@ -85,5 +85,5 @@ interface FormTypeInterface + * @return string + */ +- public function getBlockPrefix(); ++ public function getBlockPrefix(): string; + + /** +@@ -92,4 +92,4 @@ interface FormTypeInterface + * @return string|null + */ +- public function getParent(); ++ public function getParent(): ?string; + } +diff --git a/src/Symfony/Component/Form/FormView.php b/src/Symfony/Component/Form/FormView.php +index e04fa13b09..231b75810e 100644 +--- a/src/Symfony/Component/Form/FormView.php ++++ b/src/Symfony/Component/Form/FormView.php +@@ -96,5 +96,5 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable + * @return void + */ +- public function setMethodRendered() ++ public function setMethodRendered(): void + { + $this->methodRendered = true; +diff --git a/src/Symfony/Component/Form/NativeRequestHandler.php b/src/Symfony/Component/Form/NativeRequestHandler.php +index 11c4d4d9c0..a09361d59a 100644 +--- a/src/Symfony/Component/Form/NativeRequestHandler.php ++++ b/src/Symfony/Component/Form/NativeRequestHandler.php +@@ -45,5 +45,5 @@ class NativeRequestHandler implements RequestHandlerInterface + * @throws Exception\UnexpectedTypeException If the $request is not null + */ +- public function handleRequest(FormInterface $form, mixed $request = null) ++ public function handleRequest(FormInterface $form, mixed $request = null): void + { + if (null !== $request) { +diff --git a/src/Symfony/Component/Form/RequestHandlerInterface.php b/src/Symfony/Component/Form/RequestHandlerInterface.php +index 39fd458ee4..ccd77ccecc 100644 +--- a/src/Symfony/Component/Form/RequestHandlerInterface.php ++++ b/src/Symfony/Component/Form/RequestHandlerInterface.php +@@ -24,5 +24,5 @@ interface RequestHandlerInterface + * @return void + */ +- public function handleRequest(FormInterface $form, mixed $request = null); ++ public function handleRequest(FormInterface $form, mixed $request = null): void; + + /** +diff --git a/src/Symfony/Component/Form/ResolvedFormType.php b/src/Symfony/Component/Form/ResolvedFormType.php +index f05db1533b..0e67c63c66 100644 +--- a/src/Symfony/Component/Form/ResolvedFormType.php ++++ b/src/Symfony/Component/Form/ResolvedFormType.php +@@ -96,5 +96,5 @@ class ResolvedFormType implements ResolvedFormTypeInterface + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options) ++ public function buildForm(FormBuilderInterface $builder, array $options): void + { + $this->parent?->buildForm($builder, $options); +@@ -110,5 +110,5 @@ class ResolvedFormType implements ResolvedFormTypeInterface + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options) ++ public function buildView(FormView $view, FormInterface $form, array $options): void + { + $this->parent?->buildView($view, $form, $options); +@@ -124,5 +124,5 @@ class ResolvedFormType implements ResolvedFormTypeInterface + * @return void + */ +- public function finishView(FormView $view, FormInterface $form, array $options) ++ public function finishView(FormView $view, FormInterface $form, array $options): void + { + $this->parent?->finishView($view, $form, $options); +diff --git a/src/Symfony/Component/Form/ResolvedFormTypeInterface.php b/src/Symfony/Component/Form/ResolvedFormTypeInterface.php +index e0b96a5ac3..7982e0cab3 100644 +--- a/src/Symfony/Component/Form/ResolvedFormTypeInterface.php ++++ b/src/Symfony/Component/Form/ResolvedFormTypeInterface.php +@@ -60,5 +60,5 @@ interface ResolvedFormTypeInterface + * @return void + */ +- public function buildForm(FormBuilderInterface $builder, array $options); ++ public function buildForm(FormBuilderInterface $builder, array $options): void; + + /** +@@ -69,5 +69,5 @@ interface ResolvedFormTypeInterface + * @return void + */ +- public function buildView(FormView $view, FormInterface $form, array $options); ++ public function buildView(FormView $view, FormInterface $form, array $options): void; + + /** +@@ -78,5 +78,5 @@ interface ResolvedFormTypeInterface + * @return void + */ +- public function finishView(FormView $view, FormInterface $form, array $options); ++ public function finishView(FormView $view, FormInterface $form, array $options): void; + + /** +diff --git a/src/Symfony/Component/HttpClient/CachingHttpClient.php b/src/Symfony/Component/HttpClient/CachingHttpClient.php +index 0b6e495806..8cef2cad7c 100644 +--- a/src/Symfony/Component/HttpClient/CachingHttpClient.php ++++ b/src/Symfony/Component/HttpClient/CachingHttpClient.php +@@ -140,5 +140,5 @@ class CachingHttpClient implements HttpClientInterface, ResetInterface + * @return void + */ +- public function reset() ++ public function reset(): void + { + if ($this->client instanceof ResetInterface) { +diff --git a/src/Symfony/Component/HttpClient/DecoratorTrait.php b/src/Symfony/Component/HttpClient/DecoratorTrait.php +index 472437e465..1dfe39146b 100644 +--- a/src/Symfony/Component/HttpClient/DecoratorTrait.php ++++ b/src/Symfony/Component/HttpClient/DecoratorTrait.php +@@ -52,5 +52,5 @@ trait DecoratorTrait + * @return void + */ +- public function reset() ++ public function reset(): void + { + if ($this->client instanceof ResetInterface) { +diff --git a/src/Symfony/Component/HttpClient/HttpClientTrait.php b/src/Symfony/Component/HttpClient/HttpClientTrait.php +index de24e3b7fd..0aff3bbc60 100644 +--- a/src/Symfony/Component/HttpClient/HttpClientTrait.php ++++ b/src/Symfony/Component/HttpClient/HttpClientTrait.php +@@ -562,5 +562,5 @@ trait HttpClientTrait + * @return string + */ +- private static function removeDotSegments(string $path) ++ private static function removeDotSegments(string $path): string + { + $result = ''; +diff --git a/src/Symfony/Component/HttpClient/MockHttpClient.php b/src/Symfony/Component/HttpClient/MockHttpClient.php +index 9b8305e418..9ab577f6e8 100644 +--- a/src/Symfony/Component/HttpClient/MockHttpClient.php ++++ b/src/Symfony/Component/HttpClient/MockHttpClient.php +@@ -110,5 +110,5 @@ class MockHttpClient implements HttpClientInterface, ResetInterface + * @return void + */ +- public function reset() ++ public function reset(): void + { + $this->requestsCount = 0; +diff --git a/src/Symfony/Component/HttpClient/ScopingHttpClient.php b/src/Symfony/Component/HttpClient/ScopingHttpClient.php +index a87171d2ca..cec8a6f027 100644 +--- a/src/Symfony/Component/HttpClient/ScopingHttpClient.php ++++ b/src/Symfony/Component/HttpClient/ScopingHttpClient.php +@@ -97,5 +97,5 @@ class ScopingHttpClient implements HttpClientInterface, ResetInterface, LoggerAw + * @return void + */ +- public function reset() ++ public function reset(): void + { + if ($this->client instanceof ResetInterface) { +diff --git a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +index 78958f1ae0..a9fe288e4b 100644 +--- a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php ++++ b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +@@ -355,5 +355,5 @@ class BinaryFileResponse extends Response + * @return void + */ +- public static function trustXSendfileTypeHeader() ++ public static function trustXSendfileTypeHeader(): void + { + self::$trustXSendfileTypeHeader = true; +diff --git a/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php b/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php +index b09c167cff..93d1a8cac5 100644 +--- a/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php ++++ b/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php +@@ -33,5 +33,5 @@ class ExpressionRequestMatcher extends RequestMatcher + * @return void + */ +- public function setExpression(ExpressionLanguage $language, Expression|string $expression) ++ public function setExpression(ExpressionLanguage $language, Expression|string $expression): void + { + $this->language = $language; +diff --git a/src/Symfony/Component/HttpFoundation/FileBag.php b/src/Symfony/Component/HttpFoundation/FileBag.php +index b74a02e2e1..51b4f7f1c3 100644 +--- a/src/Symfony/Component/HttpFoundation/FileBag.php ++++ b/src/Symfony/Component/HttpFoundation/FileBag.php +@@ -35,5 +35,5 @@ class FileBag extends ParameterBag + * @return void + */ +- public function replace(array $files = []) ++ public function replace(array $files = []): void + { + $this->parameters = []; +@@ -44,5 +44,5 @@ class FileBag extends ParameterBag + * @return void + */ +- public function set(string $key, mixed $value) ++ public function set(string $key, mixed $value): void + { + if (!\is_array($value) && !$value instanceof UploadedFile) { +@@ -56,5 +56,5 @@ class FileBag extends ParameterBag + * @return void + */ +- public function add(array $files = []) ++ public function add(array $files = []): void + { + foreach ($files as $key => $file) { +diff --git a/src/Symfony/Component/HttpFoundation/HeaderBag.php b/src/Symfony/Component/HttpFoundation/HeaderBag.php +index 081f26a2d0..7ed43e2c07 100644 +--- a/src/Symfony/Component/HttpFoundation/HeaderBag.php ++++ b/src/Symfony/Component/HttpFoundation/HeaderBag.php +@@ -90,5 +90,5 @@ class HeaderBag implements \IteratorAggregate, \Countable + * @return void + */ +- public function replace(array $headers = []) ++ public function replace(array $headers = []): void + { + $this->headers = []; +@@ -101,5 +101,5 @@ class HeaderBag implements \IteratorAggregate, \Countable + * @return void + */ +- public function add(array $headers) ++ public function add(array $headers): void + { + foreach ($headers as $key => $values) { +@@ -134,5 +134,5 @@ class HeaderBag implements \IteratorAggregate, \Countable + * @return void + */ +- public function set(string $key, string|array|null $values, bool $replace = true) ++ public function set(string $key, string|array|null $values, bool $replace = true): void + { + $key = strtr($key, self::UPPER, self::LOWER); +@@ -180,5 +180,5 @@ class HeaderBag implements \IteratorAggregate, \Countable + * @return void + */ +- public function remove(string $key) ++ public function remove(string $key): void + { + $key = strtr($key, self::UPPER, self::LOWER); +@@ -214,5 +214,5 @@ class HeaderBag implements \IteratorAggregate, \Countable + * @return void + */ +- public function addCacheControlDirective(string $key, bool|string $value = true) ++ public function addCacheControlDirective(string $key, bool|string $value = true): void + { + $this->cacheControl[$key] = $value; +@@ -242,5 +242,5 @@ class HeaderBag implements \IteratorAggregate, \Countable + * @return void + */ +- public function removeCacheControlDirective(string $key) ++ public function removeCacheControlDirective(string $key): void + { + unset($this->cacheControl[$key]); +@@ -270,5 +270,5 @@ class HeaderBag implements \IteratorAggregate, \Countable + * @return string + */ +- protected function getCacheControlHeader() ++ protected function getCacheControlHeader(): string + { + ksort($this->cacheControl); +diff --git a/src/Symfony/Component/HttpFoundation/ParameterBag.php b/src/Symfony/Component/HttpFoundation/ParameterBag.php +index 44d8d96d28..43124c0ea0 100644 +--- a/src/Symfony/Component/HttpFoundation/ParameterBag.php ++++ b/src/Symfony/Component/HttpFoundation/ParameterBag.php +@@ -64,5 +64,5 @@ class ParameterBag implements \IteratorAggregate, \Countable + * @return void + */ +- public function replace(array $parameters = []) ++ public function replace(array $parameters = []): void + { + $this->parameters = $parameters; +@@ -74,5 +74,5 @@ class ParameterBag implements \IteratorAggregate, \Countable + * @return void + */ +- public function add(array $parameters = []) ++ public function add(array $parameters = []): void + { + $this->parameters = array_replace($this->parameters, $parameters); +@@ -87,5 +87,5 @@ class ParameterBag implements \IteratorAggregate, \Countable + * @return void + */ +- public function set(string $key, mixed $value) ++ public function set(string $key, mixed $value): void + { + $this->parameters[$key] = $value; +@@ -105,5 +105,5 @@ class ParameterBag implements \IteratorAggregate, \Countable + * @return void + */ +- public function remove(string $key) ++ public function remove(string $key): void + { + unset($this->parameters[$key]); +diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php +index 17eb95829c..9d234147b5 100644 +--- a/src/Symfony/Component/HttpFoundation/Request.php ++++ b/src/Symfony/Component/HttpFoundation/Request.php +@@ -267,5 +267,5 @@ class Request + * @return void + */ +- public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) ++ public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null): void + { + $this->request = new InputBag($request); +@@ -427,5 +427,5 @@ class Request + * @return void + */ +- public static function setFactory(?callable $callable) ++ public static function setFactory(?callable $callable): void + { + self::$requestFactory = $callable; +@@ -533,5 +533,5 @@ class Request + * @return void + */ +- public function overrideGlobals() ++ public function overrideGlobals(): void + { + $this->server->set('QUERY_STRING', static::normalizeQueryString(http_build_query($this->query->all(), '', '&'))); +@@ -575,5 +575,5 @@ class Request + * @return void + */ +- public static function setTrustedProxies(array $proxies, int $trustedHeaderSet) ++ public static function setTrustedProxies(array $proxies, int $trustedHeaderSet): void + { + self::$trustedProxies = array_reduce($proxies, function ($proxies, $proxy) { +@@ -618,5 +618,5 @@ class Request + * @return void + */ +- public static function setTrustedHosts(array $hostPatterns) ++ public static function setTrustedHosts(array $hostPatterns): void + { + self::$trustedHostPatterns = array_map(fn ($hostPattern) => sprintf('{%s}i', $hostPattern), $hostPatterns); +@@ -666,5 +666,5 @@ class Request + * @return void + */ +- public static function enableHttpMethodParameterOverride() ++ public static function enableHttpMethodParameterOverride(): void + { + self::$httpMethodParameterOverride = true; +@@ -753,5 +753,5 @@ class Request + * @return void + */ +- public function setSession(SessionInterface $session) ++ public function setSession(SessionInterface $session): void + { + $this->session = $session; +@@ -1176,5 +1176,5 @@ class Request + * @return void + */ +- public function setMethod(string $method) ++ public function setMethod(string $method): void + { + $this->method = null; +@@ -1299,5 +1299,5 @@ class Request + * @return void + */ +- public function setFormat(?string $format, string|array $mimeTypes) ++ public function setFormat(?string $format, string|array $mimeTypes): void + { + if (null === static::$formats) { +@@ -1331,5 +1331,5 @@ class Request + * @return void + */ +- public function setRequestFormat(?string $format) ++ public function setRequestFormat(?string $format): void + { + $this->format = $format; +@@ -1363,5 +1363,5 @@ class Request + * @return void + */ +- public function setDefaultLocale(string $locale) ++ public function setDefaultLocale(string $locale): void + { + $this->defaultLocale = $locale; +@@ -1385,5 +1385,5 @@ class Request + * @return void + */ +- public function setLocale(string $locale) ++ public function setLocale(string $locale): void + { + $this->setPhpDefaultLocale($this->locale = $locale); +@@ -1892,5 +1892,5 @@ class Request + * @return void + */ +- protected static function initializeFormats() ++ protected static function initializeFormats(): void + { + static::$formats = [ +diff --git a/src/Symfony/Component/HttpFoundation/RequestMatcher.php b/src/Symfony/Component/HttpFoundation/RequestMatcher.php +index 8c5f1d8134..fdd3a666e9 100644 +--- a/src/Symfony/Component/HttpFoundation/RequestMatcher.php ++++ b/src/Symfony/Component/HttpFoundation/RequestMatcher.php +@@ -73,5 +73,5 @@ class RequestMatcher implements RequestMatcherInterface + * @return void + */ +- public function matchScheme(string|array|null $scheme) ++ public function matchScheme(string|array|null $scheme): void + { + $this->schemes = null !== $scheme ? array_map('strtolower', (array) $scheme) : []; +@@ -83,5 +83,5 @@ class RequestMatcher implements RequestMatcherInterface + * @return void + */ +- public function matchHost(?string $regexp) ++ public function matchHost(?string $regexp): void + { + $this->host = $regexp; +@@ -95,5 +95,5 @@ class RequestMatcher implements RequestMatcherInterface + * @return void + */ +- public function matchPort(?int $port) ++ public function matchPort(?int $port): void + { + $this->port = $port; +@@ -105,5 +105,5 @@ class RequestMatcher implements RequestMatcherInterface + * @return void + */ +- public function matchPath(?string $regexp) ++ public function matchPath(?string $regexp): void + { + $this->path = $regexp; +@@ -117,5 +117,5 @@ class RequestMatcher implements RequestMatcherInterface + * @return void + */ +- public function matchIp(string $ip) ++ public function matchIp(string $ip): void + { + $this->matchIps($ip); +@@ -129,5 +129,5 @@ class RequestMatcher implements RequestMatcherInterface + * @return void + */ +- public function matchIps(string|array|null $ips) ++ public function matchIps(string|array|null $ips): void + { + $ips = null !== $ips ? (array) $ips : []; +@@ -143,5 +143,5 @@ class RequestMatcher implements RequestMatcherInterface + * @return void + */ +- public function matchMethod(string|array|null $method) ++ public function matchMethod(string|array|null $method): void + { + $this->methods = null !== $method ? array_map('strtoupper', (array) $method) : []; +@@ -153,5 +153,5 @@ class RequestMatcher implements RequestMatcherInterface + * @return void + */ +- public function matchAttribute(string $key, string $regexp) ++ public function matchAttribute(string $key, string $regexp): void + { + $this->attributes[$key] = $regexp; +diff --git a/src/Symfony/Component/HttpFoundation/RequestStack.php b/src/Symfony/Component/HttpFoundation/RequestStack.php +index 5aa8ba7934..80742b0764 100644 +--- a/src/Symfony/Component/HttpFoundation/RequestStack.php ++++ b/src/Symfony/Component/HttpFoundation/RequestStack.php +@@ -35,5 +35,5 @@ class RequestStack + * @return void + */ +- public function push(Request $request) ++ public function push(Request $request): void + { + $this->requests[] = $request; +diff --git a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php +index 10450ca5e2..3e034007fb 100644 +--- a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php ++++ b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php +@@ -59,5 +59,5 @@ class ResponseHeaderBag extends HeaderBag + * @return array + */ +- public function allPreserveCaseWithoutCookies() ++ public function allPreserveCaseWithoutCookies(): array + { + $headers = $this->allPreserveCase(); +@@ -72,5 +72,5 @@ class ResponseHeaderBag extends HeaderBag + * @return void + */ +- public function replace(array $headers = []) ++ public function replace(array $headers = []): void + { + $this->headerNames = []; +@@ -107,5 +107,5 @@ class ResponseHeaderBag extends HeaderBag + * @return void + */ +- public function set(string $key, string|array|null $values, bool $replace = true) ++ public function set(string $key, string|array|null $values, bool $replace = true): void + { + $uniqueKey = strtr($key, self::UPPER, self::LOWER); +@@ -138,5 +138,5 @@ class ResponseHeaderBag extends HeaderBag + * @return void + */ +- public function remove(string $key) ++ public function remove(string $key): void + { + $uniqueKey = strtr($key, self::UPPER, self::LOWER); +@@ -173,5 +173,5 @@ class ResponseHeaderBag extends HeaderBag + * @return void + */ +- public function setCookie(Cookie $cookie) ++ public function setCookie(Cookie $cookie): void + { + $this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; +@@ -184,5 +184,5 @@ class ResponseHeaderBag extends HeaderBag + * @return void + */ +- public function removeCookie(string $name, ?string $path = '/', string $domain = null) ++ public function removeCookie(string $name, ?string $path = '/', string $domain = null): void + { + $path ??= '/'; +@@ -237,5 +237,5 @@ class ResponseHeaderBag extends HeaderBag + * @return void + */ +- public function clearCookie(string $name, ?string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, string $sameSite = null) ++ public function clearCookie(string $name, ?string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, string $sameSite = null): void + { + $this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite)); +@@ -247,5 +247,5 @@ class ResponseHeaderBag extends HeaderBag + * @return string + */ +- public function makeDisposition(string $disposition, string $filename, string $filenameFallback = '') ++ public function makeDisposition(string $disposition, string $filename, string $filenameFallback = ''): string + { + return HeaderUtils::makeDisposition($disposition, $filename, $filenameFallback); +diff --git a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php +index ad5a6590a5..cf296c1d6d 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php +@@ -40,5 +40,5 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta + * @return void + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + $this->name = $name; +@@ -48,5 +48,5 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta + * @return void + */ +- public function initialize(array &$attributes) ++ public function initialize(array &$attributes): void + { + $this->attributes = &$attributes; +@@ -71,5 +71,5 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta + * @return void + */ +- public function set(string $name, mixed $value) ++ public function set(string $name, mixed $value): void + { + $this->attributes[$name] = $value; +@@ -84,5 +84,5 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta + * @return void + */ +- public function replace(array $attributes) ++ public function replace(array $attributes): void + { + $this->attributes = []; +diff --git a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php +index e8cd0b5a4d..27eca96974 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php +@@ -36,5 +36,5 @@ interface AttributeBagInterface extends SessionBagInterface + * @return void + */ +- public function set(string $name, mixed $value); ++ public function set(string $name, mixed $value): void; + + /** +@@ -48,5 +48,5 @@ interface AttributeBagInterface extends SessionBagInterface + * @return void + */ +- public function replace(array $attributes); ++ public function replace(array $attributes): void; + + /** +diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php +index 80bbeda0f8..c4d461cd3a 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php +@@ -39,5 +39,5 @@ class AutoExpireFlashBag implements FlashBagInterface + * @return void + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + $this->name = $name; +@@ -47,5 +47,5 @@ class AutoExpireFlashBag implements FlashBagInterface + * @return void + */ +- public function initialize(array &$flashes) ++ public function initialize(array &$flashes): void + { + $this->flashes = &$flashes; +@@ -61,5 +61,5 @@ class AutoExpireFlashBag implements FlashBagInterface + * @return void + */ +- public function add(string $type, mixed $message) ++ public function add(string $type, mixed $message): void + { + $this->flashes['new'][$type][] = $message; +@@ -103,5 +103,5 @@ class AutoExpireFlashBag implements FlashBagInterface + * @return void + */ +- public function setAll(array $messages) ++ public function setAll(array $messages): void + { + $this->flashes['new'] = $messages; +@@ -111,5 +111,5 @@ class AutoExpireFlashBag implements FlashBagInterface + * @return void + */ +- public function set(string $type, string|array $messages) ++ public function set(string $type, string|array $messages): void + { + $this->flashes['new'][$type] = (array) $messages; +diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php +index 659d59d186..3da6888cec 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php +@@ -39,5 +39,5 @@ class FlashBag implements FlashBagInterface + * @return void + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + $this->name = $name; +@@ -47,5 +47,5 @@ class FlashBag implements FlashBagInterface + * @return void + */ +- public function initialize(array &$flashes) ++ public function initialize(array &$flashes): void + { + $this->flashes = &$flashes; +@@ -55,5 +55,5 @@ class FlashBag implements FlashBagInterface + * @return void + */ +- public function add(string $type, mixed $message) ++ public function add(string $type, mixed $message): void + { + $this->flashes[$type][] = $message; +@@ -94,5 +94,5 @@ class FlashBag implements FlashBagInterface + * @return void + */ +- public function set(string $type, string|array $messages) ++ public function set(string $type, string|array $messages): void + { + $this->flashes[$type] = (array) $messages; +@@ -102,5 +102,5 @@ class FlashBag implements FlashBagInterface + * @return void + */ +- public function setAll(array $messages) ++ public function setAll(array $messages): void + { + $this->flashes = $messages; +diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php +index bbcf7f8b7d..6ef5b35e7d 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php +@@ -26,5 +26,5 @@ interface FlashBagInterface extends SessionBagInterface + * @return void + */ +- public function add(string $type, mixed $message); ++ public function add(string $type, mixed $message): void; + + /** +@@ -33,5 +33,5 @@ interface FlashBagInterface extends SessionBagInterface + * @return void + */ +- public function set(string $type, string|array $messages); ++ public function set(string $type, string|array $messages): void; + + /** +@@ -65,5 +65,5 @@ interface FlashBagInterface extends SessionBagInterface + * @return void + */ +- public function setAll(array $messages); ++ public function setAll(array $messages): void; + + /** +diff --git a/src/Symfony/Component/HttpFoundation/Session/Session.php b/src/Symfony/Component/HttpFoundation/Session/Session.php +index b45be2f8c3..ce73fdb85f 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Session.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Session.php +@@ -73,5 +73,5 @@ class Session implements FlashBagAwareSessionInterface, \IteratorAggregate, \Cou + * @return void + */ +- public function set(string $name, mixed $value) ++ public function set(string $name, mixed $value): void + { + $this->getAttributeBag()->set($name, $value); +@@ -86,5 +86,5 @@ class Session implements FlashBagAwareSessionInterface, \IteratorAggregate, \Cou + * @return void + */ +- public function replace(array $attributes) ++ public function replace(array $attributes): void + { + $this->getAttributeBag()->replace($attributes); +@@ -99,5 +99,5 @@ class Session implements FlashBagAwareSessionInterface, \IteratorAggregate, \Cou + * @return void + */ +- public function clear() ++ public function clear(): void + { + $this->getAttributeBag()->clear(); +@@ -167,5 +167,5 @@ class Session implements FlashBagAwareSessionInterface, \IteratorAggregate, \Cou + * @return void + */ +- public function save() ++ public function save(): void + { + $this->storage->save(); +@@ -180,5 +180,5 @@ class Session implements FlashBagAwareSessionInterface, \IteratorAggregate, \Cou + * @return void + */ +- public function setId(string $id) ++ public function setId(string $id): void + { + if ($this->storage->getId() !== $id) { +@@ -195,5 +195,5 @@ class Session implements FlashBagAwareSessionInterface, \IteratorAggregate, \Cou + * @return void + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + $this->storage->setName($name); +@@ -213,5 +213,5 @@ class Session implements FlashBagAwareSessionInterface, \IteratorAggregate, \Cou + * @return void + */ +- public function registerBag(SessionBagInterface $bag) ++ public function registerBag(SessionBagInterface $bag): void + { + $this->storage->registerBag(new SessionBagProxy($bag, $this->data, $this->usageIndex, $this->usageReporter)); +diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php +index e1c2505549..d88b64acdd 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php ++++ b/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php +@@ -29,5 +29,5 @@ interface SessionBagInterface + * @return void + */ +- public function initialize(array &$array); ++ public function initialize(array &$array): void; + + /** +diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php +index 534883d2d2..1240e36f74 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php ++++ b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php +@@ -38,5 +38,5 @@ interface SessionInterface + * @return void + */ +- public function setId(string $id); ++ public function setId(string $id): void; + + /** +@@ -50,5 +50,5 @@ interface SessionInterface + * @return void + */ +- public function setName(string $name); ++ public function setName(string $name): void; + + /** +@@ -86,5 +86,5 @@ interface SessionInterface + * @return void + */ +- public function save(); ++ public function save(): void; + + /** +@@ -103,5 +103,5 @@ interface SessionInterface + * @return void + */ +- public function set(string $name, mixed $value); ++ public function set(string $name, mixed $value): void; + + /** +@@ -115,5 +115,5 @@ interface SessionInterface + * @return void + */ +- public function replace(array $attributes); ++ public function replace(array $attributes): void; + + /** +@@ -129,5 +129,5 @@ interface SessionInterface + * @return void + */ +- public function clear(); ++ public function clear(): void; + + /** +@@ -141,5 +141,5 @@ interface SessionInterface + * @return void + */ +- public function registerBag(SessionBagInterface $bag); ++ public function registerBag(SessionBagInterface $bag): void; + + /** +diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +index 65452a5207..ce0357e36b 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +@@ -242,5 +242,5 @@ class PdoSessionHandler extends AbstractSessionHandler + * @throws \DomainException When an unsupported PDO driver is used + */ +- public function createTable() ++ public function createTable(): void + { + // connect if we are not yet +diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php +index ebe4b748ad..059a6b5ac8 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php +@@ -55,5 +55,5 @@ class MetadataBag implements SessionBagInterface + * @return void + */ +- public function initialize(array &$array) ++ public function initialize(array &$array): void + { + $this->meta = &$array; +@@ -89,5 +89,5 @@ class MetadataBag implements SessionBagInterface + * @return void + */ +- public function stampNew(int $lifetime = null) ++ public function stampNew(int $lifetime = null): void + { + $this->stampCreated($lifetime); +@@ -135,5 +135,5 @@ class MetadataBag implements SessionBagInterface + * @return void + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + $this->name = $name; +diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php +index d30b56d691..0f002902bd 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php +@@ -72,5 +72,5 @@ class MockArraySessionStorage implements SessionStorageInterface + * @return void + */ +- public function setSessionData(array $array) ++ public function setSessionData(array $array): void + { + $this->data = $array; +@@ -112,5 +112,5 @@ class MockArraySessionStorage implements SessionStorageInterface + * @return void + */ +- public function setId(string $id) ++ public function setId(string $id): void + { + if ($this->started) { +@@ -129,5 +129,5 @@ class MockArraySessionStorage implements SessionStorageInterface + * @return void + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + $this->name = $name; +@@ -137,5 +137,5 @@ class MockArraySessionStorage implements SessionStorageInterface + * @return void + */ +- public function save() ++ public function save(): void + { + if (!$this->started || $this->closed) { +@@ -150,5 +150,5 @@ class MockArraySessionStorage implements SessionStorageInterface + * @return void + */ +- public function clear() ++ public function clear(): void + { + // clear out the bags +@@ -167,5 +167,5 @@ class MockArraySessionStorage implements SessionStorageInterface + * @return void + */ +- public function registerBag(SessionBagInterface $bag) ++ public function registerBag(SessionBagInterface $bag): void + { + $this->bags[$bag->getName()] = $bag; +@@ -193,5 +193,5 @@ class MockArraySessionStorage implements SessionStorageInterface + * @return void + */ +- public function setMetadataBag(MetadataBag $bag = null) ++ public function setMetadataBag(MetadataBag $bag = null): void + { + if (1 > \func_num_args()) { +@@ -223,5 +223,5 @@ class MockArraySessionStorage implements SessionStorageInterface + * @return void + */ +- protected function loadSession() ++ protected function loadSession(): void + { + $bags = array_merge($this->bags, [$this->metadataBag]); +diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php +index 95f69f2e13..971b890f0f 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php +@@ -77,5 +77,5 @@ class MockFileSessionStorage extends MockArraySessionStorage + * @return void + */ +- public function save() ++ public function save(): void + { + if (!$this->started) { +diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +index 7c6b6f9296..0b63abb810 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +@@ -187,5 +187,5 @@ class NativeSessionStorage implements SessionStorageInterface + * @return void + */ +- public function setId(string $id) ++ public function setId(string $id): void + { + $this->saveHandler->setId($id); +@@ -200,5 +200,5 @@ class NativeSessionStorage implements SessionStorageInterface + * @return void + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + $this->saveHandler->setName($name); +@@ -232,5 +232,5 @@ class NativeSessionStorage implements SessionStorageInterface + * @return void + */ +- public function save() ++ public function save(): void + { + // Store a copy so we can restore the bags in case the session was not left empty +@@ -274,5 +274,5 @@ class NativeSessionStorage implements SessionStorageInterface + * @return void + */ +- public function clear() ++ public function clear(): void + { + // clear out the bags +@@ -291,5 +291,5 @@ class NativeSessionStorage implements SessionStorageInterface + * @return void + */ +- public function registerBag(SessionBagInterface $bag) ++ public function registerBag(SessionBagInterface $bag): void + { + if ($this->started) { +@@ -318,5 +318,5 @@ class NativeSessionStorage implements SessionStorageInterface + * @return void + */ +- public function setMetadataBag(MetadataBag $metaBag = null) ++ public function setMetadataBag(MetadataBag $metaBag = null): void + { + if (1 > \func_num_args()) { +@@ -351,5 +351,5 @@ class NativeSessionStorage implements SessionStorageInterface + * @return void + */ +- public function setOptions(array $options) ++ public function setOptions(array $options): void + { + if (headers_sent() || \PHP_SESSION_ACTIVE === session_status()) { +@@ -397,5 +397,5 @@ class NativeSessionStorage implements SessionStorageInterface + * @throws \InvalidArgumentException + */ +- public function setSaveHandler(AbstractProxy|\SessionHandlerInterface $saveHandler = null) ++ public function setSaveHandler(AbstractProxy|\SessionHandlerInterface $saveHandler = null): void + { + if (1 > \func_num_args()) { +@@ -430,5 +430,5 @@ class NativeSessionStorage implements SessionStorageInterface + * @return void + */ +- protected function loadSession(array &$session = null) ++ protected function loadSession(array &$session = null): void + { + if (null === $session) { +diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php +index 28cb3c3d05..fc5452c5b0 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php +@@ -45,5 +45,5 @@ class PhpBridgeSessionStorage extends NativeSessionStorage + * @return void + */ +- public function clear() ++ public function clear(): void + { + // clear out the bags and nothing else that may be set +diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php +index 2fcd06b10b..4981f75360 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php +@@ -76,5 +76,5 @@ abstract class AbstractProxy + * @throws \LogicException + */ +- public function setId(string $id) ++ public function setId(string $id): void + { + if ($this->isActive()) { +@@ -100,5 +100,5 @@ abstract class AbstractProxy + * @throws \LogicException + */ +- public function setName(string $name) ++ public function setName(string $name): void + { + if ($this->isActive()) { +diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php +index ed2189e4e7..28e90cdcf9 100644 +--- a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php ++++ b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php +@@ -44,5 +44,5 @@ interface SessionStorageInterface + * @return void + */ +- public function setId(string $id); ++ public function setId(string $id): void; + + /** +@@ -56,5 +56,5 @@ interface SessionStorageInterface + * @return void + */ +- public function setName(string $name); ++ public function setName(string $name): void; + + /** +@@ -100,5 +100,5 @@ interface SessionStorageInterface + * is already closed + */ +- public function save(); ++ public function save(): void; + + /** +@@ -107,5 +107,5 @@ interface SessionStorageInterface + * @return void + */ +- public function clear(); ++ public function clear(): void; + + /** +@@ -121,5 +121,5 @@ interface SessionStorageInterface + * @return void + */ +- public function registerBag(SessionBagInterface $bag); ++ public function registerBag(SessionBagInterface $bag): void; + + public function getMetadataBag(): MetadataBag; +diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +index 2ddf55f2cb..52049a92b4 100644 +--- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php ++++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +@@ -35,5 +35,5 @@ abstract class Bundle implements BundleInterface + * @return void + */ +- public function boot() ++ public function boot(): void + { + } +@@ -42,5 +42,5 @@ abstract class Bundle implements BundleInterface + * @return void + */ +- public function shutdown() ++ public function shutdown(): void + { + } +@@ -52,5 +52,5 @@ abstract class Bundle implements BundleInterface + * @return void + */ +- public function build(ContainerBuilder $container) ++ public function build(ContainerBuilder $container): void + { + } +@@ -122,5 +122,5 @@ abstract class Bundle implements BundleInterface + * @return void + */ +- public function registerCommands(Application $application) ++ public function registerCommands(Application $application): void + { + } +diff --git a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php b/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php +index 02cb9641db..abe408eb24 100644 +--- a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php ++++ b/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php +@@ -28,5 +28,5 @@ interface BundleInterface extends ContainerAwareInterface + * @return void + */ +- public function boot(); ++ public function boot(): void; + + /** +@@ -35,5 +35,5 @@ interface BundleInterface extends ContainerAwareInterface + * @return void + */ +- public function shutdown(); ++ public function shutdown(): void; + + /** +@@ -44,5 +44,5 @@ interface BundleInterface extends ContainerAwareInterface + * @return void + */ +- public function build(ContainerBuilder $container); ++ public function build(ContainerBuilder $container): void; + + /** +diff --git a/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php b/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php +index 5ca4265624..1cb3611f8d 100644 +--- a/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php ++++ b/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php +@@ -24,4 +24,4 @@ interface CacheClearerInterface + * @return void + */ +- public function clear(string $cacheDir); ++ public function clear(string $cacheDir): void; + } +diff --git a/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php b/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php +index 3c99b74af3..fdb68feb2c 100644 +--- a/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php ++++ b/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php +@@ -61,5 +61,5 @@ class Psr6CacheClearer implements CacheClearerInterface + * @return void + */ +- public function clear(string $cacheDir) ++ public function clear(string $cacheDir): void + { + foreach ($this->pools as $pool) { +diff --git a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php +index f940ba4a72..5178dc96bb 100644 +--- a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php ++++ b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php +@@ -22,5 +22,5 @@ abstract class CacheWarmer implements CacheWarmerInterface + * @return void + */ +- protected function writeCacheFile(string $file, $content) ++ protected function writeCacheFile(string $file, $content): void + { + $tmpFile = @tempnam(\dirname($file), basename($file)); +diff --git a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php +index 1f1740b7e2..22dc8ea26a 100644 +--- a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php ++++ b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php +@@ -29,4 +29,4 @@ interface CacheWarmerInterface extends WarmableInterface + * @return bool + */ +- public function isOptional(); ++ public function isOptional(): bool; + } +diff --git a/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php b/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php +index 2f442cb536..d98909cfae 100644 +--- a/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php ++++ b/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php +@@ -24,4 +24,4 @@ interface WarmableInterface + * @return string[] A list of classes or files to preload on PHP 7.4+ + */ +- public function warmUp(string $cacheDir); ++ public function warmUp(string $cacheDir): array; + } +diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php +index 698ed31397..c5a3eea409 100644 +--- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php @@ -59,5 +59,5 @@ abstract class DataCollector implements DataCollectorInterface * @return callable[] The casters to add to the cloner */ -- protected function getCasters() -+ protected function getCasters(): array +- protected function getCasters() ++ protected function getCasters(): array + { + $casters = [ +diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php +index 8df94ccb8f..42288d8a02 100644 +--- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php ++++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php +@@ -28,5 +28,5 @@ interface DataCollectorInterface extends ResetInterface + * @return void + */ +- public function collect(Request $request, Response $response, \Throwable $exception = null); ++ public function collect(Request $request, Response $response, \Throwable $exception = null): void; + + /** +@@ -35,4 +35,4 @@ interface DataCollectorInterface extends ResetInterface + * @return string + */ +- public function getName(); ++ public function getName(): string; + } +diff --git a/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php b/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php +index efa1a4f737..752eb19faf 100644 +--- a/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php ++++ b/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php +@@ -24,4 +24,4 @@ interface LateDataCollectorInterface + * @return void + */ +- public function lateCollect(); ++ public function lateCollect(): void; + } +diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +index 094683ccce..5582af522e 100644 +--- a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php ++++ b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +@@ -199,5 +199,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return ParameterBag + */ +- public function getRequestRequest() ++ public function getRequestRequest(): ParameterBag + { + return new ParameterBag($this->data['request_request']->getValue()); +@@ -207,5 +207,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return ParameterBag + */ +- public function getRequestQuery() ++ public function getRequestQuery(): ParameterBag + { + return new ParameterBag($this->data['request_query']->getValue()); +@@ -215,5 +215,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return ParameterBag + */ +- public function getRequestFiles() ++ public function getRequestFiles(): ParameterBag + { + return new ParameterBag($this->data['request_files']->getValue()); +@@ -223,5 +223,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return ParameterBag + */ +- public function getRequestHeaders() ++ public function getRequestHeaders(): ParameterBag + { + return new ParameterBag($this->data['request_headers']->getValue()); +@@ -231,5 +231,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return ParameterBag + */ +- public function getRequestServer(bool $raw = false) ++ public function getRequestServer(bool $raw = false): ParameterBag + { + return new ParameterBag($this->data['request_server']->getValue($raw)); +@@ -239,5 +239,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return ParameterBag + */ +- public function getRequestCookies(bool $raw = false) ++ public function getRequestCookies(bool $raw = false): ParameterBag + { + return new ParameterBag($this->data['request_cookies']->getValue($raw)); +@@ -247,5 +247,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return ParameterBag + */ +- public function getRequestAttributes() ++ public function getRequestAttributes(): ParameterBag + { + return new ParameterBag($this->data['request_attributes']->getValue()); +@@ -255,5 +255,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return ParameterBag + */ +- public function getResponseHeaders() ++ public function getResponseHeaders(): ParameterBag + { + return new ParameterBag($this->data['response_headers']->getValue()); +@@ -263,5 +263,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return ParameterBag + */ +- public function getResponseCookies() ++ public function getResponseCookies(): ParameterBag + { + return new ParameterBag($this->data['response_cookies']->getValue()); +@@ -301,5 +301,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return bool + */ +- public function isJsonRequest() ++ public function isJsonRequest(): bool + { + return 1 === preg_match('{^application/(?:\w+\++)*json$}i', $this->data['request_headers']['content-type']); +@@ -309,5 +309,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return string|null + */ +- public function getPrettyJson() ++ public function getPrettyJson(): ?string + { + $decoded = json_decode($this->getContent()); +@@ -344,5 +344,5 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter + * @return ParameterBag + */ +- public function getDotenvVars() ++ public function getDotenvVars(): ParameterBag + { + return new ParameterBag($this->data['dotenv_vars']->getValue()); +diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php +index 444138da70..42a3c28b5f 100644 +--- a/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php ++++ b/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php +@@ -52,5 +52,5 @@ class RouterDataCollector extends DataCollector + * @return void + */ +- public function reset() ++ public function reset(): void + { + $this->controllers = new \SplObjectStorage(); +@@ -66,5 +66,5 @@ class RouterDataCollector extends DataCollector + * @return string + */ +- protected function guessRoute(Request $request, string|object|array $controller) ++ protected function guessRoute(Request $request, string|object|array $controller): string + { + return 'n/a'; +@@ -76,5 +76,5 @@ class RouterDataCollector extends DataCollector + * @return void + */ +- public function onKernelController(ControllerEvent $event) ++ public function onKernelController(ControllerEvent $event): void + { + $this->controllers[$event->getRequest()] = $event->getController(); +diff --git a/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php b/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php +index fcb100859f..8bf3ef09d5 100644 +--- a/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php ++++ b/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php +@@ -53,5 +53,5 @@ class FileLinkFormatter + * @return string|false + */ +- public function format(string $file, int $line): string|bool ++ public function format(string $file, int $line): string|false + { + if ($fmt = $this->getFileLinkFormat()) { +diff --git a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +index 4f6c34bc74..c84198c912 100644 +--- a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php ++++ b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +@@ -27,5 +27,5 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher + * @return void + */ +- protected function beforeDispatch(string $eventName, object $event) ++ protected function beforeDispatch(string $eventName, object $event): void + { + switch ($eventName) { +@@ -62,5 +62,5 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher + * @return void + */ +- protected function afterDispatch(string $eventName, object $event) ++ protected function afterDispatch(string $eventName, object $event): void + { + switch ($eventName) { +diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php +index 1924b1ddb0..62c58c8e8b 100644 +--- a/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php ++++ b/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php +@@ -35,5 +35,5 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $annotatedClasses = []; +diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ControllerArgumentValueResolverPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ControllerArgumentValueResolverPass.php +index dff3e248ae..381db9aa8f 100644 +--- a/src/Symfony/Component/HttpKernel/DependencyInjection/ControllerArgumentValueResolverPass.php ++++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ControllerArgumentValueResolverPass.php +@@ -34,5 +34,5 @@ class ControllerArgumentValueResolverPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('argument_resolver')) { +diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php b/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php +index d72efa1724..ea38e4d301 100644 +--- a/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php ++++ b/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php +@@ -38,5 +38,5 @@ abstract class Extension extends BaseExtension + * @return void + */ +- public function addAnnotatedClassesToCompile(array $annotatedClasses) ++ public function addAnnotatedClassesToCompile(array $annotatedClasses): void + { + $this->annotatedClasses = array_merge($this->annotatedClasses, $annotatedClasses); +diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php +index f41d58b81b..cb2b5c484c 100644 +--- a/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php ++++ b/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php +@@ -29,5 +29,5 @@ class FragmentRendererPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('fragment.handler')) { +diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php +index 2b6cb00793..6bf9e49796 100644 +--- a/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php ++++ b/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php +@@ -29,5 +29,5 @@ class LoggerPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $container->setAlias(LoggerInterface::class, 'logger') +diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php +index cec23e1970..946d9f6802 100644 +--- a/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php ++++ b/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php +@@ -35,5 +35,5 @@ class MergeExtensionConfigurationPass extends BaseMergeExtensionConfigurationPas + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + foreach ($this->extensions as $extension) { +diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +index d0e05340d8..18b5beb201 100644 +--- a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php ++++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +@@ -37,5 +37,5 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('argument_resolver.service') && !$container->hasDefinition('argument_resolver.not_tagged_controller')) { +diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterLocaleAwareServicesPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterLocaleAwareServicesPass.php +index 2a01365bd3..d321073903 100644 +--- a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterLocaleAwareServicesPass.php ++++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterLocaleAwareServicesPass.php +@@ -27,5 +27,5 @@ class RegisterLocaleAwareServicesPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->hasDefinition('locale_aware_listener')) { +diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php +index 7a21fe0e59..1a87f4f7e5 100644 +--- a/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php ++++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php +@@ -25,5 +25,5 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + $controllerLocator = $container->findDefinition('argument_resolver.controller_locator'); +diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php +index da9f8d6320..cfef739f87 100644 +--- a/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php ++++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php +@@ -27,5 +27,5 @@ class ResettableServicePass implements CompilerPassInterface + * @return void + */ +- public function process(ContainerBuilder $container) ++ public function process(ContainerBuilder $container): void + { + if (!$container->has('services_resetter')) { +diff --git a/src/Symfony/Component/HttpKernel/Event/RequestEvent.php b/src/Symfony/Component/HttpKernel/Event/RequestEvent.php +index b81a79b780..e05ed715e2 100644 +--- a/src/Symfony/Component/HttpKernel/Event/RequestEvent.php ++++ b/src/Symfony/Component/HttpKernel/Event/RequestEvent.php +@@ -40,5 +40,5 @@ class RequestEvent extends KernelEvent + * @return void + */ +- public function setResponse(Response $response) ++ public function setResponse(Response $response): void + { + $this->response = $response; +diff --git a/src/Symfony/Component/HttpKernel/EventListener/CacheAttributeListener.php b/src/Symfony/Component/HttpKernel/EventListener/CacheAttributeListener.php +index 723e758cd0..f3a5618e3d 100644 +--- a/src/Symfony/Component/HttpKernel/EventListener/CacheAttributeListener.php ++++ b/src/Symfony/Component/HttpKernel/EventListener/CacheAttributeListener.php +@@ -50,5 +50,5 @@ class CacheAttributeListener implements EventSubscriberInterface + * @return void + */ +- public function onKernelControllerArguments(ControllerArgumentsEvent $event) ++ public function onKernelControllerArguments(ControllerArgumentsEvent $event): void + { + $request = $event->getRequest(); +@@ -96,5 +96,5 @@ class CacheAttributeListener implements EventSubscriberInterface + * @return void + */ +- public function onKernelResponse(ResponseEvent $event) ++ public function onKernelResponse(ResponseEvent $event): void + { + $request = $event->getRequest(); +diff --git a/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php b/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php +index 4a40909157..61edeb266c 100644 +--- a/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php ++++ b/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php +@@ -40,5 +40,5 @@ class DumpListener implements EventSubscriberInterface + * @return void + */ +- public function configure() ++ public function configure(): void + { + $cloner = $this->cloner; +diff --git a/src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php b/src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php +index cc6936cfda..c4a74bdd93 100644 +--- a/src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php ++++ b/src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php +@@ -55,5 +55,5 @@ class ErrorListener implements EventSubscriberInterface + * @return void + */ +- public function logKernelException(ExceptionEvent $event) ++ public function logKernelException(ExceptionEvent $event): void + { + $throwable = $event->getThrowable(); +@@ -96,5 +96,5 @@ class ErrorListener implements EventSubscriberInterface + * @return void + */ +- public function onKernelException(ExceptionEvent $event) ++ public function onKernelException(ExceptionEvent $event): void + { + if (null === $this->controller) { +@@ -142,5 +142,5 @@ class ErrorListener implements EventSubscriberInterface + * @return void + */ +- public function onControllerArguments(ControllerArgumentsEvent $event) ++ public function onControllerArguments(ControllerArgumentsEvent $event): void + { + $e = $event->getRequest()->attributes->get('exception'); +diff --git a/src/Symfony/Component/HttpKernel/Exception/HttpException.php b/src/Symfony/Component/HttpKernel/Exception/HttpException.php +index e12abce004..3354a5aebf 100644 +--- a/src/Symfony/Component/HttpKernel/Exception/HttpException.php ++++ b/src/Symfony/Component/HttpKernel/Exception/HttpException.php +@@ -43,5 +43,5 @@ class HttpException extends \RuntimeException implements HttpExceptionInterface + * @return void + */ +- public function setHeaders(array $headers) ++ public function setHeaders(array $headers): void + { + $this->headers = $headers; +diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +index 62b21e6d4e..67984f7e75 100644 +--- a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php ++++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +@@ -52,5 +52,5 @@ class FragmentHandler + * @return void + */ +- public function addRenderer(FragmentRendererInterface $renderer) ++ public function addRenderer(FragmentRendererInterface $renderer): void + { + $this->renderers[$renderer->getName()] = $renderer; +diff --git a/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php b/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php +index 3650d1700d..055b57fc77 100644 +--- a/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php ++++ b/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php +@@ -107,5 +107,5 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer + * @return Request + */ +- protected function createSubRequest(string $uri, Request $request) ++ protected function createSubRequest(string $uri, Request $request): Request + { + $cookies = $request->cookies->all(); +diff --git a/src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php b/src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php +index 47027233a7..2be5cfc7de 100644 +--- a/src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php ++++ b/src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php +@@ -35,5 +35,5 @@ abstract class RoutableFragmentRenderer implements FragmentRendererInterface + * @return void + */ +- public function setFragmentPath(string $path) ++ public function setFragmentPath(string $path): void + { + $this->fragmentPath = $path; +diff --git a/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php b/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php +index f158cca3f9..bf5533dce7 100644 +--- a/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php ++++ b/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php +@@ -59,5 +59,5 @@ abstract class AbstractSurrogate implements SurrogateInterface + * @return void + */ +- public function addSurrogateCapability(Request $request) ++ public function addSurrogateCapability(Request $request): void + { + $current = $request->headers->get('Surrogate-Capability'); +@@ -108,5 +108,5 @@ abstract class AbstractSurrogate implements SurrogateInterface + * @return void + */ +- protected function removeFromControl(Response $response) ++ protected function removeFromControl(Response $response): void + { + if (!$response->headers->has('Surrogate-Control')) { +diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php +index 4730b33c13..da8fdccfaa 100644 +--- a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php ++++ b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php +@@ -36,5 +36,5 @@ class Esi extends AbstractSurrogate + * @return void + */ +- public function addSurrogateControl(Response $response) ++ public function addSurrogateControl(Response $response): void + { + if (str_contains($response->getContent(), 'surrogate?->addSurrogateCapability($request); +@@ -598,5 +598,5 @@ class HttpCache implements HttpKernelInterface, TerminableInterface + * @throws \Exception + */ +- protected function store(Request $request, Response $response) ++ protected function store(Request $request, Response $response): void + { + try { +@@ -666,5 +666,5 @@ class HttpCache implements HttpKernelInterface, TerminableInterface + * @return void + */ +- protected function processResponseBody(Request $request, Response $response) ++ protected function processResponseBody(Request $request, Response $response): void + { + if ($this->surrogate?->needsParsing($response)) { +diff --git a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php +index 1bdaab148a..7976d00605 100644 +--- a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php ++++ b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php +@@ -58,5 +58,5 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface + * @return void + */ +- public function add(Response $response) ++ public function add(Response $response): void + { + ++$this->embeddedResponses; +@@ -102,5 +102,5 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface + * @return void + */ +- public function update(Response $response) ++ public function update(Response $response): void + { + // if we have no embedded Response, do nothing +diff --git a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php +index 33c8bd9412..8fe6df2512 100644 +--- a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php ++++ b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php +@@ -31,5 +31,5 @@ interface ResponseCacheStrategyInterface + * @return void + */ +- public function add(Response $response); ++ public function add(Response $response): void; + + /** +@@ -38,4 +38,4 @@ interface ResponseCacheStrategyInterface + * @return void + */ +- public function update(Response $response); ++ public function update(Response $response): void; + } +diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php b/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php +index bde72914a7..c1656f2ac0 100644 +--- a/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php ++++ b/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php +@@ -30,5 +30,5 @@ class Ssi extends AbstractSurrogate + * @return void + */ +- public function addSurrogateControl(Response $response) ++ public function addSurrogateControl(Response $response): void + { + if (str_contains($response->getContent(), ' first last diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled.xml index a3d7f8bfa623b..226c09814c2f2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled.xml @@ -7,7 +7,7 @@ - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase bar baz diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled_named_workflows.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled_named_workflows.xml index 3569297c45784..59d91e76da315 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled_named_workflows.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled_named_workflows.xml @@ -8,7 +8,7 @@ bar - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase bar baz diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/html_sanitizer.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/html_sanitizer.yml index 007f4875b6f79..a60b8b4eef69a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/html_sanitizer.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/html_sanitizer.yml @@ -3,6 +3,7 @@ framework: html_sanitizer: sanitizers: custom: + block_body_elements: true allow_safe_elements: true allow_static_elements: true allow_elements: diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_full_default_options.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_full_default_options.yml index de9300e17f158..acd33293fbe65 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_full_default_options.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_full_default_options.yml @@ -22,3 +22,6 @@ framework: peer_fingerprint: pin-sha256: ['14s5erg62v1v8471g2revg48r7==', 'jsda84hjtyd4821bgfesd215bsfg5412='] md5: 'sdhtb481248721thbr=' + extra: + foo: + bar: 'baz' diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_override_default_options.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_override_default_options.yml index 14a6915380dba..3f4af70018f6a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_override_default_options.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_override_default_options.yml @@ -4,7 +4,9 @@ framework: max_host_connections: 4 default_options: headers: {'foo': 'bar'} + extra: {'foo': 'bar'} scoped_clients: foo: base_uri: http://example.com headers: {'bar': 'baz'} + extra: {'bar': 'baz'} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger.yml index 29174a9b407f2..929b1230e8a6c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger.yml @@ -1,5 +1,6 @@ framework: http_method_override: false + scheduler: true messenger: routing: 'Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\FooMessage': ['sender.bar', 'sender.biz'] diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_disabled.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_disabled.yml index 8bbd594e3839b..6f90172804408 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_disabled.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_disabled.yml @@ -1,3 +1,4 @@ framework: http_method_override: false messenger: false + scheduler: false diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_schedule.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_schedule.yml new file mode 100644 index 0000000000000..d0b4c33e41870 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_schedule.yml @@ -0,0 +1,5 @@ +framework: + http_method_override: false + messenger: + transports: + schedule: 'schedule://default' diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml index 24471939c5435..15728009e57ef 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml @@ -22,3 +22,4 @@ framework: failed: 'in-memory:///' redis: 'redis://127.0.0.1:6379/messages' beanstalkd: 'beanstalkd://127.0.0.1:11300' + schedule: 'schedule://default' diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/notifier_without_messenger.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/notifier_without_messenger.yml index 9ff92d0ac74af..c55bc0358c89b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/notifier_without_messenger.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/notifier_without_messenger.yml @@ -16,3 +16,4 @@ framework: high: ['slack', 'twilio'] admin_recipients: - { email: 'test@test.de', phone: '+490815' } + scheduler: false diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_mapping_without_annotations.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_mapping_without_annotations.yml new file mode 100644 index 0000000000000..ca0647c06683d --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_mapping_without_annotations.yml @@ -0,0 +1,9 @@ +framework: + http_method_override: false + serializer: + enable_annotations: false + mapping: + paths: + - "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/files" + - "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yml" + - "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yaml" diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_not_valid.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_not_valid.yml index 29eeb8e9ad18d..f651f087936b8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_not_valid.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_not_valid.yml @@ -4,7 +4,7 @@ framework: my_workflow: type: state_machine supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase places: [first, middle, last] transitions: go: diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_guard_expression.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_guard_expression.yml index 6855c013053b2..7d56712d47b53 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_guard_expression.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_guard_expression.yml @@ -4,7 +4,7 @@ framework: article: type: workflow supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase initial_marking: [draft] places: - draft diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml index 384bd47170bfa..38f066fffa173 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml @@ -4,7 +4,7 @@ framework: article: type: workflow supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase initial_marking: [draft] places: - draft diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_no_events_to_dispatch.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_no_events_to_dispatch.yml index c511543df056d..7686463c42884 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_no_events_to_dispatch.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_no_events_to_dispatch.yml @@ -9,7 +9,7 @@ framework: type: method property: state supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase places: - one - two diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_specified_events_to_dispatch.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_specified_events_to_dispatch.yml index 703195b557664..1d6067fbc0180 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_specified_events_to_dispatch.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_specified_events_to_dispatch.yml @@ -9,7 +9,7 @@ framework: type: method property: state supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase places: - one - two diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_support_and_support_strategy.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_support_and_support_strategy.yml index a57bc555b6fb7..bab7d22a464a4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_support_and_support_strategy.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_support_and_support_strategy.yml @@ -4,7 +4,7 @@ framework: my_workflow: type: workflow supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase support_strategy: foobar places: - first diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml index ff1b926b09997..f0f57d89e236e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml @@ -4,7 +4,7 @@ framework: article: type: workflow supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase initial_marking: [draft] metadata: title: article workflow @@ -32,7 +32,7 @@ framework: to: [published] pull_request: supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase initial_marking: start metadata: title: workflow title @@ -75,7 +75,7 @@ framework: marking_store: service: workflow_service supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase places: - { name: first } - { name: last } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled.yml index 1ee334125e3d1..c4bfbe3e31310 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled.yml @@ -6,7 +6,7 @@ framework: foo: type: workflow supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase initial_marking: [bar] places: - bar diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled_named_workflows.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled_named_workflows.yml index 0dcfc93a1c209..24d8f17416c04 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled_named_workflows.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled_named_workflows.yml @@ -5,7 +5,7 @@ framework: workflows: type: workflow supports: - - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase initial_marking: [bar] places: - bar diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php similarity index 95% rename from src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php rename to src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php index d3c24f28dcadc..38a196978ece3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php @@ -57,6 +57,10 @@ use Symfony\Component\HttpClient\ScopingHttpClient; use Symfony\Component\HttpKernel\DependencyInjection\LoggerPass; use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface; +use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsTransportFactory; +use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransportFactory; +use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdTransportFactory; +use Symfony\Component\Messenger\Bridge\Redis\Transport\RedisTransportFactory; use Symfony\Component\Messenger\Transport\TransportFactory; use Symfony\Component\Notifier\ChatterInterface; use Symfony\Component\Notifier\TexterInterface; @@ -85,7 +89,7 @@ use Symfony\Contracts\Cache\CacheInterface; use Symfony\Contracts\Cache\TagAwareCacheInterface; -abstract class FrameworkExtensionTest extends TestCase +abstract class FrameworkExtensionTestCase extends TestCase { use ExpectDeprecationTrait; @@ -541,9 +545,9 @@ public function testEnabledPhpErrorsConfig() { $container = $this->createContainerFromFile('php_errors_enabled'); - $definition = $container->getDefinition('debug.debug_handlers_listener'); - $this->assertEquals(new Reference('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), $definition->getArgument(1)); - $this->assertNull($definition->getArgument(2)); + $definition = $container->getDefinition('debug.error_handler_configurator'); + $this->assertEquals(new Reference('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), $definition->getArgument(0)); + $this->assertNull($definition->getArgument(1)); $this->assertSame(-1, $container->getParameter('debug.error_handler.throw_at')); } @@ -551,9 +555,9 @@ public function testDisabledPhpErrorsConfig() { $container = $this->createContainerFromFile('php_errors_disabled'); - $definition = $container->getDefinition('debug.debug_handlers_listener'); + $definition = $container->getDefinition('debug.error_handler_configurator'); + $this->assertNull($definition->getArgument(0)); $this->assertNull($definition->getArgument(1)); - $this->assertNull($definition->getArgument(2)); $this->assertSame(0, $container->getParameter('debug.error_handler.throw_at')); } @@ -561,21 +565,21 @@ public function testPhpErrorsWithLogLevel() { $container = $this->createContainerFromFile('php_errors_log_level'); - $definition = $container->getDefinition('debug.debug_handlers_listener'); - $this->assertEquals(new Reference('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), $definition->getArgument(1)); - $this->assertSame(8, $definition->getArgument(2)); + $definition = $container->getDefinition('debug.error_handler_configurator'); + $this->assertEquals(new Reference('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), $definition->getArgument(0)); + $this->assertSame(8, $definition->getArgument(1)); } public function testPhpErrorsWithLogLevels() { $container = $this->createContainerFromFile('php_errors_log_levels'); - $definition = $container->getDefinition('debug.debug_handlers_listener'); - $this->assertEquals(new Reference('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), $definition->getArgument(1)); + $definition = $container->getDefinition('debug.error_handler_configurator'); + $this->assertEquals(new Reference('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), $definition->getArgument(0)); $this->assertSame([ \E_NOTICE => \Psr\Log\LogLevel::ERROR, \E_WARNING => \Psr\Log\LogLevel::ERROR, - ], $definition->getArgument(2)); + ], $definition->getArgument(1)); } public function testExceptionsConfig() @@ -662,9 +666,8 @@ public function testNullSessionHandler() { $container = $this->createContainerFromFile('session'); - $this->assertNull($container->getDefinition('session.storage.factory.native')->getArgument(1)); - $this->assertNull($container->getDefinition('session.storage.factory.php_bridge')->getArgument(0)); - $this->assertSame('session.handler.native_file', (string) $container->getAlias('session.handler')); + $this->assertNull($container->getParameter('session.save_path')); + $this->assertSame('session.handler.native', (string) $container->getAlias('session.handler')); $expected = ['session_factory', 'logger', 'session_collector']; $this->assertEquals($expected, array_keys($container->getDefinition('session_listener')->getArgument(0)->getValues())); @@ -769,6 +772,13 @@ public function testWebLink() public function testMessengerServicesRemovedWhenDisabled() { $container = $this->createContainerFromFile('messenger_disabled'); + $messengerDefinitions = array_filter( + $container->getDefinitions(), + static fn ($name) => str_starts_with($name, 'messenger.'), + \ARRAY_FILTER_USE_KEY + ); + + $this->assertEmpty($messengerDefinitions); $this->assertFalse($container->hasDefinition('console.command.messenger_consume_messages')); $this->assertFalse($container->hasDefinition('console.command.messenger_debug')); $this->assertFalse($container->hasDefinition('console.command.messenger_stop_workers')); @@ -801,14 +811,41 @@ public function testMessengerWithExplictResetOnMessageLegacy() public function testMessenger() { - $container = $this->createContainerFromFile('messenger'); + $container = $this->createContainerFromFile('messenger', [], true, false); + $container->addCompilerPass(new ResolveTaggedIteratorArgumentPass()); + $container->compile(); + + $expectedFactories = [ + new Reference('scheduler.messenger_transport_factory'), + ]; + + if (class_exists(AmqpTransportFactory::class)) { + $expectedFactories[] = 'messenger.transport.amqp.factory'; + } + + if (class_exists(RedisTransportFactory::class)) { + $expectedFactories[] = 'messenger.transport.redis.factory'; + } + + $expectedFactories[] = 'messenger.transport.sync.factory'; + $expectedFactories[] = 'messenger.transport.in_memory.factory'; + + if (class_exists(AmazonSqsTransportFactory::class)) { + $expectedFactories[] = 'messenger.transport.sqs.factory'; + } + + if (class_exists(BeanstalkdTransportFactory::class)) { + $expectedFactories[] = 'messenger.transport.beanstalkd.factory'; + } + + $this->assertTrue($container->hasDefinition('messenger.receiver_locator')); $this->assertTrue($container->hasDefinition('console.command.messenger_consume_messages')); $this->assertTrue($container->hasAlias('messenger.default_bus')); $this->assertTrue($container->getAlias('messenger.default_bus')->isPublic()); - $this->assertTrue($container->hasDefinition('messenger.transport.amqp.factory')); - $this->assertTrue($container->hasDefinition('messenger.transport.redis.factory')); $this->assertTrue($container->hasDefinition('messenger.transport_factory')); $this->assertSame(TransportFactory::class, $container->getDefinition('messenger.transport_factory')->getClass()); + $this->assertInstanceOf(TaggedIteratorArgument::class, $container->getDefinition('messenger.transport_factory')->getArgument(0)); + $this->assertEquals($expectedFactories, $container->getDefinition('messenger.transport_factory')->getArgument(0)->getValues()); $this->assertTrue($container->hasDefinition('messenger.listener.reset_services')); $this->assertSame('messenger.listener.reset_services', (string) $container->getDefinition('console.command.messenger_consume_messages')->getArgument(5)); } @@ -825,10 +862,7 @@ public function testMessengerWithoutConsole() $this->assertFalse($container->hasDefinition('console.command.messenger_consume_messages')); $this->assertTrue($container->hasAlias('messenger.default_bus')); $this->assertTrue($container->getAlias('messenger.default_bus')->isPublic()); - $this->assertTrue($container->hasDefinition('messenger.transport.amqp.factory')); - $this->assertTrue($container->hasDefinition('messenger.transport.redis.factory')); $this->assertTrue($container->hasDefinition('messenger.transport_factory')); - $this->assertSame(TransportFactory::class, $container->getDefinition('messenger.transport_factory')->getClass()); $this->assertFalse($container->hasDefinition('messenger.listener.reset_services')); } @@ -953,6 +987,14 @@ public function testMessengerTransports() $this->assertTrue($container->hasDefinition('messenger.transport.beanstalkd.factory')); + $this->assertTrue($container->hasDefinition('messenger.transport.schedule')); + $transportFactory = $container->getDefinition('messenger.transport.schedule')->getFactory(); + $transportArguments = $container->getDefinition('messenger.transport.schedule')->getArguments(); + + $this->assertEquals([new Reference('messenger.transport_factory'), 'createTransport'], $transportFactory); + $this->assertCount(3, $transportArguments); + $this->assertSame('schedule://default', $transportArguments[0]); + $this->assertSame(10, $container->getDefinition('messenger.retry.multiplier_retry_strategy.customised')->getArgument(0)); $this->assertSame(7, $container->getDefinition('messenger.retry.multiplier_retry_strategy.customised')->getArgument(1)); $this->assertSame(3, $container->getDefinition('messenger.retry.multiplier_retry_strategy.customised')->getArgument(2)); @@ -966,6 +1008,7 @@ public function testMessengerTransports() 'default' => new Reference('messenger.transport.failed'), 'failed' => new Reference('messenger.transport.failed'), 'redis' => new Reference('messenger.transport.failed'), + 'schedule' => new Reference('messenger.transport.failed'), ]; $failureTransportsReferences = array_map(function (ServiceClosureArgument $serviceClosureArgument) { @@ -1146,9 +1189,7 @@ public function testTranslator() $nonExistingDirectories = array_filter( $options['scanned_directories'], - function ($directory) { - return !file_exists($directory); - } + fn ($directory) => !file_exists($directory) ); $this->assertNotEmpty($nonExistingDirectories, 'FrameworkBundle should pass non existing directories to Translator'); @@ -1526,9 +1567,15 @@ public function testSerializerCacheActivated() $this->assertEquals(new Reference('serializer.mapping.cache.symfony'), $cache); } - public function testSerializerCacheNotActivatedDebug() + public function testSerializerCacheUsedWithoutAnnotationsAndMappingFiles() + { + $container = $this->createContainerFromFile('serializer_mapping_without_annotations', ['kernel.debug' => true, 'kernel.container_class' => __CLASS__]); + $this->assertTrue($container->hasDefinition('serializer.mapping.cache_class_metadata_factory')); + } + + public function testSerializerCacheNotActivatedWithAnnotations() { - $container = $this->createContainerFromFile('serializer_enabled', ['kernel.debug' => true, 'kernel.container_class' => __CLASS__]); + $container = $this->createContainerFromFile('serializer_mapping', ['kernel.debug' => true, 'kernel.container_class' => __CLASS__]); $this->assertFalse($container->hasDefinition('serializer.mapping.cache_class_metadata_factory')); } @@ -1731,7 +1778,7 @@ public function testAppRedisTagAwareAdapter(string $configFile) } } - public function appRedisTagAwareConfigProvider(): array + public static function appRedisTagAwareConfigProvider(): array { return [ ['cache_app_redis_tag_aware'], @@ -1847,13 +1894,14 @@ public function testRobotsTagListenerIsRegisteredInDebugMode() public function testHttpClientDefaultOptions() { $container = $this->createContainerFromFile('http_client_default_options'); - $this->assertTrue($container->hasDefinition('http_client'), '->registerHttpClientConfiguration() loads http_client.xml'); + $this->assertTrue($container->hasDefinition('http_client.transport'), '->registerHttpClientConfiguration() loads http_client.xml'); $defaultOptions = [ 'headers' => [], 'resolve' => [], + 'extra' => [], ]; - $this->assertSame([$defaultOptions, 4], $container->getDefinition('http_client')->getArguments()); + $this->assertSame([$defaultOptions, 4], $container->getDefinition('http_client.transport')->getArguments()); $this->assertTrue($container->hasDefinition('foo'), 'should have the "foo" service.'); $this->assertSame(ScopingHttpClient::class, $container->getDefinition('foo')->getClass()); @@ -1871,18 +1919,22 @@ public function testHttpClientOverrideDefaultOptions() { $container = $this->createContainerFromFile('http_client_override_default_options'); - $this->assertSame(['foo' => 'bar'], $container->getDefinition('http_client')->getArgument(0)['headers']); - $this->assertSame(4, $container->getDefinition('http_client')->getArgument(1)); + $this->assertSame(['foo' => 'bar'], $container->getDefinition('http_client.transport')->getArgument(0)['headers']); + $this->assertSame(['foo' => 'bar'], $container->getDefinition('http_client.transport')->getArgument(0)['extra']); + $this->assertSame(4, $container->getDefinition('http_client.transport')->getArgument(1)); $this->assertSame('http://example.com', $container->getDefinition('foo')->getArgument(1)); $expected = [ 'headers' => [ 'bar' => 'baz', ], + 'extra' => [ + 'bar' => 'baz', + ], 'query' => [], 'resolve' => [], ]; - $this->assertSame($expected, $container->getDefinition('foo')->getArgument(2)); + $this->assertEquals($expected, $container->getDefinition('foo')->getArgument(2)); } public function testHttpClientRetry() @@ -1922,7 +1974,7 @@ public function testHttpClientFullDefaultOptions() { $container = $this->createContainerFromFile('http_client_full_default_options'); - $defaultOptions = $container->getDefinition('http_client')->getArgument(0); + $defaultOptions = $container->getDefinition('http_client.transport')->getArgument(0); $this->assertSame(['X-powered' => 'PHP'], $defaultOptions['headers']); $this->assertSame(2, $defaultOptions['max_redirects']); @@ -1944,9 +1996,10 @@ public function testHttpClientFullDefaultOptions() 'pin-sha256' => ['14s5erg62v1v8471g2revg48r7==', 'jsda84hjtyd4821bgfesd215bsfg5412='], 'md5' => 'sdhtb481248721thbr=', ], $defaultOptions['peer_fingerprint']); + $this->assertSame(['foo' => ['bar' => 'baz']], $defaultOptions['extra']); } - public function provideMailer(): array + public static function provideMailer(): array { return [ ['mailer_with_dsn', ['main' => 'smtp://example.com']], @@ -2007,7 +2060,7 @@ public function testHttpClientMockResponseFactory() $argument = $definition->getArgument(0); $this->assertInstanceOf(Reference::class, $argument); - $this->assertSame('http_client', current($definition->getDecoratedService())); + $this->assertSame('http_client.transport', current($definition->getDecoratedService())); $this->assertSame('my_response_factory', (string) $argument); } @@ -2122,6 +2175,7 @@ public function testHtmlSanitizer() [ ['allowSafeElements', [], true], ['allowStaticElements', [], true], + ['blockBodyElements', [], true], ['allowElement', ['iframe', 'src'], true], ['allowElement', ['custom-tag', ['data-attr', 'data-attr-1']], true], ['allowElement', ['custom-tag-2', '*'], true], @@ -2346,7 +2400,7 @@ private function assertCachePoolServiceDefinitionIsCreated(ContainerBuilder $con */ class TestAnnotationsPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { $container->setDefinition('annotation_reader', $container->getDefinition('annotations.cached_reader')); $container->removeDefinition('annotations.cached_reader'); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php index a904c4c86ee90..5daeaa14ec28e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php @@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; use Symfony\Component\Workflow\Exception\InvalidDefinitionException; -class PhpFrameworkExtensionTest extends FrameworkExtensionTest +class PhpFrameworkExtensionTest extends FrameworkExtensionTestCase { protected function loadFromFile(ContainerBuilder $container, $file) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php index 131bb07f0c657..4a2ff788bf5c6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php @@ -14,8 +14,9 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\RateLimiter\Policy\SlidingWindowLimiter; -class XmlFrameworkExtensionTest extends FrameworkExtensionTest +class XmlFrameworkExtensionTest extends FrameworkExtensionTestCase { protected function loadFromFile(ContainerBuilder $container, $file) { @@ -66,4 +67,11 @@ public function testLegacyExceptionsConfig() 'status_code' => 500, ], $configuration[\Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException::class]); } + + public function testRateLimiter() + { + $container = $this->createContainerFromFile('rate_limiter'); + + $this->assertTrue($container->hasDefinition('limiter.sliding_window')); + } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/YamlFrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/YamlFrameworkExtensionTest.php index 457467aa11d77..cb5a0a5e16f6f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/YamlFrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/YamlFrameworkExtensionTest.php @@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; -class YamlFrameworkExtensionTest extends FrameworkExtensionTest +class YamlFrameworkExtensionTest extends FrameworkExtensionTestCase { protected function loadFromFile(ContainerBuilder $container, $file) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Messenger/DummySchedule.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Messenger/DummySchedule.php new file mode 100644 index 0000000000000..51a50e33ca796 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Messenger/DummySchedule.php @@ -0,0 +1,26 @@ +add(...self::$recurringMessages) + ->stateful(new ArrayAdapter()) + ->lock(new Lock(new Key('dummy'), new InMemoryStore())) + ; + } +} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractAttributeRoutingTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractAttributeRoutingTestCase.php similarity index 92% rename from src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractAttributeRoutingTest.php rename to src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractAttributeRoutingTestCase.php index 8f8747bfff495..5166c8dda4384 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractAttributeRoutingTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractAttributeRoutingTestCase.php @@ -13,7 +13,7 @@ use Symfony\Component\HttpFoundation\Request; -abstract class AbstractAttributeRoutingTest extends AbstractWebTestCase +abstract class AbstractAttributeRoutingTestCase extends AbstractWebTestCase { /** * @dataProvider getRoutes @@ -31,7 +31,7 @@ public function testAnnotatedController(string $path, string $expectedValue) $this->assertSame('/annotated/create-transaction', $router->generate('symfony_framework_tests_functional_test_annotated_createtransaction')); } - public function getRoutes(): array + public static function getRoutes(): array { return [ ['/null_request', Request::class], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php index 631d75bb50dff..9ca913748d5b3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; -class AnnotatedControllerTest extends AbstractAttributeRoutingTest +class AnnotatedControllerTest extends AbstractAttributeRoutingTestCase { protected function getTestCaseApp(): string { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/DefaultConfigTestBundle/DependencyInjection/DefaultConfigTestExtension.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/DefaultConfigTestBundle/DependencyInjection/DefaultConfigTestExtension.php index 400384f616f29..67d7b2bdac997 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/DefaultConfigTestBundle/DependencyInjection/DefaultConfigTestExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/DefaultConfigTestBundle/DependencyInjection/DefaultConfigTestExtension.php @@ -16,7 +16,7 @@ class DefaultConfigTestExtension extends Extension { - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/ExtensionWithoutConfigTestBundle/DependencyInjection/ExtensionWithoutConfigTestExtension.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/ExtensionWithoutConfigTestBundle/DependencyInjection/ExtensionWithoutConfigTestExtension.php index 497a7a99d6d2b..560f84e62df4f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/ExtensionWithoutConfigTestBundle/DependencyInjection/ExtensionWithoutConfigTestExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/ExtensionWithoutConfigTestBundle/DependencyInjection/ExtensionWithoutConfigTestExtension.php @@ -16,7 +16,7 @@ class ExtensionWithoutConfigTestExtension implements ExtensionInterface { - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/AnnotationReaderPass.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/AnnotationReaderPass.php index 53555fd664174..9e61c5ae76f64 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/AnnotationReaderPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/AnnotationReaderPass.php @@ -16,7 +16,7 @@ class AnnotationReaderPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { // simulate using "annotation_reader" in a compiler pass $container->get('test.annotation_reader'); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php index 80cee0f1ae344..b0cd9ff916816 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php @@ -21,7 +21,7 @@ class TestExtension extends Extension implements PrependExtensionInterface { private $customConfig; - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { $configuration = $this->getConfiguration($configs, $container); $this->processConfiguration($configuration, $configs); @@ -29,7 +29,7 @@ public function load(array $configs, ContainerBuilder $container) $container->setAlias('test.annotation_reader', new Alias('annotation_reader', true)); } - public function prepend(ContainerBuilder $container) + public function prepend(ContainerBuilder $container): void { $container->prependExtensionConfig('test', ['custom' => 'foo']); } @@ -39,7 +39,7 @@ public function getConfiguration(array $config, ContainerBuilder $container): ?C return new Configuration($this->customConfig); } - public function setCustomConfig($customConfig) + public function setCustomConfig($customConfig): void { $this->customConfig = $customConfig; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php index 13c368fd585e4..bde1279ad1ec3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php @@ -21,7 +21,7 @@ class TestBundle extends Bundle { - public function build(ContainerBuilder $container) + public function build(ContainerBuilder $container): void { parent::build($container); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php index b01295607b17f..76ac645d2b6f6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php @@ -14,6 +14,7 @@ use Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Cache\Adapter\FilesystemAdapter; +use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use Symfony\Component\Finder\SplFileInfo; @@ -76,6 +77,33 @@ public function testClearUnexistingPool() ->execute(['pools' => ['unknown_pool']], ['decorated' => false]); } + public function testClearAll() + { + $tester = $this->createCommandTester(['cache.app_clearer']); + $tester->execute(['--all' => true], ['decorated' => false]); + + $tester->assertCommandIsSuccessful('cache:pool:clear exits with 0 in case of success'); + $this->assertStringContainsString('Clearing all cache pools...', $tester->getDisplay()); + $this->assertStringContainsString('Calling cache clearer: cache.app_clearer', $tester->getDisplay()); + $this->assertStringContainsString('[OK] Cache was successfully cleared.', $tester->getDisplay()); + } + + public function testClearWithoutPoolNames() + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Could not clear all cache pools, try specifying a specific pool or cache clearer.'); + + $this->createCommandTester()->execute(['--all' => true], ['decorated' => false]); + } + + public function testClearNoOptions() + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Either specify at least one pool name, or provide the --all option to clear all pools.'); + + $this->createCommandTester()->execute([], ['decorated' => false]); + } + public function testClearFailed() { $tester = $this->createCommandTester(); @@ -104,10 +132,10 @@ public function testClearFailed() $this->assertStringContainsString('[WARNING] Cache pool "cache.public_pool" could not be cleared.', $tester->getDisplay()); } - private function createCommandTester() + private function createCommandTester(array $poolNames = null) { $application = new Application(static::$kernel); - $application->add(new CachePoolClearCommand(static::getContainer()->get('cache.global_clearer'))); + $application->add(new CachePoolClearCommand(static::getContainer()->get('cache.global_clearer'), $poolNames)); return new CommandTester($application->find('cache:pool:clear')); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php index 2bebd2d77a3e9..2608966586a78 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php @@ -26,6 +26,7 @@ public function testCachePools() /** * @requires extension redis + * * @group integration */ public function testRedisCachePools() @@ -49,6 +50,7 @@ public function testRedisCachePools() /** * @requires extension redis + * * @group integration */ public function testRedisCustomCachePools() diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php index dffd5a1c1be5e..307b34a395299 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php @@ -164,7 +164,7 @@ public function testComplete(array $input, array $expectedSuggestions) } } - public function provideCompletionSuggestions(): \Generator + public static function provideCompletionSuggestions(): \Generator { yield 'name' => [[''], ['default_config_test', 'extension_without_config_test', 'framework', 'test']]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php index 4747b785f8149..e944960aea4e7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -103,7 +103,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'name' => [[''], ['DefaultConfigTestBundle', 'default_config_test', 'ExtensionWithoutConfigTestBundle', 'extension_without_config_test', 'FrameworkBundle', 'framework', 'TestBundle', 'test']]; yield 'option --format' => [['--format', ''], ['yaml', 'xml']]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php index 32d8aa0a67073..b3624cc5c9e74 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php @@ -50,6 +50,19 @@ public function testNoDebug() $this->assertStringContainsString('public', $tester->getDisplay()); } + public function testNoDumpedXML() + { + static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml', 'debug' => true, 'debug.container.dump' => false]); + + $application = new Application(static::$kernel); + $application->setAutoExit(false); + + $tester = new ApplicationTester($application); + $tester->run(['command' => 'debug:container']); + + $this->assertStringContainsString('public', $tester->getDisplay()); + } + public function testPrivateAlias() { static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml']); @@ -242,7 +255,7 @@ public function testGetDeprecationNoFile() $this->assertStringContainsString('[WARNING] The deprecation file does not exist', $tester->getDisplay()); } - public function provideIgnoreBackslashWhenFindingService() + public static function provideIgnoreBackslashWhenFindingService() { return [ [BackslashClass::class], @@ -270,7 +283,7 @@ public function testComplete(array $input, array $expectedSuggestions, array $no } } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { $serviceId = 'console.command.container_debug'; $hiddenServiceId = '.console.command.container_debug.lazy'; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php index 650d2174d2096..db2ee9c468117 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php @@ -133,7 +133,7 @@ public function testComplete(array $input, array $expectedSuggestions) } } - public function provideCompletionSuggestions(): \Generator + public static function provideCompletionSuggestions(): \Generator { yield 'search' => [[''], ['SessionHandlerInterface', LoggerInterface::class, 'Psr\\Container\\ContainerInterface $parameterBag']]; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php index b514ed3b8e042..6d8966a171ba2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php @@ -37,7 +37,7 @@ public function testFragment($insulate) , $client->getResponse()->getContent()); } - public function getConfigs() + public static function getConfigs() { return [ [false], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/KernelTestCaseTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/KernelTestCaseTest.php index 32bee3b587309..aa12467829ed1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/KernelTestCaseTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/KernelTestCaseTest.php @@ -17,6 +17,7 @@ use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestServiceContainer\PublicService; use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestServiceContainer\UnusedPrivateService; use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; class KernelTestCaseTest extends AbstractWebTestCase { @@ -41,4 +42,20 @@ public function testThatPrivateServicesAreAvailableIfTestConfigIsEnabled() $this->assertTrue($container->has('private_service')); $this->assertFalse($container->has(UnusedPrivateService::class)); } + + public function testThatPrivateServicesCanBeSetIfTestConfigIsEnabled() + { + static::bootKernel(['test_case' => 'TestServiceContainer']); + + $container = static::getContainer(); + + $service = new \stdClass(); + + $container->set('private_service', $service); + $this->assertSame($service, $container->get('private_service')); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('The "private_service" service is already initialized, you cannot replace it.'); + $container->set('private_service', new \stdClass()); + } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php index 7b65ca5c276e8..d7825979536e5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php @@ -57,7 +57,7 @@ public function testProfilerCollectParameter($insulate) $this->assertNull($client->getProfile()); } - public function getConfigs() + public static function getConfigs() { return [ [false], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Psr4RoutingTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Psr4RoutingTest.php index 0d0d715c9d0b4..811a99a112c0c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Psr4RoutingTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Psr4RoutingTest.php @@ -14,7 +14,7 @@ /** * @requires function Symfony\Component\Routing\Loader\Psr4DirectoryLoader::__construct */ -final class Psr4RoutingTest extends AbstractAttributeRoutingTest +final class Psr4RoutingTest extends AbstractAttributeRoutingTestCase { protected function getTestCaseApp(): string { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php index 7390a124c3c0a..9865e7edea6fe 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php @@ -96,7 +96,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $tester->complete($input)); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'option --format' => [ ['--format', ''], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RoutingConditionServiceTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RoutingConditionServiceTest.php index 780060d7fc6f6..4f4caa6eb1567 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RoutingConditionServiceTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RoutingConditionServiceTest.php @@ -24,7 +24,7 @@ public function testCondition(int $code, string $path) $this->assertSame($code, $client->getResponse()->getStatusCode()); } - public function provideRoutes(): iterable + public static function provideRoutes(): iterable { yield 'allowed by an autoconfigured service' => [ 200, diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SchedulerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SchedulerTest.php new file mode 100644 index 0000000000000..5aef74f473088 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SchedulerTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; + +use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\BarMessage; +use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummySchedule; +use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\FooMessage; +use Symfony\Component\Clock\MockClock; +use Symfony\Component\HttpKernel\KernelInterface; +use Symfony\Component\Scheduler\Messenger\SchedulerTransport; +use Symfony\Component\Scheduler\RecurringMessage; + +class SchedulerTest extends AbstractWebTestCase +{ + public function testScheduler() + { + $scheduledMessages = [ + RecurringMessage::every('5 minutes', $foo = new FooMessage(), new \DateTimeImmutable('2020-01-01T00:00:00Z')), + RecurringMessage::every('5 minutes', $bar = new BarMessage(), new \DateTimeImmutable('2020-01-01T00:01:00Z')), + ]; + DummySchedule::$recurringMessages = $scheduledMessages; + + $container = self::getContainer(); + $container->set('clock', $clock = new MockClock('2020-01-01T00:09:59Z')); + + $this->assertTrue($container->get('receivers')->has('scheduler_dummy')); + $this->assertInstanceOf(SchedulerTransport::class, $cron = $container->get('receivers')->get('scheduler_dummy')); + + $fetchMessages = static function (float $sleep) use ($clock, $cron) { + if (0 < $sleep) { + $clock->sleep($sleep); + } + $messages = []; + foreach ($cron->get() as $key => $envelope) { + $messages[$key] = $envelope->getMessage(); + } + + return $messages; + }; + + $this->assertSame([], $fetchMessages(0.0)); + $this->assertSame([$foo], $fetchMessages(1.0)); + $this->assertSame([], $fetchMessages(1.0)); + $this->assertSame([$bar], $fetchMessages(60.0)); + $this->assertSame([$foo, $bar, $foo, $bar], $fetchMessages(600.0)); + } + + protected static function createKernel(array $options = []): KernelInterface + { + return parent::createKernel(['test_case' => 'Scheduler'] + $options); + } +} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php index d97039562119c..c26fa717d9176 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php @@ -33,7 +33,7 @@ public function testLoginUser(string $username, array $roles, ?string $firewallC $this->assertEquals('Welcome '.$username.'!', $client->getResponse()->getContent()); } - public function getUsers() + public static function getUsers() { yield ['the-username', ['ROLE_FOO'], null]; yield ['the-username', ['ROLE_FOO'], 'main']; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php index aaf6ad49ccca1..9a6527b14dd62 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php @@ -52,7 +52,7 @@ public function testNormalizersAndEncodersUseDefaultContextConfigOption(string $ self::assertEquals('foo', $defaultContext['fake_context_option']); } - public function provideNormalizersAndEncodersWithDefaultContextOption(): array + public static function provideNormalizersAndEncodersWithDefaultContextOption(): array { return [ ['serializer.normalizer.constraint_violation_list.alias'], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php index ae8c7afafd425..4c1b92ccf539f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php @@ -144,7 +144,7 @@ public function testCorrectCacheControlHeadersForCacheableAction($config, $insul $this->assertSame('public, s-maxage=100', $response->headers->get('cache-control')); } - public function getConfigs() + public static function getConfigs() { return [ // configfile, insulate diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php index b182e902d7392..3f99eff48d57c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php @@ -73,12 +73,12 @@ public function getLogDir(): string return sys_get_temp_dir().'/'.$this->varDir.'/'.$this->testCase.'/logs'; } - public function registerContainerConfiguration(LoaderInterface $loader) + public function registerContainerConfiguration(LoaderInterface $loader): void { $loader->load($this->rootConfig); } - protected function build(ContainerBuilder $container) + protected function build(ContainerBuilder $container): void { $container->register('logger', NullLogger::class); $container->registerExtension(new TestDumpExtension()); @@ -117,7 +117,7 @@ public function getConfigTreeBuilder(): TreeBuilder return $treeBuilder; } - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Scheduler/bundles.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Scheduler/bundles.php new file mode 100644 index 0000000000000..13ab9fddee4a6 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Scheduler/bundles.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return [ + new FrameworkBundle(), +]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Scheduler/config.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Scheduler/config.yml new file mode 100644 index 0000000000000..e39d423f4f4cd --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Scheduler/config.yml @@ -0,0 +1,18 @@ +imports: + - { resource: ../config/default.yml } + +framework: + lock: ~ + scheduler: ~ + messenger: ~ + +services: + Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummySchedule: + autoconfigure: true + + clock: + synthetic: true + + receivers: + public: true + alias: 'messenger.receiver_locator' diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php index 404a239b51282..1e462f7d0a8f6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php @@ -64,7 +64,7 @@ public function testRequestAfterKernelShutdownAndPerformedRequest() private function getKernelMock() { $mock = $this->getMockBuilder($this->getKernelClass()) - ->setMethods(['shutdown', 'boot', 'handle', 'getContainer']) + ->onlyMethods(['shutdown', 'boot', 'handle', 'getContainer']) ->disableOriginalConstructor() ->getMock(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php index cdcaa490ac423..d89a09489baa3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php @@ -511,7 +511,7 @@ public function testBooleanContainerParametersWithinRouteCondition() $this->assertSame('1 or 0', $route->getCondition()); } - public function getNonStringValues() + public static function getNonStringValues() { return [[null], [false], [true], [new \stdClass()], [['foo', 'bar']], [[[]]]]; } @@ -591,7 +591,7 @@ public function testResolvingMethods() $this->assertEquals(['GET', 'POST'], $route->getMethods()); } - public function getContainerParameterForRoute() + public static function getContainerParameterForRoute() { yield 'String' => ['"foo"']; yield 'Integer' => [0]; @@ -609,7 +609,7 @@ private function getServiceContainer(RouteCollection $routes): Container ->willReturn($routes) ; - $sc = $this->getMockBuilder(Container::class)->setMethods(['get'])->getMock(); + $sc = $this->getMockBuilder(Container::class)->onlyMethods(['get'])->getMock(); $sc ->expects($this->once()) @@ -647,9 +647,7 @@ private function getParameterBag(array $params = []): ContainerInterface $bag ->expects($this->any()) ->method('get') - ->willReturnCallback(function ($key) use ($params) { - return $params[$key] ?? null; - }) + ->willReturnCallback(fn ($key) => $params[$key] ?? null) ; return $bag; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Test/WebTestCaseTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Test/WebTestCaseTest.php index ba3b404364342..802f676070519 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Test/WebTestCaseTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Test/WebTestCaseTest.php @@ -243,16 +243,18 @@ public function testAssertInputValueNotSame() public function testAssertCheckboxChecked() { $this->getCrawlerTester(new Crawler('
'))->assertCheckboxChecked('rememberMe'); + $this->getCrawlerTester(new Crawler(''))->assertCheckboxChecked('rememberMe'); $this->expectException(AssertionFailedError::class); - $this->expectExceptionMessage('matches selector "input[name="rememberMe"]" and has a node matching selector "input[name="rememberMe"]" with attribute "checked" of value "checked".'); + $this->expectExceptionMessage('matches selector "input[name="rememberMe"]:checked".'); $this->getCrawlerTester(new Crawler(''))->assertCheckboxChecked('rememberMe'); } public function testAssertCheckboxNotChecked() { $this->getCrawlerTester(new Crawler(''))->assertCheckboxNotChecked('rememberMe'); + $this->getCrawlerTester(new Crawler(''))->assertCheckboxNotChecked('rememberMe'); $this->expectException(AssertionFailedError::class); - $this->expectExceptionMessage('matches selector "input[name="rememberMe"]" and does not have a node matching selector "input[name="rememberMe"]" with attribute "checked" of value "checked".'); + $this->expectExceptionMessage('does not match selector "input[name="rememberMe"]:checked".'); $this->getCrawlerTester(new Crawler(''))->assertCheckboxNotChecked('rememberMe'); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php index ab5074e8dfa45..0c3fb88cc9074 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php @@ -149,18 +149,21 @@ public function testResourceFilesOptionLoadsBeforeOtherAddedResources($debug, $e $loader = $this->createMock(LoaderInterface::class); + $series = [ + /* The "messages.some_locale.loader" is passed via the resource_file option and shall be loaded first */ + [['messages.some_locale.loader', 'some_locale', 'messages'], $someCatalogue], + /* This resource is added by an addResource() call and shall be loaded after the resource_files */ + [['second_resource.some_locale.loader', 'some_locale', 'messages'], $someCatalogue], + ]; + $loader->expects($this->exactly(2)) ->method('load') - ->withConsecutive( - /* The "messages.some_locale.loader" is passed via the resource_file option and shall be loaded first */ - ['messages.some_locale.loader', 'some_locale', 'messages'], - /* This resource is added by an addResource() call and shall be loaded after the resource_files */ - ['second_resource.some_locale.loader', 'some_locale', 'messages'] - ) - ->willReturnOnConsecutiveCalls( - $someCatalogue, - $someCatalogue - ); + ->willReturnCallback(function (...$args) use (&$series) { + [$expectedArgs, $return] = array_shift($series); + $this->assertSame($expectedArgs, $args); + + return $return; + }); $options = [ 'resource_files' => ['some_locale' => ['messages.some_locale.loader']], @@ -178,7 +181,7 @@ public function testResourceFilesOptionLoadsBeforeOtherAddedResources($debug, $e $translator->trans('some_message', [], null, 'some_locale'); } - public function getDebugModeAndCacheDirCombinations() + public static function getDebugModeAndCacheDirCombinations() { return [ [false, false], diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php index 3116080f042c0..dac3b6394fce8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php @@ -118,6 +118,9 @@ public function warmUp(string $cacheDir): array return []; } + /** + * @return void + */ public function addResource(string $format, mixed $resource, string $locale, string $domain = null) { if ($this->resourceFiles) { @@ -126,6 +129,9 @@ public function addResource(string $format, mixed $resource, string $locale, str $this->resources[] = [$format, $resource, $locale, $domain]; } + /** + * @return void + */ protected function initializeCatalogue(string $locale) { $this->initialize(); @@ -145,6 +151,9 @@ protected function doLoadCatalogue(string $locale): void } } + /** + * @return void + */ protected function initialize() { if ($this->resourceFiles) { diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 096172bcf80e8..795e8bca67153 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -21,12 +21,12 @@ "ext-xml": "*", "symfony/cache": "^5.4|^6.0", "symfony/config": "^6.1", - "symfony/dependency-injection": "^6.2", + "symfony/dependency-injection": "^6.2.8", "symfony/deprecation-contracts": "^2.5|^3", "symfony/error-handler": "^6.1", "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/http-foundation": "^6.2", - "symfony/http-kernel": "^6.2.1", + "symfony/http-foundation": "^6.3", + "symfony/http-kernel": "^6.3", "symfony/polyfill-mbstring": "~1.0", "symfony/filesystem": "^5.4|^6.0", "symfony/finder": "^5.4|^6.0", @@ -38,6 +38,7 @@ "symfony/asset": "^5.4|^6.0", "symfony/browser-kit": "^5.4|^6.0", "symfony/console": "^5.4.9|^6.0.9", + "symfony/clock": "^6.2", "symfony/css-selector": "^5.4|^6.0", "symfony/dom-crawler": "^6.3", "symfony/dotenv": "^5.4|^6.0", @@ -45,7 +46,7 @@ "symfony/form": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0", "symfony/html-sanitizer": "^6.1", - "symfony/http-client": "^5.4|^6.0", + "symfony/http-client": "^6.3", "symfony/lock": "^5.4|^6.0", "symfony/mailer": "^5.4|^6.0", "symfony/messenger": "^6.3", @@ -53,14 +54,15 @@ "symfony/notifier": "^5.4|^6.0", "symfony/process": "^5.4|^6.0", "symfony/rate-limiter": "^5.4|^6.0", + "symfony/scheduler": "^6.3", "symfony/security-bundle": "^5.4|^6.0", "symfony/semaphore": "^5.4|^6.0", "symfony/serializer": "^6.1", "symfony/stopwatch": "^5.4|^6.0", "symfony/string": "^5.4|^6.0", - "symfony/translation": "^5.4|^6.0", + "symfony/translation": "^6.2.8", "symfony/twig-bundle": "^5.4|^6.0", - "symfony/validator": "^5.4|^6.0", + "symfony/validator": "^6.3", "symfony/workflow": "^5.4|^6.0", "symfony/yaml": "^5.4|^6.0", "symfony/property-info": "^5.4|^6.0", @@ -79,8 +81,8 @@ "symfony/clock": "<6.3", "symfony/console": "<5.4", "symfony/dotenv": "<5.4", - "symfony/dom-crawler": "<5.4", - "symfony/http-client": "<5.4", + "symfony/dom-crawler": "<6.3", + "symfony/http-client": "<6.3", "symfony/form": "<5.4", "symfony/lock": "<5.4", "symfony/mailer": "<5.4", @@ -92,10 +94,10 @@ "symfony/security-csrf": "<5.4", "symfony/security-core": "<5.4", "symfony/stopwatch": "<5.4", - "symfony/translation": "<5.4", + "symfony/translation": "<6.2.8", "symfony/twig-bridge": "<5.4", "symfony/twig-bundle": "<5.4", - "symfony/validator": "<5.4", + "symfony/validator": "<6.3", "symfony/web-profiler-bundle": "<5.4", "symfony/workflow": "<5.4" }, diff --git a/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md b/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md index def296d23df5e..f71cea472f7de 100644 --- a/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md @@ -10,6 +10,7 @@ CHANGELOG * Modify "icon.svg" to improve accessibility for blind/low vision users * Make `Security::login()` return the authenticator response * Deprecate the `security.firewalls.logout.csrf_token_generator` config option, use `security.firewalls.logout.csrf_token_manager` instead + * Make firewalls event dispatcher traceable on debug mode 6.2 --- diff --git a/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php index 220c51314d290..846d82dec0710 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php @@ -152,7 +152,7 @@ protected function displayFirewallSummary(string $name, FirewallContext $context ); } - private function displaySwitchUser(FirewallContext $context, SymfonyStyle $io) + private function displaySwitchUser(FirewallContext $context, SymfonyStyle $io): void { if ((null === $config = $context->getConfig()) || (null === $switchUser = $config->getSwitchUser())) { return; @@ -216,11 +216,9 @@ private function displayAuthenticators(string $name, SymfonyStyle $io): void $io->table( ['Classname'], array_map( - static function ($authenticator) { - return [ - $authenticator::class, - ]; - }, + static fn ($authenticator) => [ + $authenticator::class, + ], $authenticators ) ); diff --git a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php index 6f0e496477702..14b95bff007b1 100644 --- a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php +++ b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php @@ -55,7 +55,7 @@ public function __construct(TokenStorageInterface $tokenStorage = null, RoleHier $this->hasVarDumper = class_exists(ClassStub::class); } - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, \Throwable $exception = null): void { if (null === $this->tokenStorage) { $this->data = [ @@ -202,12 +202,12 @@ public function collect(Request $request, Response $response, \Throwable $except $this->data['authenticators'] = $this->firewall ? $this->firewall->getAuthenticatorsInfo() : []; } - public function reset() + public function reset(): void { $this->data = []; } - public function lateCollect() + public function lateCollect(): void { $this->data = $this->cloneVar($this->data); } diff --git a/src/Symfony/Bundle/SecurityBundle/Debug/TraceableFirewallListener.php b/src/Symfony/Bundle/SecurityBundle/Debug/TraceableFirewallListener.php index 45eae8f605202..bb5fe03096466 100644 --- a/src/Symfony/Bundle/SecurityBundle/Debug/TraceableFirewallListener.php +++ b/src/Symfony/Bundle/SecurityBundle/Debug/TraceableFirewallListener.php @@ -28,6 +28,9 @@ final class TraceableFirewallListener extends FirewallListener private array $wrappedListeners = []; private array $authenticatorsInfo = []; + /** + * @return array + */ public function getWrappedListeners() { return $this->wrappedListeners; @@ -38,7 +41,7 @@ public function getAuthenticatorsInfo(): array return $this->authenticatorsInfo; } - protected function callListeners(RequestEvent $event, iterable $listeners) + protected function callListeners(RequestEvent $event, iterable $listeners): void { $wrappedListeners = []; $wrappedLazyListeners = []; diff --git a/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php b/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php index a30900a5342e2..55c70ec5780d6 100644 --- a/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php +++ b/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php @@ -38,12 +38,12 @@ public function supports(Request $request): ?bool return $this->listener->supports($request); } - public function authenticate(RequestEvent $event) + public function authenticate(RequestEvent $event): void { $startTime = microtime(true); try { - $ret = $this->listener->authenticate($event); + $this->listener->authenticate($event); } catch (LazyResponseException $e) { $this->response = $e->getResponse(); @@ -53,7 +53,5 @@ public function authenticate(RequestEvent $event) } $this->response = $event->getResponse(); - - return $ret; } } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php index 607d1f06c927d..08d7fd9213df8 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php @@ -22,6 +22,9 @@ */ class AddExpressionLanguageProvidersPass implements CompilerPassInterface { + /** + * @return void + */ public function process(ContainerBuilder $container) { if ($container->has('security.expression_language')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php index 273a0db67fddf..ccf474087af5d 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php @@ -29,6 +29,9 @@ class AddSecurityVotersPass implements CompilerPassInterface { use PriorityTaggedServiceTrait; + /** + * @return void + */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('security.access.decision_manager')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php index 5b107b5ef0dfc..9a7a94ca08786 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php @@ -21,6 +21,9 @@ */ class AddSessionDomainConstraintPass implements CompilerPassInterface { + /** + * @return void + */ public function process(ContainerBuilder $container) { if (!$container->hasParameter('session.storage.options') || !$container->has('security.http_utils')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php index fb4b6f83dc3b8..2041a36b3806d 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php @@ -21,6 +21,9 @@ */ class CleanRememberMeVerifierPass implements CompilerPassInterface { + /** + * @return void + */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('cache.system')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/MakeFirewallsEventDispatcherTraceablePass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/MakeFirewallsEventDispatcherTraceablePass.php new file mode 100644 index 0000000000000..e7c77d1ec31d8 --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/MakeFirewallsEventDispatcherTraceablePass.php @@ -0,0 +1,73 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; + +/** + * @author Mathieu Lechat + */ +class MakeFirewallsEventDispatcherTraceablePass implements CompilerPassInterface +{ + /** + * @return void + */ + public function process(ContainerBuilder $container) + { + if (!$container->has('event_dispatcher') || !$container->hasParameter('security.firewalls')) { + return; + } + + if (!$container->getParameter('kernel.debug') || !$container->has('debug.stopwatch')) { + return; + } + + $dispatchersId = []; + + foreach ($container->getParameter('security.firewalls') as $firewallName) { + $dispatcherId = 'security.event_dispatcher.'.$firewallName; + + if (!$container->has($dispatcherId)) { + continue; + } + + $dispatchersId[$dispatcherId] = 'debug.'.$dispatcherId; + + $container->register($dispatchersId[$dispatcherId], TraceableEventDispatcher::class) + ->setDecoratedService($dispatcherId) + ->setArguments([ + new Reference($dispatchersId[$dispatcherId].'.inner'), + new Reference('debug.stopwatch'), + new Reference('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE), + new Reference('request_stack', ContainerInterface::NULL_ON_INVALID_REFERENCE), + ]); + } + + foreach (['kernel.event_subscriber', 'kernel.event_listener'] as $tagName) { + foreach ($container->findTaggedServiceIds($tagName) as $taggedServiceId => $tags) { + $taggedServiceDefinition = $container->findDefinition($taggedServiceId); + $taggedServiceDefinition->clearTag($tagName); + + foreach ($tags as $tag) { + if ($dispatcherId = $tag['dispatcher'] ?? null) { + $tag['dispatcher'] = $dispatchersId[$dispatcherId] ?? $dispatcherId; + } + $taggedServiceDefinition->addTag($tagName, $tag); + } + } + } + } +} diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterCsrfFeaturesPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterCsrfFeaturesPass.php index a0d6206134031..3564f7c1fd38a 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterCsrfFeaturesPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterCsrfFeaturesPass.php @@ -26,13 +26,13 @@ */ class RegisterCsrfFeaturesPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { $this->registerCsrfProtectionListener($container); $this->registerLogoutHandler($container); } - private function registerCsrfProtectionListener(ContainerBuilder $container) + private function registerCsrfProtectionListener(ContainerBuilder $container): void { if (!$container->has('security.authenticator.manager') || !$container->has('security.csrf.token_manager')) { return; @@ -44,7 +44,7 @@ private function registerCsrfProtectionListener(ContainerBuilder $container) ->setPublic(false); } - protected function registerLogoutHandler(ContainerBuilder $container) + protected function registerLogoutHandler(ContainerBuilder $container): void { if (!$container->has('security.logout_listener') || !$container->has('security.csrf.token_storage')) { return; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterEntryPointPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterEntryPointPass.php index 6de49517f3405..3ca2a70acb934 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterEntryPointPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterEntryPointPass.php @@ -23,6 +23,9 @@ */ class RegisterEntryPointPass implements CompilerPassInterface { + /** + * @return void + */ public function process(ContainerBuilder $container) { if (!$container->hasParameter('security.firewalls')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php index 8eac2cf83a8c0..5d581aac7ccd8 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php @@ -52,7 +52,7 @@ class RegisterGlobalSecurityEventListenersPass implements CompilerPassInterface SecurityEvents::INTERACTIVE_LOGIN, ]; - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->has('event_dispatcher') || !$container->hasParameter('security.firewalls')) { return; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterLdapLocatorPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterLdapLocatorPass.php index 295f363292245..8221aa53aa783 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterLdapLocatorPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterLdapLocatorPass.php @@ -25,7 +25,7 @@ */ class RegisterLdapLocatorPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { $definition = $container->setDefinition('security.ldap_locator', new Definition(ServiceLocator::class)); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php index fdffab1bbf395..1d1e47cfe15ec 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php @@ -27,7 +27,7 @@ */ class RegisterTokenUsageTrackingPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->has('security.untracked_token_storage')) { return; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/SortFirewallListenersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/SortFirewallListenersPass.php index 6d49320445c10..7f0301a3edab7 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/SortFirewallListenersPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/SortFirewallListenersPass.php @@ -45,9 +45,7 @@ private function sortFirewallContextListeners(Definition $definition, ContainerB $prioritiesByServiceId = $this->getListenerPriorities($listenerIteratorArgument, $container); $listeners = $listenerIteratorArgument->getValues(); - usort($listeners, function (Reference $a, Reference $b) use ($prioritiesByServiceId) { - return $prioritiesByServiceId[(string) $b] <=> $prioritiesByServiceId[(string) $a]; - }); + usort($listeners, fn (Reference $a, Reference $b) => $prioritiesByServiceId[(string) $b] <=> $prioritiesByServiceId[(string) $a]); $listenerIteratorArgument->setValues(array_values($listeners)); } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php index 44d925c1f1c0b..c6ba45edc2e47 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php @@ -78,15 +78,15 @@ public function getConfigTreeBuilder(): TreeBuilder ->booleanNode('allow_if_equal_granted_denied')->defaultTrue()->end() ->end() ->validate() - ->ifTrue(function ($v) { return isset($v['strategy'], $v['service']); }) + ->ifTrue(fn ($v) => isset($v['strategy'], $v['service'])) ->thenInvalid('"strategy" and "service" cannot be used together.') ->end() ->validate() - ->ifTrue(function ($v) { return isset($v['strategy'], $v['strategy_service']); }) + ->ifTrue(fn ($v) => isset($v['strategy'], $v['strategy_service'])) ->thenInvalid('"strategy" and "strategy_service" cannot be used together.') ->end() ->validate() - ->ifTrue(function ($v) { return isset($v['service'], $v['strategy_service']); }) + ->ifTrue(fn ($v) => isset($v['service'], $v['strategy_service'])) ->thenInvalid('"service" and "strategy_service" cannot be used together.') ->end() ->end() @@ -102,7 +102,7 @@ public function getConfigTreeBuilder(): TreeBuilder return $tb; } - private function addRoleHierarchySection(ArrayNodeDefinition $rootNode) + private function addRoleHierarchySection(ArrayNodeDefinition $rootNode): void { $rootNode ->fixXmlConfig('role', 'role_hierarchy') @@ -111,10 +111,10 @@ private function addRoleHierarchySection(ArrayNodeDefinition $rootNode) ->useAttributeAsKey('id') ->prototype('array') ->performNoDeepMerging() - ->beforeNormalization()->ifString()->then(function ($v) { return ['value' => $v]; })->end() + ->beforeNormalization()->ifString()->then(fn ($v) => ['value' => $v])->end() ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && isset($v['value']); }) - ->then(function ($v) { return preg_split('/\s*,\s*/', $v['value']); }) + ->ifTrue(fn ($v) => \is_array($v) && isset($v['value'])) + ->then(fn ($v) => preg_split('/\s*,\s*/', $v['value'])) ->end() ->prototype('scalar')->end() ->end() @@ -123,7 +123,7 @@ private function addRoleHierarchySection(ArrayNodeDefinition $rootNode) ; } - private function addAccessControlSection(ArrayNodeDefinition $rootNode) + private function addAccessControlSection(ArrayNodeDefinition $rootNode): void { $rootNode ->fixXmlConfig('rule', 'access_control') @@ -175,7 +175,7 @@ private function addAccessControlSection(ArrayNodeDefinition $rootNode) /** * @param array $factories */ - private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $factories) + private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $factories): void { $firewallNodeBuilder = $rootNode ->fixXmlConfig('firewall') @@ -251,6 +251,15 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto ->scalarNode('path')->defaultValue('/logout')->end() ->scalarNode('target')->defaultValue('/')->end() ->booleanNode('invalidate_session')->defaultTrue()->end() + ->arrayNode('clear_site_data') + ->performNoDeepMerging() + ->beforeNormalization()->ifString()->then(fn ($v) => $v ? array_map('trim', explode(',', $v)) : [])->end() + ->enumPrototype() + ->values([ + '*', 'cache', 'cookies', 'storage', 'executionContexts', + ]) + ->end() + ->end() ->end() ->fixXmlConfig('delete_cookie') ->children() @@ -324,9 +333,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto $firewallNodeBuilder ->end() ->validate() - ->ifTrue(function ($v) { - return true === $v['security'] && isset($v['pattern']) && !isset($v['request_matcher']); - }) + ->ifTrue(fn ($v) => true === $v['security'] && isset($v['pattern']) && !isset($v['request_matcher'])) ->then(function ($firewall) use ($abstractFactoryKeys) { foreach ($abstractFactoryKeys as $k) { if (!isset($firewall[$k]['check_path'])) { @@ -344,7 +351,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto ; } - private function addProvidersSection(ArrayNodeDefinition $rootNode) + private function addProvidersSection(ArrayNodeDefinition $rootNode): void { $providerNodeBuilder = $rootNode ->fixXmlConfig('provider') @@ -375,7 +382,7 @@ private function addProvidersSection(ArrayNodeDefinition $rootNode) ->arrayNode('providers') ->beforeNormalization() ->ifString() - ->then(function ($v) { return preg_split('/\s*,\s*/', $v); }) + ->then(fn ($v) => preg_split('/\s*,\s*/', $v)) ->end() ->prototype('scalar')->end() ->end() @@ -393,17 +400,17 @@ private function addProvidersSection(ArrayNodeDefinition $rootNode) $providerNodeBuilder ->validate() - ->ifTrue(function ($v) { return \count($v) > 1; }) + ->ifTrue(fn ($v) => \count($v) > 1) ->thenInvalid('You cannot set multiple provider types for the same provider') ->end() ->validate() - ->ifTrue(function ($v) { return 0 === \count($v); }) + ->ifTrue(fn ($v) => 0 === \count($v)) ->thenInvalid('You must set a provider definition for the provider.') ->end() ; } - private function addPasswordHashersSection(ArrayNodeDefinition $rootNode) + private function addPasswordHashersSection(ArrayNodeDefinition $rootNode): void { $rootNode ->fixXmlConfig('password_hasher') diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php index b0c6b5c0ecb79..24eb1377c51c2 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php @@ -14,7 +14,6 @@ use Symfony\Component\Config\Definition\Builder\NodeDefinition; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; /** * AbstractFactory is the base class for all classes inheriting from @@ -53,6 +52,9 @@ final public function addOption(string $name, mixed $default = null): void $this->options[$name] = $default; } + /** + * @return void + */ public function addConfiguration(NodeDefinition $node) { $builder = $node->children(); @@ -73,6 +75,9 @@ public function addConfiguration(NodeDefinition $node) } } + /** + * @return string + */ protected function createAuthenticationSuccessHandler(ContainerBuilder $container, string $id, array $config) { $successHandlerId = $this->getSuccessHandlerId($id); @@ -80,7 +85,7 @@ protected function createAuthenticationSuccessHandler(ContainerBuilder $containe if (isset($config['success_handler'])) { $successHandler = $container->setDefinition($successHandlerId, new ChildDefinition('security.authentication.custom_success_handler')); - $successHandler->replaceArgument(0, new Reference($config['success_handler'])); + $successHandler->replaceArgument(0, new ChildDefinition($config['success_handler'])); $successHandler->replaceArgument(1, $options); $successHandler->replaceArgument(2, $id); } else { @@ -92,6 +97,9 @@ protected function createAuthenticationSuccessHandler(ContainerBuilder $containe return $successHandlerId; } + /** + * @return string + */ protected function createAuthenticationFailureHandler(ContainerBuilder $container, string $id, array $config) { $id = $this->getFailureHandlerId($id); @@ -99,7 +107,7 @@ protected function createAuthenticationFailureHandler(ContainerBuilder $containe if (isset($config['failure_handler'])) { $failureHandler = $container->setDefinition($id, new ChildDefinition('security.authentication.custom_failure_handler')); - $failureHandler->replaceArgument(0, new Reference($config['failure_handler'])); + $failureHandler->replaceArgument(0, new ChildDefinition($config['failure_handler'])); $failureHandler->replaceArgument(1, $options); } else { $failureHandler = $container->setDefinition($id, new ChildDefinition('security.authentication.failure_handler')); @@ -109,11 +117,17 @@ protected function createAuthenticationFailureHandler(ContainerBuilder $containe return $id; } + /** + * @return string + */ protected function getSuccessHandlerId(string $id) { return 'security.authentication.success_handler.'.$id.'.'.str_replace('-', '_', $this->getKey()); } + /** + * @return string + */ protected function getFailureHandlerId(string $id) { return 'security.authentication.failure_handler.'.$id.'.'.str_replace('-', '_', $this->getKey()); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AccessTokenFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AccessTokenFactory.php index a3ed0e3ee0839..a59a9a6f3ede0 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AccessTokenFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AccessTokenFactory.php @@ -46,7 +46,7 @@ public function addConfiguration(NodeDefinition $node): void ->fixXmlConfig('token_extractors') ->beforeNormalization() ->ifString() - ->then(static function (string $v): array { return [$v]; }) + ->then(static fn (string $v): array => [$v]) ->end() ->cannotBeEmpty() ->defaultValue([ @@ -97,9 +97,7 @@ private function createExtractor(ContainerBuilder $container, string $firewallNa 'request_body' => 'security.access_token_extractor.request_body', 'header' => 'security.access_token_extractor.header', ]; - $extractors = array_map(static function (string $extractor) use ($aliases): string { - return $aliases[$extractor] ?? $extractor; - }, $extractors); + $extractors = array_map(static fn (string $extractor): string => $aliases[$extractor] ?? $extractor, $extractors); if (1 === \count($extractors)) { return current($extractors); @@ -107,7 +105,7 @@ private function createExtractor(ContainerBuilder $container, string $firewallNa $extractorId = sprintf('security.authenticator.access_token.chain_extractor.%s', $firewallName); $container ->setDefinition($extractorId, new ChildDefinition('security.authenticator.access_token.chain_extractor')) - ->replaceArgument(0, array_map(function (string $extractorId): Reference {return new Reference($extractorId); }, $extractors)) + ->replaceArgument(0, array_map(fn (string $extractorId): Reference => new Reference($extractorId), $extractors)) ; return $extractorId; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php index 1ef3f74f79aa5..8082b6f3524b5 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php @@ -30,11 +30,16 @@ public function getPriority(): int; */ public function getKey(): string; + /** + * @return void + */ public function addConfiguration(NodeDefinition $builder); /** * Creates the authenticator service(s) for the provided configuration. * + * @param array $config + * * @return string|string[] The authenticator service ID(s) to be used by the firewall */ public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string|array; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/CustomAuthenticatorFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/CustomAuthenticatorFactory.php index 269b6e85a925d..e443122e6cf10 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/CustomAuthenticatorFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/CustomAuthenticatorFactory.php @@ -35,7 +35,7 @@ public function getKey(): string /** * @param ArrayNodeDefinition $builder */ - public function addConfiguration(NodeDefinition $builder) + public function addConfiguration(NodeDefinition $builder): void { $builder ->info('An array of service ids for all of your "authenticators"') @@ -47,7 +47,7 @@ public function addConfiguration(NodeDefinition $builder) $factoryRootNode ->fixXmlConfig('custom_authenticator') ->validate() - ->ifTrue(function ($v) { return isset($v['custom_authenticators']) && empty($v['custom_authenticators']); }) + ->ifTrue(fn ($v) => isset($v['custom_authenticators']) && empty($v['custom_authenticators'])) ->then(function ($v) { unset($v['custom_authenticators']); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FirewallListenerFactoryInterface.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FirewallListenerFactoryInterface.php index c4842010a779f..443ced6c4c936 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FirewallListenerFactoryInterface.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FirewallListenerFactoryInterface.php @@ -23,6 +23,8 @@ interface FirewallListenerFactoryInterface /** * Creates the firewall listener services for the provided configuration. * + * @param array $config + * * @return string[] The listener service IDs to be used by the firewall */ public function createListeners(ContainerBuilder $container, string $firewallName, array $config): array; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php index bc5ce52376c0f..177fda4feb5a4 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php @@ -50,7 +50,7 @@ public function getKey(): string return 'form-login'; } - public function addConfiguration(NodeDefinition $node) + public function addConfiguration(NodeDefinition $node): void { parent::addConfiguration($node); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php index a439ca0adf316..705d079c5d73e 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php @@ -25,7 +25,7 @@ class FormLoginLdapFactory extends FormLoginFactory { use LdapFactoryTrait; - public function addConfiguration(NodeDefinition $node) + public function addConfiguration(NodeDefinition $node): void { parent::addConfiguration($node); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php index 02f2009ac1eca..45d78508de6bc 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php @@ -48,7 +48,7 @@ public function getKey(): string return 'http-basic'; } - public function addConfiguration(NodeDefinition $node) + public function addConfiguration(NodeDefinition $node): void { $node ->children() diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php index 0c63b21c63aaa..3d7946115c433 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php @@ -70,7 +70,7 @@ public function create(ContainerBuilder $container, string $id, array $config, s return [$provider, $listenerId, $entryPointId]; } - public function addConfiguration(NodeDefinition $node) + public function addConfiguration(NodeDefinition $node): void { parent::addConfiguration($node); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php index 3b4ff7a048df2..61266854c8f5e 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php @@ -22,7 +22,7 @@ class JsonLoginLdapFactory extends JsonLoginFactory { use LdapFactoryTrait; - public function addConfiguration(NodeDefinition $node) + public function addConfiguration(NodeDefinition $node): void { parent::addConfiguration($node); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginLinkFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginLinkFactory.php index 29b588631bc0a..9a03a0f066744 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginLinkFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginLinkFactory.php @@ -28,7 +28,7 @@ class LoginLinkFactory extends AbstractFactory { public const PRIORITY = -20; - public function addConfiguration(NodeDefinition $node) + public function addConfiguration(NodeDefinition $node): void { /** @var NodeBuilder $builder */ $builder = $node->fixXmlConfig('signature_property', 'signature_properties')->children(); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php index 6356702cc5d0b..4092f3e837f4c 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php @@ -44,7 +44,7 @@ public function getKey(): string /** * @param ArrayNodeDefinition $builder */ - public function addConfiguration(NodeDefinition $builder) + public function addConfiguration(NodeDefinition $builder): void { $builder ->children() @@ -87,7 +87,7 @@ public function createAuthenticator(ContainerBuilder $container, string $firewal return []; } - private function registerRateLimiter(ContainerBuilder $container, string $name, array $limiterConfig) + private function registerRateLimiter(ContainerBuilder $container, string $name, array $limiterConfig): void { // default configuration (when used by other DI extensions) $limiterConfig += ['lock_factory' => 'lock.factory', 'cache_pool' => 'cache.rate_limiter']; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php index d3ec4633cf5ce..a9a679ffc3d51 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php @@ -133,7 +133,7 @@ public function getKey(): string return 'remember-me'; } - public function addConfiguration(NodeDefinition $node) + public function addConfiguration(NodeDefinition $node): void { $builder = $node ->fixXmlConfig('user_provider') @@ -148,7 +148,7 @@ public function addConfiguration(NodeDefinition $node) ->scalarNode('service')->end() ->arrayNode('user_providers') ->beforeNormalization() - ->ifString()->then(function ($v) { return [$v]; }) + ->ifString()->then(fn ($v) => [$v]) ->end() ->prototype('scalar')->end() ->end() @@ -162,7 +162,7 @@ public function addConfiguration(NodeDefinition $node) ->end() ->arrayNode('token_provider') ->beforeNormalization() - ->ifString()->then(function ($v) { return ['service' => $v]; }) + ->ifString()->then(fn ($v) => ['service' => $v]) ->end() ->children() ->scalarNode('service')->info('The service ID of a custom rememberme token provider.')->end() @@ -235,7 +235,7 @@ private function createTokenVerifier(ContainerBuilder $container, string $firewa return new Reference($tokenVerifierId, ContainerInterface::NULL_ON_INVALID_REFERENCE); } - public function prepend(ContainerBuilder $container) + public function prepend(ContainerBuilder $container): void { $rememberMeSecureDefault = false; $rememberMeSameSiteDefault = null; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RemoteUserFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RemoteUserFactory.php index de79af1494f42..97d50008b5baf 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RemoteUserFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RemoteUserFactory.php @@ -51,7 +51,7 @@ public function getKey(): string return 'remote-user'; } - public function addConfiguration(NodeDefinition $node) + public function addConfiguration(NodeDefinition $node): void { $node ->children() diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php index 77840005c5fc9..2d28e2b684b74 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php @@ -52,7 +52,7 @@ public function getKey(): string return 'x509'; } - public function addConfiguration(NodeDefinition $node) + public function addConfiguration(NodeDefinition $node): void { $node ->children() diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php index 0abb1ce247f5e..936f58a084222 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php @@ -24,6 +24,9 @@ */ class InMemoryFactory implements UserProviderFactoryInterface { + /** + * @return void + */ public function create(ContainerBuilder $container, string $id, array $config) { $definition = $container->setDefinition($id, new ChildDefinition('security.user.provider.in_memory')); @@ -37,11 +40,17 @@ public function create(ContainerBuilder $container, string $id, array $config) $definition->addArgument($users); } + /** + * @return string + */ public function getKey() { return 'memory'; } + /** + * @return void + */ public function addConfiguration(NodeDefinition $node) { $node @@ -54,7 +63,7 @@ public function addConfiguration(NodeDefinition $node) ->children() ->scalarNode('password')->defaultNull()->end() ->arrayNode('roles') - ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() + ->beforeNormalization()->ifString()->then(fn ($v) => preg_split('/\s*,\s*/', $v))->end() ->prototype('scalar')->end() ->end() ->end() diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php index c2a334369ca0c..2f4dca01d1598 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php @@ -24,6 +24,9 @@ */ class LdapFactory implements UserProviderFactoryInterface { + /** + * @return void + */ public function create(ContainerBuilder $container, string $id, array $config) { $container @@ -40,11 +43,17 @@ public function create(ContainerBuilder $container, string $id, array $config) ; } + /** + * @return string + */ public function getKey() { return 'ldap'; } + /** + * @return void + */ public function addConfiguration(NodeDefinition $node) { $node @@ -59,7 +68,7 @@ public function addConfiguration(NodeDefinition $node) ->prototype('scalar')->end() ->end() ->arrayNode('default_roles') - ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() + ->beforeNormalization()->ifString()->then(fn ($v) => preg_split('/\s*,\s*/', $v))->end() ->requiresAtLeastOneElement() ->prototype('scalar')->end() ->end() diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php index 6d9481c59cb4a..a2c5815e4bfac 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php @@ -22,9 +22,18 @@ */ interface UserProviderFactoryInterface { + /** + * @return void + */ public function create(ContainerBuilder $container, string $id, array $config); + /** + * @return string + */ public function getKey(); + /** + * @return void + */ public function addConfiguration(NodeDefinition $builder); } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php index d1724dd81b621..37978b285f3d7 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php @@ -78,6 +78,9 @@ class SecurityExtension extends Extension implements PrependExtensionInterface private array $sortedFactories = []; private array $userProviderFactories = []; + /** + * @return void + */ public function prepend(ContainerBuilder $container) { foreach ($this->getSortedFactories() as $factory) { @@ -87,6 +90,9 @@ public function prepend(ContainerBuilder $container) } } + /** + * @return void + */ public function load(array $configs, ContainerBuilder $container) { if (!array_filter($configs)) { @@ -200,7 +206,7 @@ private function createStrategyDefinition(string $strategy, bool $allowIfAllAbst }; } - private function createRoleHierarchy(array $config, ContainerBuilder $container) + private function createRoleHierarchy(array $config, ContainerBuilder $container): void { if (!isset($config['role_hierarchy']) || 0 === \count($config['role_hierarchy'])) { $container->removeDefinition('security.access.role_hierarchy_voter'); @@ -212,7 +218,7 @@ private function createRoleHierarchy(array $config, ContainerBuilder $container) $container->removeDefinition('security.access.simple_role_voter'); } - private function createAuthorization(array $config, ContainerBuilder $container) + private function createAuthorization(array $config, ContainerBuilder $container): void { foreach ($config['access_control'] as $access) { if (isset($access['request_matcher'])) { @@ -265,7 +271,7 @@ private function createAuthorization(array $config, ContainerBuilder $container) } } - private function createFirewalls(array $config, ContainerBuilder $container) + private function createFirewalls(array $config, ContainerBuilder $container): void { if (!isset($config['firewalls'])) { return; @@ -353,7 +359,7 @@ private function createFirewalls(array $config, ContainerBuilder $container) } } - private function createFirewall(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, array $providerIds, string $configId) + private function createFirewall(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, array $providerIds, string $configId): array { $config = $container->setDefinition($configId, new ChildDefinition('security.firewall.config')); $config->replaceArgument(0, $id); @@ -451,8 +457,7 @@ private function createFirewall(ContainerBuilder $container, string $id, array $ 'logout_path' => $firewall['logout']['path'], ]); - $logoutSuccessListenerId = 'security.logout.listener.default.'.$id; - $container->setDefinition($logoutSuccessListenerId, new ChildDefinition('security.logout.listener.default')) + $container->setDefinition('security.logout.listener.default.'.$id, new ChildDefinition('security.logout.listener.default')) ->replaceArgument(1, $firewall['logout']['target']) ->addTag('kernel.event_subscriber', ['dispatcher' => $firewallEventDispatcherId]); @@ -474,6 +479,13 @@ private function createFirewall(ContainerBuilder $container, string $id, array $ ->addTag('kernel.event_subscriber', ['dispatcher' => $firewallEventDispatcherId]); } + // add clear site data listener + if ($firewall['logout']['clear_site_data'] ?? false) { + $container->setDefinition('security.logout.listener.clear_site_data.'.$id, new ChildDefinition('security.logout.listener.clear_site_data')) + ->addArgument($firewall['logout']['clear_site_data']) + ->addTag('kernel.event_subscriber', ['dispatcher' => $firewallEventDispatcherId]); + } + // register with LogoutUrlGenerator $container ->getDefinition('security.logout_url_generator') @@ -501,9 +513,7 @@ private function createFirewall(ContainerBuilder $container, string $id, array $ $configuredEntryPoint = $defaultEntryPoint; // authenticator manager - $authenticators = array_map(function ($id) { - return new Reference($id); - }, $firewallAuthenticationProviders); + $authenticators = array_map(fn ($id) => new Reference($id), $firewallAuthenticationProviders); $container ->setDefinition($managerId = 'security.authenticator.manager.'.$id, new ChildDefinition('security.authenticator.manager')) ->replaceArgument(0, $authenticators) @@ -601,7 +611,7 @@ private function createContextListener(ContainerBuilder $container, string $cont return $this->contextListeners[$contextKey] = $listenerId; } - private function createAuthenticationListeners(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, ?string $defaultProvider, array $providerIds, ?string $defaultEntryPoint, string $contextListenerId = null) + private function createAuthenticationListeners(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, ?string $defaultProvider, array $providerIds, ?string $defaultEntryPoint, string $contextListenerId = null): array { $listeners = []; $entryPoints = []; @@ -694,7 +704,7 @@ private function createMissingUserProvider(ContainerBuilder $container, string $ return $userProvider; } - private function createHashers(array $hashers, ContainerBuilder $container) + private function createHashers(array $hashers, ContainerBuilder $container): void { $hasherMap = []; foreach ($hashers as $class => $hasher) { @@ -707,7 +717,12 @@ private function createHashers(array $hashers, ContainerBuilder $container) ; } - private function createHasher(array $config) + /** + * @param array $config + * + * @return Reference|array + */ + private function createHasher(array $config): Reference|array { // a custom hasher service if (isset($config['id'])) { @@ -998,13 +1013,13 @@ private function createRequestMatcher(ContainerBuilder $container, string $path return $this->requestMatchers[$id] = new Reference($id); } - public function addAuthenticatorFactory(AuthenticatorFactoryInterface $factory) + public function addAuthenticatorFactory(AuthenticatorFactoryInterface $factory): void { $this->factories[] = [$factory->getPriority(), $factory]; $this->sortedFactories = []; } - public function addUserProviderFactory(UserProviderFactoryInterface $factory) + public function addUserProviderFactory(UserProviderFactoryInterface $factory): void { $this->userProviderFactories[] = $factory; } @@ -1027,9 +1042,7 @@ public function getConfiguration(array $config, ContainerBuilder $container): ?C private function isValidIps(string|array $ips): bool { - $ipsList = array_reduce((array) $ips, static function (array $ips, string $ip) { - return array_merge($ips, preg_split('/\s*,\s*/', $ip)); - }, []); + $ipsList = array_reduce((array) $ips, static fn (array $ips, string $ip) => array_merge($ips, preg_split('/\s*,\s*/', $ip)), []); if (!$ipsList) { return false; @@ -1081,9 +1094,7 @@ private function getSortedFactories(): array $factories[] = array_merge($factory, [$i]); } - usort($factories, function ($a, $b) { - return $b[0] <=> $a[0] ?: $a[2] <=> $b[2]; - }); + usort($factories, fn ($a, $b) => $b[0] <=> $a[0] ?: $a[2] <=> $b[2]); $this->sortedFactories = array_column($factories, 1); } diff --git a/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php b/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php index 9e91f3930ab08..0c703f79cfb43 100644 --- a/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php +++ b/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php @@ -36,6 +36,9 @@ public function __construct(FirewallMapInterface $map, EventDispatcherInterface parent::__construct($map, $dispatcher); } + /** + * @return void + */ public function configureLogoutUrlGenerator(RequestEvent $event) { if (!$event->isMainRequest()) { @@ -47,6 +50,9 @@ public function configureLogoutUrlGenerator(RequestEvent $event) } } + /** + * @return void + */ public function onKernelFinishRequest(FinishRequestEvent $event) { if ($event->isMainRequest()) { diff --git a/src/Symfony/Bundle/SecurityBundle/EventListener/VoteListener.php b/src/Symfony/Bundle/SecurityBundle/EventListener/VoteListener.php index ef715f5271a34..34ca91c3a7735 100644 --- a/src/Symfony/Bundle/SecurityBundle/EventListener/VoteListener.php +++ b/src/Symfony/Bundle/SecurityBundle/EventListener/VoteListener.php @@ -31,10 +31,7 @@ public function __construct(TraceableAccessDecisionManager $traceableAccessDecis $this->traceableAccessDecisionManager = $traceableAccessDecisionManager; } - /** - * Event dispatched by a voter during access manager decision. - */ - public function onVoterVote(VoteEvent $event) + public function onVoterVote(VoteEvent $event): void { $this->traceableAccessDecisionManager->addVoterVote($event->getVoter(), $event->getAttributes(), $event->getVote()); } diff --git a/src/Symfony/Bundle/SecurityBundle/LICENSE b/src/Symfony/Bundle/SecurityBundle/LICENSE index 008370457251e..0138f8f071351 100644 --- a/src/Symfony/Bundle/SecurityBundle/LICENSE +++ b/src/Symfony/Bundle/SecurityBundle/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2023 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/schema/security-1.0.xsd b/src/Symfony/Bundle/SecurityBundle/Resources/config/schema/security-1.0.xsd index 33140fdae8d11..f0835052a6848 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/config/schema/security-1.0.xsd +++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/schema/security-1.0.xsd @@ -171,9 +171,10 @@ - + - + + @@ -407,4 +408,14 @@ + + + + + + + + + + diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security.php b/src/Symfony/Bundle/SecurityBundle/Resources/config/security.php index 9cff34b0a2835..fa7c0fe37e8eb 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security.php +++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security.php @@ -83,7 +83,7 @@ service_locator([ 'security.token_storage' => service('security.token_storage'), 'security.authorization_checker' => service('security.authorization_checker'), - 'security.user_authenticator' => service('security.user_authenticator')->ignoreOnInvalid(), + 'security.authenticator.managers_locator' => service('security.authenticator.managers_locator')->ignoreOnInvalid(), 'request_stack' => service('request_stack'), 'security.firewall.map' => service('security.firewall.map'), 'security.user_checker' => service('security.user_checker'), @@ -100,13 +100,16 @@ ->args([ service('security.token_storage'), ]) - ->tag('controller.argument_value_resolver', ['priority' => 120]) + ->tag('controller.argument_value_resolver', ['priority' => 120, 'name' => UserValueResolver::class]) // Authentication related services ->set('security.authentication.trust_resolver', AuthenticationTrustResolver::class) ->set('security.authentication.session_strategy', SessionAuthenticationStrategy::class) - ->args([param('security.authentication.session_strategy.strategy')]) + ->args([ + param('security.authentication.session_strategy.strategy'), + service('security.csrf.token_storage')->ignoreOnInvalid(), + ]) ->alias(SessionAuthenticationStrategyInterface::class, 'security.authentication.session_strategy') ->set('security.authentication.session_strategy_noop', SessionAuthenticationStrategy::class) diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.php b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.php index 921aa90b8d730..952b1d75625ad 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.php +++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.php @@ -17,6 +17,7 @@ use Symfony\Component\Security\Http\Authentication\CustomAuthenticationSuccessHandler; use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler; use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler; +use Symfony\Component\Security\Http\EventListener\ClearSiteDataLogoutListener; use Symfony\Component\Security\Http\EventListener\CookieClearingLogoutListener; use Symfony\Component\Security\Http\EventListener\DefaultLogoutListener; use Symfony\Component\Security\Http\EventListener\SessionLogoutListener; @@ -64,6 +65,9 @@ ->set('security.logout.listener.session', SessionLogoutListener::class) ->abstract() + ->set('security.logout.listener.clear_site_data', ClearSiteDataLogoutListener::class) + ->abstract() + ->set('security.logout.listener.cookie_clearing', CookieClearingLogoutListener::class) ->abstract() diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig index 4a5fa01a9e3bc..48e6c95998c7a 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -2,6 +2,35 @@ {% block page_title 'Security' %} +{% block head %} + {{ parent() }} + + +{% endblock %} + {% block toolbar %} {% if collector.firewall %} {% set icon %} diff --git a/src/Symfony/Bundle/SecurityBundle/Security.php b/src/Symfony/Bundle/SecurityBundle/Security.php index 1ef5a50008c9c..d5cd800e020a8 100644 --- a/src/Symfony/Bundle/SecurityBundle/Security.php +++ b/src/Symfony/Bundle/SecurityBundle/Security.php @@ -72,7 +72,7 @@ public function login(UserInterface $user, string $authenticatorName = null, str $this->container->get('security.user_checker')->checkPreAuth($user); - return $this->container->get('security.user_authenticator')->authenticateUser($user, $authenticator, $request); + return $this->container->get('security.authenticator.managers_locator')->get($firewallName)->authenticateUser($user, $authenticator, $request); } /** diff --git a/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php b/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php index a81f6d8983113..5077c6768d95e 100644 --- a/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php +++ b/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php @@ -38,6 +38,9 @@ public function __construct(iterable $listeners, ExceptionListener $exceptionLis $this->config = $config; } + /** + * @return FirewallConfig|null + */ public function getConfig() { return $this->config; @@ -51,11 +54,17 @@ public function getListeners(): iterable return $this->listeners; } + /** + * @return ExceptionListener|null + */ public function getExceptionListener() { return $this->exceptionListener; } + /** + * @return LogoutListener|null + */ public function getLogoutListener() { return $this->logoutListener; diff --git a/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php b/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php index 3d90b1690a589..bf30dafbee612 100644 --- a/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php +++ b/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php @@ -15,6 +15,7 @@ use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSecurityVotersPass; use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSessionDomainConstraintPass; use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\CleanRememberMeVerifierPass; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\MakeFirewallsEventDispatcherTraceablePass; use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\RegisterCsrfFeaturesPass; use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\RegisterEntryPointPass; use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\RegisterGlobalSecurityEventListenersPass; @@ -52,6 +53,9 @@ */ class SecurityBundle extends Bundle { + /** + * @return void + */ public function build(ContainerBuilder $container) { parent::build($container); @@ -92,5 +96,8 @@ public function build(ContainerBuilder $container) AuthenticationEvents::ALIASES, SecurityEvents::ALIASES ))); + + // must be registered before DecoratorServicePass + $container->addCompilerPass(new MakeFirewallsEventDispatcherTraceablePass(), PassConfig::TYPE_OPTIMIZE, 10); } } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/CacheWarmer/ExpressionCacheWarmerTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/CacheWarmer/ExpressionCacheWarmerTest.php index 53b16fcdf7774..d32e2d5de560f 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/CacheWarmer/ExpressionCacheWarmerTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/CacheWarmer/ExpressionCacheWarmerTest.php @@ -14,6 +14,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Bundle\SecurityBundle\CacheWarmer\ExpressionCacheWarmer; use Symfony\Component\ExpressionLanguage\Expression; +use Symfony\Component\ExpressionLanguage\ParsedExpression; use Symfony\Component\Security\Core\Authorization\ExpressionLanguage; class ExpressionCacheWarmerTest extends TestCase @@ -22,13 +23,21 @@ public function testWarmUp() { $expressions = [new Expression('A'), new Expression('B')]; + $series = [ + [$expressions[0], ['token', 'user', 'object', 'subject', 'role_names', 'request', 'trust_resolver']], + [$expressions[1], ['token', 'user', 'object', 'subject', 'role_names', 'request', 'trust_resolver']], + ]; + $expressionLang = $this->createMock(ExpressionLanguage::class); $expressionLang->expects($this->exactly(2)) ->method('parse') - ->withConsecutive( - [$expressions[0], ['token', 'user', 'object', 'subject', 'role_names', 'request', 'trust_resolver']], - [$expressions[1], ['token', 'user', 'object', 'subject', 'role_names', 'request', 'trust_resolver']] - ); + ->willReturnCallback(function (...$args) use (&$series) { + $expectedArgs = array_shift($series); + $this->assertSame($expectedArgs, $args); + + return $this->createMock(ParsedExpression::class); + }) + ; (new ExpressionCacheWarmer($expressions, $expressionLang))->warmUp(''); } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php index 9b5afb0b8b20a..9d2b056385de3 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php @@ -24,6 +24,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager; use Symfony\Component\Security\Core\Authorization\Voter\TraceableVoter; @@ -32,6 +33,7 @@ use Symfony\Component\Security\Core\User\InMemoryUser; use Symfony\Component\Security\Http\FirewallMapInterface; use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator; +use Symfony\Component\VarDumper\Caster\ClassStub; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; class SecurityDataCollectorTest extends TestCase @@ -219,17 +221,36 @@ public function testGetListeners() $this->assertSame(1, $listenerCalled); } - public function providerCollectDecisionLog(): \Generator + public function testCollectCollectsDecisionLogWhenStrategyIsAffirmative() { - $voter1 = $this->getMockBuilder(VoterInterface::class)->getMockForAbstractClass(); - $voter2 = $this->getMockBuilder(VoterInterface::class)->getMockForAbstractClass(); + $voter1 = new DummyVoter(); + $voter2 = new DummyVoter(); - $eventDispatcher = $this->getMockBuilder(EventDispatcherInterface::class)->getMockForAbstractClass(); - $decoratedVoter1 = new TraceableVoter($voter1, $eventDispatcher); + $decoratedVoter1 = new TraceableVoter($voter1, new class() implements EventDispatcherInterface { + public function dispatch(object $event, string $eventName = null): object + { + return new \stdClass(); + } + }); - yield [ - MainConfiguration::STRATEGY_AFFIRMATIVE, - [[ + $strategy = MainConfiguration::STRATEGY_AFFIRMATIVE; + + $accessDecisionManager = $this->createMock(TraceableAccessDecisionManager::class); + + $accessDecisionManager + ->method('getStrategy') + ->willReturn($strategy); + + $accessDecisionManager + ->method('getVoters') + ->willReturn([ + $decoratedVoter1, + $decoratedVoter1, + ]); + + $accessDecisionManager + ->method('getDecisionLog') + ->willReturn([[ 'attributes' => ['view'], 'object' => new \stdClass(), 'result' => true, @@ -237,23 +258,74 @@ public function providerCollectDecisionLog(): \Generator ['voter' => $voter1, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_ABSTAIN], ['voter' => $voter2, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_ABSTAIN], ], - ]], - [$decoratedVoter1, $decoratedVoter1], - [$voter1::class, $voter2::class], - [[ - 'attributes' => ['view'], - 'object' => new \stdClass(), - 'result' => true, - 'voter_details' => [ - ['class' => $voter1::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_ABSTAIN], - ['class' => $voter2::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_ABSTAIN], - ], - ]], + ]]); + + $dataCollector = new SecurityDataCollector(null, null, null, $accessDecisionManager, null, null, true); + + $dataCollector->collect(new Request(), new Response()); + + $actualDecisionLog = $dataCollector->getAccessDecisionLog(); + + $expectedDecisionLog = [[ + 'attributes' => ['view'], + 'object' => new \stdClass(), + 'result' => true, + 'voter_details' => [ + ['class' => $voter1::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_ABSTAIN], + ['class' => $voter2::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_ABSTAIN], + ], + ]]; + + $this->assertEquals($actualDecisionLog, $expectedDecisionLog, 'Wrong value returned by getAccessDecisionLog'); + + $actualVoterClasses = array_map(static function (ClassStub $classStub): string { + return (string) $classStub; + }, $dataCollector->getVoters()); + + $expectedVoterClasses = [ + $voter1::class, + $voter2::class, ]; - yield [ - MainConfiguration::STRATEGY_UNANIMOUS, - [ + $this->assertSame( + $actualVoterClasses, + $expectedVoterClasses, + 'Wrong value returned by getVoters' + ); + + $this->assertSame($dataCollector->getVoterStrategy(), $strategy, 'Wrong value returned by getVoterStrategy'); + } + + public function testCollectCollectsDecisionLogWhenStrategyIsUnanimous() + { + $voter1 = new DummyVoter(); + $voter2 = new DummyVoter(); + + $decoratedVoter1 = new TraceableVoter($voter1, new class() implements EventDispatcherInterface { + public function dispatch(object $event, string $eventName = null): object + { + return new \stdClass(); + } + }); + + $strategy = MainConfiguration::STRATEGY_UNANIMOUS; + + $accessDecisionManager = $this->createMock(TraceableAccessDecisionManager::class); + + $accessDecisionManager + ->method('getStrategy') + ->willReturn($strategy); + + $accessDecisionManager + ->method('getVoters') + ->willReturn([ + $decoratedVoter1, + $decoratedVoter1, + ]); + + $accessDecisionManager + ->method('getDecisionLog') + ->willReturn([ [ 'attributes' => ['view', 'edit'], 'object' => new \stdClass(), @@ -274,82 +346,58 @@ public function providerCollectDecisionLog(): \Generator ['voter' => $voter2, 'attributes' => ['update'], 'vote' => VoterInterface::ACCESS_GRANTED], ], ], - ], - [$decoratedVoter1, $decoratedVoter1], - [$voter1::class, $voter2::class], + ]); + + $dataCollector = new SecurityDataCollector(null, null, null, $accessDecisionManager, null, null, true); + + $dataCollector->collect(new Request(), new Response()); + + $actualDecisionLog = $dataCollector->getAccessDecisionLog(); + + $expectedDecisionLog = [ [ - [ - 'attributes' => ['view', 'edit'], - 'object' => new \stdClass(), - 'result' => false, - 'voter_details' => [ - ['class' => $voter1::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_DENIED], - ['class' => $voter1::class, 'attributes' => ['edit'], 'vote' => VoterInterface::ACCESS_DENIED], - ['class' => $voter2::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_GRANTED], - ['class' => $voter2::class, 'attributes' => ['edit'], 'vote' => VoterInterface::ACCESS_GRANTED], - ], + 'attributes' => ['view', 'edit'], + 'object' => new \stdClass(), + 'result' => false, + 'voter_details' => [ + ['class' => $voter1::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_DENIED], + ['class' => $voter1::class, 'attributes' => ['edit'], 'vote' => VoterInterface::ACCESS_DENIED], + ['class' => $voter2::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_GRANTED], + ['class' => $voter2::class, 'attributes' => ['edit'], 'vote' => VoterInterface::ACCESS_GRANTED], ], - [ - 'attributes' => ['update'], - 'object' => new \stdClass(), - 'result' => true, - 'voter_details' => [ - ['class' => $voter1::class, 'attributes' => ['update'], 'vote' => VoterInterface::ACCESS_GRANTED], - ['class' => $voter2::class, 'attributes' => ['update'], 'vote' => VoterInterface::ACCESS_GRANTED], - ], + ], + [ + 'attributes' => ['update'], + 'object' => new \stdClass(), + 'result' => true, + 'voter_details' => [ + ['class' => $voter1::class, 'attributes' => ['update'], 'vote' => VoterInterface::ACCESS_GRANTED], + ['class' => $voter2::class, 'attributes' => ['update'], 'vote' => VoterInterface::ACCESS_GRANTED], ], ], ]; - } - - /** - * Test the returned data when AccessDecisionManager is a TraceableAccessDecisionManager. - * - * @param string $strategy strategy returned by the AccessDecisionManager - * @param array $voters voters returned by AccessDecisionManager - * @param array $decisionLog log of the votes and final decisions from AccessDecisionManager - * @param array $expectedVoterClasses expected voter classes returned by the collector - * @param array $expectedDecisionLog expected decision log returned by the collector - * - * @dataProvider providerCollectDecisionLog - */ - public function testCollectDecisionLog(string $strategy, array $decisionLog, array $voters, array $expectedVoterClasses, array $expectedDecisionLog) - { - $accessDecisionManager = $this - ->getMockBuilder(TraceableAccessDecisionManager::class) - ->disableOriginalConstructor() - ->setMethods(['getStrategy', 'getVoters', 'getDecisionLog']) - ->getMock(); - $accessDecisionManager - ->expects($this->any()) - ->method('getStrategy') - ->willReturn($strategy); + $this->assertEquals($actualDecisionLog, $expectedDecisionLog, 'Wrong value returned by getAccessDecisionLog'); - $accessDecisionManager - ->expects($this->any()) - ->method('getVoters') - ->willReturn($voters); + $actualVoterClasses = array_map(static function (ClassStub $classStub): string { + return (string) $classStub; + }, $dataCollector->getVoters()); - $accessDecisionManager - ->expects($this->any()) - ->method('getDecisionLog') - ->willReturn($decisionLog); - - $dataCollector = new SecurityDataCollector(null, null, null, $accessDecisionManager, null, null, true); - $dataCollector->collect(new Request(), new Response()); - - $this->assertEquals($dataCollector->getAccessDecisionLog(), $expectedDecisionLog, 'Wrong value returned by getAccessDecisionLog'); + $expectedVoterClasses = [ + $voter1::class, + $voter2::class, + ]; $this->assertSame( - array_map(function ($classStub) { return (string) $classStub; }, $dataCollector->getVoters()), + $actualVoterClasses, $expectedVoterClasses, 'Wrong value returned by getVoters' ); + $this->assertSame($dataCollector->getVoterStrategy(), $strategy, 'Wrong value returned by getVoterStrategy'); } - public function provideRoles() + public static function provideRoles() { return [ // Basic roles @@ -380,3 +428,10 @@ private function getRoleHierarchy() ]); } } + +final class DummyVoter implements VoterInterface +{ + public function vote(TokenInterface $token, mixed $subject, array $attributes): int + { + } +} diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/MakeFirewallsEventDispatcherTraceablePassTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/MakeFirewallsEventDispatcherTraceablePassTest.php new file mode 100644 index 0000000000000..e156a2f6f51d4 --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/MakeFirewallsEventDispatcherTraceablePassTest.php @@ -0,0 +1,73 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; +use Symfony\Bundle\SecurityBundle\SecurityBundle; +use Symfony\Component\DependencyInjection\Compiler\DecoratorServicePass; +use Symfony\Component\DependencyInjection\Compiler\PassConfig; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Stopwatch\Stopwatch; + +class MakeFirewallsEventDispatcherTraceablePassTest extends TestCase +{ + private $container; + + protected function setUp(): void + { + $this->container = new ContainerBuilder(); + $this->container->register('request_stack', \stdClass::class); + $this->container->register('event_dispatcher', EventDispatcher::class); + $this->container->register('debug.stopwatch', Stopwatch::class); + + $this->container->registerExtension(new SecurityExtension()); + $this->container->loadFromExtension('security', [ + 'firewalls' => ['main' => ['pattern' => '/', 'http_basic' => true]], + ]); + + $this->container->addCompilerPass(new DecoratorServicePass(), PassConfig::TYPE_OPTIMIZE); + $this->container->getCompilerPassConfig()->setRemovingPasses([]); + $this->container->getCompilerPassConfig()->setAfterRemovingPasses([]); + + $securityBundle = new SecurityBundle(); + $securityBundle->build($this->container); + } + + public function testEventDispatcherIsDecoratedOnDebugMode() + { + $this->container->setParameter('kernel.debug', true); + + $this->container->compile(); + + $dispatcherDefinition = $this->container->findDefinition('security.event_dispatcher.main'); + + $this->assertSame(TraceableEventDispatcher::class, $dispatcherDefinition->getClass()); + $this->assertSame( + [['name' => 'security.event_dispatcher.main']], + $dispatcherDefinition->getTag('event_dispatcher.dispatcher') + ); + } + + public function testEventDispatcherIsNotDecoratedOnNonDebugMode() + { + $this->container->setParameter('kernel.debug', false); + + $this->container->compile(); + + $dispatcherDefinition = $this->container->findDefinition('security.event_dispatcher.main'); + + $this->assertSame(EventDispatcher::class, $dispatcherDefinition->getClass()); + } +} diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php index cecf1b04835ef..c7f437e9d4808 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php @@ -69,7 +69,7 @@ public function testEventIsPropagated(string $configuredEvent, string $registere ]); } - public function providePropagatedEvents(): array + public static function providePropagatedEvents(): array { return [ [CheckPassportEvent::class, CheckPassportEvent::class], @@ -191,10 +191,8 @@ private function assertListeners(array $expectedListeners, string $dispatcherId $actualListeners[] = $arguments; } - $foundListeners = array_uintersect($expectedListeners, $actualListeners, function (array $a, array $b) { - // PHP internally sorts all the arrays first, so returning proper 1 / -1 values is crucial - return $a <=> $b; - }); + // PHP internally sorts all the arrays first, so returning proper 1 / -1 values is crucial + $foundListeners = array_uintersect($expectedListeners, $actualListeners, fn (array $a, array $b) => $a <=> $b); $this->assertEquals($expectedListeners, $foundListeners); } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/SortFirewallListenersPassTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/SortFirewallListenersPassTest.php index 8cbf745e9cc88..dde5127bbd7f9 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/SortFirewallListenersPassTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/SortFirewallListenersPassTest.php @@ -65,7 +65,7 @@ public function supports(Request $request): ?bool { } - public function authenticate(RequestEvent $event) + public function authenticate(RequestEvent $event): void { } @@ -81,7 +81,7 @@ public function supports(Request $request): ?bool { } - public function authenticate(RequestEvent $event) + public function authenticate(RequestEvent $event): void { } @@ -97,7 +97,7 @@ public function supports(Request $request): ?bool { } - public function authenticate(RequestEvent $event) + public function authenticate(RequestEvent $event): void { } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php similarity index 98% rename from src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php rename to src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php index acf5de337fc6b..44193e4ec0a58 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php @@ -35,7 +35,7 @@ use Symfony\Component\Security\Http\Authenticator\Passport\Badge\CsrfTokenBadge; use Symfony\Component\Security\Http\Authenticator\Passport\Badge\RememberMeBadge; -abstract class CompleteConfigurationTest extends TestCase +abstract class CompleteConfigurationTestCase extends TestCase { abstract protected function getLoader(ContainerBuilder $container); @@ -93,7 +93,7 @@ public function testUserProviders() { $container = $this->getContainer('container1'); - $providers = array_values(array_filter($container->getServiceIds(), function ($key) { return str_starts_with($key, 'security.user.provider.concrete'); })); + $providers = array_values(array_filter($container->getServiceIds(), fn ($key) => str_starts_with($key, 'security.user.provider.concrete'))); $expectedProviders = [ 'security.user.provider.concrete.default', @@ -181,6 +181,7 @@ public function testFirewalls() 'invalidate_session' => true, 'delete_cookies' => [], 'enable_csrf' => null, + 'clear_site_data' => [], ], ], [ @@ -708,6 +709,13 @@ public function testFirewallListenerWithProvider() $this->addToAssertionCount(1); } + public function testFirewallLogoutClearSiteData() + { + $container = $this->getContainer('logout_clear_site_data'); + $ClearSiteDataConfig = $container->getDefinition('security.firewall.map.config.main')->getArgument(12)['clear_site_data']; + $this->assertSame(['cookies', 'executionContexts'], $ClearSiteDataConfig); + } + protected function getContainer($file) { $file .= '.'.$this->getFileExtension(); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/UserProvider/DummyProvider.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/UserProvider/DummyProvider.php index 55d3d6e9a2f10..ffefb8dbdb2fa 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/UserProvider/DummyProvider.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/UserProvider/DummyProvider.php @@ -8,16 +8,16 @@ class DummyProvider implements UserProviderFactoryInterface { - public function create(ContainerBuilder $container, $id, $config) + public function create(ContainerBuilder $container, $id, $config): void { } - public function getKey() + public function getKey(): string { return 'foo'; } - public function addConfiguration(NodeDefinition $node) + public function addConfiguration(NodeDefinition $node): void { } } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/logout_clear_site_data.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/logout_clear_site_data.php new file mode 100644 index 0000000000000..3d02a68bb83df --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/logout_clear_site_data.php @@ -0,0 +1,20 @@ +loadFromExtension('security', [ + 'providers' => [ + 'default' => ['id' => 'foo'], + ], + + 'firewalls' => [ + 'main' => [ + 'provider' => 'default', + 'form_login' => true, + 'logout' => [ + 'clear-site-data' => [ + 'cookies', + 'executionContexts', + ], + ], + ], + ], +]); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/logout_clear_site_data.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/logout_clear_site_data.xml new file mode 100644 index 0000000000000..e0eec6eb46d58 --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/logout_clear_site_data.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + cookies + executionContexts + + + + diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/logout_clear_site_data.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/logout_clear_site_data.yml new file mode 100644 index 0000000000000..f5e6b83436d63 --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/logout_clear_site_data.yml @@ -0,0 +1,13 @@ +security: + providers: + default: + id: foo + + firewalls: + main: + provider: default + form_login: true + logout: + clear_site_data: + - cookies + - executionContexts diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/PhpCompleteConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/PhpCompleteConfigurationTest.php index 846d01d5337ca..c4297c7b9c0e1 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/PhpCompleteConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/PhpCompleteConfigurationTest.php @@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -class PhpCompleteConfigurationTest extends CompleteConfigurationTest +class PhpCompleteConfigurationTest extends CompleteConfigurationTestCase { protected function getLoader(ContainerBuilder $container) { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php index ff4108d25cdc9..be300e7526b82 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php @@ -13,6 +13,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AbstractFactory; +use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerBuilder; class AbstractFactoryTest extends TestCase @@ -43,16 +44,23 @@ public function testDefaultFailureHandler($serviceId, $defaultHandlerInjection) $failureHandler = $this->container->getDefinition('security.authentication.failure_handler.foo.stub'); + $expectedFailureHandlerOptions = ['login_path' => '/bar']; $methodCalls = $failureHandler->getMethodCalls(); if ($defaultHandlerInjection) { $this->assertEquals('setOptions', $methodCalls[0][0]); - $this->assertEquals(['login_path' => '/bar'], $methodCalls[0][1][0]); + $this->assertEquals($expectedFailureHandlerOptions, $methodCalls[0][1][0]); } else { $this->assertCount(0, $methodCalls); + $this->assertInstanceOf(ChildDefinition::class, $failureHandler); + $this->assertEquals('security.authentication.custom_failure_handler', $failureHandler->getParent()); + $failureHandlerArguments = $failureHandler->getArguments(); + $this->assertInstanceOf(ChildDefinition::class, $failureHandlerArguments['index_0']); + $this->assertEquals($serviceId, $failureHandlerArguments['index_0']->getParent()); + $this->assertEquals($expectedFailureHandlerOptions, $failureHandlerArguments['index_1']); } } - public function getFailureHandlers() + public static function getFailureHandlers() { return [ [null, true], @@ -80,17 +88,26 @@ public function testDefaultSuccessHandler($serviceId, $defaultHandlerInjection) $successHandler = $this->container->getDefinition('security.authentication.success_handler.foo.stub'); $methodCalls = $successHandler->getMethodCalls(); + $expectedSuccessHandlerOptions = ['default_target_path' => '/bar']; + $expectedFirewallName = 'foo'; if ($defaultHandlerInjection) { $this->assertEquals('setOptions', $methodCalls[0][0]); - $this->assertEquals(['default_target_path' => '/bar'], $methodCalls[0][1][0]); + $this->assertEquals($expectedSuccessHandlerOptions, $methodCalls[0][1][0]); $this->assertEquals('setFirewallName', $methodCalls[1][0]); - $this->assertEquals(['foo'], $methodCalls[1][1]); + $this->assertEquals($expectedFirewallName, $methodCalls[1][1][0]); } else { $this->assertCount(0, $methodCalls); + $this->assertInstanceOf(ChildDefinition::class, $successHandler); + $this->assertEquals('security.authentication.custom_success_handler', $successHandler->getParent()); + $successHandlerArguments = $successHandler->getArguments(); + $this->assertInstanceOf(ChildDefinition::class, $successHandlerArguments['index_0']); + $this->assertEquals($serviceId, $successHandlerArguments['index_0']->getParent()); + $this->assertEquals($expectedSuccessHandlerOptions, $successHandlerArguments['index_1']); + $this->assertEquals($expectedFirewallName, $successHandlerArguments['index_2']); } } - public function getSuccessHandlers() + public static function getSuccessHandlers() { return [ [null, true], diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php index 227d126db33e2..bed6d8c93ffbe 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php @@ -306,7 +306,7 @@ public function testRegisterAccessControlWithRequestMatcherAndAdditionalOptionsT $container->compile(); } - public function provideAdditionalRequestMatcherConstraints() + public static function provideAdditionalRequestMatcherConstraints() { yield 'Invalid configuration with path' => [['path' => '^/url']]; yield 'Invalid configuration with host' => [['host' => 'example.com']]; @@ -606,7 +606,7 @@ public function sessionConfigurationProvider() ]; } - public function acceptableIpsProvider(): iterable + public static function acceptableIpsProvider(): iterable { yield [['127.0.0.1']]; yield ['127.0.0.1']; @@ -711,7 +711,7 @@ public function testEntryPointRequired(array $firewall, $messageRegex) $container->compile(); } - public function provideEntryPointRequiredData() + public static function provideEntryPointRequiredData() { // more than one entry point available and not explicitly set yield [ @@ -742,7 +742,7 @@ public function testConfigureCustomAuthenticator(array $firewall, array $expecte $this->assertEquals($expectedAuthenticators, array_map('strval', $container->getDefinition('security.authenticator.manager.main')->getArgument(0))); } - public function provideConfigureCustomAuthenticatorData() + public static function provideConfigureCustomAuthenticatorData() { yield [ ['custom_authenticator' => TestAuthenticator::class], @@ -819,7 +819,7 @@ public function testUserCheckerWithAuthenticatorManager(array $config, string $e $this->assertEquals($expectedUserCheckerClass, $container->findDefinition($userCheckerId)->getClass()); } - public function provideUserCheckerConfig() + public static function provideUserCheckerConfig() { yield [[], InMemoryUserChecker::class]; yield [['user_checker' => TestUserChecker::class], TestUserChecker::class]; @@ -848,6 +848,48 @@ public function testConfigureCustomFirewallListener() $this->assertContains('custom_firewall_listener_id', $firewallListeners); } + public function testClearSiteDataLogoutListenerEnabled() + { + $container = $this->getRawContainer(); + + $firewallId = 'logout_firewall'; + $container->loadFromExtension('security', [ + 'firewalls' => [ + $firewallId => [ + 'logout' => [ + 'clear_site_data' => ['*'], + ], + ], + ], + ]); + + $container->compile(); + + $this->assertTrue($container->has('security.logout.listener.clear_site_data.'.$firewallId)); + $listenerArgument = $container->getDefinition('security.logout.listener.clear_site_data.'.$firewallId)->getArgument(0); + $this->assertSame(['*'], $listenerArgument); + } + + public function testClearSiteDataLogoutListenerDisabled() + { + $container = $this->getRawContainer(); + + $firewallId = 'logout_firewall'; + $container->loadFromExtension('security', [ + 'firewalls' => [ + $firewallId => [ + 'logout' => [ + 'clear_site_data' => [], + ], + ], + ], + ]); + + $container->compile(); + + $this->assertFalse($container->has('security.logout.listener.clear_site_data.'.$firewallId)); + } + /** * @group legacy */ @@ -923,11 +965,11 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio class TestUserChecker implements UserCheckerInterface { - public function checkPreAuth(UserInterface $user) + public function checkPreAuth(UserInterface $user): void { } - public function checkPostAuth(UserInterface $user) + public function checkPostAuth(UserInterface $user): void { } } @@ -956,7 +998,7 @@ public function getKey(): string return 'custom_listener'; } - public function addConfiguration(NodeDefinition $builder) + public function addConfiguration(NodeDefinition $builder): void { } } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php index 00006a756a2ec..eccfabef77950 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php @@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -class XmlCompleteConfigurationTest extends CompleteConfigurationTest +class XmlCompleteConfigurationTest extends CompleteConfigurationTestCase { protected function getLoader(ContainerBuilder $container) { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/YamlCompleteConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/YamlCompleteConfigurationTest.php index 8e3954a057daf..4fd2d44e117c1 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/YamlCompleteConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/YamlCompleteConfigurationTest.php @@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; -class YamlCompleteConfigurationTest extends CompleteConfigurationTest +class YamlCompleteConfigurationTest extends CompleteConfigurationTestCase { protected function getLoader(ContainerBuilder $container) { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/EventListener/VoteListenerTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/EventListener/VoteListenerTest.php index 3406e16503f43..d262effae29ac 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/EventListener/VoteListenerTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/EventListener/VoteListenerTest.php @@ -26,7 +26,7 @@ public function testOnVoterVote() $traceableAccessDecisionManager = $this ->getMockBuilder(TraceableAccessDecisionManager::class) ->disableOriginalConstructor() - ->setMethods(['addVoterVote']) + ->onlyMethods(['addVoterVote']) ->getMock(); $traceableAccessDecisionManager diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php index d07b5ed3e8eb7..6ee313b9ffbbb 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php @@ -113,12 +113,12 @@ public function testCustomMissingFormEncodedBodyShouldFail() $this->assertSame(401, $response->getStatusCode()); } - public function defaultFormEncodedBodyFailureData(): iterable + public static function defaultFormEncodedBodyFailureData(): iterable { yield [['access_token' => 'INVALID_ACCESS_TOKEN'], ['CONTENT_TYPE' => 'application/x-www-form-urlencoded']]; } - public function customFormEncodedBodyFailure(): iterable + public static function customFormEncodedBodyFailure(): iterable { yield [['secured_token' => 'INVALID_ACCESS_TOKEN'], ['CONTENT_TYPE' => 'application/x-www-form-urlencoded']]; } @@ -211,24 +211,24 @@ public function testCustomMissingHeaderAccessTokenShouldFail(array $headers) $this->assertSame(401, $response->getStatusCode()); } - public function defaultHeaderAccessTokenFailureData(): iterable + public static function defaultHeaderAccessTokenFailureData(): iterable { yield [['HTTP_AUTHORIZATION' => 'Bearer INVALID_ACCESS_TOKEN']]; } - public function defaultMissingHeaderAccessTokenFailData(): iterable + public static function defaultMissingHeaderAccessTokenFailData(): iterable { yield [['HTTP_AUTHORIZATION' => 'JWT INVALID_TOKEN_TYPE']]; yield [['HTTP_X_FOO' => 'Missing-Header']]; yield [['HTTP_X_AUTH_TOKEN' => 'this is not a token']]; } - public function customHeaderAccessTokenFailure(): iterable + public static function customHeaderAccessTokenFailure(): iterable { yield [['HTTP_X_AUTH_TOKEN' => 'INVALID_ACCESS_TOKEN'], 500]; } - public function customMissingHeaderAccessTokenShouldFail(): iterable + public static function customMissingHeaderAccessTokenShouldFail(): iterable { yield [[]]; yield [['HTTP_AUTHORIZATION' => 'Bearer this is not a token']]; @@ -306,12 +306,12 @@ public function testCustomMissingQueryAccessTokenShouldFail() $this->assertSame(401, $response->getStatusCode()); } - public function defaultQueryAccessTokenFailureData(): iterable + public static function defaultQueryAccessTokenFailureData(): iterable { yield ['/foo?access_token=INVALID_ACCESS_TOKEN']; } - public function customQueryAccessTokenFailure(): iterable + public static function customQueryAccessTokenFailure(): iterable { yield ['/foo?protection_token=INVALID_ACCESS_TOKEN']; } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php index 10eeb39ca8c5e..ca99dbf3eadab 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php @@ -60,7 +60,7 @@ public function testWithoutUserProvider($email) $this->assertJsonStringEqualsJsonString('{"email":"'.$email.'"}', $client->getResponse()->getContent()); } - public function provideEmails() + public static function provideEmails() { yield ['jane@example.org', true]; yield ['john@example.org', false]; @@ -84,7 +84,7 @@ public function testLoginUsersWithMultipleFirewalls(string $username, string $fi $this->assertEquals('Welcome '.$username.'!', $client->getResponse()->getContent()); } - public function provideEmailsWithFirewalls() + public static function provideEmailsWithFirewalls() { yield ['jane@example.org', 'main']; yield ['john@example.org', 'custom']; @@ -102,4 +102,38 @@ public function testMultipleFirewalls() $client->request('GET', '/firewall2/profile'); $this->assertResponseRedirects('http://localhost/login'); } + + public function testCustomSuccessHandler() + { + $client = $this->createClient(['test_case' => 'Authenticator', 'root_config' => 'custom_handlers.yml']); + + $client->request('POST', '/firewall1/login', [ + '_username' => 'jane@example.org', + '_password' => 'test', + ]); + $this->assertResponseRedirects('http://localhost/firewall1/test'); + + $client->request('POST', '/firewall1/dummy_login', [ + '_username' => 'jane@example.org', + '_password' => 'test', + ]); + $this->assertResponseRedirects('http://localhost/firewall1/dummy'); + } + + public function testCustomFailureHandler() + { + $client = $this->createClient(['test_case' => 'Authenticator', 'root_config' => 'custom_handlers.yml']); + + $client->request('POST', '/firewall1/login', [ + '_username' => 'jane@example.org', + '_password' => '', + ]); + $this->assertResponseRedirects('http://localhost/firewall1/login'); + + $client->request('POST', '/firewall1/dummy_login', [ + '_username' => 'jane@example.org', + '_password' => '', + ]); + $this->assertResponseRedirects('http://localhost/firewall1/dummy_login'); + } } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AuthenticatorBundle/ApiAuthenticator.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AuthenticatorBundle/ApiAuthenticator.php index dca54cfb0d999..3060f4ef9e8c6 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AuthenticatorBundle/ApiAuthenticator.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AuthenticatorBundle/ApiAuthenticator.php @@ -46,7 +46,7 @@ public function authenticate(Request $request): Passport $userLoader = null; if ($this->selfLoadingUser) { - $userLoader = function ($username) { return new InMemoryUser($username, 'test', ['ROLE_USER']); }; + $userLoader = fn ($username) => new InMemoryUser($username, 'test', ['ROLE_USER']); } return new SelfValidatingPassport(new UserBadge($email, $userLoader)); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AuthenticatorBundle/AuthenticatorBundle.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AuthenticatorBundle/AuthenticatorBundle.php new file mode 100644 index 0000000000000..6d0f01391ac7e --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AuthenticatorBundle/AuthenticatorBundle.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AuthenticatorBundle; + +use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class AuthenticatorBundle extends Bundle +{ + public function build(ContainerBuilder $container): void + { + parent::build($container); + + $this->configureSecurityExtension($container); + } + + private function configureSecurityExtension(ContainerBuilder $container): void + { + /** @var SecurityExtension $extension */ + $extension = $container->getExtension('security'); + + $extension->addAuthenticatorFactory(new DummyFormLoginFactory()); + } +} diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AuthenticatorBundle/DummyFormLoginFactory.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AuthenticatorBundle/DummyFormLoginFactory.php new file mode 100644 index 0000000000000..fc728fe5c6f4e --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AuthenticatorBundle/DummyFormLoginFactory.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AuthenticatorBundle; + +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FormLoginFactory; +use Symfony\Component\DependencyInjection\ChildDefinition; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +class DummyFormLoginFactory extends FormLoginFactory +{ + public function getKey(): string + { + return 'dummy_form_login'; + } + + public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string + { + $authenticatorId = 'security.authenticator.dummy_form_login.'.$firewallName; + $options = array_intersect_key($config, $this->options); + $authenticator = $container + ->setDefinition($authenticatorId, new ChildDefinition('security.authenticator.form_login')) + ->replaceArgument(1, new Reference($userProviderId)) + ->replaceArgument(2, new Reference($this->createAuthenticationSuccessHandler($container, $firewallName, $config))) + ->replaceArgument(3, new Reference($this->createAuthenticationFailureHandler($container, $firewallName, $config))) + ->replaceArgument(4, $options); + + if ($options['use_forward'] ?? false) { + $authenticator->addMethodCall('setHttpKernel', [new Reference('http_kernel')]); + } + + return $authenticatorId; + } +} diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php index 80adb49a8892e..5868a0b3a9094 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php @@ -32,14 +32,12 @@ */ class UserLoginType extends AbstractType { - private $requestStack; - - public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; + public function __construct( + private readonly RequestStack $requestStack, + ) { } - public function buildForm(FormBuilderInterface $builder, array $options) + public function buildForm(FormBuilderInterface $builder, array $options): void { $builder ->add('username', TextType::class) @@ -71,7 +69,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) }); } - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { /* Note: the form's csrf_token_id must correspond to that for the form login * listener in order for the CSRF token to validate successfully. diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php index dfedac3735f53..eb33a4ce8f211 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php @@ -18,7 +18,7 @@ class FirewallEntryPointExtension extends Extension { - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.xml'); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.php index 2c81ca6416171..0eac0017d0d51 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.php @@ -18,7 +18,7 @@ class FormLoginExtension extends Extension { - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { $container ->register('localized_form_failure_handler', LocalizedFormFailureHandler::class) diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php index 62490a739bdcc..76ac78c3c488c 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php @@ -18,7 +18,7 @@ class FormLoginBundle extends Bundle { - public function build(ContainerBuilder $container) + public function build(ContainerBuilder $container): void { parent::build($container); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/StaticTokenProvider.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/StaticTokenProvider.php index 8a669e99bc48d..c79518b6cb9fb 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/StaticTokenProvider.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/StaticTokenProvider.php @@ -39,12 +39,12 @@ public function loadTokenBySeries(string $series): PersistentTokenInterface return $token; } - public function deleteTokenBySeries(string $series) + public function deleteTokenBySeries(string $series): void { unset(self::$db[$series]); } - public function updateToken(string $series, string $tokenValue, \DateTime $lastUsed) + public function updateToken(string $series, string $tokenValue, \DateTime $lastUsed): void { $token = $this->loadTokenBySeries($series); $refl = new \ReflectionClass($token); @@ -57,7 +57,7 @@ public function updateToken(string $series, string $tokenValue, \DateTime $lastU self::$db[$series] = $token; } - public function createNewToken(PersistentTokenInterface $token) + public function createNewToken(PersistentTokenInterface $token): void { self::$db[$token->getSeries()] = $token; } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/TestBundle.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/TestBundle.php index 8336dce245792..8652dc73b41d1 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/TestBundle.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/TestBundle.php @@ -18,7 +18,7 @@ class TestBundle extends Bundle { - public function build(ContainerBuilder $container) + public function build(ContainerBuilder $container): void { $container->setParameter('container.build_hash', 'test_bundle'); $container->setParameter('container.build_time', time()); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php index ad2fc0c63d1e0..25aa013131648 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php @@ -11,6 +11,12 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; +use Symfony\Bundle\FrameworkBundle\KernelBrowser; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\RequestEvent; +use Symfony\Component\HttpKernel\KernelEvents; + class CsrfFormLoginTest extends AbstractWebTestCase { /** @@ -20,6 +26,10 @@ public function testFormLoginAndLogoutWithCsrfTokens($options) { $client = $this->createClient($options); + $this->callInRequestContext($client, function () { + static::getContainer()->get('security.csrf.token_storage')->setToken('foo', 'bar'); + }); + $form = $client->request('GET', '/login')->selectButton('login')->form(); $form['user_login[username]'] = 'johannes'; $form['user_login[password]'] = 'test'; @@ -40,6 +50,10 @@ public function testFormLoginAndLogoutWithCsrfTokens($options) $client->click($logoutLinks[0]); $this->assertRedirect($client->getResponse(), '/'); + + $this->callInRequestContext($client, function () { + $this->assertFalse(static::getContainer()->get('security.csrf.token_storage')->hasToken('foo')); + }); } /** @@ -49,6 +63,10 @@ public function testFormLoginWithInvalidCsrfToken($options) { $client = $this->createClient($options); + $this->callInRequestContext($client, function () { + static::getContainer()->get('security.csrf.token_storage')->setToken('foo', 'bar'); + }); + $form = $client->request('GET', '/login')->selectButton('login')->form(); $form['user_login[_token]'] = ''; $client->submit($form); @@ -57,6 +75,10 @@ public function testFormLoginWithInvalidCsrfToken($options) $text = $client->followRedirect()->text(null, true); $this->assertStringContainsString('Invalid CSRF token.', $text); + + $this->callInRequestContext($client, function () { + $this->assertTrue(static::getContainer()->get('security.csrf.token_storage')->hasToken('foo')); + }); } /** @@ -100,9 +122,27 @@ public function testFormLoginRedirectsToProtectedResourceAfterLogin($options) $this->assertStringContainsString('You\'re browsing to path "/protected-resource".', $text); } - public function provideClientOptions() + public static function provideClientOptions() { yield [['test_case' => 'CsrfFormLogin', 'root_config' => 'config.yml']]; yield [['test_case' => 'CsrfFormLogin', 'root_config' => 'routes_as_path.yml']]; } + + private function callInRequestContext(KernelBrowser $client, callable $callable): void + { + /** @var EventDispatcherInterface $eventDispatcher */ + $eventDispatcher = static::getContainer()->get(EventDispatcherInterface::class); + $wrappedCallable = function (RequestEvent $event) use (&$callable) { + $callable(); + $event->setResponse(new Response('')); + $event->stopPropagation(); + }; + + $eventDispatcher->addListener(KernelEvents::REQUEST, $wrappedCallable); + try { + $client->request('GET', '/'.uniqid('', true)); + } finally { + $eventDispatcher->removeListener(KernelEvents::REQUEST, $wrappedCallable); + } + } } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php index 78b7f6140542a..583c0dd2336b0 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php @@ -147,7 +147,7 @@ public function testLoginThrottling() } } - public function provideClientOptions() + public static function provideClientOptions() { yield [['test_case' => 'StandardFormLogin', 'root_config' => 'base_config.yml']]; yield [['test_case' => 'StandardFormLogin', 'root_config' => 'routes_as_path.yml']]; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php index 0c356662c39a7..99ba311a26eb8 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php @@ -36,6 +36,7 @@ public function testLoginLogoutProcedure(string $locale) /** * @group issue-32995 + * * @dataProvider getLocales */ public function testLoginFailureWithLocalizedFailurePath(string $locale) @@ -73,7 +74,7 @@ public function testAccessRestrictedResourceWithForward(string $locale) $this->assertCount(1, $crawler->selectButton('login'), (string) $client->getResponse()); } - public function getLocales() + public static function getLocales() { yield ['en']; yield ['de']; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LogoutTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LogoutTest.php index 72ed1be80d077..50473ed84e912 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LogoutTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LogoutTest.php @@ -24,9 +24,6 @@ public function testCsrfTokensAreClearedOnLogout() { $client = $this->createClient(['test_case' => 'LogoutWithoutSessionInvalidation', 'root_config' => 'config.yml']); $client->disableReboot(); - $this->callInRequestContext($client, function () { - static::getContainer()->get('security.csrf.token_storage')->setToken('foo', 'bar'); - }); $client->request('POST', '/login', [ '_username' => 'johannes', @@ -34,8 +31,7 @@ public function testCsrfTokensAreClearedOnLogout() ]); $this->callInRequestContext($client, function () { - $this->assertTrue(static::getContainer()->get('security.csrf.token_storage')->hasToken('foo')); - $this->assertSame('bar', static::getContainer()->get('security.csrf.token_storage')->getToken('foo')); + static::getContainer()->get('security.csrf.token_storage')->setToken('foo', 'bar'); }); $client->request('GET', '/logout'); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php index 0bd2711f25ca0..d91b321bbc3aa 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php @@ -31,7 +31,7 @@ public function testSessionRememberMeSecureCookieFlagAuto($https, $expectedSecur $this->assertSame($expectedSecureFlag, $cookies['']['/']['REMEMBERME']->isSecure()); } - public function getSessionRememberMeSecureCookieFlagAutoHttpsMap() + public static function getSessionRememberMeSecureCookieFlagAutoHttpsMap() { return [ [true, true], diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php index 0ccc17d9c989d..2fff3a9eddc7a 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php @@ -93,7 +93,7 @@ public function testSessionLessRememberMeLogout() $this->assertNull($cookieJar->get('REMEMBERME')); } - public function provideConfigs() + public static function provideConfigs() { yield [['root_config' => 'config_session.yml']]; yield [['root_config' => 'config_persistent.yml']]; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php index 7c1f3dc0679a4..362801253f305 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php @@ -151,7 +151,7 @@ private function assertRestricted($client, $path) $this->assertEquals(302, $client->getResponse()->getStatusCode()); } - public function provideConfigs() + public static function provideConfigs() { yield [['test_case' => 'StandardFormLogin', 'root_config' => 'base_config.yml']]; yield [['test_case' => 'StandardFormLogin', 'root_config' => 'routes_as_path.yml']]; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php index 91eaefa45e076..f2d6733fcf350 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php @@ -76,7 +76,7 @@ public function testUserWillBeMarkedAsChangedIfRolesHasChanged(UserInterface $us $this->assertEquals(302, $client->getResponse()->getStatusCode()); } - public function userWillBeMarkedAsChangedIfRolesHasChangedProvider() + public static function userWillBeMarkedAsChangedIfRolesHasChangedProvider() { return [ [ diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php index 8b8848014d57a..f376847214913 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php @@ -63,7 +63,7 @@ public function testSwitchUserStateless() $this->assertSame('dunglas', $client->getProfile()->getCollector('security')->getUser()); } - public function getTestParameters() + public static function getTestParameters() { return [ 'unauthorized_user_cannot_switch' => ['user_cannot_switch_1', 'user_cannot_switch_1', 'user_cannot_switch_1', 403], diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php index d10326e676a38..4969b13419fb8 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php @@ -75,7 +75,7 @@ public function getLogDir(): string return sys_get_temp_dir().'/'.$this->varDir.'/'.$this->testCase.'/logs'; } - public function registerContainerConfiguration(LoaderInterface $loader) + public function registerContainerConfiguration(LoaderInterface $loader): void { foreach ($this->rootConfig as $config) { $loader->load($config); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/bundles.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/bundles.php index d1e9eb7e0d36a..372700495208f 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/bundles.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/bundles.php @@ -12,4 +12,5 @@ return [ new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), + new Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AuthenticatorBundle\AuthenticatorBundle(), ]; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/custom_handlers.yml b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/custom_handlers.yml new file mode 100644 index 0000000000000..df25ce3fa602d --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/custom_handlers.yml @@ -0,0 +1,33 @@ +imports: + - { resource: ./config.yml } + - { resource: ./security.yml } + +security: + firewalls: + firewall1: + pattern: /firewall1 + provider: in_memory + entry_point: form_login + form_login: + check_path: /firewall1/login + success_handler: success_handler + failure_handler: failure_handler + default_target_path: /firewall1/test + login_path: /firewall1/login + dummy_form_login: + check_path: /firewall1/dummy_login + success_handler: success_handler + failure_handler: failure_handler + default_target_path: /firewall1/dummy + login_path: /firewall1/dummy_login + +services: + success_handler: + class: Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler + arguments: + - '@security.http_utils' + failure_handler: + class: Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler + arguments: + - '@http_kernel' + - '@security.http_utils' diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/routing.yml b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/routing.yml index 4796a3f6bc00c..76d894d9de904 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/routing.yml +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/routing.yml @@ -22,6 +22,9 @@ security_custom_profile: firewall1_login: path: /firewall1/login +firewall_dummy_login: + path: /firewall1/dummy_login + firewall2_profile: path: /firewall2/profile defaults: diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/SecurityHelper/config.yml b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/SecurityHelper/config.yml index c6934ba011e94..3837eb5d08190 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/SecurityHelper/config.yml +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/SecurityHelper/config.yml @@ -40,7 +40,16 @@ security: custom_authenticators: - 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AuthenticatorBundle\ApiAuthenticator' provider: main + second: + pattern: ^/second + form_login: + check_path: /second/login/check + custom_authenticators: + - 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AuthenticatorBundle\ApiAuthenticator' + provider: main access_control: - { path: '^/main/login/check$', roles: IS_AUTHENTICATED_FULLY } - { path: '^/main/logged-in$', roles: IS_AUTHENTICATED_FULLY } + - { path: '^/second/login/check$', roles: IS_AUTHENTICATED_FULLY } + - { path: '^/second/logged-in$', roles: IS_AUTHENTICATED_FULLY } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/SecurityHelper/routing.yml b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/SecurityHelper/routing.yml index 1f74d27501207..8487bbec1a0cc 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/SecurityHelper/routing.yml +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/SecurityHelper/routing.yml @@ -9,3 +9,11 @@ logged-in: force-logout: path: /main/force-logout controller: Symfony\Bundle\SecurityBundle\Tests\Functional\LogoutController::logout + +second-force-login: + path: /second/force-login + controller: Symfony\Bundle\SecurityBundle\Tests\Functional\ForceLoginController::welcome + +second-logged-in: + path: /second/logged-in + controller: Symfony\Bundle\SecurityBundle\Tests\Functional\LoggedInController diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/LoginLink/FirewallAwareLoginLinkHandlerTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/LoginLink/FirewallAwareLoginLinkHandlerTest.php index 0b466d0af7990..92703f41ec3c7 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/LoginLink/FirewallAwareLoginLinkHandlerTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/LoginLink/FirewallAwareLoginLinkHandlerTest.php @@ -69,14 +69,10 @@ private function createLocator(array $linkers) $locator = $this->createMock(ContainerInterface::class); $locator->expects($this->any()) ->method('has') - ->willReturnCallback(function ($firewallName) use ($linkers) { - return isset($linkers[$firewallName]); - }); + ->willReturnCallback(fn ($firewallName) => isset($linkers[$firewallName])); $locator->expects($this->any()) ->method('get') - ->willReturnCallback(function ($firewallName) use ($linkers) { - return $linkers[$firewallName]; - }); + ->willReturnCallback(fn ($firewallName) => $linkers[$firewallName]); return $locator; } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php index 9b5fcf3b51ddf..95b0006f5f896 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php @@ -74,7 +74,7 @@ public function testGetUser($userInToken, $expectedUser) $this->assertSame($expectedUser, $security->getUser()); } - public function getUserTests() + public static function getUserTests() { yield [null, null]; @@ -115,7 +115,7 @@ public function testGetFirewallConfig(Request $request, ?FirewallConfig $expecte $this->assertSame($expectedFirewallConfig, $security->getFirewallConfig($request)); } - public function getFirewallConfigTests() + public static function getFirewallConfigTests() { $request = new Request(); @@ -141,7 +141,7 @@ public function testLogin() ->willReturnMap([ ['request_stack', $requestStack], ['security.firewall.map', $firewallMap], - ['security.user_authenticator', $userAuthenticator], + ['security.authenticator.managers_locator', $this->createContainer('main', $userAuthenticator)], ['security.user_checker', $userChecker], ]) ; @@ -187,7 +187,7 @@ public function testLoginReturnsAuthenticatorResponse() ->willReturnMap([ ['request_stack', $requestStack], ['security.firewall.map', $firewallMap], - ['security.user_authenticator', $userAuthenticator], + ['security.authenticator.managers_locator', $this->createContainer('main', $userAuthenticator)], ['security.user_checker', $userChecker], ]) ; diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json index f336cdae7dd69..0272b63276cb8 100644 --- a/src/Symfony/Bundle/SecurityBundle/composer.json +++ b/src/Symfony/Bundle/SecurityBundle/composer.json @@ -27,7 +27,7 @@ "symfony/password-hasher": "^5.4|^6.0", "symfony/security-core": "^6.2", "symfony/security-csrf": "^5.4|^6.0", - "symfony/security-http": "^6.2" + "symfony/security-http": "^6.2.6" }, "require-dev": { "doctrine/annotations": "^1.10.4|^2", diff --git a/src/Symfony/Bundle/TwigBundle/CHANGELOG.md b/src/Symfony/Bundle/TwigBundle/CHANGELOG.md index 5502812c27ec1..ba5a3f08850d8 100644 --- a/src/Symfony/Bundle/TwigBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/TwigBundle/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +6.3 +--- + + * Deprecate the `Twig_Environment` autowiring alias, use `Twig\Environment` instead + 6.2 --- diff --git a/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php b/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php index d26ddf358aaba..4e748ddc61228 100644 --- a/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php +++ b/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php @@ -42,15 +42,9 @@ public function warmUp(string $cacheDir): array { $this->twig ??= $this->container->get('twig'); - $files = []; - foreach ($this->iterator as $template) { try { - $template = $this->twig->load($template); - - if (\is_callable([$template, 'unwrap'])) { - $files[] = (new \ReflectionClass($template->unwrap()))->getFileName(); - } + $this->twig->load($template); } catch (Error) { /* * Problem during compilation, give up for this template (e.g. syntax errors). @@ -63,7 +57,7 @@ public function warmUp(string $cacheDir): array } } - return $files; + return []; } public function isOptional(): bool diff --git a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php index f85dd13aa2f3a..10aa983e0ea46 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php @@ -23,7 +23,7 @@ #[AsCommand(name: 'lint:twig', description: 'Lint a Twig template and outputs encountered errors')] final class LintCommand extends BaseLintCommand { - protected function configure() + protected function configure(): void { parent::configure(); diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php index 6654fe08e11a9..5c3cff66fc411 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php @@ -25,6 +25,9 @@ */ class ExtensionPass implements CompilerPassInterface { + /** + * @return void + */ public function process(ContainerBuilder $container) { if (!class_exists(Packages::class)) { diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php index 82cf1c145a312..ecb99ce20ea08 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php @@ -21,6 +21,9 @@ */ class RuntimeLoaderPass implements CompilerPassInterface { + /** + * @return void + */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('twig.runtime_loader')) { diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php index 3a90bce15ffaa..99b975edea3a0 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php @@ -24,6 +24,9 @@ class TwigEnvironmentPass implements CompilerPassInterface { use PriorityTaggedServiceTrait; + /** + * @return void + */ public function process(ContainerBuilder $container) { if (false === $container->hasDefinition('twig')) { diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php index a422f668257ad..1da7e8679724f 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php @@ -23,6 +23,9 @@ */ class TwigLoaderPass implements CompilerPassInterface { + /** + * @return void + */ public function process(ContainerBuilder $container) { if (false === $container->hasDefinition('twig')) { diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php index 0655a51e7c159..4712b18a6ac1b 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php @@ -33,7 +33,7 @@ public function getConfigTreeBuilder(): TreeBuilder $rootNode = $treeBuilder->getRootNode(); $rootNode->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && \array_key_exists('exception_controller', $v); }) + ->ifTrue(fn ($v) => \is_array($v) && \array_key_exists('exception_controller', $v)) ->then(function ($v) { if (isset($v['exception_controller'])) { throw new InvalidConfigurationException('Option "exception_controller" under "twig" must be null or unset, use "error_controller" under "framework" instead.'); @@ -54,7 +54,7 @@ public function getConfigTreeBuilder(): TreeBuilder return $treeBuilder; } - private function addFormThemesSection(ArrayNodeDefinition $rootNode) + private function addFormThemesSection(ArrayNodeDefinition $rootNode): void { $rootNode ->fixXmlConfig('form_theme') @@ -64,17 +64,15 @@ private function addFormThemesSection(ArrayNodeDefinition $rootNode) ->prototype('scalar')->defaultValue('form_div_layout.html.twig')->end() ->example(['@My/form.html.twig']) ->validate() - ->ifTrue(function ($v) { return !\in_array('form_div_layout.html.twig', $v); }) - ->then(function ($v) { - return array_merge(['form_div_layout.html.twig'], $v); - }) + ->ifTrue(fn ($v) => !\in_array('form_div_layout.html.twig', $v)) + ->then(fn ($v) => array_merge(['form_div_layout.html.twig'], $v)) ->end() ->end() ->end() ; } - private function addGlobalsSection(ArrayNodeDefinition $rootNode) + private function addGlobalsSection(ArrayNodeDefinition $rootNode): void { $rootNode ->fixXmlConfig('global') @@ -86,7 +84,7 @@ private function addGlobalsSection(ArrayNodeDefinition $rootNode) ->prototype('array') ->normalizeKeys(false) ->beforeNormalization() - ->ifTrue(function ($v) { return \is_string($v) && str_starts_with($v, '@'); }) + ->ifTrue(fn ($v) => \is_string($v) && str_starts_with($v, '@')) ->then(function ($v) { if (str_starts_with($v, '@@')) { return substr($v, 1); @@ -106,7 +104,7 @@ private function addGlobalsSection(ArrayNodeDefinition $rootNode) return true; }) - ->then(function ($v) { return ['value' => $v]; }) + ->then(fn ($v) => ['value' => $v]) ->end() ->children() ->scalarNode('id')->end() @@ -124,7 +122,7 @@ private function addGlobalsSection(ArrayNodeDefinition $rootNode) ; } - private function addTwigOptions(ArrayNodeDefinition $rootNode) + private function addTwigOptions(ArrayNodeDefinition $rootNode): void { $rootNode ->fixXmlConfig('path') @@ -151,7 +149,7 @@ private function addTwigOptions(ArrayNodeDefinition $rootNode) ->info('Pattern of file name used for cache warmer and linter') ->beforeNormalization() ->ifString() - ->then(function ($value) { return [$value]; }) + ->then(fn ($value) => [$value]) ->end() ->prototype('scalar')->end() ->end() @@ -187,7 +185,7 @@ private function addTwigOptions(ArrayNodeDefinition $rootNode) ; } - private function addTwigFormatOptions(ArrayNodeDefinition $rootNode) + private function addTwigFormatOptions(ArrayNodeDefinition $rootNode): void { $rootNode ->children() @@ -216,7 +214,7 @@ private function addTwigFormatOptions(ArrayNodeDefinition $rootNode) ; } - private function addMailerSection(ArrayNodeDefinition $rootNode) + private function addMailerSection(ArrayNodeDefinition $rootNode): void { $rootNode ->children() diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php index 7505c1fcd36fa..b3eec9ff60e34 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php @@ -42,6 +42,9 @@ public function __construct(string $dateFormat, string $intervalFormat, ?string $this->thousandsSeparator = $thousandsSeparator; } + /** + * @return void + */ public function configure(Environment $environment) { $environment->getExtension(CoreExtension::class)->setDateFormat($this->dateFormat, $this->intervalFormat); @@ -53,7 +56,7 @@ public function configure(Environment $environment) $environment->getExtension(CoreExtension::class)->setNumberFormat($this->decimals, $this->decimalPoint, $this->thousandsSeparator); // wrap UndefinedCallableHandler in closures for lazy-autoloading - $environment->registerUndefinedFilterCallback(function ($name) { return UndefinedCallableHandler::onUndefinedFilter($name); }); - $environment->registerUndefinedFunctionCallback(function ($name) { return UndefinedCallableHandler::onUndefinedFunction($name); }); + $environment->registerUndefinedFilterCallback(fn ($name) => UndefinedCallableHandler::onUndefinedFilter($name)); + $environment->registerUndefinedFunctionCallback(fn ($name) => UndefinedCallableHandler::onUndefinedFunction($name)); } } diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php index b323bf808946e..101dbf699a5a4 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -35,6 +35,9 @@ */ class TwigExtension extends Extension { + /** + * @return void + */ public function load(array $configs, ContainerBuilder $container) { $loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); diff --git a/src/Symfony/Bundle/TwigBundle/LICENSE b/src/Symfony/Bundle/TwigBundle/LICENSE index 008370457251e..0138f8f071351 100644 --- a/src/Symfony/Bundle/TwigBundle/LICENSE +++ b/src/Symfony/Bundle/TwigBundle/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2023 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/TwigBundle/Resources/config/twig.php b/src/Symfony/Bundle/TwigBundle/Resources/config/twig.php index aa5c543b30f40..00ed07c588e05 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/config/twig.php +++ b/src/Symfony/Bundle/TwigBundle/Resources/config/twig.php @@ -68,6 +68,7 @@ ->tag('container.preload', ['class' => TemplateWrapper::class]) ->alias('Twig_Environment', 'twig') + ->deprecate('symfony/twig-bundle', '6.3', 'The "%alias_id%" service alias is deprecated, use "'.Environment::class.'" or "twig" instead.') ->alias(Environment::class, 'twig') ->set('twig.app_variable', AppVariable::class) diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php index 5bc4e6cff02cb..e1fcb3af33a92 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php @@ -207,7 +207,7 @@ public function testTwigLoaderPaths($format) ], $paths); } - public function getFormats() + public static function getFormats() { return [ ['php'], @@ -237,7 +237,7 @@ public function testStopwatchExtensionAvailability($debug, $stopwatchEnabled, $e $this->assertSame($expected, $stopwatchIsAvailable->getValue($tokenParsers[0])); } - public function stopwatchExtensionAvailabilityProvider() + public static function stopwatchExtensionAvailabilityProvider() { return [ 'debug-and-stopwatch-enabled' => [true, true, true], diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Functional/EmptyAppTest.php b/src/Symfony/Bundle/TwigBundle/Tests/Functional/EmptyAppTest.php index bfdf9418a765a..6451f6185150c 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/Functional/EmptyAppTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/Functional/EmptyAppTest.php @@ -58,7 +58,7 @@ public function registerBundles(): iterable return [new TwigBundle()]; } - public function registerContainerConfiguration(LoaderInterface $loader) + public function registerContainerConfiguration(LoaderInterface $loader): void { $loader->load(static function (ContainerBuilder $container) { $container->register('error_renderer.html', HtmlErrorRenderer::class); diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php b/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php index 691430ead578b..a12a48ef51831 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php @@ -59,7 +59,7 @@ public function registerBundles(): iterable return [new FrameworkBundle(), new TwigBundle()]; } - public function registerContainerConfiguration(LoaderInterface $loader) + public function registerContainerConfiguration(LoaderInterface $loader): void { $loader->load(function (ContainerBuilder $container) { $container diff --git a/src/Symfony/Bundle/TwigBundle/TwigBundle.php b/src/Symfony/Bundle/TwigBundle/TwigBundle.php index 3910dd5e2e389..802cb536d123f 100644 --- a/src/Symfony/Bundle/TwigBundle/TwigBundle.php +++ b/src/Symfony/Bundle/TwigBundle/TwigBundle.php @@ -27,6 +27,9 @@ */ class TwigBundle extends Bundle { + /** + * @return void + */ public function build(ContainerBuilder $container) { parent::build($container); @@ -38,6 +41,9 @@ public function build(ContainerBuilder $container) $container->addCompilerPass(new RuntimeLoaderPass(), PassConfig::TYPE_BEFORE_REMOVING); } + /** + * @return void + */ public function registerCommands(Application $application) { // noop diff --git a/src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md b/src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md index c78fffefd8a15..bdcfc3bdc5d3f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md @@ -6,6 +6,7 @@ CHANGELOG * Add a "role=img" and an explicit title in the .svg file used by the web debug toolbar to improve accessibility with screen readers for blind users + * Add a clickable link to the entry view twig file in the toolbar 6.1 --- diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index be5b7883285ec..b9a861df38dd2 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -352,7 +352,7 @@ protected function getTemplateManager(): TemplateManager return $this->templateManager ??= new TemplateManager($this->profiler, $this->twig, $this->templates); } - private function denyAccessIfProfilerDisabled() + private function denyAccessIfProfilerDisabled(): void { if (null === $this->profiler) { throw new NotFoundHttpException('The profiler must be enabled.'); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php b/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php index 3275ea792672b..7fe5018317081 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php @@ -71,7 +71,7 @@ public function getNonces(Request $request, Response $response): array * * All related headers will be removed. */ - public function disableCsp() + public function disableCsp(): void { $this->cspDisabled = true; } @@ -96,13 +96,13 @@ public function updateResponseHeaders(Request $request, Response $response): arr return $nonces; } - private function cleanHeaders(Response $response) + private function cleanHeaders(Response $response): void { $response->headers->remove('X-SymfonyProfiler-Script-Nonce'); $response->headers->remove('X-SymfonyProfiler-Style-Nonce'); } - private function removeCspHeaders(Response $response) + private function removeCspHeaders(Response $response): void { $response->headers->remove('X-Content-Security-Policy'); $response->headers->remove('Content-Security-Policy'); @@ -180,9 +180,7 @@ private function generateNonce(): string */ private function generateCspHeader(array $directives): string { - return array_reduce(array_keys($directives), function ($res, $name) use ($directives) { - return ('' !== $res ? $res.'; ' : '').sprintf('%s %s', $name, implode(' ', $directives[$name])); - }, ''); + return array_reduce(array_keys($directives), fn ($res, $name) => ('' !== $res ? $res.'; ' : '').sprintf('%s %s', $name, implode(' ', $directives[$name])), ''); } /** diff --git a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php index 23a69bc76490c..16e6db29eeaff 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php +++ b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php @@ -37,6 +37,8 @@ class WebProfilerExtension extends Extension * Loads the web profiler configuration. * * @param array $configs An array of configuration settings + * + * @return void */ public function load(array $configs, ContainerBuilder $container) { diff --git a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php index efaa98e0ca50f..c29a389902113 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php +++ b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php @@ -73,7 +73,7 @@ public function setMode(int $mode): void $this->mode = $mode; } - public function onKernelResponse(ResponseEvent $event) + public function onKernelResponse(ResponseEvent $event): void { $response = $event->getResponse(); $request = $event->getRequest(); @@ -134,7 +134,7 @@ public function onKernelResponse(ResponseEvent $event) /** * Injects the web debug toolbar into the given Response. */ - protected function injectToolbar(Response $response, Request $request, array $nonces) + protected function injectToolbar(Response $response, Request $request, array $nonces): void { $content = $response->getContent(); $pos = strripos($content, ''); diff --git a/src/Symfony/Bundle/WebProfilerBundle/LICENSE b/src/Symfony/Bundle/WebProfilerBundle/LICENSE index 008370457251e..0138f8f071351 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/LICENSE +++ b/src/Symfony/Bundle/WebProfilerBundle/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2023 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig index b0353b87db310..ca51978f13333 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -1,5 +1,51 @@ {% extends '@WebProfiler/Profiler/layout.html.twig' %} +{% block head %} + {{ parent() }} + + +{% endblock %} + {% block toolbar %} {% if 'unknown' == collector.symfonyState %} {% set block_status = '' %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig index 3dcd475dcd7ea..fb5b8b7dadaff 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig @@ -41,6 +41,27 @@ {{ parent() }} +{% endblock %} + + {% block toolbar %} {% if collector.requestCount %} {% set icon %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig index 385c80795fdd9..20cf25840bf5b 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -1,5 +1,220 @@ {% extends '@WebProfiler/Profiler/layout.html.twig' %} +{% block head %} + {{ parent() }} + + +{% endblock %} + {% block toolbar %} {% if collector.counterrors or collector.countdeprecations or collector.countwarnings %} {% set icon %} @@ -55,28 +270,25 @@ {% set filters = collector.filters %}
-
    -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • -
+
+ {% set initially_active_tab = has_error_logs ? 'error' : has_deprecation_logs ? 'deprecation' : 'all' %} + + + + + + + + +
@@ -124,13 +336,15 @@ - + - - + + + + @@ -141,7 +355,7 @@ %} - - + + {% endfor %} @@ -137,12 +275,12 @@

- {{ message.headers.get('subject').bodyAsString() ?? '(No subject)' }} + {{ message.getSubject() ?? '(No subject)' }}

-

From: {{ (message.headers.get('from').bodyAsString() ?? '(empty)')|replace({'From:': ''}) }}

-

To: {{ (message.headers.get('to').bodyAsString() ?? '(empty)')|replace({'To:': ''}) }}

- {% for header in message.headers.all|filter(header => (header.name ?? '') not in ['Subject', 'From', 'To']) %} +

From: {{ message.getFrom()|map(addr => addr.toString())|join(', ')|default('(empty)') }}

+

To: {{ message.getTo()|map(addr => addr.toString())|join(', ')|default('(empty)') }}

+ {% for header in message.headers.all|filter(header => (header.name ?? '')|lower not in ['subject', 'from', 'to']) %}

{{ header.toString }}

{% endfor %}
@@ -177,56 +315,59 @@
{% endif %} - {% if message.htmlBody or message.textBody %} -
-
- {% if message.htmlBody %} - {% set htmlBody = message.htmlBody() %} -
-

HTML content

-
-
-                                                    {%- if message.htmlCharset() %}
-                                                        {{- htmlBody|convert_encoding('UTF-8', message.htmlCharset()) }}
-                                                    {%- else %}
-                                                        {{- htmlBody }}
-                                                    {%- endif -%}
-                                                
+
+ {% set textBody = message.textBody %} + {% set htmlBody = message.htmlBody %} +
+
+

Text content

+
+ {% if textBody %} +
+                                                {%- if message.textCharset() %}
+                                                    {{- textBody|convert_encoding('UTF-8', message.textCharset()) }}
+                                                {%- else %}
+                                                    {{- textBody }}
+                                                {%- endif -%}
+                                            
+ {% else %} +
+

The text body is empty.

-
+ {% endif %} +
+
-
-

HTML preview

-
-
-                                                    
-                                                
-
+ {% if htmlBody %} +
+

HTML preview

+
+
+                                            
- {% endif %} - - {% if message.textBody %} - {% set textBody = message.textBody() %} -
-

Text content

-
-
-                                                    {%- if message.textCharset() %}
-                                                        {{- textBody|convert_encoding('UTF-8', message.textCharset()) }}
-                                                    {%- else %}
-                                                        {{- textBody }}
-                                                    {%- endif -%}
-                                                
+
+ {% endif %} + +
+

HTML content

+
+ {% if htmlBody %} +
+                                                {%- if message.htmlCharset() %}
+                                                    {{- htmlBody|convert_encoding('UTF-8', message.htmlCharset()) }}
+                                                {%- else %}
+                                                    {{- htmlBody }}
+                                                {%- endif -%}
+                                            
+ {% else %} +
+

The HTML body is empty.

-
- {% endif %} + {% endif %} +
- {% endif %} +
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/messenger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/messenger.html.twig index cd1b9ece321ed..d803d6f2f80d0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/messenger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/messenger.html.twig @@ -1,5 +1,43 @@ {% extends '@WebProfiler/Profiler/layout.html.twig' %} +{% block head %} + {{ parent() }} + + +{% endblock %} + {% block toolbar %} {% if collector.messages|length > 0 %} {% set status_color = collector.exceptionsCount ? 'red' %} @@ -39,25 +77,6 @@ {% endblock %} -{% block head %} - {{ parent() }} - -{% endblock %} - {% block panel %}

Messages

diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/notifier.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/notifier.html.twig index b0c9219b02b79..7d108394f37da 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/notifier.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/notifier.html.twig @@ -17,7 +17,7 @@ {% for transport in events.transports %}
- {{ transport }} + {{ transport ?: 'Empty Transport Name' }} {{ events.messages(transport)|length }}
{% endfor %} @@ -29,7 +29,7 @@ {% block head %} {{ parent() }} - +{% endblock %} + {% block toolbar %} {% set request_handler %} {{ _self.set_handler(collector.controller) }} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/serializer.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/serializer.html.twig index 238444a0052ef..94540fe1a59c9 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/serializer.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/serializer.html.twig @@ -1,5 +1,33 @@ {% extends '@WebProfiler/Profiler/layout.html.twig' %} +{% block head %} + {{ parent() }} + + +{% endblock %} + {% block toolbar %} {% if collector.handledCount > 0 %} {% set icon %} @@ -126,12 +154,12 @@
{% for item in data %} - - - - - - + + + + + + {% endfor %} @@ -196,11 +224,11 @@ {% for item in data %} - - - - - + + + + + {% endfor %} @@ -235,11 +263,11 @@ {% for item in data %} - - - - - + + + + + {% endfor %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig index 57f85cdfe9ec3..2fb4e0a848f35 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig @@ -1,5 +1,43 @@ {% extends '@WebProfiler/Profiler/layout.html.twig' %} +{% block head %} + {{ parent() }} + + +{% endblock %} + {% block toolbar %} {% set has_time_events = collector.events|length > 0 %} {% set total_time = has_time_events ? '%.0f'|format(collector.duration) : 'n/a' %} @@ -142,7 +180,7 @@ - diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig index ac62bdcf5387a..e568d7e6c9284 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig @@ -4,7 +4,8 @@ diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig index a38bae9405d32..1bca6ae8e8cb8 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig @@ -79,7 +79,7 @@
Profiled on
-
+
Token
{{ profile.token }}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig index 7fc32f99352cb..953ee53f8d2f9 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig @@ -2079,7 +2079,7 @@ tr.log-status-silenced > td:first-child:before { max-width: 888px; } .width-full .sql-explain { - max-width: min-content; + max-width: unset; } .sql-explain table td, .sql-explain table tr { word-break: normal; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig index ae18451444218..befa301a1508f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig @@ -6,6 +6,28 @@ {%- endif -%} {% endmacro %} +{% block head %} + {{ parent() }} + + +{% endblock %} + {% block summary %}

Profile Search

@@ -49,8 +71,12 @@ {{ _self.profile_search_filter(request, result, 'url') }}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/settings.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/settings.html.twig index 71080c737782a..9f96c5b881eb6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/settings.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/settings.html.twig @@ -41,7 +41,9 @@ } .modal-wrap { - -webkit-transition: all 0.3s ease-in-out; + -webkit-transition-duration: 0.3s; + -webkit-transition-property: opacity, visibility; + -webkit-transition-timing-function: ease-in-out; align-items: center; background: rgba(0, 0, 0, 0.70); display: flex; @@ -49,11 +51,13 @@ height: 100%; justify-content: center; left: 0; - opacity: 1; + opacity: 0; overflow: auto; position: fixed; top: 0; - transition: all 0.3s ease-in-out; + transition-duration: 0.3s; + transition-property: opacity, visibility; + transition-timing-function: ease-in-out; visibility: hidden; width: 100%; z-index: 100000; @@ -195,7 +199,7 @@
TimeMessage
TimeMessage
-
{{ loop.index }}{{ event.message.headers.get('subject').bodyAsString() ?? '(No subject)' }}{{ (event.message.headers.get('to').bodyAsString() ?? '(empty)')|replace({'To:': ''}) }}{{ event.message.getSubject() ?? '(No subject)' }}{{ event.message.getTo()|map(addr => addr.toString())|join(', ')|default('(empty)') }}
{{ helper.render_data_cell(item, loop.index, cellPrefix) }}{{ helper.render_context_cell(item, loop.index, cellPrefix) }}{{ helper.render_normalizer_cell(item, loop.index, cellPrefix) }}{{ helper.render_encoder_cell(item, loop.index, cellPrefix) }}{{ helper.render_time_cell(item) }}{{ helper.render_caller_cell(item, loop.index, cellPrefix) }}{{ _self.render_data_cell(item, loop.index, cellPrefix) }}{{ _self.render_context_cell(item, loop.index, cellPrefix) }}{{ _self.render_normalizer_cell(item, loop.index, cellPrefix) }}{{ _self.render_encoder_cell(item, loop.index, cellPrefix) }}{{ _self.render_time_cell(item) }}{{ _self.render_caller_cell(item, loop.index, cellPrefix) }}
{{ helper.render_data_cell(item, loop.index, cellPrefix) }}{{ helper.render_context_cell(item, loop.index, cellPrefix) }}{{ helper.render_normalizer_cell(item, loop.index, cellPrefix) }}{{ helper.render_time_cell(item) }}{{ helper.render_caller_cell(item, loop.index, cellPrefix) }}{{ _self.render_data_cell(item, loop.index, cellPrefix) }}{{ _self.render_context_cell(item, loop.index, cellPrefix) }}{{ _self.render_normalizer_cell(item, loop.index, cellPrefix) }}{{ _self.render_time_cell(item) }}{{ _self.render_caller_cell(item, loop.index, cellPrefix) }}
{{ helper.render_data_cell(item, loop.index, cellPrefix) }}{{ helper.render_context_cell(item, loop.index, cellPrefix) }}{{ helper.render_encoder_cell(item, loop.index, cellPrefix) }}{{ helper.render_time_cell(item) }}{{ helper.render_caller_cell(item, loop.index, cellPrefix) }}{{ _self.render_data_cell(item, loop.index, cellPrefix) }}{{ _self.render_context_cell(item, loop.index, cellPrefix) }}{{ _self.render_encoder_cell(item, loop.index, cellPrefix) }}{{ _self.render_time_cell(item) }}{{ _self.render_caller_cell(item, loop.index, cellPrefix) }}
- {{ result.time|date('d-M-Y') }} - {{ result.time|date('H:i:s') }} + + {{ result.token }}