From 70ba6b21284d99c631b4d26e5f3c51d1f408f3f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 14 May 2025 11:53:12 +0200 Subject: [PATCH 01/59] [WebLink] Add class to parse Link headers from HTTP responses --- DependencyInjection/FrameworkExtension.php | 6 ++++++ Resources/config/web_link.php | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index 912282f49..38cae0ae7 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -216,6 +216,7 @@ use Symfony\Component\Validator\ObjectInitializerInterface; use Symfony\Component\Validator\Validation; use Symfony\Component\Webhook\Controller\WebhookController; +use Symfony\Component\WebLink\HttpHeaderParser; use Symfony\Component\WebLink\HttpHeaderSerializer; use Symfony\Component\Workflow; use Symfony\Component\Workflow\WorkflowInterface; @@ -497,6 +498,11 @@ public function load(array $configs, ContainerBuilder $container): void } $loader->load('web_link.php'); + + // Require symfony/web-link 7.4 + if (!class_exists(HttpHeaderParser::class)) { + $container->removeDefinition('web_link.http_header_parser'); + } } if ($this->readConfigEnabled('uid', $container, $config['uid'])) { diff --git a/Resources/config/web_link.php b/Resources/config/web_link.php index 64345cc99..df55d1947 100644 --- a/Resources/config/web_link.php +++ b/Resources/config/web_link.php @@ -12,6 +12,7 @@ namespace Symfony\Component\DependencyInjection\Loader\Configurator; use Symfony\Component\WebLink\EventListener\AddLinkHeaderListener; +use Symfony\Component\WebLink\HttpHeaderParser; use Symfony\Component\WebLink\HttpHeaderSerializer; return static function (ContainerConfigurator $container) { @@ -20,6 +21,9 @@ ->set('web_link.http_header_serializer', HttpHeaderSerializer::class) ->alias(HttpHeaderSerializer::class, 'web_link.http_header_serializer') + ->set('web_link.http_header_parser', HttpHeaderParser::class) + ->alias(HttpHeaderParser::class, 'web_link.http_header_parser') + ->set('web_link.add_link_header_listener', AddLinkHeaderListener::class) ->args([ service('web_link.http_header_serializer'), From 79e7b61e8e79b90eece8b33012c17e9e8c2b28b3 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 1 Jun 2025 23:04:34 +0200 Subject: [PATCH 02/59] do not restrict experimental components to a single minor version --- composer.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 15a9496d1..fa4ec0074 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,7 @@ "symfony/messenger": "^6.4|^7.0", "symfony/mime": "^6.4|^7.0", "symfony/notifier": "^6.4|^7.0", - "symfony/object-mapper": "^v7.3.0-beta2", + "symfony/object-mapper": "^7.3", "symfony/process": "^6.4|^7.0", "symfony/rate-limiter": "^6.4|^7.0", "symfony/scheduler": "^6.4.4|^7.0.4", @@ -70,7 +70,7 @@ "symfony/workflow": "^7.3", "symfony/yaml": "^6.4|^7.0", "symfony/property-info": "^6.4|^7.0", - "symfony/json-streamer": "7.3.*", + "symfony/json-streamer": "^7.3", "symfony/uid": "^6.4|^7.0", "symfony/web-link": "^6.4|^7.0", "symfony/webhook": "^7.2", @@ -89,12 +89,10 @@ "symfony/dom-crawler": "<6.4", "symfony/http-client": "<6.4", "symfony/form": "<6.4", - "symfony/json-streamer": ">=7.4", "symfony/lock": "<6.4", "symfony/mailer": "<6.4", "symfony/messenger": "<6.4", "symfony/mime": "<6.4", - "symfony/object-mapper": ">=7.4", "symfony/property-info": "<6.4", "symfony/property-access": "<6.4", "symfony/runtime": "<6.4.13|>=7.0,<7.1.6", From 0ecd22828dfc30cb2e7c89301aa1055e30126f93 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 30 May 2025 15:05:58 +0200 Subject: [PATCH 03/59] [DependencyInjection][FrameworkBundle] Use php-serialize to dump the container for debug/lint commands --- Command/BuildDebugContainerTrait.php | 20 ++++++---- Command/ContainerLintCommand.php | 16 +++++--- .../ContainerBuilderDebugDumpPass.php | 38 +++++++++++++++++-- 3 files changed, 59 insertions(+), 15 deletions(-) diff --git a/Command/BuildDebugContainerTrait.php b/Command/BuildDebugContainerTrait.php index 2f625e9e3..011510095 100644 --- a/Command/BuildDebugContainerTrait.php +++ b/Command/BuildDebugContainerTrait.php @@ -39,7 +39,9 @@ protected function getContainerBuilder(KernelInterface $kernel): ContainerBuilde return $this->container; } - if (!$kernel->isDebug() || !$kernel->getContainer()->getParameter('debug.container.dump') || !(new ConfigCache($kernel->getContainer()->getParameter('debug.container.dump'), true))->isFresh()) { + $file = $kernel->isDebug() ? $kernel->getContainer()->getParameter('debug.container.dump') : false; + + if (!$file || !(new ConfigCache($file, true))->isFresh()) { $buildContainer = \Closure::bind(function () { $this->initializeBundles(); @@ -57,13 +59,17 @@ protected function getContainerBuilder(KernelInterface $kernel): ContainerBuilde return $containerBuilder; }, $kernel, $kernel::class); $container = $buildContainer(); - (new XmlFileLoader($container, new FileLocator()))->load($kernel->getContainer()->getParameter('debug.container.dump')); - $locatorPass = new ServiceLocatorTagPass(); - $locatorPass->process($container); - $container->getCompilerPassConfig()->setBeforeOptimizationPasses([]); - $container->getCompilerPassConfig()->setOptimizationPasses([]); - $container->getCompilerPassConfig()->setBeforeRemovingPasses([]); + if (str_ends_with($file, '.xml') && is_file(substr_replace($file, '.ser', -4))) { + $dumpedContainer = unserialize(file_get_contents(substr_replace($file, '.ser', -4))); + $container->setDefinitions($dumpedContainer->getDefinitions()); + $container->setAliases($dumpedContainer->getAliases()); + $container->__construct($dumpedContainer->getParameterBag()); + } else { + (new XmlFileLoader($container, new FileLocator()))->load($file); + $locatorPass = new ServiceLocatorTagPass(); + $locatorPass->process($container); + } } return $this->container = $container; diff --git a/Command/ContainerLintCommand.php b/Command/ContainerLintCommand.php index e794e88c4..423b58a38 100644 --- a/Command/ContainerLintCommand.php +++ b/Command/ContainerLintCommand.php @@ -79,9 +79,10 @@ private function getContainerBuilder(): ContainerBuilder } $kernel = $this->getApplication()->getKernel(); - $kernelContainer = $kernel->getContainer(); + $container = $kernel->getContainer(); + $file = $container->isDebug() ? $container->getParameter('debug.container.dump') : false; - if (!$kernel->isDebug() || !$kernelContainer->getParameter('debug.container.dump') || !(new ConfigCache($kernelContainer->getParameter('debug.container.dump'), true))->isFresh()) { + if (!$file || !(new ConfigCache($file, true))->isFresh()) { if (!$kernel instanceof Kernel) { throw new RuntimeException(\sprintf('This command does not support the application kernel: "%s" does not extend "%s".', get_debug_type($kernel), Kernel::class)); } @@ -93,12 +94,17 @@ private function getContainerBuilder(): ContainerBuilder }, $kernel, $kernel::class); $container = $buildContainer(); } else { - if (!$kernelContainer instanceof Container) { - throw new RuntimeException(\sprintf('This command does not support the application container: "%s" does not extend "%s".', get_debug_type($kernelContainer), Container::class)); + if (str_ends_with($file, '.xml') && is_file(substr_replace($file, '.ser', -4))) { + $container = unserialize(file_get_contents(substr_replace($file, '.ser', -4))); + } else { + (new XmlFileLoader($container = new ContainerBuilder(new EnvPlaceholderParameterBag()), new FileLocator()))->load($file); } - (new XmlFileLoader($container = new ContainerBuilder($parameterBag = new EnvPlaceholderParameterBag()), new FileLocator()))->load($kernelContainer->getParameter('debug.container.dump')); + if (!$container instanceof ContainerBuilder) { + throw new RuntimeException(\sprintf('This command does not support the application container: "%s" is not a "%s".', get_debug_type($container), ContainerBuilder::class)); + } + $parameterBag = $container->getParameterBag(); $refl = new \ReflectionProperty($parameterBag, 'resolved'); $refl->setValue($parameterBag, true); diff --git a/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php b/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php index e4023e623..b3a036c37 100644 --- a/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php +++ b/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php @@ -13,8 +13,11 @@ use Symfony\Component\Config\ConfigCache; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Compiler\ResolveEnvPlaceholdersPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Dumper\XmlDumper; +use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; +use Symfony\Component\Filesystem\Filesystem; /** * Dumps the ContainerBuilder to a cache file so that it can be used by @@ -31,9 +34,38 @@ public function process(ContainerBuilder $container): void return; } - $cache = new ConfigCache($container->getParameter('debug.container.dump'), true); - if (!$cache->isFresh()) { - $cache->write((new XmlDumper($container))->dump(), $container->getResources()); + $file = $container->getParameter('debug.container.dump'); + $cache = new ConfigCache($file, true); + if ($cache->isFresh()) { + return; + } + $cache->write((new XmlDumper($container))->dump(), $container->getResources()); + + if (!str_ends_with($file, '.xml')) { + return; + } + + $file = substr_replace($file, '.ser', -4); + + try { + $dump = new ContainerBuilder(clone $container->getParameterBag()); + $dump->setDefinitions(unserialize(serialize($container->getDefinitions()))); + $dump->setAliases($container->getAliases()); + + if (($bag = $container->getParameterBag()) instanceof EnvPlaceholderParameterBag) { + (new ResolveEnvPlaceholdersPass(null))->process($dump); + $dump->__construct(new EnvPlaceholderParameterBag($container->resolveEnvPlaceholders($bag->all()))); + } + + $fs = new Filesystem(); + $fs->dumpFile($file, serialize($dump)); + $fs->chmod($file, 0666, umask()); + } catch (\Throwable $e) { + $container->getCompiler()->log($this, $e->getMessage()); + // ignore serialization and file-system errors + if (file_exists($file)) { + @unlink($file); + } } } } From 13dd0f884b6d96d9a490dacf0cc0d4b50c52b585 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 2 Jun 2025 16:08:14 +0200 Subject: [PATCH 04/59] Allow Symfony ^8.0 --- composer.json | 94 +++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/composer.json b/composer.json index fa4ec0074..4814cc601 100644 --- a/composer.json +++ b/composer.json @@ -19,61 +19,61 @@ "php": ">=8.2", "composer-runtime-api": ">=2.1", "ext-xml": "*", - "symfony/cache": "^6.4|^7.0", - "symfony/config": "^7.3", - "symfony/dependency-injection": "^7.2", + "symfony/cache": "^6.4|^7.0|^8.0", + "symfony/config": "^7.3|^8.0", + "symfony/dependency-injection": "^7.2|^8.0", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/error-handler": "^7.3", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/http-foundation": "^7.3", - "symfony/http-kernel": "^7.2", + "symfony/error-handler": "^7.3|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^7.3|^8.0", + "symfony/http-kernel": "^7.2|^8.0", "symfony/polyfill-mbstring": "~1.0", - "symfony/filesystem": "^7.1", - "symfony/finder": "^6.4|^7.0", - "symfony/routing": "^6.4|^7.0" + "symfony/filesystem": "^7.1|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/routing": "^6.4|^7.0|^8.0" }, "require-dev": { "doctrine/persistence": "^1.3|^2|^3", "dragonmantank/cron-expression": "^3.1", "seld/jsonlint": "^1.10", - "symfony/asset": "^6.4|^7.0", - "symfony/asset-mapper": "^6.4|^7.0", - "symfony/browser-kit": "^6.4|^7.0", - "symfony/console": "^6.4|^7.0", - "symfony/clock": "^6.4|^7.0", - "symfony/css-selector": "^6.4|^7.0", - "symfony/dom-crawler": "^6.4|^7.0", - "symfony/dotenv": "^6.4|^7.0", + "symfony/asset": "^6.4|^7.0|^8.0", + "symfony/asset-mapper": "^6.4|^7.0|^8.0", + "symfony/browser-kit": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/css-selector": "^6.4|^7.0|^8.0", + "symfony/dom-crawler": "^6.4|^7.0|^8.0", + "symfony/dotenv": "^6.4|^7.0|^8.0", "symfony/polyfill-intl-icu": "~1.0", - "symfony/form": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/html-sanitizer": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/lock": "^6.4|^7.0", - "symfony/mailer": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/mime": "^6.4|^7.0", - "symfony/notifier": "^6.4|^7.0", - "symfony/object-mapper": "^7.3", - "symfony/process": "^6.4|^7.0", - "symfony/rate-limiter": "^6.4|^7.0", - "symfony/scheduler": "^6.4.4|^7.0.4", - "symfony/security-bundle": "^6.4|^7.0", - "symfony/semaphore": "^6.4|^7.0", - "symfony/serializer": "^7.2.5", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/string": "^6.4|^7.0", - "symfony/translation": "^7.3", - "symfony/twig-bundle": "^6.4|^7.0", - "symfony/type-info": "^7.1", - "symfony/validator": "^6.4|^7.0", - "symfony/workflow": "^7.3", - "symfony/yaml": "^6.4|^7.0", - "symfony/property-info": "^6.4|^7.0", - "symfony/json-streamer": "^7.3", - "symfony/uid": "^6.4|^7.0", - "symfony/web-link": "^6.4|^7.0", - "symfony/webhook": "^7.2", + "symfony/form": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/html-sanitizer": "^6.4|^7.0|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/mailer": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/notifier": "^6.4|^7.0|^8.0", + "symfony/object-mapper": "^7.3|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/rate-limiter": "^6.4|^7.0|^8.0", + "symfony/scheduler": "^6.4.4|^7.0.4|^8.0", + "symfony/security-bundle": "^6.4|^7.0|^8.0", + "symfony/semaphore": "^6.4|^7.0|^8.0", + "symfony/serializer": "^7.2.5|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/string": "^6.4|^7.0|^8.0", + "symfony/translation": "^7.3|^8.0", + "symfony/twig-bundle": "^6.4|^7.0|^8.0", + "symfony/type-info": "^7.1|^8.0", + "symfony/validator": "^6.4|^7.0|^8.0", + "symfony/workflow": "^7.3|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/json-streamer": "^7.3|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/web-link": "^6.4|^7.0|^8.0", + "symfony/webhook": "^7.2|^8.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "twig/twig": "^3.12" }, From 67beea1c6b5a769a900cb34938897b953eaea04a Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 2 Jun 2025 17:50:55 +0200 Subject: [PATCH 05/59] Bump Symfony 8 to PHP >= 8.4 --- composer.json | 134 +++++++++++++++++++++----------------------------- 1 file changed, 56 insertions(+), 78 deletions(-) diff --git a/composer.json b/composer.json index 4814cc601..a10a0f1ac 100644 --- a/composer.json +++ b/composer.json @@ -16,98 +16,76 @@ } ], "require": { - "php": ">=8.2", + "php": ">=8.4", "composer-runtime-api": ">=2.1", "ext-xml": "*", - "symfony/cache": "^6.4|^7.0|^8.0", - "symfony/config": "^7.3|^8.0", - "symfony/dependency-injection": "^7.2|^8.0", + "symfony/cache": "^7.4|^8.0", + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/error-handler": "^7.3|^8.0", - "symfony/event-dispatcher": "^6.4|^7.0|^8.0", - "symfony/http-foundation": "^7.3|^8.0", - "symfony/http-kernel": "^7.2|^8.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/filesystem": "^7.1|^8.0", - "symfony/finder": "^6.4|^7.0|^8.0", - "symfony/routing": "^6.4|^7.0|^8.0" + "symfony/error-handler": "^7.4|^8.0", + "symfony/event-dispatcher": "^7.4|^8.0", + "symfony/filesystem": "^7.4|^8.0", + "symfony/finder": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/routing": "^7.4|^8.0" }, "require-dev": { "doctrine/persistence": "^1.3|^2|^3", "dragonmantank/cron-expression": "^3.1", - "seld/jsonlint": "^1.10", - "symfony/asset": "^6.4|^7.0|^8.0", - "symfony/asset-mapper": "^6.4|^7.0|^8.0", - "symfony/browser-kit": "^6.4|^7.0|^8.0", - "symfony/console": "^6.4|^7.0|^8.0", - "symfony/clock": "^6.4|^7.0|^8.0", - "symfony/css-selector": "^6.4|^7.0|^8.0", - "symfony/dom-crawler": "^6.4|^7.0|^8.0", - "symfony/dotenv": "^6.4|^7.0|^8.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/form": "^6.4|^7.0|^8.0", - "symfony/expression-language": "^6.4|^7.0|^8.0", - "symfony/html-sanitizer": "^6.4|^7.0|^8.0", - "symfony/http-client": "^6.4|^7.0|^8.0", - "symfony/lock": "^6.4|^7.0|^8.0", - "symfony/mailer": "^6.4|^7.0|^8.0", - "symfony/messenger": "^6.4|^7.0|^8.0", - "symfony/mime": "^6.4|^7.0|^8.0", - "symfony/notifier": "^6.4|^7.0|^8.0", - "symfony/object-mapper": "^7.3|^8.0", - "symfony/process": "^6.4|^7.0|^8.0", - "symfony/rate-limiter": "^6.4|^7.0|^8.0", - "symfony/scheduler": "^6.4.4|^7.0.4|^8.0", - "symfony/security-bundle": "^6.4|^7.0|^8.0", - "symfony/semaphore": "^6.4|^7.0|^8.0", - "symfony/serializer": "^7.2.5|^8.0", - "symfony/stopwatch": "^6.4|^7.0|^8.0", - "symfony/string": "^6.4|^7.0|^8.0", - "symfony/translation": "^7.3|^8.0", - "symfony/twig-bundle": "^6.4|^7.0|^8.0", - "symfony/type-info": "^7.1|^8.0", - "symfony/validator": "^6.4|^7.0|^8.0", - "symfony/workflow": "^7.3|^8.0", - "symfony/yaml": "^6.4|^7.0|^8.0", - "symfony/property-info": "^6.4|^7.0|^8.0", - "symfony/json-streamer": "^7.3|^8.0", - "symfony/uid": "^6.4|^7.0|^8.0", - "symfony/web-link": "^6.4|^7.0|^8.0", - "symfony/webhook": "^7.2|^8.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "seld/jsonlint": "^1.10", + "symfony/asset": "^7.4|^8.0", + "symfony/asset-mapper": "^7.4|^8.0", + "symfony/browser-kit": "^7.4|^8.0", + "symfony/clock": "^7.4|^8.0", + "symfony/console": "^7.4|^8.0", + "symfony/css-selector": "^7.4|^8.0", + "symfony/dom-crawler": "^7.4|^8.0", + "symfony/dotenv": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/form": "^7.4|^8.0", + "symfony/html-sanitizer": "^7.4|^8.0", + "symfony/http-client": "^7.4|^8.0", + "symfony/json-streamer": "^7.4|^8.0", + "symfony/lock": "^7.4|^8.0", + "symfony/mailer": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/mime": "^7.4|^8.0", + "symfony/notifier": "^7.4|^8.0", + "symfony/object-mapper": "^7.4|^8.0", + "symfony/polyfill-intl-icu": "^1.0", + "symfony/process": "^7.4|^8.0", + "symfony/property-info": "^7.4|^8.0", + "symfony/rate-limiter": "^7.4|^8.0", + "symfony/scheduler": "^7.4|^8.0", + "symfony/security-bundle": "^7.4|^8.0", + "symfony/semaphore": "^7.4|^8.0", + "symfony/serializer": "^7.4|^8.0", + "symfony/stopwatch": "^7.4|^8.0", + "symfony/string": "^7.4|^8.0", + "symfony/translation": "^7.4|^8.0", + "symfony/twig-bundle": "^7.4|^8.0", + "symfony/type-info": "^7.4|^8.0", + "symfony/uid": "^7.4|^8.0", + "symfony/validator": "^7.4|^8.0", + "symfony/workflow": "^7.4|^8.0", + "symfony/web-link": "^7.4|^8.0", + "symfony/webhook": "^7.4|^8.0", + "symfony/yaml": "^7.4|^8.0", "twig/twig": "^3.12" }, "conflict": { "doctrine/persistence": "<1.3", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/asset": "<6.4", - "symfony/asset-mapper": "<6.4", - "symfony/clock": "<6.4", - "symfony/console": "<6.4", - "symfony/dotenv": "<6.4", - "symfony/dom-crawler": "<6.4", - "symfony/http-client": "<6.4", - "symfony/form": "<6.4", - "symfony/lock": "<6.4", - "symfony/mailer": "<6.4", - "symfony/messenger": "<6.4", - "symfony/mime": "<6.4", - "symfony/property-info": "<6.4", - "symfony/property-access": "<6.4", - "symfony/runtime": "<6.4.13|>=7.0,<7.1.6", - "symfony/scheduler": "<6.4.4|>=7.0.0,<7.0.4", - "symfony/security-csrf": "<7.2", - "symfony/security-core": "<6.4", - "symfony/serializer": "<7.2.5", - "symfony/stopwatch": "<6.4", - "symfony/translation": "<7.3", - "symfony/twig-bridge": "<6.4", - "symfony/twig-bundle": "<6.4", - "symfony/validator": "<6.4", - "symfony/web-profiler-bundle": "<6.4", - "symfony/webhook": "<7.2", - "symfony/workflow": "<7.3.0-beta2" + "symfony/security-csrf": "<7.4", + "symfony/serializer": "<7.4", + "symfony/translation": "<7.4", + "symfony/webhook": "<7.4", + "symfony/workflow": "<7.4" }, "autoload": { "psr-4": { "Symfony\\Bundle\\FrameworkBundle\\": "" }, From 8724e953c475642541572a11bf599cd0aa715680 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 3 Jun 2025 17:41:25 +0200 Subject: [PATCH 06/59] Remove deadcode after the bump to PHP >= 8.4 --- DependencyInjection/FrameworkExtension.php | 5 ----- Resources/config/json_streamer.php | 8 -------- 2 files changed, 13 deletions(-) diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index 937ba2d2c..7674c9738 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -2131,11 +2131,6 @@ private function registerJsonStreamerConfiguration(array $config, ContainerBuild $container->setParameter('.json_streamer.stream_writers_dir', '%kernel.cache_dir%/json_streamer/stream_writer'); $container->setParameter('.json_streamer.stream_readers_dir', '%kernel.cache_dir%/json_streamer/stream_reader'); - $container->setParameter('.json_streamer.lazy_ghosts_dir', '%kernel.cache_dir%/json_streamer/lazy_ghost'); - - if (\PHP_VERSION_ID >= 80400) { - $container->removeDefinition('.json_streamer.cache_warmer.lazy_ghost'); - } } private function registerPropertyInfoConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader): void diff --git a/Resources/config/json_streamer.php b/Resources/config/json_streamer.php index 79fb25833..4b38f0a50 100644 --- a/Resources/config/json_streamer.php +++ b/Resources/config/json_streamer.php @@ -38,7 +38,6 @@ tagged_locator('json_streamer.value_transformer'), service('json_streamer.read.property_metadata_loader'), param('.json_streamer.stream_readers_dir'), - param('.json_streamer.lazy_ghosts_dir'), ]) ->alias(JsonStreamWriter::class, 'json_streamer.stream_writer') ->alias(JsonStreamReader::class, 'json_streamer.stream_reader') @@ -108,12 +107,5 @@ service('logger')->ignoreOnInvalid(), ]) ->tag('kernel.cache_warmer') - - ->set('.json_streamer.cache_warmer.lazy_ghost', LazyGhostCacheWarmer::class) - ->args([ - abstract_arg('streamable class names'), - param('.json_streamer.lazy_ghosts_dir'), - ]) - ->tag('kernel.cache_warmer') ; }; From 59fddfe981668f6cbb7edba751130f065adcd899 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 5 Jun 2025 10:47:29 +0200 Subject: [PATCH 07/59] Tweak return type declarations and related CI checks --- Tests/Kernel/MicroKernelTraitTest.php | 25 ----------------- Tests/Kernel/MinimalKernel.php | 39 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 25 deletions(-) create mode 100644 Tests/Kernel/MinimalKernel.php diff --git a/Tests/Kernel/MicroKernelTraitTest.php b/Tests/Kernel/MicroKernelTraitTest.php index 5c7161124..159dd21eb 100644 --- a/Tests/Kernel/MicroKernelTraitTest.php +++ b/Tests/Kernel/MicroKernelTraitTest.php @@ -14,7 +14,6 @@ use PHPUnit\Framework\TestCase; use Psr\Log\NullLogger; use Symfony\Bundle\FrameworkBundle\Console\Application; -use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; @@ -186,27 +185,3 @@ public function testDefaultKernel() $this->assertSame('OK', $response->getContent()); } } - -abstract class MinimalKernel extends Kernel -{ - use MicroKernelTrait; - - private string $cacheDir; - - public function __construct(string $cacheDir) - { - parent::__construct('test', false); - - $this->cacheDir = sys_get_temp_dir().'/'.$cacheDir; - } - - public function getCacheDir(): string - { - return $this->cacheDir; - } - - public function getLogDir(): string - { - return $this->cacheDir; - } -} diff --git a/Tests/Kernel/MinimalKernel.php b/Tests/Kernel/MinimalKernel.php new file mode 100644 index 000000000..df2c97e6a --- /dev/null +++ b/Tests/Kernel/MinimalKernel.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Kernel; + +use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; +use Symfony\Component\HttpKernel\Kernel; + +abstract class MinimalKernel extends Kernel +{ + use MicroKernelTrait; + + private string $cacheDir; + + public function __construct(string $cacheDir) + { + parent::__construct('test', false); + + $this->cacheDir = sys_get_temp_dir().'/'.$cacheDir; + } + + public function getCacheDir(): string + { + return $this->cacheDir; + } + + public function getLogDir(): string + { + return $this->cacheDir; + } +} From 7e7374c547b5b8e53856e5c976ce23aaaea6ece0 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 5 Jun 2025 18:38:40 +0200 Subject: [PATCH 08/59] [VarExporter] Remove `LazyGhostTrait` and `LazyProxyTrait` in favor of native lazy objects --- Resources/config/json_streamer.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Resources/config/json_streamer.php b/Resources/config/json_streamer.php index 4b38f0a50..b6daf512c 100644 --- a/Resources/config/json_streamer.php +++ b/Resources/config/json_streamer.php @@ -11,7 +11,6 @@ namespace Symfony\Component\DependencyInjection\Loader\Configurator; -use Symfony\Component\JsonStreamer\CacheWarmer\LazyGhostCacheWarmer; use Symfony\Component\JsonStreamer\CacheWarmer\StreamerCacheWarmer; use Symfony\Component\JsonStreamer\JsonStreamReader; use Symfony\Component\JsonStreamer\JsonStreamWriter; From f6c70603774888c9efa7586f5489932520e2ff40 Mon Sep 17 00:00:00 2001 From: HypeMC Date: Thu, 5 Jun 2025 23:57:46 +0200 Subject: [PATCH 09/59] [FrameworkBundle] Enable constructor extractor by default --- CHANGELOG.md | 5 +++++ DependencyInjection/Configuration.php | 11 +---------- Tests/DependencyInjection/ConfigurationTest.php | 3 ++- Tests/DependencyInjection/Fixtures/php/full.php | 5 +---- .../Fixtures/php/property_info.php | 1 - ...> property_info_without_constructor_extractor.php} | 2 +- .../Fixtures/php/validation_auto_mapping.php | 5 +---- Tests/DependencyInjection/Fixtures/xml/full.xml | 2 +- .../Fixtures/xml/property_info.xml | 2 +- ...> property_info_without_constructor_extractor.xml} | 2 +- .../Fixtures/xml/validation_auto_mapping.xml | 2 +- Tests/DependencyInjection/Fixtures/yml/full.yml | 3 +-- .../Fixtures/yml/property_info.yml | 1 - ...> property_info_without_constructor_extractor.yml} | 2 +- .../Fixtures/yml/validation_auto_mapping.yml | 4 +--- .../FrameworkExtensionTestCase.php | 8 ++++---- Tests/Functional/app/ApiAttributesTest/config.yml | 4 +--- Tests/Functional/app/ContainerDump/config.yml | 4 +--- Tests/Functional/app/Serializer/config.yml | 4 +--- 19 files changed, 25 insertions(+), 45 deletions(-) rename Tests/DependencyInjection/Fixtures/php/{property_info_with_constructor_extractor.php => property_info_without_constructor_extractor.php} (84%) rename Tests/DependencyInjection/Fixtures/xml/{property_info_with_constructor_extractor.xml => property_info_without_constructor_extractor.xml} (97%) rename Tests/DependencyInjection/Fixtures/yml/{property_info_with_constructor_extractor.yml => property_info_without_constructor_extractor.yml} (80%) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce62c9cdf..05084098d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +8.0 +--- + + * Enable the property info constructor extractor by default + 7.3 --- diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index f4e137f04..c23af059e 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -1281,20 +1281,11 @@ private function addPropertyInfoSection(ArrayNodeDefinition $rootNode, callable ->children() ->booleanNode('with_constructor_extractor') ->info('Registers the constructor extractor.') + ->defaultTrue() ->end() ->end() ->end() ->end() - ->validate() - ->ifTrue(fn ($v) => $v['property_info']['enabled'] && !isset($v['property_info']['with_constructor_extractor'])) - ->then(function ($v) { - $v['property_info']['with_constructor_extractor'] = false; - - trigger_deprecation('symfony/framework-bundle', '7.3', 'Not setting the "property_info.with_constructor_extractor" option explicitly is deprecated because its default value will change in version 8.0.'); - - return $v; - }) - ->end() ; } diff --git a/Tests/DependencyInjection/ConfigurationTest.php b/Tests/DependencyInjection/ConfigurationTest.php index c8142e98a..ccb4fea5d 100644 --- a/Tests/DependencyInjection/ConfigurationTest.php +++ b/Tests/DependencyInjection/ConfigurationTest.php @@ -826,7 +826,8 @@ protected static function getBundleDefaultConfig() ], 'property_info' => [ 'enabled' => !class_exists(FullStack::class), - ] + (!class_exists(FullStack::class) ? ['with_constructor_extractor' => false] : []), + 'with_constructor_extractor' => true, + ], 'router' => [ 'enabled' => false, 'default_uri' => null, diff --git a/Tests/DependencyInjection/Fixtures/php/full.php b/Tests/DependencyInjection/Fixtures/php/full.php index cb7762829..0a32ce8b3 100644 --- a/Tests/DependencyInjection/Fixtures/php/full.php +++ b/Tests/DependencyInjection/Fixtures/php/full.php @@ -74,10 +74,7 @@ ], ], ], - 'property_info' => [ - 'enabled' => true, - 'with_constructor_extractor' => true, - ], + 'property_info' => true, 'type_info' => true, 'ide' => 'file%%link%%format', 'request' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/property_info.php b/Tests/DependencyInjection/Fixtures/php/property_info.php index e2437e2c2..b234c4527 100644 --- a/Tests/DependencyInjection/Fixtures/php/property_info.php +++ b/Tests/DependencyInjection/Fixtures/php/property_info.php @@ -7,6 +7,5 @@ 'php_errors' => ['log' => true], 'property_info' => [ 'enabled' => true, - 'with_constructor_extractor' => false, ], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/property_info_with_constructor_extractor.php b/Tests/DependencyInjection/Fixtures/php/property_info_without_constructor_extractor.php similarity index 84% rename from Tests/DependencyInjection/Fixtures/php/property_info_with_constructor_extractor.php rename to Tests/DependencyInjection/Fixtures/php/property_info_without_constructor_extractor.php index fa143d2e1..e2437e2c2 100644 --- a/Tests/DependencyInjection/Fixtures/php/property_info_with_constructor_extractor.php +++ b/Tests/DependencyInjection/Fixtures/php/property_info_without_constructor_extractor.php @@ -7,6 +7,6 @@ 'php_errors' => ['log' => true], 'property_info' => [ 'enabled' => true, - 'with_constructor_extractor' => true, + 'with_constructor_extractor' => false, ], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/validation_auto_mapping.php b/Tests/DependencyInjection/Fixtures/php/validation_auto_mapping.php index 67bac4a32..ae5bea2ea 100644 --- a/Tests/DependencyInjection/Fixtures/php/validation_auto_mapping.php +++ b/Tests/DependencyInjection/Fixtures/php/validation_auto_mapping.php @@ -5,10 +5,7 @@ 'http_method_override' => false, 'handle_all_throwables' => true, 'php_errors' => ['log' => true], - 'property_info' => [ - 'enabled' => true, - 'with_constructor_extractor' => true, - ], + 'property_info' => ['enabled' => true], 'validation' => [ 'email_validation_mode' => 'html5', 'auto_mapping' => [ diff --git a/Tests/DependencyInjection/Fixtures/xml/full.xml b/Tests/DependencyInjection/Fixtures/xml/full.xml index 07faf22ab..851a6c24b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/full.xml +++ b/Tests/DependencyInjection/Fixtures/xml/full.xml @@ -44,7 +44,7 @@ - + diff --git a/Tests/DependencyInjection/Fixtures/xml/property_info.xml b/Tests/DependencyInjection/Fixtures/xml/property_info.xml index 19bac44d9..5f49aabaa 100644 --- a/Tests/DependencyInjection/Fixtures/xml/property_info.xml +++ b/Tests/DependencyInjection/Fixtures/xml/property_info.xml @@ -8,6 +8,6 @@ - + diff --git a/Tests/DependencyInjection/Fixtures/xml/property_info_with_constructor_extractor.xml b/Tests/DependencyInjection/Fixtures/xml/property_info_without_constructor_extractor.xml similarity index 97% rename from Tests/DependencyInjection/Fixtures/xml/property_info_with_constructor_extractor.xml rename to Tests/DependencyInjection/Fixtures/xml/property_info_without_constructor_extractor.xml index df8dabe0b..19bac44d9 100644 --- a/Tests/DependencyInjection/Fixtures/xml/property_info_with_constructor_extractor.xml +++ b/Tests/DependencyInjection/Fixtures/xml/property_info_without_constructor_extractor.xml @@ -8,6 +8,6 @@ - + diff --git a/Tests/DependencyInjection/Fixtures/xml/validation_auto_mapping.xml b/Tests/DependencyInjection/Fixtures/xml/validation_auto_mapping.xml index 966598091..c60691b0b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/validation_auto_mapping.xml +++ b/Tests/DependencyInjection/Fixtures/xml/validation_auto_mapping.xml @@ -6,7 +6,7 @@ - + foo diff --git a/Tests/DependencyInjection/Fixtures/yml/full.yml b/Tests/DependencyInjection/Fixtures/yml/full.yml index 8a1a3834b..515381638 100644 --- a/Tests/DependencyInjection/Fixtures/yml/full.yml +++ b/Tests/DependencyInjection/Fixtures/yml/full.yml @@ -64,8 +64,7 @@ framework: default_context: enable_max_depth: false type_info: ~ - property_info: - with_constructor_extractor: true + property_info: ~ ide: file%%link%%format request: formats: diff --git a/Tests/DependencyInjection/Fixtures/yml/property_info.yml b/Tests/DependencyInjection/Fixtures/yml/property_info.yml index 4fde73710..de05e6bb7 100644 --- a/Tests/DependencyInjection/Fixtures/yml/property_info.yml +++ b/Tests/DependencyInjection/Fixtures/yml/property_info.yml @@ -6,4 +6,3 @@ framework: log: true property_info: enabled: true - with_constructor_extractor: false diff --git a/Tests/DependencyInjection/Fixtures/yml/property_info_with_constructor_extractor.yml b/Tests/DependencyInjection/Fixtures/yml/property_info_without_constructor_extractor.yml similarity index 80% rename from Tests/DependencyInjection/Fixtures/yml/property_info_with_constructor_extractor.yml rename to Tests/DependencyInjection/Fixtures/yml/property_info_without_constructor_extractor.yml index a43762df3..4fde73710 100644 --- a/Tests/DependencyInjection/Fixtures/yml/property_info_with_constructor_extractor.yml +++ b/Tests/DependencyInjection/Fixtures/yml/property_info_without_constructor_extractor.yml @@ -6,4 +6,4 @@ framework: log: true property_info: enabled: true - with_constructor_extractor: true + with_constructor_extractor: false diff --git a/Tests/DependencyInjection/Fixtures/yml/validation_auto_mapping.yml b/Tests/DependencyInjection/Fixtures/yml/validation_auto_mapping.yml index e81203e24..55a43886f 100644 --- a/Tests/DependencyInjection/Fixtures/yml/validation_auto_mapping.yml +++ b/Tests/DependencyInjection/Fixtures/yml/validation_auto_mapping.yml @@ -4,9 +4,7 @@ framework: handle_all_throwables: true php_errors: log: true - property_info: - enabled: true - with_constructor_extractor: true + property_info: { enabled: true } validation: email_validation_mode: html5 auto_mapping: diff --git a/Tests/DependencyInjection/FrameworkExtensionTestCase.php b/Tests/DependencyInjection/FrameworkExtensionTestCase.php index 5ef658693..05031aabc 100644 --- a/Tests/DependencyInjection/FrameworkExtensionTestCase.php +++ b/Tests/DependencyInjection/FrameworkExtensionTestCase.php @@ -1773,14 +1773,14 @@ public function testPropertyInfoEnabled() { $container = $this->createContainerFromFile('property_info'); $this->assertTrue($container->has('property_info')); - $this->assertFalse($container->has('property_info.constructor_extractor')); + $this->assertTrue($container->has('property_info.constructor_extractor')); } - public function testPropertyInfoWithConstructorExtractorEnabled() + public function testPropertyInfoWithConstructorExtractorDisabled() { - $container = $this->createContainerFromFile('property_info_with_constructor_extractor'); + $container = $this->createContainerFromFile('property_info_without_constructor_extractor'); $this->assertTrue($container->has('property_info')); - $this->assertTrue($container->has('property_info.constructor_extractor')); + $this->assertFalse($container->has('property_info.constructor_extractor')); } public function testPropertyInfoCacheActivated() diff --git a/Tests/Functional/app/ApiAttributesTest/config.yml b/Tests/Functional/app/ApiAttributesTest/config.yml index 00bdd8ab9..8b218d48c 100644 --- a/Tests/Functional/app/ApiAttributesTest/config.yml +++ b/Tests/Functional/app/ApiAttributesTest/config.yml @@ -5,6 +5,4 @@ framework: serializer: enabled: true validation: true - property_info: - enabled: true - with_constructor_extractor: true + property_info: { enabled: true } diff --git a/Tests/Functional/app/ContainerDump/config.yml b/Tests/Functional/app/ContainerDump/config.yml index 48bff3240..3efa5f950 100644 --- a/Tests/Functional/app/ContainerDump/config.yml +++ b/Tests/Functional/app/ContainerDump/config.yml @@ -15,8 +15,6 @@ framework: translator: true validation: true serializer: true - property_info: - enabled: true - with_constructor_extractor: true + property_info: true csrf_protection: true form: true diff --git a/Tests/Functional/app/Serializer/config.yml b/Tests/Functional/app/Serializer/config.yml index 3c0c35417..2f20dab9e 100644 --- a/Tests/Functional/app/Serializer/config.yml +++ b/Tests/Functional/app/Serializer/config.yml @@ -10,9 +10,7 @@ framework: max_depth_handler: Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Serializer\MaxDepthHandler default_context: enable_max_depth: true - property_info: - enabled: true - with_constructor_extractor: true + property_info: { enabled: true } services: serializer.alias: From 1187ec1677dbb62ad0794a912b648b09aef27bb3 Mon Sep 17 00:00:00 2001 From: Mathias Arlaud Date: Mon, 2 Jun 2025 16:22:00 +0200 Subject: [PATCH 10/59] [PropertyInfo] Remove deprecated code --- Tests/Functional/PropertyInfoTest.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Tests/Functional/PropertyInfoTest.php b/Tests/Functional/PropertyInfoTest.php index 18cd61b08..bf1c11cb5 100644 --- a/Tests/Functional/PropertyInfoTest.php +++ b/Tests/Functional/PropertyInfoTest.php @@ -11,7 +11,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; -use Symfony\Component\PropertyInfo\Type as LegacyType; use Symfony\Component\TypeInfo\Type; class PropertyInfoTest extends AbstractWebTestCase @@ -28,22 +27,6 @@ public function testPhpDocPriority() $this->assertEquals(Type::list(Type::int()), $propertyInfo->getType(Dummy::class, 'codes')); } - - /** - * @group legacy - */ - public function testPhpDocPriorityLegacy() - { - static::bootKernel(['test_case' => 'Serializer']); - - $propertyInfo = static::getContainer()->get('property_info'); - - if (!method_exists($propertyInfo, 'getTypes')) { - $this->markTestSkipped(); - } - - $this->assertEquals([new LegacyType('array', false, null, true, new LegacyType('int'), new LegacyType('int'))], $propertyInfo->getTypes(Dummy::class, 'codes')); - } } class Dummy From ccdd87db3c227aba9e1e3598777bb7438af00fdf Mon Sep 17 00:00:00 2001 From: HypeMC Date: Mon, 9 Jun 2025 17:40:54 +0200 Subject: [PATCH 11/59] [Console] Simplify using invokable commands when the component is used standalone --- CHANGELOG.md | 5 +++++ Console/Application.php | 22 +++++++++++++++++-- .../Command/AboutCommand/AboutCommandTest.php | 2 +- Tests/Command/CachePoolClearCommandTest.php | 2 +- Tests/Command/CachePoolDeleteCommandTest.php | 4 ++-- Tests/Command/CachePruneCommandTest.php | 2 +- Tests/Command/RouterMatchCommandTest.php | 4 ++-- Tests/Command/TranslationDebugCommandTest.php | 2 +- ...ranslationExtractCommandCompletionTest.php | 2 +- .../Command/TranslationExtractCommandTest.php | 2 +- Tests/Command/WorkflowDumpCommandTest.php | 7 +++++- Tests/Command/XliffLintCommandTest.php | 7 +++++- Tests/Command/YamlLintCommandTest.php | 7 +++++- Tests/Console/ApplicationTest.php | 2 +- Tests/Functional/BundlePathsTest.php | 2 +- .../Functional/CachePoolClearCommandTest.php | 2 +- Tests/Functional/CachePoolListCommandTest.php | 2 +- Tests/Functional/ConfigDebugCommandTest.php | 2 +- .../ConfigDumpReferenceCommandTest.php | 2 +- .../Functional/DebugAutowiringCommandTest.php | 2 +- 20 files changed, 60 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce62c9cdf..203644c01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +7.4 +--- + + * Deprecate `Symfony\Bundle\FrameworkBundle\Console\Application::add()` in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()` + 7.3 --- diff --git a/Console/Application.php b/Console/Application.php index 274e7b06d..8eb3808a5 100644 --- a/Console/Application.php +++ b/Console/Application.php @@ -159,11 +159,29 @@ public function getLongVersion(): string return parent::getLongVersion().\sprintf(' (env: %s, debug: %s)', $this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false'); } + /** + * @deprecated since Symfony 7.4, use Application::addCommand() instead + */ public function add(Command $command): ?Command + { + trigger_deprecation('symfony/framework-bundle', '7.4', 'The "%s()" method is deprecated and will be removed in Symfony 8.0, use "%s::addCommand()" instead.', __METHOD__, self::class); + + return $this->addCommand($command); + } + + public function addCommand(callable|Command $command): ?Command { $this->registerCommands(); - return parent::add($command); + if (!method_exists(BaseApplication::class, 'addCommand')) { + if (!$command instanceof Command) { + throw new \LogicException('Using callables as commands requires symfony/console 7.4 or higher.'); + } + + return parent::add($command); + } + + return parent::addCommand($command); } protected function registerCommands(): void @@ -197,7 +215,7 @@ protected function registerCommands(): void foreach ($container->getParameter('console.command.ids') as $id) { if (!isset($lazyCommandIds[$id])) { try { - $this->add($container->get($id)); + $this->addCommand($container->get($id)); } catch (\Throwable $e) { $this->registrationErrors[] = $e; } diff --git a/Tests/Command/AboutCommand/AboutCommandTest.php b/Tests/Command/AboutCommand/AboutCommandTest.php index bcf3c7fe0..ee3904be3 100644 --- a/Tests/Command/AboutCommand/AboutCommandTest.php +++ b/Tests/Command/AboutCommand/AboutCommandTest.php @@ -82,7 +82,7 @@ public function testAboutWithUnreadableFiles() private function createCommandTester(TestAppKernel $kernel): CommandTester { $application = new Application($kernel); - $application->add(new AboutCommand()); + $application->addCommand(new AboutCommand()); return new CommandTester($application->find('about')); } diff --git a/Tests/Command/CachePoolClearCommandTest.php b/Tests/Command/CachePoolClearCommandTest.php index 3a927f217..c98d7ed92 100644 --- a/Tests/Command/CachePoolClearCommandTest.php +++ b/Tests/Command/CachePoolClearCommandTest.php @@ -36,7 +36,7 @@ protected function setUp(): void public function testComplete(array $input, array $expectedSuggestions) { $application = new Application($this->getKernel()); - $application->add(new CachePoolClearCommand(new Psr6CacheClearer(['foo' => $this->cachePool]), ['foo'])); + $application->addCommand(new CachePoolClearCommand(new Psr6CacheClearer(['foo' => $this->cachePool]), ['foo'])); $tester = new CommandCompletionTester($application->get('cache:pool:clear')); $suggestions = $tester->complete($input); diff --git a/Tests/Command/CachePoolDeleteCommandTest.php b/Tests/Command/CachePoolDeleteCommandTest.php index 3db39e121..b4c11d4db 100644 --- a/Tests/Command/CachePoolDeleteCommandTest.php +++ b/Tests/Command/CachePoolDeleteCommandTest.php @@ -90,7 +90,7 @@ public function testCommandDeleteFailed() public function testComplete(array $input, array $expectedSuggestions) { $application = new Application($this->getKernel()); - $application->add(new CachePoolDeleteCommand(new Psr6CacheClearer(['foo' => $this->cachePool]), ['foo'])); + $application->addCommand(new CachePoolDeleteCommand(new Psr6CacheClearer(['foo' => $this->cachePool]), ['foo'])); $tester = new CommandCompletionTester($application->get('cache:pool:delete')); $suggestions = $tester->complete($input); @@ -125,7 +125,7 @@ private function getKernel(): MockObject&KernelInterface private function getCommandTester(KernelInterface $kernel): CommandTester { $application = new Application($kernel); - $application->add(new CachePoolDeleteCommand(new Psr6CacheClearer(['foo' => $this->cachePool]))); + $application->addCommand(new CachePoolDeleteCommand(new Psr6CacheClearer(['foo' => $this->cachePool]))); return new CommandTester($application->find('cache:pool:delete')); } diff --git a/Tests/Command/CachePruneCommandTest.php b/Tests/Command/CachePruneCommandTest.php index a2d0ad7fe..18a3622f2 100644 --- a/Tests/Command/CachePruneCommandTest.php +++ b/Tests/Command/CachePruneCommandTest.php @@ -77,7 +77,7 @@ private function getPruneableInterfaceMock(): MockObject&PruneableInterface private function getCommandTester(KernelInterface $kernel, RewindableGenerator $generator): CommandTester { $application = new Application($kernel); - $application->add(new CachePoolPruneCommand($generator)); + $application->addCommand(new CachePoolPruneCommand($generator)); return new CommandTester($application->find('cache:pool:prune')); } diff --git a/Tests/Command/RouterMatchCommandTest.php b/Tests/Command/RouterMatchCommandTest.php index b6b6771f9..97b1859be 100644 --- a/Tests/Command/RouterMatchCommandTest.php +++ b/Tests/Command/RouterMatchCommandTest.php @@ -46,8 +46,8 @@ public function testWithNotMatchPath() private function createCommandTester(): CommandTester { $application = new Application($this->getKernel()); - $application->add(new RouterMatchCommand($this->getRouter())); - $application->add(new RouterDebugCommand($this->getRouter())); + $application->addCommand(new RouterMatchCommand($this->getRouter())); + $application->addCommand(new RouterDebugCommand($this->getRouter())); return new CommandTester($application->find('router:match')); } diff --git a/Tests/Command/TranslationDebugCommandTest.php b/Tests/Command/TranslationDebugCommandTest.php index c6c91a857..1b114ad49 100644 --- a/Tests/Command/TranslationDebugCommandTest.php +++ b/Tests/Command/TranslationDebugCommandTest.php @@ -223,7 +223,7 @@ function ($path, $catalogue) use ($loadedMessages) { $command = new TranslationDebugCommand($translator, $loader, $extractor, $this->translationDir.'/translations', $this->translationDir.'/templates', $transPaths, $codePaths, $enabledLocales); $application = new Application($kernel); - $application->add($command); + $application->addCommand($command); return $application->find('debug:translation'); } diff --git a/Tests/Command/TranslationExtractCommandCompletionTest.php b/Tests/Command/TranslationExtractCommandCompletionTest.php index 6d2f22d96..a47b0913f 100644 --- a/Tests/Command/TranslationExtractCommandCompletionTest.php +++ b/Tests/Command/TranslationExtractCommandCompletionTest.php @@ -132,7 +132,7 @@ function ($path, $catalogue) use ($loadedMessages) { $command = new TranslationExtractCommand($writer, $loader, $extractor, 'en', $this->translationDir.'/translations', $this->translationDir.'/templates', $transPaths, $codePaths, ['en', 'fr']); $application = new Application($kernel); - $application->add($command); + $application->addCommand($command); return new CommandCompletionTester($application->find('translation:extract')); } diff --git a/Tests/Command/TranslationExtractCommandTest.php b/Tests/Command/TranslationExtractCommandTest.php index c5e78de12..22927d210 100644 --- a/Tests/Command/TranslationExtractCommandTest.php +++ b/Tests/Command/TranslationExtractCommandTest.php @@ -304,7 +304,7 @@ function (MessageCatalogue $catalogue) use ($writerMessages) { $command = new TranslationExtractCommand($writer, $loader, $extractor, 'en', $this->translationDir.'/translations', $this->translationDir.'/templates', $transPaths, $codePaths); $application = new Application($kernel); - $application->add($command); + $application->addCommand($command); return new CommandTester($application->find('translation:extract')); } diff --git a/Tests/Command/WorkflowDumpCommandTest.php b/Tests/Command/WorkflowDumpCommandTest.php index 284e97623..34009756a 100644 --- a/Tests/Command/WorkflowDumpCommandTest.php +++ b/Tests/Command/WorkflowDumpCommandTest.php @@ -25,7 +25,12 @@ class WorkflowDumpCommandTest extends TestCase public function testComplete(array $input, array $expectedSuggestions) { $application = new Application(); - $application->add(new WorkflowDumpCommand(new ServiceLocator([]))); + $command = new WorkflowDumpCommand(new ServiceLocator([])); + if (method_exists($application, 'addCommand')) { + $application->addCommand($command); + } else { + $application->add($command); + } $tester = new CommandCompletionTester($application->find('workflow:dump')); $suggestions = $tester->complete($input, 2); diff --git a/Tests/Command/XliffLintCommandTest.php b/Tests/Command/XliffLintCommandTest.php index d5495ada9..ed96fbb00 100644 --- a/Tests/Command/XliffLintCommandTest.php +++ b/Tests/Command/XliffLintCommandTest.php @@ -59,7 +59,12 @@ private function createCommandTester($application = null): CommandTester { if (!$application) { $application = new BaseApplication(); - $application->add(new XliffLintCommand()); + $command = new XliffLintCommand(); + if (method_exists($application, 'addCommand')) { + $application->addCommand($command); + } else { + $application->add($command); + } } $command = $application->find('lint:xliff'); diff --git a/Tests/Command/YamlLintCommandTest.php b/Tests/Command/YamlLintCommandTest.php index ec2093119..30a73015b 100644 --- a/Tests/Command/YamlLintCommandTest.php +++ b/Tests/Command/YamlLintCommandTest.php @@ -107,7 +107,12 @@ private function createCommandTester($application = null): CommandTester { if (!$application) { $application = new BaseApplication(); - $application->add(new YamlLintCommand()); + $command = new YamlLintCommand(); + if (method_exists($application, 'addCommand')) { + $application->addCommand($command); + } else { + $application->add($command); + } } $command = $application->find('lint:yaml'); diff --git a/Tests/Console/ApplicationTest.php b/Tests/Console/ApplicationTest.php index 0b92a813c..7f712107c 100644 --- a/Tests/Console/ApplicationTest.php +++ b/Tests/Console/ApplicationTest.php @@ -119,7 +119,7 @@ public function testBundleCommandCanOverriddeAPreExistingCommandWithTheSameName( $application = new Application($kernel); $newCommand = new Command('example'); - $application->add($newCommand); + $application->addCommand($newCommand); $this->assertSame($newCommand, $application->get('example')); } diff --git a/Tests/Functional/BundlePathsTest.php b/Tests/Functional/BundlePathsTest.php index a06803434..45663f0bf 100644 --- a/Tests/Functional/BundlePathsTest.php +++ b/Tests/Functional/BundlePathsTest.php @@ -28,7 +28,7 @@ public function testBundlePublicDir() $fs = new Filesystem(); $fs->remove($projectDir); $fs->mkdir($projectDir.'/public'); - $command = (new Application($kernel))->add(new AssetsInstallCommand($fs, $projectDir)); + $command = (new Application($kernel))->addCommand(new AssetsInstallCommand($fs, $projectDir)); $exitCode = (new CommandTester($command))->execute(['target' => $projectDir.'/public']); $this->assertSame(0, $exitCode); diff --git a/Tests/Functional/CachePoolClearCommandTest.php b/Tests/Functional/CachePoolClearCommandTest.php index dbd78645d..a2966b5a2 100644 --- a/Tests/Functional/CachePoolClearCommandTest.php +++ b/Tests/Functional/CachePoolClearCommandTest.php @@ -146,7 +146,7 @@ public function testExcludedPool() private function createCommandTester(?array $poolNames = null) { $application = new Application(static::$kernel); - $application->add(new CachePoolClearCommand(static::getContainer()->get('cache.global_clearer'), $poolNames)); + $application->addCommand(new CachePoolClearCommand(static::getContainer()->get('cache.global_clearer'), $poolNames)); return new CommandTester($application->find('cache:pool:clear')); } diff --git a/Tests/Functional/CachePoolListCommandTest.php b/Tests/Functional/CachePoolListCommandTest.php index 8e9061845..eec484026 100644 --- a/Tests/Functional/CachePoolListCommandTest.php +++ b/Tests/Functional/CachePoolListCommandTest.php @@ -46,7 +46,7 @@ public function testEmptyList() private function createCommandTester(array $poolNames) { $application = new Application(static::$kernel); - $application->add(new CachePoolListCommand($poolNames)); + $application->addCommand(new CachePoolListCommand($poolNames)); return new CommandTester($application->find('cache:pool:list')); } diff --git a/Tests/Functional/ConfigDebugCommandTest.php b/Tests/Functional/ConfigDebugCommandTest.php index bd1539636..1819e7f4e 100644 --- a/Tests/Functional/ConfigDebugCommandTest.php +++ b/Tests/Functional/ConfigDebugCommandTest.php @@ -241,7 +241,7 @@ public function testComplete(bool $debug, array $input, array $expectedSuggestio { $application = $this->createApplication($debug); - $application->add(new ConfigDebugCommand()); + $application->addCommand(new ConfigDebugCommand()); $tester = new CommandCompletionTester($application->get('debug:config')); $suggestions = $tester->complete($input); diff --git a/Tests/Functional/ConfigDumpReferenceCommandTest.php b/Tests/Functional/ConfigDumpReferenceCommandTest.php index 8f5930faa..a16d8e046 100644 --- a/Tests/Functional/ConfigDumpReferenceCommandTest.php +++ b/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -132,7 +132,7 @@ public function testComplete(bool $debug, array $input, array $expectedSuggestio { $application = $this->createApplication($debug); - $application->add(new ConfigDumpReferenceCommand()); + $application->addCommand(new ConfigDumpReferenceCommand()); $tester = new CommandCompletionTester($application->get('config:dump-reference')); $suggestions = $tester->complete($input); $this->assertSame($expectedSuggestions, $suggestions); diff --git a/Tests/Functional/DebugAutowiringCommandTest.php b/Tests/Functional/DebugAutowiringCommandTest.php index ca11e3fae..b43a12ed6 100644 --- a/Tests/Functional/DebugAutowiringCommandTest.php +++ b/Tests/Functional/DebugAutowiringCommandTest.php @@ -122,7 +122,7 @@ public function testNotConfusedByClassAliases() public function testComplete(array $input, array $expectedSuggestions) { $kernel = static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml']); - $command = (new Application($kernel))->add(new DebugAutowiringCommand()); + $command = (new Application($kernel))->addCommand(new DebugAutowiringCommand()); $tester = new CommandCompletionTester($command); From 2075113566a543cfc698b4f48332d4c45ac3aa99 Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Wed, 11 Jun 2025 19:08:03 -0300 Subject: [PATCH 12/59] [Mailer] Add new `assertEmailAddressNotContains` method --- CHANGELOG.md | 1 + Test/MailerAssertionsTrait.php | 5 +++++ Tests/Functional/MailerTest.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 203644c01..b18639e4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ CHANGELOG --- * Deprecate `Symfony\Bundle\FrameworkBundle\Console\Application::add()` in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()` + * Add `assertEmailAddressNotContains()` to the `MailerAssertionsTrait` 7.3 --- diff --git a/Test/MailerAssertionsTrait.php b/Test/MailerAssertionsTrait.php index 2308c3e2f..07f4c99f5 100644 --- a/Test/MailerAssertionsTrait.php +++ b/Test/MailerAssertionsTrait.php @@ -90,6 +90,11 @@ public static function assertEmailAddressContains(RawMessage $email, string $hea self::assertThat($email, new MimeConstraint\EmailAddressContains($headerName, $expectedValue), $message); } + public static function assertEmailAddressNotContains(RawMessage $email, string $headerName, string $expectedValue, string $message = ''): void + { + self::assertThat($email, new LogicalNot(new MimeConstraint\EmailAddressContains($headerName, $expectedValue)), $message); + } + public static function assertEmailSubjectContains(RawMessage $email, string $expectedValue, string $message = ''): void { self::assertThat($email, new MimeConstraint\EmailSubjectContains($expectedValue), $message); diff --git a/Tests/Functional/MailerTest.php b/Tests/Functional/MailerTest.php index 1ba71d74f..4193e3ff7 100644 --- a/Tests/Functional/MailerTest.php +++ b/Tests/Functional/MailerTest.php @@ -99,6 +99,7 @@ public function testMailerAssertions() $this->assertEmailHtmlBodyContains($email, 'Foo'); $this->assertEmailHtmlBodyNotContains($email, 'Bar'); $this->assertEmailAttachmentCount($email, 1); + $this->assertEmailAddressNotContains($email, 'To', 'thomas@symfony.com'); $email = $this->getMailerMessage($second); $this->assertEmailSubjectContains($email, 'Foo'); @@ -106,5 +107,7 @@ public function testMailerAssertions() $this->assertEmailAddressContains($email, 'To', 'fabien@symfony.com'); $this->assertEmailAddressContains($email, 'To', 'thomas@symfony.com'); $this->assertEmailAddressContains($email, 'Reply-To', 'me@symfony.com'); + $this->assertEmailAddressNotContains($email, 'To', 'helene@symfony.com'); + $this->assertEmailAddressNotContains($email, 'Reply-To', 'helene@symfony.com'); } } From 6db416a6fe3157375fed0cd9574da53b8e334d86 Mon Sep 17 00:00:00 2001 From: HypeMC Date: Fri, 13 Jun 2025 02:20:31 +0200 Subject: [PATCH 13/59] [Console][FrameworkBundle] Remove deprecated `Application::add()` methods --- CHANGELOG.md | 1 + Console/Application.php | 18 ------------------ Tests/Command/WorkflowDumpCommandTest.php | 7 +------ Tests/Command/XliffLintCommandTest.php | 7 +------ Tests/Command/YamlLintCommandTest.php | 7 +------ composer.json | 1 + 6 files changed, 5 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e0633b7f..bb5e5007a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ CHANGELOG --- * Enable the property info constructor extractor by default + * Remove deprecated `Symfony\Bundle\FrameworkBundle\Console\Application::add()` method in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()` 7.4 --- diff --git a/Console/Application.php b/Console/Application.php index 8eb3808a5..2a0eb2907 100644 --- a/Console/Application.php +++ b/Console/Application.php @@ -159,28 +159,10 @@ public function getLongVersion(): string return parent::getLongVersion().\sprintf(' (env: %s, debug: %s)', $this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false'); } - /** - * @deprecated since Symfony 7.4, use Application::addCommand() instead - */ - public function add(Command $command): ?Command - { - trigger_deprecation('symfony/framework-bundle', '7.4', 'The "%s()" method is deprecated and will be removed in Symfony 8.0, use "%s::addCommand()" instead.', __METHOD__, self::class); - - return $this->addCommand($command); - } - public function addCommand(callable|Command $command): ?Command { $this->registerCommands(); - if (!method_exists(BaseApplication::class, 'addCommand')) { - if (!$command instanceof Command) { - throw new \LogicException('Using callables as commands requires symfony/console 7.4 or higher.'); - } - - return parent::add($command); - } - return parent::addCommand($command); } diff --git a/Tests/Command/WorkflowDumpCommandTest.php b/Tests/Command/WorkflowDumpCommandTest.php index 34009756a..f9f70491d 100644 --- a/Tests/Command/WorkflowDumpCommandTest.php +++ b/Tests/Command/WorkflowDumpCommandTest.php @@ -25,12 +25,7 @@ class WorkflowDumpCommandTest extends TestCase public function testComplete(array $input, array $expectedSuggestions) { $application = new Application(); - $command = new WorkflowDumpCommand(new ServiceLocator([])); - if (method_exists($application, 'addCommand')) { - $application->addCommand($command); - } else { - $application->add($command); - } + $application->addCommand(new WorkflowDumpCommand(new ServiceLocator([]))); $tester = new CommandCompletionTester($application->find('workflow:dump')); $suggestions = $tester->complete($input, 2); diff --git a/Tests/Command/XliffLintCommandTest.php b/Tests/Command/XliffLintCommandTest.php index ed96fbb00..622173f27 100644 --- a/Tests/Command/XliffLintCommandTest.php +++ b/Tests/Command/XliffLintCommandTest.php @@ -59,12 +59,7 @@ private function createCommandTester($application = null): CommandTester { if (!$application) { $application = new BaseApplication(); - $command = new XliffLintCommand(); - if (method_exists($application, 'addCommand')) { - $application->addCommand($command); - } else { - $application->add($command); - } + $application->addCommand(new XliffLintCommand()); } $command = $application->find('lint:xliff'); diff --git a/Tests/Command/YamlLintCommandTest.php b/Tests/Command/YamlLintCommandTest.php index 30a73015b..4b40b567b 100644 --- a/Tests/Command/YamlLintCommandTest.php +++ b/Tests/Command/YamlLintCommandTest.php @@ -107,12 +107,7 @@ private function createCommandTester($application = null): CommandTester { if (!$application) { $application = new BaseApplication(); - $command = new YamlLintCommand(); - if (method_exists($application, 'addCommand')) { - $application->addCommand($command); - } else { - $application->add($command); - } + $application->addCommand(new YamlLintCommand()); } $command = $application->find('lint:yaml'); diff --git a/composer.json b/composer.json index a10a0f1ac..aac0b545d 100644 --- a/composer.json +++ b/composer.json @@ -81,6 +81,7 @@ "doctrine/persistence": "<1.3", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", + "symfony/console": "<7.4", "symfony/security-csrf": "<7.4", "symfony/serializer": "<7.4", "symfony/translation": "<7.4", From 6f1e900eb37c90e6ebc84893f1a6bd6b0e17ce31 Mon Sep 17 00:00:00 2001 From: Jack Worman Date: Mon, 9 Jun 2025 08:20:00 -0400 Subject: [PATCH 14/59] Improve-callable-typing --- Console/Descriptor/TextDescriptor.php | 3 +++ Console/Descriptor/XmlDescriptor.php | 3 +++ Routing/Router.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Console/Descriptor/TextDescriptor.php b/Console/Descriptor/TextDescriptor.php index 12b345411..a5b31b186 100644 --- a/Console/Descriptor/TextDescriptor.php +++ b/Console/Descriptor/TextDescriptor.php @@ -576,6 +576,9 @@ private function formatRouterConfig(array $config): string return trim($configAsString); } + /** + * @param (callable():ContainerBuilder)|null $getContainer + */ private function formatControllerLink(mixed $controller, string $anchorText, ?callable $getContainer = null): string { if (null === $this->fileLinkFormatter) { diff --git a/Console/Descriptor/XmlDescriptor.php b/Console/Descriptor/XmlDescriptor.php index 8daa61d2a..6a25ae3a3 100644 --- a/Console/Descriptor/XmlDescriptor.php +++ b/Console/Descriptor/XmlDescriptor.php @@ -288,6 +288,9 @@ private function getContainerServiceDocument(object $service, string $id, ?Conta return $dom; } + /** + * @param (callable(string):bool)|null $filter + */ private function getContainerServicesDocument(ContainerBuilder $container, ?string $tag = null, bool $showHidden = false, ?callable $filter = null): \DOMDocument { $dom = new \DOMDocument('1.0', 'UTF-8'); diff --git a/Routing/Router.php b/Routing/Router.php index 9efa07fae..f9e41273c 100644 --- a/Routing/Router.php +++ b/Routing/Router.php @@ -36,6 +36,9 @@ class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberInterface { private array $collectedParameters = []; + /** + * @var \Closure(string):mixed + */ private \Closure $paramFetcher; /** From 2967178b1b9a26650f78a8e66871b2b68f38d64b Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Fri, 13 Jun 2025 23:13:45 +0200 Subject: [PATCH 15/59] [FrameworkBundle] Allow to un-verbose all the method in `BrowserKitAssertionsTrait` --- Test/BrowserKitAssertionsTrait.php | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/Test/BrowserKitAssertionsTrait.php b/Test/BrowserKitAssertionsTrait.php index 1b7437b77..7d49aa61d 100644 --- a/Test/BrowserKitAssertionsTrait.php +++ b/Test/BrowserKitAssertionsTrait.php @@ -28,24 +28,31 @@ */ trait BrowserKitAssertionsTrait { - public static function assertResponseIsSuccessful(string $message = '', bool $verbose = true): void + private static bool $defaultVerboseMode = true; + + public static function setBrowserKitAssertionsAsVerbose(bool $verbose): void + { + self::$defaultVerboseMode = $verbose; + } + + public static function assertResponseIsSuccessful(string $message = '', ?bool $verbose = null): void { - self::assertThatForResponse(new ResponseConstraint\ResponseIsSuccessful($verbose), $message); + self::assertThatForResponse(new ResponseConstraint\ResponseIsSuccessful($verbose ?? self::$defaultVerboseMode), $message); } - public static function assertResponseStatusCodeSame(int $expectedCode, string $message = '', bool $verbose = true): void + public static function assertResponseStatusCodeSame(int $expectedCode, string $message = '', ?bool $verbose = null): void { - self::assertThatForResponse(new ResponseConstraint\ResponseStatusCodeSame($expectedCode, $verbose), $message); + self::assertThatForResponse(new ResponseConstraint\ResponseStatusCodeSame($expectedCode, $verbose ?? self::$defaultVerboseMode), $message); } - public static function assertResponseFormatSame(?string $expectedFormat, string $message = ''): void + public static function assertResponseFormatSame(?string $expectedFormat, string $message = '', ?bool $verbose = null): void { - self::assertThatForResponse(new ResponseConstraint\ResponseFormatSame(self::getRequest(), $expectedFormat), $message); + self::assertThatForResponse(new ResponseConstraint\ResponseFormatSame(self::getRequest(), $expectedFormat, $verbose ?? self::$defaultVerboseMode), $message); } - public static function assertResponseRedirects(?string $expectedLocation = null, ?int $expectedCode = null, string $message = '', bool $verbose = true): void + public static function assertResponseRedirects(?string $expectedLocation = null, ?int $expectedCode = null, string $message = '', ?bool $verbose = null): void { - $constraint = new ResponseConstraint\ResponseIsRedirected($verbose); + $constraint = new ResponseConstraint\ResponseIsRedirected($verbose ?? self::$defaultVerboseMode); if ($expectedLocation) { if (class_exists(ResponseConstraint\ResponseHeaderLocationSame::class)) { $locationConstraint = new ResponseConstraint\ResponseHeaderLocationSame(self::getRequest(), $expectedLocation); @@ -100,9 +107,9 @@ public static function assertResponseCookieValueSame(string $name, string $expec ), $message); } - public static function assertResponseIsUnprocessable(string $message = '', bool $verbose = true): void + public static function assertResponseIsUnprocessable(string $message = '', ?bool $verbose = null): void { - self::assertThatForResponse(new ResponseConstraint\ResponseIsUnprocessable($verbose), $message); + self::assertThatForResponse(new ResponseConstraint\ResponseIsUnprocessable($verbose ?? self::$defaultVerboseMode), $message); } public static function assertBrowserHasCookie(string $name, string $path = '/', ?string $domain = null, string $message = ''): void From 13b5d298d5144ff1c211266bd5b92c496f7c4bc8 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 20 Jun 2025 14:59:29 +0200 Subject: [PATCH 16/59] remove the Sms77 Notifier bridge --- DependencyInjection/FrameworkExtension.php | 1 - Resources/config/notifier_transports.php | 1 - 2 files changed, 2 deletions(-) diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index eeb1e8527..02ec15f4c 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -3114,7 +3114,6 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $ NotifierBridge\Sevenio\SevenIoTransportFactory::class => 'notifier.transport_factory.sevenio', NotifierBridge\Sinch\SinchTransportFactory::class => 'notifier.transport_factory.sinch', NotifierBridge\Slack\SlackTransportFactory::class => 'notifier.transport_factory.slack', - NotifierBridge\Sms77\Sms77TransportFactory::class => 'notifier.transport_factory.sms77', NotifierBridge\Smsapi\SmsapiTransportFactory::class => 'notifier.transport_factory.smsapi', NotifierBridge\SmsBiuras\SmsBiurasTransportFactory::class => 'notifier.transport_factory.sms-biuras', NotifierBridge\Smsbox\SmsboxTransportFactory::class => 'notifier.transport_factory.smsbox', diff --git a/Resources/config/notifier_transports.php b/Resources/config/notifier_transports.php index d1adcfc37..b7516214b 100644 --- a/Resources/config/notifier_transports.php +++ b/Resources/config/notifier_transports.php @@ -102,7 +102,6 @@ 'sms-biuras' => Bridge\SmsBiuras\SmsBiurasTransportFactory::class, 'sms-factor' => Bridge\SmsFactor\SmsFactorTransportFactory::class, 'sms-sluzba' => Bridge\SmsSluzba\SmsSluzbaTransportFactory::class, - 'sms77' => Bridge\Sms77\Sms77TransportFactory::class, 'smsapi' => Bridge\Smsapi\SmsapiTransportFactory::class, 'smsbox' => Bridge\Smsbox\SmsboxTransportFactory::class, 'smsc' => Bridge\Smsc\SmscTransportFactory::class, From fc538543f669b1878e924dfc1c22d634162a369c Mon Sep 17 00:00:00 2001 From: Valmonzo Date: Mon, 23 Jun 2025 12:02:09 +0200 Subject: [PATCH 17/59] [FrameworkBundle] Allow using their name without added suffix when using #[Target] for custom services --- CHANGELOG.md | 1 + DependencyInjection/FrameworkExtension.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b18639e4c..1256fbf38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 7.4 --- + * Allow using their name without added suffix when using `#[Target]` for custom services * Deprecate `Symfony\Bundle\FrameworkBundle\Console\Application::add()` in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()` * Add `assertEmailAddressNotContains()` to the `MailerAssertionsTrait` diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index c4ff440cc..6f0e1d492 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -1426,6 +1426,7 @@ private function registerAssetsConfiguration(array $config, ContainerBuilder $co ->addTag('assets.package', ['package' => $name]); $container->setDefinition('assets._package_'.$name, $packageDefinition); $container->registerAliasForArgument('assets._package_'.$name, PackageInterface::class, $name.'.package'); + $container->registerAliasForArgument('assets._package_'.$name, PackageInterface::class, $name); } } @@ -2247,6 +2248,7 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont $container->setAlias(LockFactory::class, new Alias('lock.factory', false)); } else { $container->registerAliasForArgument('lock.'.$resourceName.'.factory', LockFactory::class, $resourceName.'.lock.factory'); + $container->registerAliasForArgument('lock.'.$resourceName.'.factory', LockFactory::class, $resourceName); } } } @@ -2282,6 +2284,7 @@ private function registerSemaphoreConfiguration(array $config, ContainerBuilder $container->setAlias(SemaphoreFactory::class, new Alias('semaphore.factory', false)); } else { $container->registerAliasForArgument('semaphore.'.$resourceName.'.factory', SemaphoreFactory::class, $resourceName.'.semaphore.factory'); + $container->registerAliasForArgument('semaphore.'.$resourceName.'.factory', SemaphoreFactory::class, $resourceName); } } } @@ -3307,7 +3310,8 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde if (interface_exists(RateLimiterFactoryInterface::class)) { $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter'); - $factoryAlias->setDeprecated('symfony/dependency-injection', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); + $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name); + $factoryAlias->setDeprecated('symfony/framework-bundle', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); } } From 1d8af873939cc96060430cd731adf5e5dfe62152 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 18 Jun 2025 15:29:22 +0200 Subject: [PATCH 18/59] [FrameworkBundle] Add `ControllerHelper`; the helpers from AbstractController as a standalone service --- CHANGELOG.md | 1 + Controller/AbstractController.php | 24 +- Controller/ControllerHelper.php | 473 ++++++++++++++++++++ Resources/config/web.php | 6 + Tests/Controller/AbstractControllerTest.php | 2 +- Tests/Controller/ControllerHelperTest.php | 64 +++ 6 files changed, 557 insertions(+), 13 deletions(-) create mode 100644 Controller/ControllerHelper.php create mode 100644 Tests/Controller/ControllerHelperTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 1256fbf38..de31d3d7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 7.4 --- + * Add `ControllerHelper`; the helpers from AbstractController as a standalone service * Allow using their name without added suffix when using `#[Target]` for custom services * Deprecate `Symfony\Bundle\FrameworkBundle\Console\Application::add()` in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()` * Add `assertEmailAddressNotContains()` to the `MailerAssertionsTrait` diff --git a/Controller/AbstractController.php b/Controller/AbstractController.php index de7395d5a..c44028f8c 100644 --- a/Controller/AbstractController.php +++ b/Controller/AbstractController.php @@ -67,18 +67,6 @@ public function setContainer(ContainerInterface $container): ?ContainerInterface return $previous; } - /** - * Gets a container parameter by its name. - */ - protected function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null - { - if (!$this->container->has('parameter_bag')) { - throw new ServiceNotFoundException('parameter_bag.', null, null, [], \sprintf('The "%s::getParameter()" method is missing a parameter bag to work properly. Did you forget to register your controller as a service subscriber? This can be fixed either by using autoconfiguration or by manually wiring a "parameter_bag" in the service locator passed to the controller.', static::class)); - } - - return $this->container->get('parameter_bag')->get($name); - } - public static function getSubscribedServices(): array { return [ @@ -96,6 +84,18 @@ public static function getSubscribedServices(): array ]; } + /** + * Gets a container parameter by its name. + */ + protected function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null + { + if (!$this->container->has('parameter_bag')) { + throw new ServiceNotFoundException('parameter_bag.', null, null, [], \sprintf('The "%s::getParameter()" method is missing a parameter bag to work properly. Did you forget to register your controller as a service subscriber? This can be fixed either by using autoconfiguration or by manually wiring a "parameter_bag" in the service locator passed to the controller.', static::class)); + } + + return $this->container->get('parameter_bag')->get($name); + } + /** * Generates a URL from the given parameters. * diff --git a/Controller/ControllerHelper.php b/Controller/ControllerHelper.php new file mode 100644 index 000000000..4fc56b6a9 --- /dev/null +++ b/Controller/ControllerHelper.php @@ -0,0 +1,473 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Controller; + +use Psr\Container\ContainerInterface; +use Psr\Link\EvolvableLinkInterface; +use Psr\Link\LinkInterface; +use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; +use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface; +use Symfony\Component\Form\Extension\Core\Type\FormType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\FormFactoryInterface; +use Symfony\Component\Form\FormInterface; +use Symfony\Component\HttpFoundation\BinaryFileResponse; +use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; +use Symfony\Component\HttpFoundation\JsonResponse; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\ResponseHeaderBag; +use Symfony\Component\HttpFoundation\Session\FlashBagAwareSessionInterface; +use Symfony\Component\HttpFoundation\StreamedResponse; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Routing\RouterInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Authorization\AccessDecision; +use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; +use Symfony\Component\Security\Core\Exception\AccessDeniedException; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Csrf\CsrfToken; +use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; +use Symfony\Component\Serializer\SerializerInterface; +use Symfony\Component\WebLink\EventListener\AddLinkHeaderListener; +use Symfony\Component\WebLink\GenericLinkProvider; +use Symfony\Component\WebLink\HttpHeaderSerializer; +use Symfony\Contracts\Service\ServiceSubscriberInterface; +use Twig\Environment; + +/** + * Provides the helpers from AbstractControler as a standalone service. + * + * Best used together with #[AutowireMethodOf] to remove any coupling. + */ +class ControllerHelper implements ServiceSubscriberInterface +{ + public function __construct( + private ContainerInterface $container, + ) { + } + + public static function getSubscribedServices(): array + { + return [ + 'router' => '?'.RouterInterface::class, + 'request_stack' => '?'.RequestStack::class, + 'http_kernel' => '?'.HttpKernelInterface::class, + 'serializer' => '?'.SerializerInterface::class, + 'security.authorization_checker' => '?'.AuthorizationCheckerInterface::class, + 'twig' => '?'.Environment::class, + 'form.factory' => '?'.FormFactoryInterface::class, + 'security.token_storage' => '?'.TokenStorageInterface::class, + 'security.csrf.token_manager' => '?'.CsrfTokenManagerInterface::class, + 'parameter_bag' => '?'.ContainerBagInterface::class, + 'web_link.http_header_serializer' => '?'.HttpHeaderSerializer::class, + ]; + } + + /** + * Gets a container parameter by its name. + */ + public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null + { + if (!$this->container->has('parameter_bag')) { + throw new ServiceNotFoundException('parameter_bag.', null, null, [], \sprintf('The "%s::getParameter()" method is missing a parameter bag to work properly. Did you forget to register your controller as a service subscriber? This can be fixed either by using autoconfiguration or by manually wiring a "parameter_bag" in the service locator passed to the controller.', static::class)); + } + + return $this->container->get('parameter_bag')->get($name); + } + + /** + * Generates a URL from the given parameters. + * + * @see UrlGeneratorInterface + */ + public function generateUrl(string $route, array $parameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): string + { + return $this->container->get('router')->generate($route, $parameters, $referenceType); + } + + /** + * Forwards the request to another controller. + * + * @param string $controller The controller name (a string like "App\Controller\PostController::index" or "App\Controller\PostController" if it is invokable) + */ + public function forward(string $controller, array $path = [], array $query = []): Response + { + $request = $this->container->get('request_stack')->getCurrentRequest(); + $path['_controller'] = $controller; + $subRequest = $request->duplicate($query, null, $path); + + return $this->container->get('http_kernel')->handle($subRequest, HttpKernelInterface::SUB_REQUEST); + } + + /** + * Returns a RedirectResponse to the given URL. + * + * @param int $status The HTTP status code (302 "Found" by default) + */ + public function redirect(string $url, int $status = 302): RedirectResponse + { + return new RedirectResponse($url, $status); + } + + /** + * Returns a RedirectResponse to the given route with the given parameters. + * + * @param int $status The HTTP status code (302 "Found" by default) + */ + public function redirectToRoute(string $route, array $parameters = [], int $status = 302): RedirectResponse + { + return $this->redirect($this->generateUrl($route, $parameters), $status); + } + + /** + * Returns a JsonResponse that uses the serializer component if enabled, or json_encode. + * + * @param int $status The HTTP status code (200 "OK" by default) + */ + public function json(mixed $data, int $status = 200, array $headers = [], array $context = []): JsonResponse + { + if ($this->container->has('serializer')) { + $json = $this->container->get('serializer')->serialize($data, 'json', array_merge([ + 'json_encode_options' => JsonResponse::DEFAULT_ENCODING_OPTIONS, + ], $context)); + + return new JsonResponse($json, $status, $headers, true); + } + + return new JsonResponse($data, $status, $headers); + } + + /** + * Returns a BinaryFileResponse object with original or customized file name and disposition header. + */ + public function file(\SplFileInfo|string $file, ?string $fileName = null, string $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT): BinaryFileResponse + { + $response = new BinaryFileResponse($file); + $response->setContentDisposition($disposition, $fileName ?? $response->getFile()->getFilename()); + + return $response; + } + + /** + * Adds a flash message to the current session for type. + * + * @throws \LogicException + */ + public function addFlash(string $type, mixed $message): void + { + try { + $session = $this->container->get('request_stack')->getSession(); + } catch (SessionNotFoundException $e) { + throw new \LogicException('You cannot use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml".', 0, $e); + } + + if (!$session instanceof FlashBagAwareSessionInterface) { + throw new \LogicException(\sprintf('You cannot use the addFlash method because class "%s" doesn\'t implement "%s".', get_debug_type($session), FlashBagAwareSessionInterface::class)); + } + + $session->getFlashBag()->add($type, $message); + } + + /** + * Checks if the attribute is granted against the current authentication token and optionally supplied subject. + * + * @throws \LogicException + */ + public function isGranted(mixed $attribute, mixed $subject = null): bool + { + if (!$this->container->has('security.authorization_checker')) { + throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".'); + } + + return $this->container->get('security.authorization_checker')->isGranted($attribute, $subject); + } + + /** + * Checks if the attribute is granted against the current authentication token and optionally supplied subject. + */ + public function getAccessDecision(mixed $attribute, mixed $subject = null): AccessDecision + { + if (!$this->container->has('security.authorization_checker')) { + throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".'); + } + + $accessDecision = new AccessDecision(); + $accessDecision->isGranted = $this->container->get('security.authorization_checker')->isGranted($attribute, $subject, $accessDecision); + + return $accessDecision; + } + + /** + * Throws an exception unless the attribute is granted against the current authentication token and optionally + * supplied subject. + * + * @throws AccessDeniedException + */ + public function denyAccessUnlessGranted(mixed $attribute, mixed $subject = null, string $message = 'Access Denied.'): void + { + if (class_exists(AccessDecision::class)) { + $accessDecision = $this->getAccessDecision($attribute, $subject); + $isGranted = $accessDecision->isGranted; + } else { + $accessDecision = null; + $isGranted = $this->isGranted($attribute, $subject); + } + + if (!$isGranted) { + $e = $this->createAccessDeniedException(3 > \func_num_args() && $accessDecision ? $accessDecision->getMessage() : $message); + $e->setAttributes([$attribute]); + $e->setSubject($subject); + + if ($accessDecision) { + $e->setAccessDecision($accessDecision); + } + + throw $e; + } + } + + /** + * Returns a rendered view. + * + * Forms found in parameters are auto-cast to form views. + */ + public function renderView(string $view, array $parameters = []): string + { + return $this->doRenderView($view, null, $parameters, __FUNCTION__); + } + + /** + * Returns a rendered block from a view. + * + * Forms found in parameters are auto-cast to form views. + */ + public function renderBlockView(string $view, string $block, array $parameters = []): string + { + return $this->doRenderView($view, $block, $parameters, __FUNCTION__); + } + + /** + * Renders a view. + * + * If an invalid form is found in the list of parameters, a 422 status code is returned. + * Forms found in parameters are auto-cast to form views. + */ + public function render(string $view, array $parameters = [], ?Response $response = null): Response + { + return $this->doRender($view, null, $parameters, $response, __FUNCTION__); + } + + /** + * Renders a block in a view. + * + * If an invalid form is found in the list of parameters, a 422 status code is returned. + * Forms found in parameters are auto-cast to form views. + */ + public function renderBlock(string $view, string $block, array $parameters = [], ?Response $response = null): Response + { + return $this->doRender($view, $block, $parameters, $response, __FUNCTION__); + } + + /** + * Streams a view. + */ + public function stream(string $view, array $parameters = [], ?StreamedResponse $response = null): StreamedResponse + { + if (!$this->container->has('twig')) { + throw new \LogicException('You cannot use the "stream" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".'); + } + + $twig = $this->container->get('twig'); + + $callback = function () use ($twig, $view, $parameters) { + $twig->display($view, $parameters); + }; + + if (null === $response) { + return new StreamedResponse($callback); + } + + $response->setCallback($callback); + + return $response; + } + + /** + * Returns a NotFoundHttpException. + * + * This will result in a 404 response code. Usage example: + * + * throw $this->createNotFoundException('Page not found!'); + */ + public function createNotFoundException(string $message = 'Not Found', ?\Throwable $previous = null): NotFoundHttpException + { + return new NotFoundHttpException($message, $previous); + } + + /** + * Returns an AccessDeniedException. + * + * This will result in a 403 response code. Usage example: + * + * throw $this->createAccessDeniedException('Unable to access this page!'); + * + * @throws \LogicException If the Security component is not available + */ + public function createAccessDeniedException(string $message = 'Access Denied.', ?\Throwable $previous = null): AccessDeniedException + { + if (!class_exists(AccessDeniedException::class)) { + throw new \LogicException('You cannot use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle".'); + } + + return new AccessDeniedException($message, $previous); + } + + /** + * Creates and returns a Form instance from the type of the form. + */ + public function createForm(string $type, mixed $data = null, array $options = []): FormInterface + { + return $this->container->get('form.factory')->create($type, $data, $options); + } + + /** + * Creates and returns a form builder instance. + */ + public function createFormBuilder(mixed $data = null, array $options = []): FormBuilderInterface + { + return $this->container->get('form.factory')->createBuilder(FormType::class, $data, $options); + } + + /** + * Get a user from the Security Token Storage. + * + * @throws \LogicException If SecurityBundle is not available + * + * @see TokenInterface::getUser() + */ + public function getUser(): ?UserInterface + { + if (!$this->container->has('security.token_storage')) { + throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".'); + } + + if (null === $token = $this->container->get('security.token_storage')->getToken()) { + return null; + } + + return $token->getUser(); + } + + /** + * Checks the validity of a CSRF token. + * + * @param string $id The id used when generating the token + * @param string|null $token The actual token sent with the request that should be validated + */ + public function isCsrfTokenValid(string $id, #[\SensitiveParameter] ?string $token): bool + { + if (!$this->container->has('security.csrf.token_manager')) { + throw new \LogicException('CSRF protection is not enabled in your application. Enable it with the "csrf_protection" key in "config/packages/framework.yaml".'); + } + + return $this->container->get('security.csrf.token_manager')->isTokenValid(new CsrfToken($id, $token)); + } + + /** + * Adds a Link HTTP header to the current response. + * + * @see https://tools.ietf.org/html/rfc5988 + */ + public function addLink(Request $request, LinkInterface $link): void + { + if (!class_exists(AddLinkHeaderListener::class)) { + throw new \LogicException('You cannot use the "addLink" method if the WebLink component is not available. Try running "composer require symfony/web-link".'); + } + + if (null === $linkProvider = $request->attributes->get('_links')) { + $request->attributes->set('_links', new GenericLinkProvider([$link])); + + return; + } + + $request->attributes->set('_links', $linkProvider->withLink($link)); + } + + /** + * @param LinkInterface[] $links + */ + public function sendEarlyHints(iterable $links = [], ?Response $response = null): Response + { + if (!$this->container->has('web_link.http_header_serializer')) { + throw new \LogicException('You cannot use the "sendEarlyHints" method if the WebLink component is not available. Try running "composer require symfony/web-link".'); + } + + $response ??= new Response(); + + $populatedLinks = []; + foreach ($links as $link) { + if ($link instanceof EvolvableLinkInterface && !$link->getRels()) { + $link = $link->withRel('preload'); + } + + $populatedLinks[] = $link; + } + + $response->headers->set('Link', $this->container->get('web_link.http_header_serializer')->serialize($populatedLinks), false); + $response->sendHeaders(103); + + return $response; + } + + private function doRenderView(string $view, ?string $block, array $parameters, string $method): string + { + if (!$this->container->has('twig')) { + throw new \LogicException(\sprintf('You cannot use the "%s" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".', $method)); + } + + foreach ($parameters as $k => $v) { + if ($v instanceof FormInterface) { + $parameters[$k] = $v->createView(); + } + } + + if (null !== $block) { + return $this->container->get('twig')->load($view)->renderBlock($block, $parameters); + } + + return $this->container->get('twig')->render($view, $parameters); + } + + private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response + { + $content = $this->doRenderView($view, $block, $parameters, $method); + $response ??= new Response(); + + if (200 === $response->getStatusCode()) { + foreach ($parameters as $v) { + if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) { + $response->setStatusCode(422); + break; + } + } + } + + $response->setContent($content); + + return $response; + } +} diff --git a/Resources/config/web.php b/Resources/config/web.php index a4e975dac..320bda08f 100644 --- a/Resources/config/web.php +++ b/Resources/config/web.php @@ -12,6 +12,7 @@ namespace Symfony\Component\DependencyInjection\Loader\Configurator; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Bundle\FrameworkBundle\Controller\ControllerHelper; use Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver; use Symfony\Bundle\FrameworkBundle\Controller\TemplateController; use Symfony\Component\HttpKernel\Controller\ArgumentResolver; @@ -146,5 +147,10 @@ ->set('controller.cache_attribute_listener', CacheAttributeListener::class) ->tag('kernel.event_subscriber') + ->set('controller.helper', ControllerHelper::class) + ->tag('container.service_subscriber') + + ->alias(ControllerHelper::class, 'controller.helper') + ; }; diff --git a/Tests/Controller/AbstractControllerTest.php b/Tests/Controller/AbstractControllerTest.php index 5f5fc5ca5..91c30d1d9 100644 --- a/Tests/Controller/AbstractControllerTest.php +++ b/Tests/Controller/AbstractControllerTest.php @@ -101,7 +101,7 @@ public function testMissingParameterBag() $controller->setContainer($container); $this->expectException(ServiceNotFoundException::class); - $this->expectExceptionMessage('TestAbstractController::getParameter()" method is missing a parameter bag'); + $this->expectExceptionMessage('::getParameter()" method is missing a parameter bag'); $controller->getParameter('foo'); } diff --git a/Tests/Controller/ControllerHelperTest.php b/Tests/Controller/ControllerHelperTest.php new file mode 100644 index 000000000..e12c1ed7f --- /dev/null +++ b/Tests/Controller/ControllerHelperTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; + +use Psr\Container\ContainerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Bundle\FrameworkBundle\Controller\ControllerHelper; + +class ControllerHelperTest extends AbstractControllerTest +{ + protected function createController() + { + return new class() extends ControllerHelper { + public function __construct() + { + } + + public function setContainer(ContainerInterface $container) + { + parent::__construct($container); + } + }; + } + + public function testSync() + { + $r = new \ReflectionClass(ControllerHelper::class); + $m = $r->getMethod('getSubscribedServices'); + $helperSrc = file($r->getFileName()); + $helperSrc = implode('', array_slice($helperSrc, $m->getStartLine() - 1, $r->getEndLine() - $m->getStartLine())); + + $r = new \ReflectionClass(AbstractController::class); + $m = $r->getMethod('getSubscribedServices'); + $abstractSrc = file($r->getFileName()); + $code = [ + implode('', array_slice($abstractSrc, $m->getStartLine() - 1, $m->getEndLine() - $m->getStartLine() + 1)), + ]; + + foreach ($r->getMethods(\ReflectionMethod::IS_PROTECTED) as $m) { + if ($m->getDocComment()) { + $code[] = ' '.$m->getDocComment(); + } + $code[] = substr_replace(implode('', array_slice($abstractSrc, $m->getStartLine() - 1, $m->getEndLine() - $m->getStartLine() + 1)), 'public', 4, 9); + } + foreach ($r->getMethods(\ReflectionMethod::IS_PRIVATE) as $m) { + if ($m->getDocComment()) { + $code[] = ' '.$m->getDocComment(); + } + $code[] = implode('', array_slice($abstractSrc, $m->getStartLine() - 1, $m->getEndLine() - $m->getStartLine() + 1)); + } + $code = implode("\n", $code); + + $this->assertSame($code, $helperSrc, 'Methods from AbstractController are not properly synced in ControllerHelper'); + } +} From fc250ed3fb29fa989b8dffde98dde43031d8c340 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 26 Jun 2025 12:09:09 +0200 Subject: [PATCH 19/59] [DependencyInjection] Add argument `$target` to `ContainerBuilder::registerAliasForArgument()` --- Command/DebugAutowiringCommand.php | 2 +- DependencyInjection/FrameworkExtension.php | 24 ++++++++-------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/Command/DebugAutowiringCommand.php b/Command/DebugAutowiringCommand.php index e159c5a39..ddebb35c6 100644 --- a/Command/DebugAutowiringCommand.php +++ b/Command/DebugAutowiringCommand.php @@ -137,7 +137,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } $target = substr($id, \strlen($previousId) + 3); - if ($previousId.' $'.(new Target($target))->getParsedName() === $serviceId) { + if ($container->findDefinition($id) === $container->findDefinition($serviceId)) { $serviceLine .= ' - target:'.$target.''; break; } diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index 8dca1fa4b..a427a0061 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -1190,8 +1190,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $ // Store to container $container->setDefinition($workflowId, $workflowDefinition); $container->setDefinition($definitionDefinitionId, $definitionDefinition); - $container->registerAliasForArgument($workflowId, WorkflowInterface::class, $name.'.'.$type); - $container->registerAliasForArgument($workflowId, WorkflowInterface::class, $name); + $container->registerAliasForArgument($workflowId, WorkflowInterface::class, $name.'.'.$type, $name); // Add workflow to Registry if ($workflow['supports']) { @@ -1426,8 +1425,7 @@ private function registerAssetsConfiguration(array $config, ContainerBuilder $co $packageDefinition = $this->createPackageDefinition($package['base_path'], $package['base_urls'], $version) ->addTag('assets.package', ['package' => $name]); $container->setDefinition('assets._package_'.$name, $packageDefinition); - $container->registerAliasForArgument('assets._package_'.$name, PackageInterface::class, $name.'.package'); - $container->registerAliasForArgument('assets._package_'.$name, PackageInterface::class, $name); + $container->registerAliasForArgument('assets._package_'.$name, PackageInterface::class, $name.'.package', $name); } } @@ -2248,8 +2246,7 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont $container->setAlias('lock.factory', new Alias('lock.'.$resourceName.'.factory', false)); $container->setAlias(LockFactory::class, new Alias('lock.factory', false)); } else { - $container->registerAliasForArgument('lock.'.$resourceName.'.factory', LockFactory::class, $resourceName.'.lock.factory'); - $container->registerAliasForArgument('lock.'.$resourceName.'.factory', LockFactory::class, $resourceName); + $container->registerAliasForArgument('lock.'.$resourceName.'.factory', LockFactory::class, $resourceName.'.lock.factory', $resourceName); } } } @@ -2284,8 +2281,7 @@ private function registerSemaphoreConfiguration(array $config, ContainerBuilder $container->setAlias('semaphore.factory', new Alias('semaphore.'.$resourceName.'.factory', false)); $container->setAlias(SemaphoreFactory::class, new Alias('semaphore.factory', false)); } else { - $container->registerAliasForArgument('semaphore.'.$resourceName.'.factory', SemaphoreFactory::class, $resourceName.'.semaphore.factory'); - $container->registerAliasForArgument('semaphore.'.$resourceName.'.factory', SemaphoreFactory::class, $resourceName); + $container->registerAliasForArgument('semaphore.'.$resourceName.'.factory', SemaphoreFactory::class, $resourceName.'.semaphore.factory', $resourceName); } } } @@ -3310,13 +3306,11 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde $factoryAlias = $container->registerAliasForArgument($limiterId, RateLimiterFactory::class, $name.'.limiter'); if (interface_exists(RateLimiterFactoryInterface::class)) { - $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter'); - $factoryAlias->setDeprecated('symfony/framework-bundle', '7.3', \sprintf('The "%%alias_id%%" autowiring alias is deprecated and will be removed in 8.0, use "%s $%s" instead.', RateLimiterFactoryInterface::class, (new Target($name.'.limiter'))->getParsedName())); - $internalAliasId = \sprintf('.%s $%s.limiter', RateLimiterFactory::class, $name); + $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name); - if ($container->hasAlias($internalAliasId)) { - $container->getAlias($internalAliasId)->setDeprecated('symfony/framework-bundle', '7.3', \sprintf('The "%%alias_id%%" autowiring alias is deprecated and will be removed in 8.0, use "%s $%s" instead.', RateLimiterFactoryInterface::class, (new Target($name.'.limiter'))->getParsedName())); - } + $factoryAlias->setDeprecated('symfony/framework-bundle', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); + $container->getAlias(\sprintf('.%s $%s.limiter', RateLimiterFactory::class, $name)) + ->setDeprecated('symfony/framework-bundle', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); } } @@ -3341,7 +3335,7 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde ))) ; - $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter'); + $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name); } } From fc5abf6f617be39b59b6da035dd388a2dca3b07c Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Fri, 27 Jun 2025 23:42:21 +0200 Subject: [PATCH 20/59] Fix typos in documentation and code comments --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de31d3d7b..76b3cb947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -706,7 +706,7 @@ CHANGELOG * added Client::enableProfiler() * a new parameter has been added to the DIC: `router.request_context.base_url` You can customize it for your functional tests or for generating URLs with - the right base URL when your are in the CLI context. + the right base URL when you are in the CLI context. * added support for default templates per render tag 2.1.0 From daee95f2ef3a6da589c7a9be8a6d9fb2dc2bba99 Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Sat, 28 Jun 2025 18:24:36 -0300 Subject: [PATCH 21/59] [FrameworkBundle] fix `lint:container` command --- Command/ContainerLintCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Command/ContainerLintCommand.php b/Command/ContainerLintCommand.php index 423b58a38..c201a9728 100644 --- a/Command/ContainerLintCommand.php +++ b/Command/ContainerLintCommand.php @@ -80,7 +80,7 @@ private function getContainerBuilder(): ContainerBuilder $kernel = $this->getApplication()->getKernel(); $container = $kernel->getContainer(); - $file = $container->isDebug() ? $container->getParameter('debug.container.dump') : false; + $file = $kernel->isDebug() ? $container->getParameter('debug.container.dump') : false; if (!$file || !(new ConfigCache($file, true))->isFresh()) { if (!$kernel instanceof Kernel) { From c8c2b51f260640e6f9414e7dcf434b9f2836296b Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Sun, 29 Jun 2025 15:07:21 -0300 Subject: [PATCH 22/59] [FrameworkBundle] Minor remove unused `Container` use statement in `ContainerLintCommand` --- Command/ContainerLintCommand.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Command/ContainerLintCommand.php b/Command/ContainerLintCommand.php index c201a9728..1b77eb6dc 100644 --- a/Command/ContainerLintCommand.php +++ b/Command/ContainerLintCommand.php @@ -24,7 +24,6 @@ use Symfony\Component\DependencyInjection\Compiler\CheckTypeDeclarationsPass; use Symfony\Component\DependencyInjection\Compiler\PassConfig; use Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass; -use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; From 3b0b4dc508e1a3e1e01df0a5a8eb394422f3eb9e Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Mon, 30 Jun 2025 00:17:16 -0300 Subject: [PATCH 23/59] [BrowserKit] Add PHPUnit constraints: `BrowserHistoryIsOnFirstPage` and `BrowserHistoryIsOnLastPage` --- Test/BrowserKitAssertionsTrait.php | 33 +++++++++++++++++ Tests/Test/WebTestCaseTest.php | 59 ++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/Test/BrowserKitAssertionsTrait.php b/Test/BrowserKitAssertionsTrait.php index 7d49aa61d..6086e75ec 100644 --- a/Test/BrowserKitAssertionsTrait.php +++ b/Test/BrowserKitAssertionsTrait.php @@ -16,6 +16,7 @@ use PHPUnit\Framework\Constraint\LogicalNot; use PHPUnit\Framework\ExpectationFailedException; use Symfony\Component\BrowserKit\AbstractBrowser; +use Symfony\Component\BrowserKit\History; use Symfony\Component\BrowserKit\Test\Constraint as BrowserKitConstraint; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -122,6 +123,38 @@ public static function assertBrowserNotHasCookie(string $name, string $path = '/ self::assertThatForClient(new LogicalNot(new BrowserKitConstraint\BrowserHasCookie($name, $path, $domain)), $message); } + public static function assertBrowserHistoryIsOnFirstPage(string $message = ''): void + { + if (!method_exists(History::class, 'isFirstPage')) { + throw new \LogicException('The `assertBrowserHistoryIsOnFirstPage` method requires symfony/browser-kit >= 7.4.'); + } + self::assertThatForClient(new BrowserKitConstraint\BrowserHistoryIsOnFirstPage(), $message); + } + + public static function assertBrowserHistoryIsNotOnFirstPage(string $message = ''): void + { + if (!method_exists(History::class, 'isFirstPage')) { + throw new \LogicException('The `assertBrowserHistoryIsNotOnFirstPage` method requires symfony/browser-kit >= 7.4.'); + } + self::assertThatForClient(new LogicalNot(new BrowserKitConstraint\BrowserHistoryIsOnFirstPage()), $message); + } + + public static function assertBrowserHistoryIsOnLastPage(string $message = ''): void + { + if (!method_exists(History::class, 'isLastPage')) { + throw new \LogicException('The `assertBrowserHistoryIsOnLastPage` method requires symfony/browser-kit >= 7.4.'); + } + self::assertThatForClient(new BrowserKitConstraint\BrowserHistoryIsOnLastPage(), $message); + } + + public static function assertBrowserHistoryIsNotOnLastPage(string $message = ''): void + { + if (!method_exists(History::class, 'isLastPage')) { + throw new \LogicException('The `assertBrowserHistoryIsNotOnLastPage` method requires symfony/browser-kit >= 7.4.'); + } + self::assertThatForClient(new LogicalNot(new BrowserKitConstraint\BrowserHistoryIsOnLastPage()), $message); + } + public static function assertBrowserCookieValueSame(string $name, string $expectedValue, bool $raw = false, string $path = '/', ?string $domain = null, string $message = ''): void { self::assertThatForClient(LogicalAnd::fromConstraints( diff --git a/Tests/Test/WebTestCaseTest.php b/Tests/Test/WebTestCaseTest.php index 84f2ef0ef..fd65b18d8 100644 --- a/Tests/Test/WebTestCaseTest.php +++ b/Tests/Test/WebTestCaseTest.php @@ -13,12 +13,14 @@ use PHPUnit\Framework\AssertionFailedError; use PHPUnit\Framework\ExpectationFailedException; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\KernelBrowser; use Symfony\Bundle\FrameworkBundle\Test\WebTestAssertionsTrait; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\BrowserKit\Cookie; use Symfony\Component\BrowserKit\CookieJar; +use Symfony\Component\BrowserKit\History; use Symfony\Component\DomCrawler\Crawler; use Symfony\Component\HttpFoundation\Cookie as HttpFoundationCookie; use Symfony\Component\HttpFoundation\Request; @@ -190,6 +192,50 @@ public function testAssertBrowserCookieValueSame() $this->getClientTester()->assertBrowserCookieValueSame('foo', 'babar', false, '/path'); } + /** + * @requires function \Symfony\Component\BrowserKit\History::isFirstPage + */ + public function testAssertBrowserHistoryIsOnFirstPage() + { + $this->createHistoryTester('isFirstPage', true)->assertBrowserHistoryIsOnFirstPage(); + $this->expectException(AssertionFailedError::class); + $this->expectExceptionMessage('Failed asserting that the Browser history is on the first page.'); + $this->createHistoryTester('isFirstPage', false)->assertBrowserHistoryIsOnFirstPage(); + } + + /** + * @requires function \Symfony\Component\BrowserKit\History::isFirstPage + */ + public function testAssertBrowserHistoryIsNotOnFirstPage() + { + $this->createHistoryTester('isFirstPage', false)->assertBrowserHistoryIsNotOnFirstPage(); + $this->expectException(AssertionFailedError::class); + $this->expectExceptionMessage('Failed asserting that the Browser history is not on the first page.'); + $this->createHistoryTester('isFirstPage', true)->assertBrowserHistoryIsNotOnFirstPage(); + } + + /** + * @requires function \Symfony\Component\BrowserKit\History::isLastPage + */ + public function testAssertBrowserHistoryIsOnLastPage() + { + $this->createHistoryTester('isLastPage', true)->assertBrowserHistoryIsOnLastPage(); + $this->expectException(AssertionFailedError::class); + $this->expectExceptionMessage('Failed asserting that the Browser history is on the last page.'); + $this->createHistoryTester('isLastPage', false)->assertBrowserHistoryIsOnLastPage(); + } + + /** + * @requires function \Symfony\Component\BrowserKit\History::isLastPage + */ + public function testAssertBrowserHistoryIsNotOnLastPage() + { + $this->createHistoryTester('isLastPage', false)->assertBrowserHistoryIsNotOnLastPage(); + $this->expectException(AssertionFailedError::class); + $this->expectExceptionMessage('Failed asserting that the Browser history is not on the last page.'); + $this->createHistoryTester('isLastPage', true)->assertBrowserHistoryIsNotOnLastPage(); + } + public function testAssertSelectorExists() { $this->getCrawlerTester(new Crawler('

'))->assertSelectorExists('body > h1'); @@ -386,6 +432,19 @@ private function getRequestTester(): WebTestCase return $this->getTester($client); } + private function createHistoryTester(string $method, bool $returnValue): WebTestCase + { + /** @var KernelBrowser&MockObject $client */ + $client = $this->createMock(KernelBrowser::class); + /** @var History&MockObject $history */ + $history = $this->createMock(History::class); + + $history->method($method)->willReturn($returnValue); + $client->method('getHistory')->willReturn($history); + + return $this->getTester($client); + } + private function getTester(KernelBrowser $client): WebTestCase { $tester = new class(method_exists($this, 'name') ? $this->name() : $this->getName()) extends WebTestCase { From 60e98cee9a7016cf5bf679d8f050c6003b53ce50 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Mon, 30 Jun 2025 11:20:40 +0200 Subject: [PATCH 24/59] [FrameworkBundle] Make `Router` class `final` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CHANGELOG.md | 1 + Routing/Router.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2780aae42..22dbf4e4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ CHANGELOG * Enable the property info constructor extractor by default * Remove deprecated `Symfony\Bundle\FrameworkBundle\Console\Application::add()` method in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()` + * Make `Router` class `final` 7.4 --- diff --git a/Routing/Router.php b/Routing/Router.php index f9e41273c..cc98fea98 100644 --- a/Routing/Router.php +++ b/Routing/Router.php @@ -30,10 +30,8 @@ * This Router creates the Loader only when the cache is empty. * * @author Fabien Potencier - * - * @final since Symfony 7.1 */ -class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberInterface +final class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberInterface { private array $collectedParameters = []; /** From f5b1037615d1bfa778a785ff7e2138cedec5403a Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Mon, 30 Jun 2025 11:22:46 +0200 Subject: [PATCH 25/59] [FrameworkBundle] Make `SerializerCacheWarmer` class `final` --- CHANGELOG.md | 1 + CacheWarmer/SerializerCacheWarmer.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22dbf4e4e..eead598fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ CHANGELOG * Enable the property info constructor extractor by default * Remove deprecated `Symfony\Bundle\FrameworkBundle\Console\Application::add()` method in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()` * Make `Router` class `final` + * Make `SerializerCacheWarmer` class `final` 7.4 --- diff --git a/CacheWarmer/SerializerCacheWarmer.php b/CacheWarmer/SerializerCacheWarmer.php index fbf7083b7..019f26dee 100644 --- a/CacheWarmer/SerializerCacheWarmer.php +++ b/CacheWarmer/SerializerCacheWarmer.php @@ -23,10 +23,8 @@ * Warms up XML and YAML serializer metadata. * * @author Titouan Galopin - * - * @final since Symfony 7.1 */ -class SerializerCacheWarmer extends AbstractPhpFileCacheWarmer +final class SerializerCacheWarmer extends AbstractPhpFileCacheWarmer { /** * @param LoaderInterface[] $loaders The serializer metadata loaders From 69e7a83cc82b38cae391c64906a38b6a36178825 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Mon, 30 Jun 2025 11:30:56 +0200 Subject: [PATCH 26/59] [FrameworkBundle] Make `Translator` class `final` --- CHANGELOG.md | 1 + Translation/Translator.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eead598fa..c2df56c2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ CHANGELOG * Remove deprecated `Symfony\Bundle\FrameworkBundle\Console\Application::add()` method in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()` * Make `Router` class `final` * Make `SerializerCacheWarmer` class `final` + * Make `Translator` class `final` 7.4 --- diff --git a/Translation/Translator.php b/Translation/Translator.php index 84aa0c7fd..b595266a9 100644 --- a/Translation/Translator.php +++ b/Translation/Translator.php @@ -21,10 +21,8 @@ /** * @author Fabien Potencier - * - * @final since Symfony 7.1 */ -class Translator extends BaseTranslator implements WarmableInterface +final class Translator extends BaseTranslator implements WarmableInterface { protected array $options = [ 'cache_dir' => null, From f002f76d0367a41155f5915ca938030cfd4a3bb2 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Mon, 30 Jun 2025 11:32:54 +0200 Subject: [PATCH 27/59] [FrameworkBundle] Make `ConfigBuilderCacheWarmer` class `final` --- CHANGELOG.md | 1 + CacheWarmer/ConfigBuilderCacheWarmer.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2df56c2a..ab13eddc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ CHANGELOG * Make `Router` class `final` * Make `SerializerCacheWarmer` class `final` * Make `Translator` class `final` + * Make `ConfigBuilderCacheWarmer` class `final` 7.4 --- diff --git a/CacheWarmer/ConfigBuilderCacheWarmer.php b/CacheWarmer/ConfigBuilderCacheWarmer.php index 48ed51aec..46aeeb71d 100644 --- a/CacheWarmer/ConfigBuilderCacheWarmer.php +++ b/CacheWarmer/ConfigBuilderCacheWarmer.php @@ -29,10 +29,8 @@ * Generate all config builders. * * @author Tobias Nyholm - * - * @final since Symfony 7.1 */ -class ConfigBuilderCacheWarmer implements CacheWarmerInterface +final class ConfigBuilderCacheWarmer implements CacheWarmerInterface { public function __construct( private KernelInterface $kernel, From 298e4c4b4aab5e189649b64d79cee642808fd7e9 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Mon, 30 Jun 2025 11:25:57 +0200 Subject: [PATCH 28/59] [FrameworkBundle] Make `TranslationsCacheWarmer` class `final` --- CHANGELOG.md | 1 + CacheWarmer/TranslationsCacheWarmer.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab13eddc7..50d3e46ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ CHANGELOG * Make `SerializerCacheWarmer` class `final` * Make `Translator` class `final` * Make `ConfigBuilderCacheWarmer` class `final` + * Make `TranslationsCacheWarmer` class `final` 7.4 --- diff --git a/CacheWarmer/TranslationsCacheWarmer.php b/CacheWarmer/TranslationsCacheWarmer.php index 40341cc10..c6c534879 100644 --- a/CacheWarmer/TranslationsCacheWarmer.php +++ b/CacheWarmer/TranslationsCacheWarmer.php @@ -21,10 +21,8 @@ * Generates the catalogues for translations. * * @author Xavier Leune - * - * @final since Symfony 7.1 */ -class TranslationsCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface +final class TranslationsCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface { private TranslatorInterface $translator; From 92de6c69c49411288cebdac86ba452d4b8fd469a Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Mon, 30 Jun 2025 11:36:05 +0200 Subject: [PATCH 29/59] [FrameworkBundle] Make `ValidatorCacheWarmer` class `final` --- CHANGELOG.md | 1 + CacheWarmer/ValidatorCacheWarmer.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50d3e46ad..6d4d01432 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ CHANGELOG * Make `Translator` class `final` * Make `ConfigBuilderCacheWarmer` class `final` * Make `TranslationsCacheWarmer` class `final` + * Make `ValidatorCacheWarmer` class `final` 7.4 --- diff --git a/CacheWarmer/ValidatorCacheWarmer.php b/CacheWarmer/ValidatorCacheWarmer.php index 9c313f80a..7a828d303 100644 --- a/CacheWarmer/ValidatorCacheWarmer.php +++ b/CacheWarmer/ValidatorCacheWarmer.php @@ -24,10 +24,8 @@ * Warms up XML and YAML validator metadata. * * @author Titouan Galopin - * - * @final since Symfony 7.1 */ -class ValidatorCacheWarmer extends AbstractPhpFileCacheWarmer +final class ValidatorCacheWarmer extends AbstractPhpFileCacheWarmer { /** * @param string $phpArrayFile The PHP file where metadata are cached From d90ae1bf5b46f915e38fae80e747ceb7590321ab Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Sat, 5 Jul 2025 15:43:06 +0200 Subject: [PATCH 30/59] chore: PHP CS Fixer fixes --- DependencyInjection/FrameworkExtension.php | 2 +- Tests/DependencyInjection/PhpFrameworkExtensionTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index d3cefbb28..d024b7a4e 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -1159,7 +1159,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $ $workflow['definition_validators'][] = match ($workflow['type']) { 'state_machine' => Workflow\Validator\StateMachineValidator::class, 'workflow' => Workflow\Validator\WorkflowValidator::class, - default => throw new \LogicException(\sprintf('Invalid workflow type "%s".', $workflow['type'])), + default => throw new \LogicException(\sprintf('Invalid workflow type "%s".', $workflow['type'])), }; // Create Workflow diff --git a/Tests/DependencyInjection/PhpFrameworkExtensionTest.php b/Tests/DependencyInjection/PhpFrameworkExtensionTest.php index 65826f698..c4f67c2f1 100644 --- a/Tests/DependencyInjection/PhpFrameworkExtensionTest.php +++ b/Tests/DependencyInjection/PhpFrameworkExtensionTest.php @@ -440,10 +440,10 @@ public function testValidatorEmailValidationMode(string $mode) $this->createContainerFromClosure(function (ContainerBuilder $container) use ($mode) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], + 'annotations' => false, + 'http_method_override' => false, + 'handle_all_throwables' => true, + 'php_errors' => ['log' => true], 'validation' => [ 'email_validation_mode' => $mode, ], From 7464e872661db10229cebd3aaf17f3c9839cbb3a Mon Sep 17 00:00:00 2001 From: Andrii Date: Sat, 28 Jun 2025 02:44:33 +0200 Subject: [PATCH 31/59] [HttpKernel] Avoid memory leaks cache attribute, profiler listener --- Resources/config/profiling.php | 1 + Resources/config/web.php | 1 + 2 files changed, 2 insertions(+) diff --git a/Resources/config/profiling.php b/Resources/config/profiling.php index a81c53a63..ba734bee2 100644 --- a/Resources/config/profiling.php +++ b/Resources/config/profiling.php @@ -39,6 +39,7 @@ param('profiler_listener.only_main_requests'), ]) ->tag('kernel.event_subscriber') + ->tag('kernel.reset', ['method' => '?reset']) ->set('console_profiler_listener', ConsoleProfilerListener::class) ->args([ diff --git a/Resources/config/web.php b/Resources/config/web.php index 320bda08f..29e128715 100644 --- a/Resources/config/web.php +++ b/Resources/config/web.php @@ -146,6 +146,7 @@ ->set('controller.cache_attribute_listener', CacheAttributeListener::class) ->tag('kernel.event_subscriber') + ->tag('kernel.reset', ['method' => '?reset']) ->set('controller.helper', ControllerHelper::class) ->tag('container.service_subscriber') From 5b22ac9de8b70b33bd123dcb5c23774346abc66e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 8 Jul 2025 11:08:29 +0200 Subject: [PATCH 32/59] Various CS fixes --- Command/DebugAutowiringCommand.php | 1 - DependencyInjection/FrameworkExtension.php | 5 ++--- Tests/Controller/ControllerHelperTest.php | 10 +++++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Command/DebugAutowiringCommand.php b/Command/DebugAutowiringCommand.php index ddebb35c6..85f546c2f 100644 --- a/Command/DebugAutowiringCommand.php +++ b/Command/DebugAutowiringCommand.php @@ -20,7 +20,6 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Attribute\Target; use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter; /** diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index c8d2624f4..a9cabf4f1 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -61,7 +61,6 @@ use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\Argument\IteratorArgument; use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Attribute\Target; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; @@ -3323,13 +3322,13 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde throw new LogicException(\sprintf('Compound rate limiter "%s" requires at least one sub-limiter.', $name)); } - if (\array_diff($limiterConfig['limiters'], $limiters)) { + if (array_diff($limiterConfig['limiters'], $limiters)) { throw new LogicException(\sprintf('Compound rate limiter "%s" requires at least one sub-limiter to be configured.', $name)); } $container->register($limiterId = 'limiter.'.$name, CompoundRateLimiterFactory::class) ->addTag('rate_limiter', ['name' => $name]) - ->addArgument(new IteratorArgument(\array_map( + ->addArgument(new IteratorArgument(array_map( static fn (string $name) => new Reference('limiter.'.$name), $limiterConfig['limiters'] ))) diff --git a/Tests/Controller/ControllerHelperTest.php b/Tests/Controller/ControllerHelperTest.php index e12c1ed7f..cb35c4757 100644 --- a/Tests/Controller/ControllerHelperTest.php +++ b/Tests/Controller/ControllerHelperTest.php @@ -19,7 +19,7 @@ class ControllerHelperTest extends AbstractControllerTest { protected function createController() { - return new class() extends ControllerHelper { + return new class extends ControllerHelper { public function __construct() { } @@ -36,26 +36,26 @@ public function testSync() $r = new \ReflectionClass(ControllerHelper::class); $m = $r->getMethod('getSubscribedServices'); $helperSrc = file($r->getFileName()); - $helperSrc = implode('', array_slice($helperSrc, $m->getStartLine() - 1, $r->getEndLine() - $m->getStartLine())); + $helperSrc = implode('', \array_slice($helperSrc, $m->getStartLine() - 1, $r->getEndLine() - $m->getStartLine())); $r = new \ReflectionClass(AbstractController::class); $m = $r->getMethod('getSubscribedServices'); $abstractSrc = file($r->getFileName()); $code = [ - implode('', array_slice($abstractSrc, $m->getStartLine() - 1, $m->getEndLine() - $m->getStartLine() + 1)), + implode('', \array_slice($abstractSrc, $m->getStartLine() - 1, $m->getEndLine() - $m->getStartLine() + 1)), ]; foreach ($r->getMethods(\ReflectionMethod::IS_PROTECTED) as $m) { if ($m->getDocComment()) { $code[] = ' '.$m->getDocComment(); } - $code[] = substr_replace(implode('', array_slice($abstractSrc, $m->getStartLine() - 1, $m->getEndLine() - $m->getStartLine() + 1)), 'public', 4, 9); + $code[] = substr_replace(implode('', \array_slice($abstractSrc, $m->getStartLine() - 1, $m->getEndLine() - $m->getStartLine() + 1)), 'public', 4, 9); } foreach ($r->getMethods(\ReflectionMethod::IS_PRIVATE) as $m) { if ($m->getDocComment()) { $code[] = ' '.$m->getDocComment(); } - $code[] = implode('', array_slice($abstractSrc, $m->getStartLine() - 1, $m->getEndLine() - $m->getStartLine() + 1)); + $code[] = implode('', \array_slice($abstractSrc, $m->getStartLine() - 1, $m->getEndLine() - $m->getStartLine() + 1)); } $code = implode("\n", $code); From 22c77ea6768411af7fcab2613c529db34a9588da Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 6 Jul 2025 15:33:06 +0200 Subject: [PATCH 33/59] remove XML routing configuration files --- CHANGELOG.md | 1 + Resources/config/routing/errors.php | 11 ----------- Resources/config/routing/errors.xml | 8 -------- Resources/config/routing/webhook.php | 11 ----------- Resources/config/routing/webhook.xml | 8 -------- 5 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 Resources/config/routing/errors.xml delete mode 100644 Resources/config/routing/webhook.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d4d01432..352781a2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 8.0 --- + * Remove `errors.xml` and `webhook.xml` routing configuration files (use their PHP equivalent instead) * Enable the property info constructor extractor by default * Remove deprecated `Symfony\Bundle\FrameworkBundle\Console\Application::add()` method in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()` * Make `Router` class `final` diff --git a/Resources/config/routing/errors.php b/Resources/config/routing/errors.php index 36a46dee4..11040e29a 100644 --- a/Resources/config/routing/errors.php +++ b/Resources/config/routing/errors.php @@ -10,19 +10,8 @@ */ use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; -use Symfony\Component\Routing\Loader\XmlFileLoader; return function (RoutingConfigurator $routes): void { - foreach (debug_backtrace() as $trace) { - if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) { - if (__DIR__ === dirname(realpath($trace['args'][3]))) { - trigger_deprecation('symfony/routing', '7.3', 'The "errors.xml" routing configuration file is deprecated, import "errors.php" instead.'); - - break; - } - } - } - $routes->add('_preview_error', '/{code}.{_format}') ->controller('error_controller::preview') ->defaults(['_format' => 'html']) diff --git a/Resources/config/routing/errors.xml b/Resources/config/routing/errors.xml deleted file mode 100644 index f890aef1e..000000000 --- a/Resources/config/routing/errors.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/Resources/config/routing/webhook.php b/Resources/config/routing/webhook.php index 177606b26..ce2436799 100644 --- a/Resources/config/routing/webhook.php +++ b/Resources/config/routing/webhook.php @@ -10,19 +10,8 @@ */ use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; -use Symfony\Component\Routing\Loader\XmlFileLoader; return function (RoutingConfigurator $routes): void { - foreach (debug_backtrace() as $trace) { - if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) { - if (__DIR__ === dirname(realpath($trace['args'][3]))) { - trigger_deprecation('symfony/routing', '7.3', 'The "webhook.xml" routing configuration file is deprecated, import "webhook.php" instead.'); - - break; - } - } - } - $routes->add('_webhook_controller', '/{type}') ->controller('webhook.controller::handle') ->requirements(['type' => '.+']) diff --git a/Resources/config/routing/webhook.xml b/Resources/config/routing/webhook.xml deleted file mode 100644 index 8cb64ebb7..000000000 --- a/Resources/config/routing/webhook.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - From cfd70c4994657db428cd52a5bfba7f07b02fe8fe Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 8 Jul 2025 19:39:48 +0200 Subject: [PATCH 34/59] Leverage get_error_handler() --- FrameworkBundle.php | 3 +-- composer.json | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FrameworkBundle.php b/FrameworkBundle.php index 300fe22fb..34e8b3ae7 100644 --- a/FrameworkBundle.php +++ b/FrameworkBundle.php @@ -103,8 +103,7 @@ public function boot(): void $_ENV['DOCTRINE_DEPRECATIONS'] = $_SERVER['DOCTRINE_DEPRECATIONS'] ??= 'trigger'; if (class_exists(SymfonyRuntime::class)) { - $handler = set_error_handler('var_dump'); - restore_error_handler(); + $handler = get_error_handler(); } else { $handler = [ErrorHandler::register(null, false)]; } diff --git a/composer.json b/composer.json index 1ff4abd0f..ff3f8bd2e 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,7 @@ "symfony/http-foundation": "^7.3|^8.0", "symfony/http-kernel": "^7.2|^8.0", "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php85": "^1.32", "symfony/filesystem": "^7.1|^8.0", "symfony/finder": "^6.4|^7.0|^8.0", "symfony/routing": "^6.4|^7.0|^8.0" From 31c77b4c7c12d5446859a7a00b3c1316177ae997 Mon Sep 17 00:00:00 2001 From: Gregor Harlan Date: Sat, 12 Jul 2025 15:55:19 +0200 Subject: [PATCH 35/59] optimize `in_array` calls --- Command/CacheClearCommand.php | 2 +- DependencyInjection/Configuration.php | 2 +- DependencyInjection/FrameworkExtension.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Command/CacheClearCommand.php b/Command/CacheClearCommand.php index 0e48ead59..01ddedde3 100644 --- a/Command/CacheClearCommand.php +++ b/Command/CacheClearCommand.php @@ -213,7 +213,7 @@ private function isNfs(string $dir): bool if ('/' === \DIRECTORY_SEPARATOR && @is_readable('/proc/mounts') && $files = @file('/proc/mounts')) { foreach ($files as $mount) { $mount = \array_slice(explode(' ', $mount), 1, -3); - if (!\in_array(array_pop($mount), ['vboxsf', 'nfs'])) { + if (!\in_array(array_pop($mount), ['vboxsf', 'nfs'], true)) { continue; } $mounts[] = implode(' ', $mount).'/'; diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index d042d44b5..1790db359 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -2563,7 +2563,7 @@ private function addRateLimiterSection(ArrayNodeDefinition $rootNode, callable $ ->end() ->end() ->validate() - ->ifTrue(static fn ($v) => !\in_array($v['policy'], ['no_limit', 'compound']) && !isset($v['limit'])) + ->ifTrue(static fn ($v) => !\in_array($v['policy'], ['no_limit', 'compound'], true) && !isset($v['limit'])) ->thenInvalid('A limit must be provided when using a policy different than "compound" or "no_limit".') ->end() ->end() diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index a9cabf4f1..e055f5f8b 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -2053,7 +2053,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder } $fileRecorder = function ($extension, $path) use (&$serializerLoaders) { - $definition = new Definition(\in_array($extension, ['yaml', 'yml']) ? YamlFileLoader::class : XmlFileLoader::class, [$path]); + $definition = new Definition(\in_array($extension, ['yaml', 'yml'], true) ? YamlFileLoader::class : XmlFileLoader::class, [$path]); $serializerLoaders[] = $definition; }; @@ -2935,7 +2935,7 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co $headers = new Definition(Headers::class); foreach ($config['headers'] as $name => $data) { $value = $data['value']; - if (\in_array(strtolower($name), ['from', 'to', 'cc', 'bcc', 'reply-to'])) { + if (\in_array(strtolower($name), ['from', 'to', 'cc', 'bcc', 'reply-to'], true)) { $value = (array) $value; } $headers->addMethodCall('addHeader', [$name, $value]); From 334375bee80bc87e6f98c155823a3cc7869b1fbd Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 18 Jul 2025 10:27:39 +0200 Subject: [PATCH 36/59] [FrameworkBundle][SecurityBundle] Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead --- CHANGELOG.md | 1 + DependencyInjection/FrameworkExtension.php | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 352781a2a..e8386b8c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ CHANGELOG * Make `ConfigBuilderCacheWarmer` class `final` * Make `TranslationsCacheWarmer` class `final` * Make `ValidatorCacheWarmer` class `final` + * Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead 7.4 --- diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index 57bf9da21..3cab67293 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -3296,15 +3296,7 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde $limiterConfig['id'] = $name; $limiter->replaceArgument(0, $limiterConfig); - $factoryAlias = $container->registerAliasForArgument($limiterId, RateLimiterFactory::class, $name.'.limiter'); - - if (interface_exists(RateLimiterFactoryInterface::class)) { - $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name); - - $factoryAlias->setDeprecated('symfony/framework-bundle', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); - $container->getAlias(\sprintf('.%s $%s.limiter', RateLimiterFactory::class, $name)) - ->setDeprecated('symfony/framework-bundle', '7.3', 'The "%alias_id%" autowiring alias is deprecated and will be removed in 8.0, use "RateLimiterFactoryInterface" instead.'); - } + $container->registerAliasForArgument($limiterId, RateLimiterFactoryInterface::class, $name.'.limiter', $name); } if ($compoundLimiters && !class_exists(CompoundRateLimiterFactory::class)) { From d2366a083d910dd9b8e5bbe2ed39fd4b93d57905 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 17 Jul 2025 19:03:41 +0200 Subject: [PATCH 37/59] Remove legacy code paths that rely on feature checks --- Command/AboutCommand.php | 6 +- Controller/AbstractController.php | 9 +- Controller/ControllerHelper.php | 9 +- DependencyInjection/Configuration.php | 6 +- DependencyInjection/FrameworkExtension.php | 111 +++--------------- Resources/config/notifier.php | 12 +- Resources/config/schema/symfony-1.0.xsd | 1 - Test/BrowserKitAssertionsTrait.php | 6 +- Tests/Controller/AbstractControllerTest.php | 16 +-- .../DependencyInjection/ConfigurationTest.php | 6 +- .../FrameworkExtensionTestCase.php | 22 +--- .../PhpFrameworkExtensionTest.php | 1 - Tests/Functional/PropertyInfoTest.php | 4 - composer.json | 3 +- 14 files changed, 41 insertions(+), 171 deletions(-) diff --git a/Command/AboutCommand.php b/Command/AboutCommand.php index 0c6899328..e2cc12329 100644 --- a/Command/AboutCommand.php +++ b/Command/AboutCommand.php @@ -52,11 +52,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int /** @var KernelInterface $kernel */ $kernel = $this->getApplication()->getKernel(); - if (method_exists($kernel, 'getBuildDir')) { - $buildDir = $kernel->getBuildDir(); - } else { - $buildDir = $kernel->getCacheDir(); - } + $buildDir = $kernel->getBuildDir(); $xdebugMode = getenv('XDEBUG_MODE') ?: \ini_get('xdebug.mode'); diff --git a/Controller/AbstractController.php b/Controller/AbstractController.php index c44028f8c..7d04cc708 100644 --- a/Controller/AbstractController.php +++ b/Controller/AbstractController.php @@ -226,13 +226,8 @@ protected function getAccessDecision(mixed $attribute, mixed $subject = null): A */ protected function denyAccessUnlessGranted(mixed $attribute, mixed $subject = null, string $message = 'Access Denied.'): void { - if (class_exists(AccessDecision::class)) { - $accessDecision = $this->getAccessDecision($attribute, $subject); - $isGranted = $accessDecision->isGranted; - } else { - $accessDecision = null; - $isGranted = $this->isGranted($attribute, $subject); - } + $accessDecision = $this->getAccessDecision($attribute, $subject); + $isGranted = $accessDecision->isGranted; if (!$isGranted) { $e = $this->createAccessDeniedException(3 > \func_num_args() && $accessDecision ? $accessDecision->getMessage() : $message); diff --git a/Controller/ControllerHelper.php b/Controller/ControllerHelper.php index 4fc56b6a9..8d19f8c2d 100644 --- a/Controller/ControllerHelper.php +++ b/Controller/ControllerHelper.php @@ -219,13 +219,8 @@ public function getAccessDecision(mixed $attribute, mixed $subject = null): Acce */ public function denyAccessUnlessGranted(mixed $attribute, mixed $subject = null, string $message = 'Access Denied.'): void { - if (class_exists(AccessDecision::class)) { - $accessDecision = $this->getAccessDecision($attribute, $subject); - $isGranted = $accessDecision->isGranted; - } else { - $accessDecision = null; - $isGranted = $this->isGranted($attribute, $subject); - } + $accessDecision = $this->getAccessDecision($attribute, $subject); + $isGranted = $accessDecision->isGranted; if (!$isGranted) { $e = $this->createAccessDeniedException(3 > \func_num_args() && $accessDecision ? $accessDecision->getMessage() : $message); diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 02846e1c2..eb61f739d 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -480,7 +480,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode): void if (!\is_string($value)) { return true; } - if (class_exists(WorkflowEvents::class) && !\in_array($value, WorkflowEvents::ALIASES, true)) { + if (!\in_array($value, WorkflowEvents::ALIASES, true)) { return true; } } @@ -969,7 +969,7 @@ private function addAssetMapperSection(ArrayNodeDefinition $rootNode, callable $ ->info('Array of extensions to compress. The entire list must be provided, no merging occurs.') ->prototype('scalar')->end() ->performNoDeepMerging() - ->defaultValue(interface_exists(CompressorInterface::class) ? CompressorInterface::DEFAULT_EXTENSIONS : []) + ->defaultValue(CompressorInterface::DEFAULT_EXTENSIONS) ->end() ->end() ->end() @@ -1096,7 +1096,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e ->validate()->castToArray()->end() ->end() ->scalarNode('translation_domain')->defaultValue('validators')->end() - ->enumNode('email_validation_mode')->values(array_merge(class_exists(Email::class) ? Email::VALIDATION_MODES : ['html5-allow-no-tld', 'html5', 'strict'], ['loose']))->defaultValue('html5')->end() + ->enumNode('email_validation_mode')->values(Email::VALIDATION_MODES)->defaultValue('html5')->end() ->arrayNode('mapping') ->addDefaultsIfNotSet() ->fixXmlConfig('path') diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index 57bf9da21..4878d7fef 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -36,7 +36,6 @@ use Symfony\Component\Asset\PackageInterface; use Symfony\Component\AssetMapper\AssetMapper; use Symfony\Component\AssetMapper\Compiler\AssetCompilerInterface; -use Symfony\Component\AssetMapper\Compressor\CompressorInterface; use Symfony\Component\BrowserKit\AbstractBrowser; use Symfony\Component\Cache\Adapter\AdapterInterface; use Symfony\Component\Cache\Adapter\ArrayAdapter; @@ -82,7 +81,6 @@ use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; use Symfony\Component\Finder\Glob; -use Symfony\Component\Form\Extension\HtmlSanitizer\Type\TextTypeHtmlSanitizerExtension; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormTypeExtensionInterface; use Symfony\Component\Form\FormTypeGuesserInterface; @@ -90,7 +88,6 @@ use Symfony\Component\HtmlSanitizer\HtmlSanitizer; use Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig; use Symfony\Component\HtmlSanitizer\HtmlSanitizerInterface; -use Symfony\Component\HttpClient\Messenger\PingWebhookMessageHandler; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\HttpClient\Retry\GenericRetryStrategy; use Symfony\Component\HttpClient\RetryableHttpClient; @@ -118,10 +115,6 @@ use Symfony\Component\Lock\Store\StoreFactory; use Symfony\Component\Mailer\Bridge as MailerBridge; use Symfony\Component\Mailer\Command\MailerTestCommand; -use Symfony\Component\Mailer\EventListener\DkimSignedMessageListener; -use Symfony\Component\Mailer\EventListener\MessengerTransportListener; -use Symfony\Component\Mailer\EventListener\SmimeEncryptedMessageListener; -use Symfony\Component\Mailer\EventListener\SmimeSignedMessageListener; use Symfony\Component\Mailer\Mailer; use Symfony\Component\Mercure\HubRegistry; use Symfony\Component\Messenger\Attribute\AsMessage; @@ -186,10 +179,8 @@ use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader; use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader; use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader; -use Symfony\Component\Serializer\NameConverter\SnakeCaseToCamelCaseNameConverter; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -use Symfony\Component\Serializer\Normalizer\NumberNormalizer; use Symfony\Component\Serializer\Serializer; use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\String\LazyString; @@ -197,7 +188,6 @@ use Symfony\Component\Translation\Bridge as TranslationBridge; use Symfony\Component\Translation\Command\TranslationLintCommand as BaseTranslationLintCommand; use Symfony\Component\Translation\Command\XliffLintCommand as BaseXliffLintCommand; -use Symfony\Component\Translation\Extractor\PhpAstExtractor; use Symfony\Component\Translation\LocaleSwitcher; use Symfony\Component\Translation\PseudoLocalizationTranslator; use Symfony\Component\Translation\TranslatableMessage; @@ -216,7 +206,6 @@ use Symfony\Component\Validator\ObjectInitializerInterface; use Symfony\Component\Validator\Validation; use Symfony\Component\Webhook\Controller\WebhookController; -use Symfony\Component\WebLink\HttpHeaderParser; use Symfony\Component\WebLink\HttpHeaderSerializer; use Symfony\Component\Workflow; use Symfony\Component\Workflow\WorkflowInterface; @@ -303,10 +292,6 @@ public function load(array $configs, ContainerBuilder $container): void // Load Cache configuration first as it is used by other components $loader->load('cache.php'); - if (!interface_exists(NamespacedPoolInterface::class)) { - $container->removeAlias(NamespacedPoolInterface::class); - } - $configuration = $this->getConfiguration($configs, $container); $config = $this->processConfiguration($configuration, $configs); @@ -502,11 +487,6 @@ public function load(array $configs, ContainerBuilder $container): void } $loader->load('web_link.php'); - - // Require symfony/web-link 7.4 - if (!class_exists(HttpHeaderParser::class)) { - $container->removeDefinition('web_link.http_header_parser'); - } } if ($this->readConfigEnabled('uid', $container, $config['uid'])) { @@ -557,7 +537,7 @@ public function load(array $configs, ContainerBuilder $container): void $container->removeDefinition('form.type_extension.form.validator'); $container->removeDefinition('form.type_guesser.validator'); } - if (!$this->readConfigEnabled('html_sanitizer', $container, $config['html_sanitizer']) || !class_exists(TextTypeHtmlSanitizerExtension::class)) { + if (!$this->readConfigEnabled('html_sanitizer', $container, $config['html_sanitizer'])) { $container->removeDefinition('form.type_extension.form.html_sanitizer'); } } else { @@ -592,26 +572,6 @@ public function load(array $configs, ContainerBuilder $container): void $container->removeDefinition('console.command.messenger_failed_messages_show'); $container->removeDefinition('console.command.messenger_failed_messages_remove'); $container->removeDefinition('cache.messenger.restart_workers_signal'); - - if ($container->hasDefinition('messenger.transport.amqp.factory') && !class_exists(MessengerBridge\Amqp\Transport\AmqpTransportFactory::class)) { - if (class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory::class)) { - $container->getDefinition('messenger.transport.amqp.factory') - ->setClass(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory::class) - ->addTag('messenger.transport_factory'); - } else { - $container->removeDefinition('messenger.transport.amqp.factory'); - } - } - - if ($container->hasDefinition('messenger.transport.redis.factory') && !class_exists(MessengerBridge\Redis\Transport\RedisTransportFactory::class)) { - if (class_exists(\Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory::class)) { - $container->getDefinition('messenger.transport.redis.factory') - ->setClass(\Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory::class) - ->addTag('messenger.transport_factory'); - } else { - $container->removeDefinition('messenger.transport.redis.factory'); - } - } } // notifier depends on messenger, mailer being registered @@ -1504,24 +1464,19 @@ private function registerAssetMapperConfiguration(array $config, ContainerBuilde ->replaceArgument(4, $config['importmap_script_attributes']) ; - if (interface_exists(CompressorInterface::class)) { - $compressors = []; - foreach ($config['precompress']['formats'] as $format) { - $compressors[$format] = new Reference("asset_mapper.compressor.$format"); - } + $compressors = []; + foreach ($config['precompress']['formats'] as $format) { + $compressors[$format] = new Reference("asset_mapper.compressor.$format"); + } - $container->getDefinition('asset_mapper.compressor')->replaceArgument(0, $compressors ?: null); + $container->getDefinition('asset_mapper.compressor')->replaceArgument(0, $compressors ?: null); - if ($config['precompress']['enabled']) { - $container - ->getDefinition('asset_mapper.local_public_assets_filesystem') - ->addArgument(new Reference('asset_mapper.compressor')) - ->addArgument($config['precompress']['extensions']) - ; - } - } else { - $container->removeDefinition('asset_mapper.compressor'); - $container->removeDefinition('asset_mapper.assets.command.compress'); + if ($config['precompress']['enabled']) { + $container + ->getDefinition('asset_mapper.local_public_assets_filesystem') + ->addArgument(new Reference('asset_mapper.compressor')) + ->addArgument($config['precompress']['extensions']) + ; } } @@ -1588,7 +1543,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder } // don't use ContainerBuilder::willBeAvailable() as these are not needed in production - if (interface_exists(Parser::class) && class_exists(PhpAstExtractor::class)) { + if (interface_exists(Parser::class)) { $container->removeDefinition('translation.extractor.php'); } else { $container->removeDefinition('translation.extractor.php_ast'); @@ -2027,16 +1982,6 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder $container->removeDefinition('serializer.normalizer.mime_message'); } - // BC layer Serializer < 7.3 - if (!class_exists(NumberNormalizer::class)) { - $container->removeDefinition('serializer.normalizer.number'); - } - - // BC layer Serializer < 7.2 - if (!class_exists(SnakeCaseToCamelCaseNameConverter::class)) { - $container->removeDefinition('serializer.name_converter.snake_case_to_camel_case'); - } - if ($container->getParameter('kernel.debug')) { $container->removeDefinition('serializer.mapping.cache_class_metadata_factory'); } @@ -2648,10 +2593,7 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con $container->registerAliasForArgument($tagAwareId, TagAwareCacheInterface::class, $pool['name'] ?? $name); $container->registerAliasForArgument($name, CacheInterface::class, $pool['name'] ?? $name); $container->registerAliasForArgument($name, CacheItemPoolInterface::class, $pool['name'] ?? $name); - - if (interface_exists(NamespacedPoolInterface::class)) { - $container->registerAliasForArgument($name, NamespacedPoolInterface::class, $pool['name'] ?? $name); - } + $container->registerAliasForArgument($name, NamespacedPoolInterface::class, $pool['name'] ?? $name); } $definition->setPublic($pool['public']); @@ -2689,10 +2631,6 @@ private function registerHttpClientConfiguration(array $config, ContainerBuilder unset($options['vars']); $container->getDefinition('http_client.transport')->setArguments([$options, $config['max_host_connections'] ?? 6]); - if (!class_exists(PingWebhookMessageHandler::class)) { - $container->removeDefinition('http_client.messenger.ping_webhook_handler'); - } - if (!$hasPsr18 = ContainerBuilder::willBeAvailable('psr/http-client', ClientInterface::class, ['symfony/framework-bundle', 'symfony/http-client'])) { $container->removeDefinition('psr18.http_client'); $container->removeAlias(ClientInterface::class); @@ -2795,10 +2733,6 @@ private function registerHttpClientConfiguration(array $config, ContainerBuilder private function registerThrottlingHttpClient(string $rateLimiter, string $name, ContainerBuilder $container): void { - if (!class_exists(ThrottlingHttpClient::class)) { - throw new LogicException('Rate limiter support cannot be enabled as version 7.1+ of the HttpClient component is required.'); - } - if (!$this->isInitializedConfigEnabled('rate_limiter')) { throw new LogicException('Rate limiter cannot be used within HttpClient as the RateLimiter component is not enabled.'); } @@ -2941,14 +2875,7 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co $container->removeDefinition('mailer.message_listener'); } - if (!class_exists(MessengerTransportListener::class)) { - $container->removeDefinition('mailer.messenger_transport_listener'); - } - if ($config['dkim_signer']['enabled']) { - if (!class_exists(DkimSignedMessageListener::class)) { - throw new LogicException('DKIM signed messages support cannot be enabled as this version of the Mailer component does not support it.'); - } $dkimSigner = $container->getDefinition('mailer.dkim_signer'); $dkimSigner->setArgument(0, $config['dkim_signer']['key']); $dkimSigner->setArgument(1, $config['dkim_signer']['domain']); @@ -2961,9 +2888,6 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co } if ($config['smime_signer']['enabled']) { - if (!class_exists(SmimeSignedMessageListener::class)) { - throw new LogicException('SMIME signed messages support cannot be enabled as this version of the Mailer component does not support it.'); - } $smimeSigner = $container->getDefinition('mailer.smime_signer'); $smimeSigner->setArgument(0, $config['smime_signer']['certificate']); $smimeSigner->setArgument(1, $config['smime_signer']['key']); @@ -2976,9 +2900,6 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co } if ($config['smime_encrypter']['enabled']) { - if (!class_exists(SmimeEncryptedMessageListener::class)) { - throw new LogicException('S/MIME encrypted messages support cannot be enabled as this version of the Mailer component does not support it.'); - } $container->setAlias('mailer.smime_encrypter.repository', $config['smime_encrypter']['repository']); $container->setParameter('mailer.smime_encrypter.cipher', $config['smime_encrypter']['cipher']); } else { @@ -3307,10 +3228,6 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde } } - if ($compoundLimiters && !class_exists(CompoundRateLimiterFactory::class)) { - throw new LogicException('Configuring compound rate limiters is only available in symfony/rate-limiter 7.3+.'); - } - foreach ($compoundLimiters as $name => $limiterConfig) { if (!$limiterConfig['limiters']) { throw new LogicException(\sprintf('Compound rate limiter "%s" requires at least one sub-limiter.', $name)); diff --git a/Resources/config/notifier.php b/Resources/config/notifier.php index 28900ad10..af5c7436e 100644 --- a/Resources/config/notifier.php +++ b/Resources/config/notifier.php @@ -140,12 +140,8 @@ ->set('notifier.notification_logger_listener', NotificationLoggerListener::class) ->tag('kernel.event_subscriber') - ; - - if (class_exists(DesktopMessage::class)) { - $container->services() - ->set('texter.messenger.desktop_handler', MessageHandler::class) - ->args([service('texter.transports')]) - ->tag('messenger.message_handler', ['handles' => DesktopMessage::class]); - } + + ->set('texter.messenger.desktop_handler', MessageHandler::class) + ->args([service('texter.transports')]) + ->tag('messenger.message_handler', ['handles' => DesktopMessage::class]); }; diff --git a/Resources/config/schema/symfony-1.0.xsd b/Resources/config/schema/symfony-1.0.xsd index a8567aa3e..3e9d6e2be 100644 --- a/Resources/config/schema/symfony-1.0.xsd +++ b/Resources/config/schema/symfony-1.0.xsd @@ -339,7 +339,6 @@ - diff --git a/Test/BrowserKitAssertionsTrait.php b/Test/BrowserKitAssertionsTrait.php index 7d49aa61d..bdf9f51c1 100644 --- a/Test/BrowserKitAssertionsTrait.php +++ b/Test/BrowserKitAssertionsTrait.php @@ -54,11 +54,7 @@ public static function assertResponseRedirects(?string $expectedLocation = null, { $constraint = new ResponseConstraint\ResponseIsRedirected($verbose ?? self::$defaultVerboseMode); if ($expectedLocation) { - if (class_exists(ResponseConstraint\ResponseHeaderLocationSame::class)) { - $locationConstraint = new ResponseConstraint\ResponseHeaderLocationSame(self::getRequest(), $expectedLocation); - } else { - $locationConstraint = new ResponseConstraint\ResponseHeaderSame('Location', $expectedLocation); - } + $locationConstraint = new ResponseConstraint\ResponseHeaderLocationSame(self::getRequest(), $expectedLocation); $constraint = LogicalAnd::fromConstraints($constraint, $locationConstraint); } diff --git a/Tests/Controller/AbstractControllerTest.php b/Tests/Controller/AbstractControllerTest.php index 6ad0113fa..9a64f8cd9 100644 --- a/Tests/Controller/AbstractControllerTest.php +++ b/Tests/Controller/AbstractControllerTest.php @@ -359,12 +359,10 @@ public function testdenyAccessUnlessGranted() ->expects($this->once()) ->method('isGranted') ->willReturnCallback(function ($attribute, $subject, ?AccessDecision $accessDecision = null) { - if (class_exists(AccessDecision::class)) { - $this->assertInstanceOf(AccessDecision::class, $accessDecision); - $accessDecision->votes[] = $vote = new Vote(); - $vote->result = VoterInterface::ACCESS_DENIED; - $vote->reasons[] = 'Why should I.'; - } + $this->assertInstanceOf(AccessDecision::class, $accessDecision); + $accessDecision->votes[] = $vote = new Vote(); + $vote->result = VoterInterface::ACCESS_DENIED; + $vote->reasons[] = 'Why should I.'; return false; }); @@ -376,14 +374,12 @@ public function testdenyAccessUnlessGranted() $controller->setContainer($container); $this->expectException(AccessDeniedException::class); - $this->expectExceptionMessage('Access Denied.'.(class_exists(AccessDecision::class) ? ' Why should I.' : '')); + $this->expectExceptionMessage('Access Denied. Why should I.'); try { $controller->denyAccessUnlessGranted('foo'); } catch (AccessDeniedException $e) { - if (class_exists(AccessDecision::class)) { - $this->assertFalse($e->getAccessDecision()->isGranted); - } + $this->assertFalse($e->getAccessDecision()->isGranted); throw $e; } diff --git a/Tests/DependencyInjection/ConfigurationTest.php b/Tests/DependencyInjection/ConfigurationTest.php index ccb4fea5d..e1263a6cd 100644 --- a/Tests/DependencyInjection/ConfigurationTest.php +++ b/Tests/DependencyInjection/ConfigurationTest.php @@ -146,7 +146,7 @@ public function testAssetMapperCanBeEnabled() 'precompress' => [ 'enabled' => false, 'formats' => [], - 'extensions' => interface_exists(CompressorInterface::class) ? CompressorInterface::DEFAULT_EXTENSIONS : [], + 'extensions' => CompressorInterface::DEFAULT_EXTENSIONS, ], ]; @@ -876,7 +876,7 @@ protected static function getBundleDefaultConfig() 'precompress' => [ 'enabled' => false, 'formats' => [], - 'extensions' => interface_exists(CompressorInterface::class) ? CompressorInterface::DEFAULT_EXTENSIONS : [], + 'extensions' => CompressorInterface::DEFAULT_EXTENSIONS, ], ], 'cache' => [ @@ -916,7 +916,7 @@ class_exists(SemaphoreStore::class) && SemaphoreStore::isSupported() ? 'semaphor ], ], 'messenger' => [ - 'enabled' => !class_exists(FullStack::class) && interface_exists(MessageBusInterface::class), + 'enabled' => !class_exists(FullStack::class), 'routing' => [], 'transports' => [], 'failure_transport' => null, diff --git a/Tests/DependencyInjection/FrameworkExtensionTestCase.php b/Tests/DependencyInjection/FrameworkExtensionTestCase.php index 87f36011c..a1a0b1aad 100644 --- a/Tests/DependencyInjection/FrameworkExtensionTestCase.php +++ b/Tests/DependencyInjection/FrameworkExtensionTestCase.php @@ -146,12 +146,6 @@ public function testPropertyAccessCache() { $container = $this->createContainerFromFile('property_accessor'); - if (!method_exists(PropertyAccessor::class, 'createCache')) { - $this->assertFalse($container->hasDefinition('cache.property_access')); - - return; - } - $cache = $container->getDefinition('cache.property_access'); $this->assertSame([PropertyAccessor::class, 'createCache'], $cache->getFactory(), 'PropertyAccessor::createCache() should be used in non-debug mode'); $this->assertSame(AdapterInterface::class, $cache->getClass()); @@ -161,12 +155,6 @@ public function testPropertyAccessCacheWithDebug() { $container = $this->createContainerFromFile('property_accessor', ['kernel.debug' => true]); - if (!method_exists(PropertyAccessor::class, 'createCache')) { - $this->assertFalse($container->hasDefinition('cache.property_access')); - - return; - } - $cache = $container->getDefinition('cache.property_access'); $this->assertNull($cache->getFactory()); $this->assertSame(ArrayAdapter::class, $cache->getClass(), 'ArrayAdapter should be used in debug mode'); @@ -1891,12 +1879,10 @@ public function testCachePoolServices() $this->assertSame(TagAwareAdapter::class, $tagAwareDefinition->getClass()); $this->assertCachePoolServiceDefinitionIsCreated($container, (string) $tagAwareDefinition->getArgument(0), 'cache.adapter.array', 410); - if (method_exists(TagAwareAdapter::class, 'setLogger')) { - $this->assertEquals([ - ['setLogger', [new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]], - ], $tagAwareDefinition->getMethodCalls()); - $this->assertSame([['channel' => 'cache']], $tagAwareDefinition->getTag('monolog.logger')); - } + $this->assertEquals([ + ['setLogger', [new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]], + ], $tagAwareDefinition->getMethodCalls()); + $this->assertSame([['channel' => 'cache']], $tagAwareDefinition->getTag('monolog.logger')); } public function testRedisTagAwareAdapter() diff --git a/Tests/DependencyInjection/PhpFrameworkExtensionTest.php b/Tests/DependencyInjection/PhpFrameworkExtensionTest.php index c4f67c2f1..877da29ee 100644 --- a/Tests/DependencyInjection/PhpFrameworkExtensionTest.php +++ b/Tests/DependencyInjection/PhpFrameworkExtensionTest.php @@ -456,7 +456,6 @@ public static function emailValidationModeProvider() foreach (Email::VALIDATION_MODES as $mode) { yield [$mode]; } - yield ['loose']; } } diff --git a/Tests/Functional/PropertyInfoTest.php b/Tests/Functional/PropertyInfoTest.php index bf1c11cb5..041400a0c 100644 --- a/Tests/Functional/PropertyInfoTest.php +++ b/Tests/Functional/PropertyInfoTest.php @@ -21,10 +21,6 @@ public function testPhpDocPriority() $propertyInfo = static::getContainer()->get('property_info'); - if (!method_exists($propertyInfo, 'getType')) { - $this->markTestSkipped(); - } - $this->assertEquals(Type::list(Type::int()), $propertyInfo->getType(Dummy::class, 'codes')); } } diff --git a/composer.json b/composer.json index f3866f6ee..0064fcaec 100644 --- a/composer.json +++ b/composer.json @@ -75,8 +75,7 @@ "symfony/workflow": "^7.4|^8.0", "symfony/web-link": "^7.4|^8.0", "symfony/webhook": "^7.4|^8.0", - "symfony/yaml": "^7.4|^8.0", - "twig/twig": "^3.12" + "symfony/yaml": "^7.4|^8.0" }, "conflict": { "doctrine/persistence": "<1.3", From 4701b01fbdd62297400802b507a632f6b09fe2f6 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 18 Jul 2025 18:29:52 +0200 Subject: [PATCH 38/59] [FrameworkBundle][TwigBundle] Remove options session.sid_length session.sid_bits_per_character router.cache_dir validation.cache and base_template_class --- CHANGELOG.md | 3 + DependencyInjection/Configuration.php | 32 ---- DependencyInjection/FrameworkExtension.php | 5 +- Resources/config/schema/symfony-1.0.xsd | 27 ---- .../ConfigBuilderCacheWarmerTest.php | 7 +- .../AboutCommand/Fixture/TestAppKernel.php | 7 +- .../CacheClearCommand/Fixture/config.yml | 5 - .../DependencyInjection/ConfigurationTest.php | 146 ++++-------------- .../php/asset_mapper_without_assets.php | 4 - .../Fixtures/php/assets.php | 4 - .../Fixtures/php/assets_disabled.php | 4 - .../assets_version_strategy_as_service.php | 4 - .../Fixtures/php/cache.php | 4 - .../php/cache_app_redis_tag_aware.php | 4 - .../php/cache_app_redis_tag_aware_pool.php | 4 - .../DependencyInjection/Fixtures/php/csrf.php | 4 - .../Fixtures/php/csrf_needs_session.php | 4 - .../Fixtures/php/default_config.php | 4 - .../php/esi_and_ssi_without_fragments.php | 4 - .../Fixtures/php/esi_disabled.php | 4 - .../Fixtures/php/exceptions.php | 4 - .../Fixtures/php/form_csrf_disabled.php | 4 - .../Fixtures/php/form_csrf_field_attr.php | 4 - .../Fixtures/php/form_default_csrf.php | 4 - .../Fixtures/php/form_no_csrf.php | 4 - .../Fixtures/php/fragments_and_hinclude.php | 4 - .../DependencyInjection/Fixtures/php/full.php | 1 - .../Fixtures/php/html_sanitizer.php | 4 - ...r_default_allowed_link_and_media_hosts.php | 4 - .../php/html_sanitizer_default_config.php | 4 - .../php/http_client_default_options.php | 4 - .../php/http_client_full_default_options.php | 4 - .../php/http_client_mock_response_factory.php | 4 - .../http_client_override_default_options.php | 4 - .../Fixtures/php/http_client_rate_limiter.php | 4 - .../Fixtures/php/http_client_retry.php | 4 - ...ttp_client_scoped_without_query_option.php | 4 - .../Fixtures/php/http_client_xml_key.php | 4 - .../Fixtures/php/json_streamer.php | 4 - .../DependencyInjection/Fixtures/php/lock.php | 4 - .../Fixtures/php/lock_named.php | 4 - .../Fixtures/php/lock_service.php | 4 - .../Fixtures/php/mailer.php | 4 - .../php/mailer_with_disabled_message_bus.php | 4 - .../Fixtures/php/mailer_with_dsn.php | 4 - .../php/mailer_with_specific_message_bus.php | 4 - .../Fixtures/php/mailer_with_transports.php | 4 - .../Fixtures/php/messenger.php | 4 - .../Fixtures/php/messenger_bus_name_stamp.php | 4 - .../Fixtures/php/messenger_disabled.php | 4 - ...er_middleware_factory_erroneous_format.php | 4 - ...iple_buses_with_deduplicate_middleware.php | 4 - ...e_buses_without_deduplicate_middleware.php | 4 - .../messenger_multiple_failure_transports.php | 4 - ...ger_multiple_failure_transports_global.php | 4 - .../Fixtures/php/messenger_routing.php | 4 - .../messenger_routing_invalid_transport.php | 4 - .../messenger_routing_invalid_wildcard.php | 4 - .../Fixtures/php/messenger_routing_single.php | 4 - .../Fixtures/php/messenger_transport.php | 4 - .../Fixtures/php/messenger_transports.php | 4 - .../Fixtures/php/notifier.php | 4 - .../notifier_with_disabled_message_bus.php | 4 - .../notifier_with_specific_message_bus.php | 4 - .../Fixtures/php/notifier_without_mailer.php | 4 - .../php/notifier_without_messenger.php | 4 - .../php/notifier_without_transports.php | 4 - .../Fixtures/php/php_errors_disabled.php | 4 - .../Fixtures/php/php_errors_enabled.php | 5 - .../Fixtures/php/php_errors_log_level.php | 4 - .../Fixtures/php/php_errors_log_levels.php | 4 - .../Fixtures/php/profiler.php | 4 - .../Fixtures/php/property_accessor.php | 4 - .../Fixtures/php/property_info.php | 4 - ...rty_info_without_constructor_extractor.php | 4 - .../Fixtures/php/request.php | 4 - .../Fixtures/php/semaphore.php | 4 - .../Fixtures/php/semaphore_named.php | 4 - .../Fixtures/php/semaphore_service.php | 4 - .../Fixtures/php/serializer_disabled.php | 4 - .../Fixtures/php/serializer_enabled.php | 4 - .../Fixtures/php/serializer_mapping.php | 4 - ...serializer_mapping_without_attributes.php} | 4 - .../php/serializer_without_translator.php | 4 - .../Fixtures/php/session.php | 4 - .../php/session_cookie_secure_auto.php | 4 - .../Fixtures/php/ssi_disabled.php | 4 - .../php/translator_cache_dir_disabled.php | 4 - .../Fixtures/php/translator_fallbacks.php | 4 - .../Fixtures/php/translator_globals.php | 4 - .../php/translator_without_globals.php | 4 - .../Fixtures/php/type_info.php | 4 - .../Fixtures/php/validation_attributes.php | 5 - .../Fixtures/php/validation_auto_mapping.php | 5 - .../php/validation_email_validation_mode.php | 6 +- .../Fixtures/php/validation_mapping.php | 5 - .../validation_multiple_static_methods.php | 5 - .../php/validation_no_static_method.php | 5 - .../php/validation_translation_domain.php | 5 - .../Fixtures/php/web_link.php | 4 - .../Fixtures/php/webhook.php | 4 - .../php/webhook_without_serializer.php | 4 - .../Fixtures/php/workflow_not_valid.php | 4 - .../php/workflow_with_guard_expression.php | 4 - ...th_multiple_transitions_with_same_name.php | 4 - .../workflow_with_no_events_to_dispatch.php | 4 - ...flow_with_specified_events_to_dispatch.php | 4 - ...flow_with_support_and_support_strategy.php | 4 - ...w_without_support_and_support_strategy.php | 4 - .../Fixtures/php/workflows.php | 4 - .../Fixtures/php/workflows_enabled.php | 4 - .../php/workflows_explicitly_enabled.php | 4 - ...ows_explicitly_enabled_named_workflows.php | 4 - .../Fixtures/xml/asset_mapper.xml | 4 +- .../xml/asset_mapper_without_assets.xml | 4 +- .../Fixtures/xml/assets.xml | 4 +- .../Fixtures/xml/assets_disabled.xml | 4 +- .../assets_version_strategy_as_service.xml | 4 +- .../Fixtures/xml/cache.xml | 4 +- .../xml/cache_app_redis_tag_aware.xml | 4 +- .../xml/cache_app_redis_tag_aware_pool.xml | 4 +- .../DependencyInjection/Fixtures/xml/csrf.xml | 4 +- .../Fixtures/xml/csrf_disabled.xml | 4 +- .../Fixtures/xml/csrf_needs_session.xml | 4 +- .../Fixtures/xml/default_config.xml | 4 +- .../xml/esi_and_ssi_without_fragments.xml | 4 +- .../Fixtures/xml/esi_disabled.xml | 4 +- .../Fixtures/xml/exceptions.xml | 4 +- .../Fixtures/xml/form_csrf_disabled.xml | 4 +- .../Fixtures/xml/form_csrf_field_attr.xml | 4 +- .../Fixtures/xml/form_default_csrf.xml | 4 +- .../Fixtures/xml/form_no_csrf.xml | 4 +- .../Fixtures/xml/fragments_and_hinclude.xml | 4 +- .../DependencyInjection/Fixtures/xml/full.xml | 1 - .../Fixtures/xml/html_sanitizer.xml | 4 +- ...r_default_allowed_link_and_media_hosts.xml | 4 +- .../xml/html_sanitizer_default_config.xml | 4 +- .../xml/http_client_default_options.xml | 4 +- .../xml/http_client_full_default_options.xml | 4 +- .../xml/http_client_mock_response_factory.xml | 4 +- .../http_client_override_default_options.xml | 4 +- .../Fixtures/xml/http_client_rate_limiter.xml | 4 +- .../Fixtures/xml/http_client_retry.xml | 4 +- ...ttp_client_scoped_without_query_option.xml | 4 +- .../Fixtures/xml/http_client_xml_key.xml | 4 +- .../Fixtures/xml/json_streamer.xml | 4 +- .../DependencyInjection/Fixtures/xml/lock.xml | 4 +- .../Fixtures/xml/lock_named.xml | 4 +- .../Fixtures/xml/lock_service.xml | 4 +- .../xml/mailer_with_disabled_message_bus.xml | 4 +- .../Fixtures/xml/mailer_with_dsn.xml | 4 +- .../xml/mailer_with_specific_message_bus.xml | 4 +- .../Fixtures/xml/mailer_with_transports.xml | 4 +- .../Fixtures/xml/messenger.xml | 4 +- .../Fixtures/xml/messenger_bus_name_stamp.xml | 4 +- .../Fixtures/xml/messenger_disabled.xml | 4 +- ...iple_buses_with_deduplicate_middleware.xml | 4 +- ...e_buses_without_deduplicate_middleware.xml | 4 +- .../messenger_multiple_failure_transports.xml | 4 +- ...ger_multiple_failure_transports_global.xml | 4 +- .../Fixtures/xml/messenger_routing.xml | 4 +- .../messenger_routing_invalid_transport.xml | 4 +- .../messenger_routing_invalid_wildcard.xml | 4 +- .../Fixtures/xml/messenger_routing_single.xml | 4 +- .../Fixtures/xml/messenger_schedule.xml | 4 +- .../Fixtures/xml/messenger_transport.xml | 4 +- .../Fixtures/xml/messenger_transports.xml | 4 +- .../Fixtures/xml/notifier.xml | 4 +- .../notifier_with_disabled_message_bus.xml | 4 +- .../notifier_with_specific_message_bus.xml | 4 +- .../Fixtures/xml/notifier_without_mailer.xml | 4 +- .../xml/notifier_without_messenger.xml | 4 +- .../xml/notifier_without_transports.xml | 4 +- .../Fixtures/xml/php_errors_disabled.xml | 3 +- .../Fixtures/xml/php_errors_enabled.xml | 5 +- .../Fixtures/xml/php_errors_log_level.xml | 3 +- .../Fixtures/xml/php_errors_log_levels.xml | 3 +- .../Fixtures/xml/profiler.xml | 4 +- .../Fixtures/xml/property_accessor.xml | 4 +- .../Fixtures/xml/property_info.xml | 4 +- ...rty_info_without_constructor_extractor.xml | 4 +- .../Fixtures/xml/rate_limiter.xml | 4 +- .../Fixtures/xml/request.xml | 4 +- .../Fixtures/xml/semaphore.xml | 4 +- .../Fixtures/xml/semaphore_named.xml | 4 +- .../Fixtures/xml/semaphore_service.xml | 4 +- .../Fixtures/xml/serializer_disabled.xml | 4 +- .../Fixtures/xml/serializer_enabled.xml | 4 +- .../Fixtures/xml/serializer_mapping.xml | 4 +- ...serializer_mapping_without_attributes.xml} | 4 +- .../xml/serializer_without_translator.xml | 4 +- .../Fixtures/xml/session.xml | 4 +- .../xml/session_cookie_secure_auto.xml | 4 +- .../Fixtures/xml/ssi_disabled.xml | 4 +- .../xml/translator_cache_dir_disabled.xml | 4 +- .../Fixtures/xml/translator_fallbacks.xml | 4 +- .../Fixtures/xml/translator_globals.xml | 4 +- .../xml/translator_without_globals.xml | 4 +- .../Fixtures/xml/type_info.xml | 4 +- .../Fixtures/xml/validation_attributes.xml | 6 +- .../Fixtures/xml/validation_auto_mapping.xml | 6 +- .../xml/validation_email_validation_mode.xml | 6 +- .../Fixtures/xml/validation_mapping.xml | 6 +- .../validation_multiple_static_methods.xml | 6 +- .../xml/validation_no_static_method.xml | 6 +- .../xml/validation_translation_domain.xml | 6 +- .../Fixtures/xml/web_link.xml | 4 +- .../Fixtures/xml/webhook.xml | 4 +- .../xml/webhook_without_serializer.xml | 4 +- .../Fixtures/xml/workflow_not_valid.xml | 4 +- .../xml/workflow_with_guard_expression.xml | 4 +- ...th_multiple_transitions_with_same_name.xml | 4 +- .../workflow_with_no_events_to_dispatch.xml | 4 +- ...flow_with_specified_events_to_dispatch.xml | 4 +- ...flow_with_support_and_support_strategy.xml | 4 +- ...w_without_support_and_support_strategy.xml | 4 +- .../Fixtures/xml/workflows.xml | 4 +- .../Fixtures/xml/workflows_enabled.xml | 4 +- .../xml/workflows_explicitly_enabled.xml | 4 +- ...ows_explicitly_enabled_named_workflows.xml | 4 +- .../yml/asset_mapper_without_assets.yml | 5 - .../Fixtures/yml/assets.yml | 5 - .../Fixtures/yml/assets_disabled.yml | 5 - .../assets_version_strategy_as_service.yml | 5 - .../Fixtures/yml/cache.yml | 5 - .../yml/cache_app_redis_tag_aware.yml | 5 - .../yml/cache_app_redis_tag_aware_pool.yml | 5 - .../DependencyInjection/Fixtures/yml/csrf.yml | 5 - .../Fixtures/yml/csrf_needs_session.yml | 5 - .../Fixtures/yml/default_config.yml | 5 - .../yml/esi_and_ssi_without_fragments.yml | 5 - .../Fixtures/yml/esi_disabled.yml | 5 - .../Fixtures/yml/exceptions.yml | 5 - .../Fixtures/yml/form_csrf_disabled.yml | 5 - .../Fixtures/yml/form_csrf_field_attr.yml | 5 - .../Fixtures/yml/form_default_csrf.yml | 5 - .../Fixtures/yml/form_no_csrf.yml | 5 - .../Fixtures/yml/fragments_and_hinclude.yml | 5 - .../DependencyInjection/Fixtures/yml/full.yml | 1 - .../Fixtures/yml/html_sanitizer.yml | 5 - ...r_default_allowed_link_and_media_hosts.yml | 5 - .../yml/html_sanitizer_default_config.yml | 5 - .../yml/http_client_default_options.yml | 5 - .../yml/http_client_full_default_options.yml | 5 - .../yml/http_client_mock_response_factory.yml | 5 - .../http_client_override_default_options.yml | 5 - .../Fixtures/yml/http_client_rate_limiter.yml | 5 - .../Fixtures/yml/http_client_retry.yml | 5 - ...ttp_client_scoped_without_query_option.yml | 5 - .../Fixtures/yml/http_client_xml_key.yml | 5 - .../Fixtures/yml/json_streamer.yml | 5 - .../DependencyInjection/Fixtures/yml/lock.yml | 5 - .../Fixtures/yml/lock_named.yml | 5 - .../Fixtures/yml/lock_service.yml | 5 - .../yml/mailer_with_disabled_message_bus.yml | 5 - .../Fixtures/yml/mailer_with_dsn.yml | 5 - .../yml/mailer_with_specific_message_bus.yml | 5 - .../Fixtures/yml/mailer_with_transports.yml | 5 - .../Fixtures/yml/messenger.yml | 5 - .../Fixtures/yml/messenger_bus_name_stamp.yml | 5 - .../Fixtures/yml/messenger_disabled.yml | 5 - ...er_middleware_factory_erroneous_format.yml | 5 - ...iple_buses_with_deduplicate_middleware.yml | 5 - ...e_buses_without_deduplicate_middleware.yml | 5 - .../messenger_multiple_failure_transports.yml | 5 - ...ger_multiple_failure_transports_global.yml | 5 - .../Fixtures/yml/messenger_routing.yml | 5 - .../messenger_routing_invalid_transport.yml | 5 - .../messenger_routing_invalid_wildcard.yml | 5 - .../Fixtures/yml/messenger_routing_single.yml | 5 - .../Fixtures/yml/messenger_schedule.yml | 5 - .../Fixtures/yml/messenger_transport.yml | 5 - .../Fixtures/yml/messenger_transports.yml | 5 - ...ssenger_with_disabled_reset_on_message.yml | 5 - ...r_with_explict_reset_on_message_legacy.yml | 5 - .../Fixtures/yml/notifier.yml | 5 - .../notifier_with_disabled_message_bus.yml | 5 - .../notifier_with_specific_message_bus.yml | 5 - .../Fixtures/yml/notifier_without_mailer.yml | 5 - .../yml/notifier_without_messenger.yml | 5 - .../yml/notifier_without_transports.yml | 5 - .../Fixtures/yml/php_errors_disabled.yml | 3 - .../Fixtures/yml/php_errors_enabled.yml | 4 - .../Fixtures/yml/php_errors_log_level.yml | 3 - .../Fixtures/yml/php_errors_log_levels.yml | 3 - .../Fixtures/yml/profiler.yml | 5 - .../Fixtures/yml/property_accessor.yml | 5 - .../Fixtures/yml/property_info.yml | 5 - ...rty_info_without_constructor_extractor.yml | 5 - .../Fixtures/yml/request.yml | 5 - .../Fixtures/yml/semaphore.yml | 5 - .../Fixtures/yml/semaphore_named.yml | 5 - .../Fixtures/yml/semaphore_service.yml | 5 - .../Fixtures/yml/serializer_disabled.yml | 5 - .../Fixtures/yml/serializer_enabled.yml | 5 - .../Fixtures/yml/serializer_mapping.yml | 5 - ...serializer_mapping_without_attributes.yml} | 5 - .../yml/serializer_without_translator.yml | 5 - .../Fixtures/yml/session.yml | 5 - .../yml/session_cookie_secure_auto.yml | 5 - .../Fixtures/yml/ssi_disabled.yml | 5 - .../yml/translator_cache_dir_disabled.yml | 5 - .../Fixtures/yml/translator_fallbacks.yml | 5 - .../Fixtures/yml/translator_globals.yml | 5 - .../yml/translator_without_globals.yml | 5 - .../Fixtures/yml/type_info.yml | 5 - .../Fixtures/yml/validation_attributes.yml | 6 - .../Fixtures/yml/validation_auto_mapping.yml | 18 +-- .../yml/validation_email_validation_mode.yml | 7 +- .../Fixtures/yml/validation_mapping.yml | 18 +-- .../validation_multiple_static_methods.yml | 8 +- .../yml/validation_no_static_method.yml | 6 - .../yml/validation_translation_domain.yml | 6 - .../Fixtures/yml/web_link.yml | 5 - .../Fixtures/yml/webhook.yml | 5 - .../yml/webhook_without_serializer.yml | 5 - .../Fixtures/yml/workflow_not_valid.yml | 5 - .../yml/workflow_with_guard_expression.yml | 5 - ...th_multiple_transitions_with_same_name.yml | 5 - .../workflow_with_no_events_to_dispatch.yml | 5 - ...flow_with_specified_events_to_dispatch.yml | 5 - ...flow_with_support_and_support_strategy.yml | 5 - ...w_without_support_and_support_strategy.yml | 5 - .../Fixtures/yml/workflows.yml | 5 - .../Fixtures/yml/workflows_enabled.yml | 5 - .../yml/workflows_explicitly_enabled.yml | 5 - ...ows_explicitly_enabled_named_workflows.yml | 5 - .../FrameworkExtensionTestCase.php | 52 +++---- .../PhpFrameworkExtensionTest.php | 56 ------- Tests/Functional/app/config/framework.yml | 9 +- Tests/Kernel/ConcreteMicroKernel.php | 5 - Tests/Kernel/MicroKernelTraitTest.php | 8 +- .../flex-style/src/FlexStyleMicroKernel.php | 8 +- 333 files changed, 192 insertions(+), 1599 deletions(-) rename Tests/DependencyInjection/Fixtures/php/{serializer_mapping_without_annotations.php => serializer_mapping_without_attributes.php} (79%) rename Tests/DependencyInjection/Fixtures/xml/{serializer_mapping_without_annotations.xml => serializer_mapping_without_attributes.xml} (82%) rename Tests/DependencyInjection/Fixtures/yml/{serializer_mapping_without_annotations.yml => serializer_mapping_without_attributes.yml} (78%) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8386b8c4..4f392e35b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ CHANGELOG * Make `TranslationsCacheWarmer` class `final` * Make `ValidatorCacheWarmer` class `final` * Remove autowiring aliases for `RateLimiterFactory`; use `RateLimiterFactoryInterface` instead + * Remove `session.sid_length` and `session.sid_bits_per_character` config options + * Remove the `router.cache_dir` config option + * Remove the `validation.cache` option 7.4 --- diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 02846e1c2..ed1f4b567 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -162,7 +162,6 @@ public function getConfigTreeBuilder(): TreeBuilder $this->addAssetMapperSection($rootNode, $enableIfStandalone); $this->addTranslatorSection($rootNode, $enableIfStandalone); $this->addValidationSection($rootNode, $enableIfStandalone); - $this->addAnnotationsSection($rootNode); $this->addSerializerSection($rootNode, $enableIfStandalone); $this->addPropertyAccessSection($rootNode, $willBeAvailable); $this->addTypeInfoSection($rootNode, $enableIfStandalone); @@ -650,10 +649,6 @@ private function addRouterSection(ArrayNodeDefinition $rootNode): void ->children() ->scalarNode('resource')->isRequired()->end() ->scalarNode('type')->end() - ->scalarNode('cache_dir') - ->defaultValue('%kernel.build_dir%') - ->setDeprecated('symfony/framework-bundle', '7.1', 'Setting the "%path%.%node%" configuration option is deprecated. It will be removed in version 8.0.') - ->end() ->scalarNode('default_uri') ->info('The default URI used to generate URLs in a non-HTTP context.') ->defaultNull() @@ -715,16 +710,6 @@ private function addSessionSection(ArrayNodeDefinition $rootNode): void ->defaultValue(0) ->info('Seconds to wait between 2 session metadata updates.') ->end() - ->integerNode('sid_length') - ->min(22) - ->max(256) - ->setDeprecated('symfony/framework-bundle', '7.2', 'Setting the "%path%.%node%" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option.') - ->end() - ->integerNode('sid_bits_per_character') - ->min(4) - ->max(6) - ->setDeprecated('symfony/framework-bundle', '7.2', 'Setting the "%path%.%node%" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option.') - ->end() ->end() ->end() ->end() @@ -1085,9 +1070,6 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e ->info('Validation configuration') ->{$enableIfStandalone('symfony/validator', Validation::class)}() ->children() - ->scalarNode('cache') - ->setDeprecated('symfony/framework-bundle', '7.3', 'Setting the "%path%.%node%" configuration option is deprecated. It will be removed in version 8.0.') - ->end() ->booleanNode('enable_attributes')->{class_exists(FullStack::class) ? 'defaultFalse' : 'defaultTrue'}()->end() ->arrayNode('static_method') ->defaultValue(['loadValidatorMetadata']) @@ -1168,20 +1150,6 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e ; } - private function addAnnotationsSection(ArrayNodeDefinition $rootNode): void - { - $rootNode - ->children() - ->arrayNode('annotations') - ->canBeEnabled() - ->validate() - ->ifTrue(static fn (array $v) => $v['enabled']) - ->thenInvalid('Enabling the doctrine/annotations integration is not supported anymore.') - ->end() - ->end() - ; - } - private function addSerializerSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone): void { $defaultContextNode = fn () => (new NodeBuilder()) diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index 3cab67293..5311896b4 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -163,7 +163,6 @@ use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\RateLimiter\CompoundRateLimiterFactory; use Symfony\Component\RateLimiter\LimiterInterface; -use Symfony\Component\RateLimiter\RateLimiterFactory; use Symfony\Component\RateLimiter\RateLimiterFactoryInterface; use Symfony\Component\RateLimiter\Storage\CacheStorage; use Symfony\Component\RemoteEvent\Attribute\AsRemoteEventConsumer; @@ -1317,7 +1316,7 @@ private function registerRouterConfiguration(array $config, ContainerBuilder $co } $container->setParameter('router.resource', $config['resource']); - $container->setParameter('router.cache_dir', $config['cache_dir']); + $container->setParameter('router.cache_dir', '%kernel.build_dir%'); $router = $container->findDefinition('router.default'); $argument = $router->getArgument(2); $argument['strict_requirements'] = $config['strict_requirements']; @@ -1343,7 +1342,7 @@ private function registerSessionConfiguration(array $config, ContainerBuilder $c $container->setAlias('session.storage.factory', $config['storage_factory_id']); $options = ['cache_limiter' => '0']; - foreach (['name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'cookie_samesite', 'use_cookies', 'gc_maxlifetime', 'gc_probability', 'gc_divisor', 'sid_length', 'sid_bits_per_character'] as $key) { + foreach (['name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'cookie_samesite', 'use_cookies', 'gc_maxlifetime', 'gc_probability', 'gc_divisor'] as $key) { if (isset($config[$key])) { $options[$key] = $config[$key]; } diff --git a/Resources/config/schema/symfony-1.0.xsd b/Resources/config/schema/symfony-1.0.xsd index a8567aa3e..aff4cf063 100644 --- a/Resources/config/schema/symfony-1.0.xsd +++ b/Resources/config/schema/symfony-1.0.xsd @@ -23,7 +23,6 @@ - @@ -133,7 +132,6 @@ - @@ -155,8 +153,6 @@ - - @@ -313,7 +309,6 @@ - @@ -349,13 +344,6 @@ - - - - - - - @@ -572,21 +560,6 @@ - - - - - - - - - - - - - - - diff --git a/Tests/CacheWarmer/ConfigBuilderCacheWarmerTest.php b/Tests/CacheWarmer/ConfigBuilderCacheWarmerTest.php index 994151807..70a433e59 100644 --- a/Tests/CacheWarmer/ConfigBuilderCacheWarmerTest.php +++ b/Tests/CacheWarmer/ConfigBuilderCacheWarmerTest.php @@ -365,12 +365,7 @@ public function getCacheDir(): string public function registerContainerConfiguration(LoaderInterface $loader): void { $loader->load(static function (ContainerBuilder $container) { - $container->loadFromExtension('framework', [ - 'annotations' => false, - 'handle_all_throwables' => true, - 'http_method_override' => false, - 'php_errors' => ['log' => true], - ]); + $container->loadFromExtension('framework', []); }); } diff --git a/Tests/Command/AboutCommand/Fixture/TestAppKernel.php b/Tests/Command/AboutCommand/Fixture/TestAppKernel.php index 8c161bc28..089860376 100644 --- a/Tests/Command/AboutCommand/Fixture/TestAppKernel.php +++ b/Tests/Command/AboutCommand/Fixture/TestAppKernel.php @@ -33,12 +33,7 @@ public function getProjectDir(): string public function registerContainerConfiguration(LoaderInterface $loader): void { $loader->load(static function (ContainerBuilder $container) { - $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - ]); + $container->loadFromExtension('framework', []); }); } diff --git a/Tests/Command/CacheClearCommand/Fixture/config.yml b/Tests/Command/CacheClearCommand/Fixture/config.yml index 13f578bea..68f8d0406 100644 --- a/Tests/Command/CacheClearCommand/Fixture/config.yml +++ b/Tests/Command/CacheClearCommand/Fixture/config.yml @@ -1,7 +1,2 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true secret: test diff --git a/Tests/DependencyInjection/ConfigurationTest.php b/Tests/DependencyInjection/ConfigurationTest.php index ccb4fea5d..d8ab946a7 100644 --- a/Tests/DependencyInjection/ConfigurationTest.php +++ b/Tests/DependencyInjection/ConfigurationTest.php @@ -41,9 +41,6 @@ public function testDefaultConfig() { $processor = new Processor(); $config = $processor->processConfiguration(new Configuration(true), [[ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'secret' => 's3cr3t', 'serializer' => ['default_context' => ['foo' => 'bar']], ]]); @@ -73,9 +70,6 @@ public function testInvalidSessionName($sessionName) $processor->processConfiguration( new Configuration(true), [[ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'session' => ['name' => $sessionName, 'cookie_secure' => 'auto', 'cookie_samesite' => 'lax'], ]] ); @@ -98,9 +92,6 @@ public function testAssetsCanBeEnabled() $processor = new Processor(); $configuration = new Configuration(true); $config = $processor->processConfiguration($configuration, [[ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'assets' => null, ]]); @@ -124,9 +115,6 @@ public function testAssetMapperCanBeEnabled() $processor = new Processor(); $configuration = new Configuration(true); $config = $processor->processConfiguration($configuration, [[ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'asset_mapper' => null, ]]); @@ -167,9 +155,6 @@ public function testAssetMapperPolyfillValue(mixed $polyfillValue, bool $isValid } $config = $processor->processConfiguration($configuration, [[ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'asset_mapper' => null === $polyfillValue ? [] : [ 'importmap_polyfill' => $polyfillValue, ], @@ -198,9 +183,6 @@ public function testValidAssetsPackageNameConfiguration($packageName) $configuration = new Configuration(true); $config = $processor->processConfiguration($configuration, [ [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'assets' => [ 'packages' => [ $packageName => [], @@ -234,9 +216,6 @@ public function testInvalidAssetsConfiguration(array $assetConfig, $expectedMess $processor->processConfiguration($configuration, [ [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'assets' => $assetConfig, ], ]); @@ -282,14 +261,9 @@ public function testValidLockConfiguration($lockConfig, $processedConfig) { $processor = new Processor(); $configuration = new Configuration(true); - $config = $processor->processConfiguration($configuration, [ - [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'lock' => $lockConfig, - ], - ]); + $config = $processor->processConfiguration($configuration, [[ + 'lock' => $lockConfig, + ]]); $this->assertArrayHasKey('lock', $config); @@ -347,20 +321,10 @@ public function testLockMergeConfigs() $configuration = new Configuration(true); $config = $processor->processConfiguration($configuration, [ [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'lock' => [ - 'payload' => 'flock', - ], + 'lock' => ['payload' => 'flock'], ], [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'lock' => [ - 'payload' => 'semaphore', - ], + 'lock' => ['payload' => 'semaphore'], ], ]); @@ -382,14 +346,9 @@ public function testValidSemaphoreConfiguration($semaphoreConfig, $processedConf { $processor = new Processor(); $configuration = new Configuration(true); - $config = $processor->processConfiguration($configuration, [ - [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'semaphore' => $semaphoreConfig, - ], - ]); + $config = $processor->processConfiguration($configuration, [[ + 'semaphore' => $semaphoreConfig, + ]]); $this->assertArrayHasKey('semaphore', $config); @@ -439,9 +398,6 @@ public function testItShowANiceMessageIfTwoMessengerBusesAreConfiguredButNoDefau $processor->processConfiguration($configuration, [ 'framework' => [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => [ 'default_bus' => null, 'buses' => [ @@ -459,9 +415,6 @@ public function testBusMiddlewareDontMerge() $configuration = new Configuration(true); $config = $processor->processConfiguration($configuration, [ [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => [ 'default_bus' => 'existing_bus', 'buses' => [ @@ -476,9 +429,6 @@ public function testBusMiddlewareDontMerge() ], ], [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => [ 'buses' => [ 'common_bus' => [ @@ -525,20 +475,15 @@ public function testItErrorsWhenDefaultBusDoesNotExist() $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage('The specified default bus "foo" is not configured. Available buses are "bar", "baz".'); - $processor->processConfiguration($configuration, [ - [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'messenger' => [ - 'default_bus' => 'foo', - 'buses' => [ - 'bar' => null, - 'baz' => null, - ], + $processor->processConfiguration($configuration, [[ + 'messenger' => [ + 'default_bus' => 'foo', + 'buses' => [ + 'bar' => null, + 'baz' => null, ], ], - ]); + ]]); } public function testLockCanBeDisabled() @@ -546,14 +491,9 @@ public function testLockCanBeDisabled() $processor = new Processor(); $configuration = new Configuration(true); - $config = $processor->processConfiguration($configuration, [ - [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'lock' => ['enabled' => false], - ], - ]); + $config = $processor->processConfiguration($configuration, [[ + 'lock' => ['enabled' => false], + ]]); $this->assertFalse($config['lock']['enabled']); } @@ -566,31 +506,21 @@ public function testEnabledLockNeedsResources() $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage('Invalid configuration for path "framework.lock": At least one resource must be defined.'); - $processor->processConfiguration($configuration, [ - [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'lock' => ['enabled' => true], - ], - ]); + $processor->processConfiguration($configuration, [[ + 'lock' => ['enabled' => true], + ]]); } public function testSerializerJsonDetailedErrorMessagesEnabledWhenDefaultContextIsConfigured() { $processor = new Processor(); - $config = $processor->processConfiguration(new Configuration(true), [ - [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'serializer' => [ - 'default_context' => [ - 'foo' => 'bar', - ], + $config = $processor->processConfiguration(new Configuration(true), [[ + 'serializer' => [ + 'default_context' => [ + 'foo' => 'bar', ], ], - ]); + ]]); $this->assertSame(['foo' => 'bar', JsonDecode::DETAILED_ERROR_MESSAGES => true], $config['serializer']['default_context'] ?? []); } @@ -598,19 +528,14 @@ public function testSerializerJsonDetailedErrorMessagesEnabledWhenDefaultContext public function testSerializerJsonDetailedErrorMessagesInDefaultContextCanBeDisabled() { $processor = new Processor(); - $config = $processor->processConfiguration(new Configuration(true), [ - [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'serializer' => [ - 'default_context' => [ - 'foo' => 'bar', - JsonDecode::DETAILED_ERROR_MESSAGES => false, - ], + $config = $processor->processConfiguration(new Configuration(true), [[ + 'serializer' => [ + 'default_context' => [ + 'foo' => 'bar', + JsonDecode::DETAILED_ERROR_MESSAGES => false, ], ], - ]); + ]]); $this->assertSame(['foo' => 'bar', JsonDecode::DETAILED_ERROR_MESSAGES => false], $config['serializer']['default_context'] ?? []); } @@ -620,9 +545,6 @@ public function testSerializerJsonDetailedErrorMessagesInDefaultContextCanBeDisa $processor = new Processor(); $config = $processor->processConfiguration(new Configuration(true), [ [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'serializer' => [ 'default_context' => [ 'foo' => 'bar', @@ -803,9 +725,6 @@ protected static function getBundleDefaultConfig() ], 'email_validation_mode' => 'html5', ], - 'annotations' => [ - 'enabled' => false, - ], 'serializer' => [ 'default_context' => ['foo' => 'bar', JsonDecode::DETAILED_ERROR_MESSAGES => true], 'enabled' => true, @@ -835,7 +754,6 @@ protected static function getBundleDefaultConfig() 'https_port' => 443, 'strict_requirements' => true, 'utf8' => true, - 'cache_dir' => '%kernel.build_dir%', ], 'session' => [ 'enabled' => false, diff --git a/Tests/DependencyInjection/Fixtures/php/asset_mapper_without_assets.php b/Tests/DependencyInjection/Fixtures/php/asset_mapper_without_assets.php index 8a74333b1..18d569d64 100644 --- a/Tests/DependencyInjection/Fixtures/php/asset_mapper_without_assets.php +++ b/Tests/DependencyInjection/Fixtures/php/asset_mapper_without_assets.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, 'asset_mapper' => null, 'assets' => false, - 'handle_all_throwables' => true, - 'http_method_override' => false, - 'php_errors' => ['log' => true], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/assets.php b/Tests/DependencyInjection/Fixtures/php/assets.php index 2ad9a990c..f26621001 100644 --- a/Tests/DependencyInjection/Fixtures/php/assets.php +++ b/Tests/DependencyInjection/Fixtures/php/assets.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'assets' => [ 'version' => 'SomeVersionScheme', 'base_urls' => 'http://cdn.example.com', diff --git a/Tests/DependencyInjection/Fixtures/php/assets_disabled.php b/Tests/DependencyInjection/Fixtures/php/assets_disabled.php index 419a3759e..d10595fba 100644 --- a/Tests/DependencyInjection/Fixtures/php/assets_disabled.php +++ b/Tests/DependencyInjection/Fixtures/php/assets_disabled.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'assets' => [ 'enabled' => false, ], diff --git a/Tests/DependencyInjection/Fixtures/php/assets_version_strategy_as_service.php b/Tests/DependencyInjection/Fixtures/php/assets_version_strategy_as_service.php index 5d49e5b56..b57f78ba4 100644 --- a/Tests/DependencyInjection/Fixtures/php/assets_version_strategy_as_service.php +++ b/Tests/DependencyInjection/Fixtures/php/assets_version_strategy_as_service.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'assets' => [ 'version_strategy' => 'assets.custom_version_strategy', 'base_urls' => 'http://cdn.example.com', diff --git a/Tests/DependencyInjection/Fixtures/php/cache.php b/Tests/DependencyInjection/Fixtures/php/cache.php index 8b443c3c9..9ca04b6c6 100644 --- a/Tests/DependencyInjection/Fixtures/php/cache.php +++ b/Tests/DependencyInjection/Fixtures/php/cache.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'cache' => [ 'pools' => [ 'cache.foo' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware.php b/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware.php index 604b03c9f..44855c62a 100644 --- a/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware.php +++ b/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'cache' => [ 'app' => 'cache.adapter.redis_tag_aware', ], diff --git a/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php b/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php index 7e653ec96..bf3ee2de2 100644 --- a/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php +++ b/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'cache' => [ 'app' => 'cache.redis_tag_aware.foo', 'pools' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/csrf.php b/Tests/DependencyInjection/Fixtures/php/csrf.php index c7fc47062..271cbf216 100644 --- a/Tests/DependencyInjection/Fixtures/php/csrf.php +++ b/Tests/DependencyInjection/Fixtures/php/csrf.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'csrf_protection' => true, 'session' => [ 'storage_factory_id' => 'session.storage.factory.native', diff --git a/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php b/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php index b1fea63ab..34fdb4c1f 100644 --- a/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php +++ b/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'csrf_protection' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/default_config.php b/Tests/DependencyInjection/Fixtures/php/default_config.php index fdcf05275..f1649c3dd 100644 --- a/Tests/DependencyInjection/Fixtures/php/default_config.php +++ b/Tests/DependencyInjection/Fixtures/php/default_config.php @@ -1,8 +1,4 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/esi_and_ssi_without_fragments.php b/Tests/DependencyInjection/Fixtures/php/esi_and_ssi_without_fragments.php index 925e54bf0..beada36b8 100644 --- a/Tests/DependencyInjection/Fixtures/php/esi_and_ssi_without_fragments.php +++ b/Tests/DependencyInjection/Fixtures/php/esi_and_ssi_without_fragments.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'fragments' => [ 'enabled' => false, ], diff --git a/Tests/DependencyInjection/Fixtures/php/esi_disabled.php b/Tests/DependencyInjection/Fixtures/php/esi_disabled.php index f40d47c99..a24cd8158 100644 --- a/Tests/DependencyInjection/Fixtures/php/esi_disabled.php +++ b/Tests/DependencyInjection/Fixtures/php/esi_disabled.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'esi' => [ 'enabled' => false, ], diff --git a/Tests/DependencyInjection/Fixtures/php/exceptions.php b/Tests/DependencyInjection/Fixtures/php/exceptions.php index ab04acb64..96b128f97 100644 --- a/Tests/DependencyInjection/Fixtures/php/exceptions.php +++ b/Tests/DependencyInjection/Fixtures/php/exceptions.php @@ -6,10 +6,6 @@ use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'exceptions' => [ BadRequestHttpException::class => [ 'log_level' => 'info', diff --git a/Tests/DependencyInjection/Fixtures/php/form_csrf_disabled.php b/Tests/DependencyInjection/Fixtures/php/form_csrf_disabled.php index 981498609..bd482c48d 100644 --- a/Tests/DependencyInjection/Fixtures/php/form_csrf_disabled.php +++ b/Tests/DependencyInjection/Fixtures/php/form_csrf_disabled.php @@ -1,12 +1,8 @@ loadFromExtension('framework', [ - 'annotations' => false, 'csrf_protection' => false, 'form' => [ 'csrf_protection' => true, ], - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/form_csrf_field_attr.php b/Tests/DependencyInjection/Fixtures/php/form_csrf_field_attr.php index 103ee4797..9015f8251 100644 --- a/Tests/DependencyInjection/Fixtures/php/form_csrf_field_attr.php +++ b/Tests/DependencyInjection/Fixtures/php/form_csrf_field_attr.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'csrf_protection' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/form_default_csrf.php b/Tests/DependencyInjection/Fixtures/php/form_default_csrf.php index 066807995..7bf017e52 100644 --- a/Tests/DependencyInjection/Fixtures/php/form_default_csrf.php +++ b/Tests/DependencyInjection/Fixtures/php/form_default_csrf.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'session' => [ 'storage_factory_id' => 'session.storage.factory.native', 'handler_id' => null, diff --git a/Tests/DependencyInjection/Fixtures/php/form_no_csrf.php b/Tests/DependencyInjection/Fixtures/php/form_no_csrf.php index 7c052c9ff..e0befdb32 100644 --- a/Tests/DependencyInjection/Fixtures/php/form_no_csrf.php +++ b/Tests/DependencyInjection/Fixtures/php/form_no_csrf.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'form' => [ 'csrf_protection' => [ 'enabled' => false, diff --git a/Tests/DependencyInjection/Fixtures/php/fragments_and_hinclude.php b/Tests/DependencyInjection/Fixtures/php/fragments_and_hinclude.php index 0fcffdbe4..dbcf5b786 100644 --- a/Tests/DependencyInjection/Fixtures/php/fragments_and_hinclude.php +++ b/Tests/DependencyInjection/Fixtures/php/fragments_and_hinclude.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'fragments' => [ 'enabled' => true, 'hinclude_default_template' => 'global_hinclude_template', diff --git a/Tests/DependencyInjection/Fixtures/php/full.php b/Tests/DependencyInjection/Fixtures/php/full.php index 0a32ce8b3..21d36ecf6 100644 --- a/Tests/DependencyInjection/Fixtures/php/full.php +++ b/Tests/DependencyInjection/Fixtures/php/full.php @@ -58,7 +58,6 @@ 'enabled' => true, 'email_validation_mode' => 'html5', ], - 'annotations' => false, 'serializer' => [ 'enabled' => true, 'enable_attributes' => true, diff --git a/Tests/DependencyInjection/Fixtures/php/html_sanitizer.php b/Tests/DependencyInjection/Fixtures/php/html_sanitizer.php index 1b64cd1b3..fb0116303 100644 --- a/Tests/DependencyInjection/Fixtures/php/html_sanitizer.php +++ b/Tests/DependencyInjection/Fixtures/php/html_sanitizer.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'html_sanitizer' => [ 'sanitizers' => [ 'custom' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/html_sanitizer_default_allowed_link_and_media_hosts.php b/Tests/DependencyInjection/Fixtures/php/html_sanitizer_default_allowed_link_and_media_hosts.php index f7781cf28..0a78ded06 100644 --- a/Tests/DependencyInjection/Fixtures/php/html_sanitizer_default_allowed_link_and_media_hosts.php +++ b/Tests/DependencyInjection/Fixtures/php/html_sanitizer_default_allowed_link_and_media_hosts.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'html_sanitizer' => [ 'sanitizers' => [ 'custom_default' => null, diff --git a/Tests/DependencyInjection/Fixtures/php/html_sanitizer_default_config.php b/Tests/DependencyInjection/Fixtures/php/html_sanitizer_default_config.php index ddf327a8c..1c1142639 100644 --- a/Tests/DependencyInjection/Fixtures/php/html_sanitizer_default_config.php +++ b/Tests/DependencyInjection/Fixtures/php/html_sanitizer_default_config.php @@ -1,8 +1,4 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'html_sanitizer' => null]); diff --git a/Tests/DependencyInjection/Fixtures/php/http_client_default_options.php b/Tests/DependencyInjection/Fixtures/php/http_client_default_options.php index b050685f4..5f71a9284 100644 --- a/Tests/DependencyInjection/Fixtures/php/http_client_default_options.php +++ b/Tests/DependencyInjection/Fixtures/php/http_client_default_options.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'http_client' => [ 'max_host_connections' => 4, 'default_options' => null, diff --git a/Tests/DependencyInjection/Fixtures/php/http_client_full_default_options.php b/Tests/DependencyInjection/Fixtures/php/http_client_full_default_options.php index e25640b79..255552b07 100644 --- a/Tests/DependencyInjection/Fixtures/php/http_client_full_default_options.php +++ b/Tests/DependencyInjection/Fixtures/php/http_client_full_default_options.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'http_client' => [ 'default_options' => [ 'headers' => ['X-powered' => 'PHP'], diff --git a/Tests/DependencyInjection/Fixtures/php/http_client_mock_response_factory.php b/Tests/DependencyInjection/Fixtures/php/http_client_mock_response_factory.php index 326f0d25d..5b64c3ae0 100644 --- a/Tests/DependencyInjection/Fixtures/php/http_client_mock_response_factory.php +++ b/Tests/DependencyInjection/Fixtures/php/http_client_mock_response_factory.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'http_client' => [ 'default_options' => null, 'mock_response_factory' => 'my_response_factory', diff --git a/Tests/DependencyInjection/Fixtures/php/http_client_override_default_options.php b/Tests/DependencyInjection/Fixtures/php/http_client_override_default_options.php index f028efa21..9c5208199 100644 --- a/Tests/DependencyInjection/Fixtures/php/http_client_override_default_options.php +++ b/Tests/DependencyInjection/Fixtures/php/http_client_override_default_options.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'http_client' => [ 'max_host_connections' => 4, 'default_options' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/http_client_rate_limiter.php b/Tests/DependencyInjection/Fixtures/php/http_client_rate_limiter.php index c8256d913..55fe2f9fc 100644 --- a/Tests/DependencyInjection/Fixtures/php/http_client_rate_limiter.php +++ b/Tests/DependencyInjection/Fixtures/php/http_client_rate_limiter.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'rate_limiter' => [ 'foo_limiter' => [ 'lock_factory' => null, diff --git a/Tests/DependencyInjection/Fixtures/php/http_client_retry.php b/Tests/DependencyInjection/Fixtures/php/http_client_retry.php index 28205f8e4..f2ab01d1e 100644 --- a/Tests/DependencyInjection/Fixtures/php/http_client_retry.php +++ b/Tests/DependencyInjection/Fixtures/php/http_client_retry.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'http_client' => [ 'default_options' => [ 'retry_failed' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/http_client_scoped_without_query_option.php b/Tests/DependencyInjection/Fixtures/php/http_client_scoped_without_query_option.php index ccc75d99d..0d3dc8847 100644 --- a/Tests/DependencyInjection/Fixtures/php/http_client_scoped_without_query_option.php +++ b/Tests/DependencyInjection/Fixtures/php/http_client_scoped_without_query_option.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'http_client' => [ 'scoped_clients' => [ 'foo' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/http_client_xml_key.php b/Tests/DependencyInjection/Fixtures/php/http_client_xml_key.php index bb8a91dc1..64778c615 100644 --- a/Tests/DependencyInjection/Fixtures/php/http_client_xml_key.php +++ b/Tests/DependencyInjection/Fixtures/php/http_client_xml_key.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'http_client' => [ 'default_options' => [ 'resolve' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/json_streamer.php b/Tests/DependencyInjection/Fixtures/php/json_streamer.php index 844b72004..b6b7427dd 100644 --- a/Tests/DependencyInjection/Fixtures/php/json_streamer.php +++ b/Tests/DependencyInjection/Fixtures/php/json_streamer.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'type_info' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/lock.php b/Tests/DependencyInjection/Fixtures/php/lock.php index 116e074df..ddcb443b6 100644 --- a/Tests/DependencyInjection/Fixtures/php/lock.php +++ b/Tests/DependencyInjection/Fixtures/php/lock.php @@ -1,9 +1,5 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'lock' => null, ]); diff --git a/Tests/DependencyInjection/Fixtures/php/lock_named.php b/Tests/DependencyInjection/Fixtures/php/lock_named.php index c03a7fa71..37bc4401f 100644 --- a/Tests/DependencyInjection/Fixtures/php/lock_named.php +++ b/Tests/DependencyInjection/Fixtures/php/lock_named.php @@ -3,10 +3,6 @@ $container->setParameter('env(REDIS_DSN)', 'redis://paas.com'); $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'lock' => [ 'foo' => 'semaphore', 'bar' => 'flock', diff --git a/Tests/DependencyInjection/Fixtures/php/lock_service.php b/Tests/DependencyInjection/Fixtures/php/lock_service.php index 4bdbd29b8..83316c872 100644 --- a/Tests/DependencyInjection/Fixtures/php/lock_service.php +++ b/Tests/DependencyInjection/Fixtures/php/lock_service.php @@ -3,9 +3,5 @@ $container->register('my_service', \Redis::class); $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'lock' => 'my_service', ]); diff --git a/Tests/DependencyInjection/Fixtures/php/mailer.php b/Tests/DependencyInjection/Fixtures/php/mailer.php index bab6b4cc5..5e3093b33 100644 --- a/Tests/DependencyInjection/Fixtures/php/mailer.php +++ b/Tests/DependencyInjection/Fixtures/php/mailer.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'mailer' => [ 'dsn' => 'smtp://example.com', 'envelope' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/mailer_with_disabled_message_bus.php b/Tests/DependencyInjection/Fixtures/php/mailer_with_disabled_message_bus.php index 887a588b0..4f2471ed9 100644 --- a/Tests/DependencyInjection/Fixtures/php/mailer_with_disabled_message_bus.php +++ b/Tests/DependencyInjection/Fixtures/php/mailer_with_disabled_message_bus.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'mailer' => [ 'dsn' => 'smtp://example.com', 'message_bus' => false, diff --git a/Tests/DependencyInjection/Fixtures/php/mailer_with_dsn.php b/Tests/DependencyInjection/Fixtures/php/mailer_with_dsn.php index 3357bf354..e163dbfb1 100644 --- a/Tests/DependencyInjection/Fixtures/php/mailer_with_dsn.php +++ b/Tests/DependencyInjection/Fixtures/php/mailer_with_dsn.php @@ -4,10 +4,6 @@ return static function (ContainerConfigurator $container) { $container->extension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'mailer' => [ 'dsn' => 'smtp://example.com', 'envelope' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/mailer_with_specific_message_bus.php b/Tests/DependencyInjection/Fixtures/php/mailer_with_specific_message_bus.php index e07cc0c6c..32b936af9 100644 --- a/Tests/DependencyInjection/Fixtures/php/mailer_with_specific_message_bus.php +++ b/Tests/DependencyInjection/Fixtures/php/mailer_with_specific_message_bus.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'mailer' => [ 'dsn' => 'smtp://example.com', 'message_bus' => 'app.another_bus', diff --git a/Tests/DependencyInjection/Fixtures/php/mailer_with_transports.php b/Tests/DependencyInjection/Fixtures/php/mailer_with_transports.php index e51fd056b..f9c95bba6 100644 --- a/Tests/DependencyInjection/Fixtures/php/mailer_with_transports.php +++ b/Tests/DependencyInjection/Fixtures/php/mailer_with_transports.php @@ -4,10 +4,6 @@ return static function (ContainerConfigurator $container) { $container->extension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'mailer' => [ 'transports' => [ 'transport1' => 'smtp://example1.com', diff --git a/Tests/DependencyInjection/Fixtures/php/messenger.php b/Tests/DependencyInjection/Fixtures/php/messenger.php index bbdf50697..0400b6bc7 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger.php @@ -4,10 +4,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\FooMessage; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'scheduler' => true, 'messenger' => [ 'routing' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_bus_name_stamp.php b/Tests/DependencyInjection/Fixtures/php/messenger_bus_name_stamp.php index 452594d45..999998ba5 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_bus_name_stamp.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_bus_name_stamp.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'lock' => false, 'messenger' => [ 'default_bus' => 'messenger.bus.commands', diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_disabled.php b/Tests/DependencyInjection/Fixtures/php/messenger_disabled.php index 0ce448781..18edef40a 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_disabled.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_disabled.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => false, 'scheduler' => false, ]); diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_middleware_factory_erroneous_format.php b/Tests/DependencyInjection/Fixtures/php/messenger_middleware_factory_erroneous_format.php index 97676ae90..cb4ee5e51 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_middleware_factory_erroneous_format.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_middleware_factory_erroneous_format.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => [ 'buses' => [ 'command_bus' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_multiple_buses_with_deduplicate_middleware.php b/Tests/DependencyInjection/Fixtures/php/messenger_multiple_buses_with_deduplicate_middleware.php index f9b3767c0..91aa6a662 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_multiple_buses_with_deduplicate_middleware.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_multiple_buses_with_deduplicate_middleware.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'lock' => null, 'messenger' => [ 'default_bus' => 'messenger.bus.commands', diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_multiple_buses_without_deduplicate_middleware.php b/Tests/DependencyInjection/Fixtures/php/messenger_multiple_buses_without_deduplicate_middleware.php index fd4a00834..1beb1e593 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_multiple_buses_without_deduplicate_middleware.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_multiple_buses_without_deduplicate_middleware.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'lock' => false, 'messenger' => [ 'default_bus' => 'messenger.bus.commands', diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_multiple_failure_transports.php b/Tests/DependencyInjection/Fixtures/php/messenger_multiple_failure_transports.php index 1fa698076..691510c3a 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_multiple_failure_transports.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_multiple_failure_transports.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => [ 'transports' => [ 'transport_1' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_multiple_failure_transports_global.php b/Tests/DependencyInjection/Fixtures/php/messenger_multiple_failure_transports_global.php index 763db88a8..c4fcb93d2 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_multiple_failure_transports_global.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_multiple_failure_transports_global.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => [ 'failure_transport' => 'failure_transport_global', 'transports' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_routing.php b/Tests/DependencyInjection/Fixtures/php/messenger_routing.php index 8c0b90eda..c21281ffa 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_routing.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_routing.php @@ -4,10 +4,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\SecondMessage; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'serializer' => true, 'messenger' => [ 'serializer' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_routing_invalid_transport.php b/Tests/DependencyInjection/Fixtures/php/messenger_routing_invalid_transport.php index c61a673ca..e18c055f3 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_routing_invalid_transport.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_routing_invalid_transport.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummyMessage; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'serializer' => true, 'messenger' => [ 'serializer' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_routing_invalid_wildcard.php b/Tests/DependencyInjection/Fixtures/php/messenger_routing_invalid_wildcard.php index 476734936..8d85a10e2 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_routing_invalid_wildcard.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_routing_invalid_wildcard.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'serializer' => true, 'messenger' => [ 'serializer' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_routing_single.php b/Tests/DependencyInjection/Fixtures/php/messenger_routing_single.php index d2d84cf65..b3490d41a 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_routing_single.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_routing_single.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummyMessage; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => [ 'routing' => [ DummyMessage::class => ['amqp'], diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_transport.php b/Tests/DependencyInjection/Fixtures/php/messenger_transport.php index 900909696..7baab29dc 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_transport.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_transport.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'serializer' => true, 'messenger' => [ 'serializer' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/messenger_transports.php b/Tests/DependencyInjection/Fixtures/php/messenger_transports.php index a010da534..a1175a695 100644 --- a/Tests/DependencyInjection/Fixtures/php/messenger_transports.php +++ b/Tests/DependencyInjection/Fixtures/php/messenger_transports.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'serializer' => true, 'messenger' => [ 'failure_transport' => 'failed', diff --git a/Tests/DependencyInjection/Fixtures/php/notifier.php b/Tests/DependencyInjection/Fixtures/php/notifier.php index 058ec7175..f740f9f57 100644 --- a/Tests/DependencyInjection/Fixtures/php/notifier.php +++ b/Tests/DependencyInjection/Fixtures/php/notifier.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/notifier_with_disabled_message_bus.php b/Tests/DependencyInjection/Fixtures/php/notifier_with_disabled_message_bus.php index 8c6b2f002..38684b03e 100644 --- a/Tests/DependencyInjection/Fixtures/php/notifier_with_disabled_message_bus.php +++ b/Tests/DependencyInjection/Fixtures/php/notifier_with_disabled_message_bus.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/notifier_with_specific_message_bus.php b/Tests/DependencyInjection/Fixtures/php/notifier_with_specific_message_bus.php index 4c38323bd..830bfa401 100644 --- a/Tests/DependencyInjection/Fixtures/php/notifier_with_specific_message_bus.php +++ b/Tests/DependencyInjection/Fixtures/php/notifier_with_specific_message_bus.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'messenger' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/notifier_without_mailer.php b/Tests/DependencyInjection/Fixtures/php/notifier_without_mailer.php index 107803ef9..0c6fc010d 100644 --- a/Tests/DependencyInjection/Fixtures/php/notifier_without_mailer.php +++ b/Tests/DependencyInjection/Fixtures/php/notifier_without_mailer.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'mailer' => [ 'enabled' => false, ], diff --git a/Tests/DependencyInjection/Fixtures/php/notifier_without_messenger.php b/Tests/DependencyInjection/Fixtures/php/notifier_without_messenger.php index 0c43db7cd..6bafa7faf 100644 --- a/Tests/DependencyInjection/Fixtures/php/notifier_without_messenger.php +++ b/Tests/DependencyInjection/Fixtures/php/notifier_without_messenger.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'mailer' => [ 'dsn' => 'smtp://example.com', ], diff --git a/Tests/DependencyInjection/Fixtures/php/notifier_without_transports.php b/Tests/DependencyInjection/Fixtures/php/notifier_without_transports.php index 6392f0b33..fd5aef252 100644 --- a/Tests/DependencyInjection/Fixtures/php/notifier_without_transports.php +++ b/Tests/DependencyInjection/Fixtures/php/notifier_without_transports.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'notifier' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/php_errors_disabled.php b/Tests/DependencyInjection/Fixtures/php/php_errors_disabled.php index 0d12f010e..cff0582bf 100644 --- a/Tests/DependencyInjection/Fixtures/php/php_errors_disabled.php +++ b/Tests/DependencyInjection/Fixtures/php/php_errors_disabled.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'php_errors' => [ 'log' => false, 'throw' => false, diff --git a/Tests/DependencyInjection/Fixtures/php/php_errors_enabled.php b/Tests/DependencyInjection/Fixtures/php/php_errors_enabled.php index 0e41dd952..3cb095316 100644 --- a/Tests/DependencyInjection/Fixtures/php/php_errors_enabled.php +++ b/Tests/DependencyInjection/Fixtures/php/php_errors_enabled.php @@ -1,12 +1,7 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'php_errors' => [ - 'log' => true, 'throw' => true, ], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/php_errors_log_level.php b/Tests/DependencyInjection/Fixtures/php/php_errors_log_level.php index 142ed1d46..87fdd64d0 100644 --- a/Tests/DependencyInjection/Fixtures/php/php_errors_log_level.php +++ b/Tests/DependencyInjection/Fixtures/php/php_errors_log_level.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'php_errors' => [ 'log' => 8, ], diff --git a/Tests/DependencyInjection/Fixtures/php/php_errors_log_levels.php b/Tests/DependencyInjection/Fixtures/php/php_errors_log_levels.php index 5673c6430..620a5871e 100644 --- a/Tests/DependencyInjection/Fixtures/php/php_errors_log_levels.php +++ b/Tests/DependencyInjection/Fixtures/php/php_errors_log_levels.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'php_errors' => [ 'log' => [ \E_NOTICE => \Psr\Log\LogLevel::ERROR, diff --git a/Tests/DependencyInjection/Fixtures/php/profiler.php b/Tests/DependencyInjection/Fixtures/php/profiler.php index 99e2a52cf..56cc6a172 100644 --- a/Tests/DependencyInjection/Fixtures/php/profiler.php +++ b/Tests/DependencyInjection/Fixtures/php/profiler.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'profiler' => [ 'enabled' => true, 'collect_serializer_data' => true, diff --git a/Tests/DependencyInjection/Fixtures/php/property_accessor.php b/Tests/DependencyInjection/Fixtures/php/property_accessor.php index 05a051318..dc6954fe8 100644 --- a/Tests/DependencyInjection/Fixtures/php/property_accessor.php +++ b/Tests/DependencyInjection/Fixtures/php/property_accessor.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'property_access' => [ 'magic_call' => true, 'magic_get' => true, diff --git a/Tests/DependencyInjection/Fixtures/php/property_info.php b/Tests/DependencyInjection/Fixtures/php/property_info.php index b234c4527..bff8d4115 100644 --- a/Tests/DependencyInjection/Fixtures/php/property_info.php +++ b/Tests/DependencyInjection/Fixtures/php/property_info.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'property_info' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/property_info_without_constructor_extractor.php b/Tests/DependencyInjection/Fixtures/php/property_info_without_constructor_extractor.php index e2437e2c2..f13f02b7c 100644 --- a/Tests/DependencyInjection/Fixtures/php/property_info_without_constructor_extractor.php +++ b/Tests/DependencyInjection/Fixtures/php/property_info_without_constructor_extractor.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'property_info' => [ 'enabled' => true, 'with_constructor_extractor' => false, diff --git a/Tests/DependencyInjection/Fixtures/php/request.php b/Tests/DependencyInjection/Fixtures/php/request.php index 38667cbf0..d69d7512a 100644 --- a/Tests/DependencyInjection/Fixtures/php/request.php +++ b/Tests/DependencyInjection/Fixtures/php/request.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'request' => [ 'formats' => [], ], diff --git a/Tests/DependencyInjection/Fixtures/php/semaphore.php b/Tests/DependencyInjection/Fixtures/php/semaphore.php index c2a1e3b6e..06168f1ea 100644 --- a/Tests/DependencyInjection/Fixtures/php/semaphore.php +++ b/Tests/DependencyInjection/Fixtures/php/semaphore.php @@ -1,9 +1,5 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'semaphore' => 'redis://localhost', ]); diff --git a/Tests/DependencyInjection/Fixtures/php/semaphore_named.php b/Tests/DependencyInjection/Fixtures/php/semaphore_named.php index c42b55983..17439aadb 100644 --- a/Tests/DependencyInjection/Fixtures/php/semaphore_named.php +++ b/Tests/DependencyInjection/Fixtures/php/semaphore_named.php @@ -3,10 +3,6 @@ $container->setParameter('env(REDIS_DSN)', 'redis://paas.com'); $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'semaphore' => [ 'foo' => 'redis://paas.com', 'qux' => '%env(REDIS_DSN)%', diff --git a/Tests/DependencyInjection/Fixtures/php/semaphore_service.php b/Tests/DependencyInjection/Fixtures/php/semaphore_service.php index 279f1c158..7edea19d1 100644 --- a/Tests/DependencyInjection/Fixtures/php/semaphore_service.php +++ b/Tests/DependencyInjection/Fixtures/php/semaphore_service.php @@ -3,9 +3,5 @@ $container->register('my_service', \Redis::class); $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'semaphore' => 'my_service', ]); diff --git a/Tests/DependencyInjection/Fixtures/php/serializer_disabled.php b/Tests/DependencyInjection/Fixtures/php/serializer_disabled.php index 130fc4ad7..937a07c22 100644 --- a/Tests/DependencyInjection/Fixtures/php/serializer_disabled.php +++ b/Tests/DependencyInjection/Fixtures/php/serializer_disabled.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'serializer' => [ 'enabled' => false, ], diff --git a/Tests/DependencyInjection/Fixtures/php/serializer_enabled.php b/Tests/DependencyInjection/Fixtures/php/serializer_enabled.php index 01fb36f3d..de3381c21 100644 --- a/Tests/DependencyInjection/Fixtures/php/serializer_enabled.php +++ b/Tests/DependencyInjection/Fixtures/php/serializer_enabled.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'serializer' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/serializer_mapping.php b/Tests/DependencyInjection/Fixtures/php/serializer_mapping.php index 1e3d1ab2b..bde5f420a 100644 --- a/Tests/DependencyInjection/Fixtures/php/serializer_mapping.php +++ b/Tests/DependencyInjection/Fixtures/php/serializer_mapping.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'annotations' => false, 'serializer' => [ 'enable_attributes' => true, 'mapping' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/serializer_mapping_without_annotations.php b/Tests/DependencyInjection/Fixtures/php/serializer_mapping_without_attributes.php similarity index 79% rename from Tests/DependencyInjection/Fixtures/php/serializer_mapping_without_annotations.php rename to Tests/DependencyInjection/Fixtures/php/serializer_mapping_without_attributes.php index 3e203028c..40b7a67f1 100644 --- a/Tests/DependencyInjection/Fixtures/php/serializer_mapping_without_annotations.php +++ b/Tests/DependencyInjection/Fixtures/php/serializer_mapping_without_attributes.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'serializer' => [ 'enable_attributes' => false, 'mapping' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/serializer_without_translator.php b/Tests/DependencyInjection/Fixtures/php/serializer_without_translator.php index acf013080..d9b650c30 100644 --- a/Tests/DependencyInjection/Fixtures/php/serializer_without_translator.php +++ b/Tests/DependencyInjection/Fixtures/php/serializer_without_translator.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'serializer' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/session.php b/Tests/DependencyInjection/Fixtures/php/session.php index f3c27f550..7fdc352a1 100644 --- a/Tests/DependencyInjection/Fixtures/php/session.php +++ b/Tests/DependencyInjection/Fixtures/php/session.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'session' => [ 'storage_factory_id' => 'session.storage.factory.native', 'handler_id' => null, diff --git a/Tests/DependencyInjection/Fixtures/php/session_cookie_secure_auto.php b/Tests/DependencyInjection/Fixtures/php/session_cookie_secure_auto.php index 066807995..7bf017e52 100644 --- a/Tests/DependencyInjection/Fixtures/php/session_cookie_secure_auto.php +++ b/Tests/DependencyInjection/Fixtures/php/session_cookie_secure_auto.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'session' => [ 'storage_factory_id' => 'session.storage.factory.native', 'handler_id' => null, diff --git a/Tests/DependencyInjection/Fixtures/php/ssi_disabled.php b/Tests/DependencyInjection/Fixtures/php/ssi_disabled.php index c7e06cf45..32e1bf0c5 100644 --- a/Tests/DependencyInjection/Fixtures/php/ssi_disabled.php +++ b/Tests/DependencyInjection/Fixtures/php/ssi_disabled.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'ssi' => [ 'enabled' => false, ], diff --git a/Tests/DependencyInjection/Fixtures/php/translator_cache_dir_disabled.php b/Tests/DependencyInjection/Fixtures/php/translator_cache_dir_disabled.php index 8d708c2bf..6f2568ffd 100644 --- a/Tests/DependencyInjection/Fixtures/php/translator_cache_dir_disabled.php +++ b/Tests/DependencyInjection/Fixtures/php/translator_cache_dir_disabled.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'translator' => [ 'cache_dir' => null, ], diff --git a/Tests/DependencyInjection/Fixtures/php/translator_fallbacks.php b/Tests/DependencyInjection/Fixtures/php/translator_fallbacks.php index b2c0cc544..592a61de6 100644 --- a/Tests/DependencyInjection/Fixtures/php/translator_fallbacks.php +++ b/Tests/DependencyInjection/Fixtures/php/translator_fallbacks.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'translator' => [ 'fallbacks' => ['en', 'fr'], ], diff --git a/Tests/DependencyInjection/Fixtures/php/translator_globals.php b/Tests/DependencyInjection/Fixtures/php/translator_globals.php index 8ee438ff9..4d59f45a6 100644 --- a/Tests/DependencyInjection/Fixtures/php/translator_globals.php +++ b/Tests/DependencyInjection/Fixtures/php/translator_globals.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'translator' => [ 'globals' => [ '%%app_name%%' => 'My application', diff --git a/Tests/DependencyInjection/Fixtures/php/translator_without_globals.php b/Tests/DependencyInjection/Fixtures/php/translator_without_globals.php index fcc65c968..15485c982 100644 --- a/Tests/DependencyInjection/Fixtures/php/translator_without_globals.php +++ b/Tests/DependencyInjection/Fixtures/php/translator_without_globals.php @@ -1,9 +1,5 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'translator' => ['globals' => []], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/type_info.php b/Tests/DependencyInjection/Fixtures/php/type_info.php index 0e7dcbae0..9b9210088 100644 --- a/Tests/DependencyInjection/Fixtures/php/type_info.php +++ b/Tests/DependencyInjection/Fixtures/php/type_info.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'type_info' => [ 'enabled' => true, ], diff --git a/Tests/DependencyInjection/Fixtures/php/validation_attributes.php b/Tests/DependencyInjection/Fixtures/php/validation_attributes.php index 3e6ae7547..b33113cb8 100644 --- a/Tests/DependencyInjection/Fixtures/php/validation_attributes.php +++ b/Tests/DependencyInjection/Fixtures/php/validation_attributes.php @@ -1,15 +1,10 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'secret' => 's3cr3t', 'validation' => [ 'enabled' => true, 'enable_attributes' => true, - 'email_validation_mode' => 'html5', ], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/validation_auto_mapping.php b/Tests/DependencyInjection/Fixtures/php/validation_auto_mapping.php index ae5bea2ea..e15762d6d 100644 --- a/Tests/DependencyInjection/Fixtures/php/validation_auto_mapping.php +++ b/Tests/DependencyInjection/Fixtures/php/validation_auto_mapping.php @@ -1,13 +1,8 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'property_info' => ['enabled' => true], 'validation' => [ - 'email_validation_mode' => 'html5', 'auto_mapping' => [ 'App\\' => ['foo', 'bar'], 'Symfony\\' => ['a', 'b'], diff --git a/Tests/DependencyInjection/Fixtures/php/validation_email_validation_mode.php b/Tests/DependencyInjection/Fixtures/php/validation_email_validation_mode.php index 36a3f6738..ab95f0add 100644 --- a/Tests/DependencyInjection/Fixtures/php/validation_email_validation_mode.php +++ b/Tests/DependencyInjection/Fixtures/php/validation_email_validation_mode.php @@ -1,11 +1,7 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'validation' => [ - 'email_validation_mode' => 'html5', + 'email_validation_mode' => 'html5-allow-no-tld', ], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/validation_mapping.php b/Tests/DependencyInjection/Fixtures/php/validation_mapping.php index e76dbf820..f8b19e348 100644 --- a/Tests/DependencyInjection/Fixtures/php/validation_mapping.php +++ b/Tests/DependencyInjection/Fixtures/php/validation_mapping.php @@ -1,12 +1,7 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'validation' => [ - 'email_validation_mode' => 'html5', 'mapping' => [ 'paths' => [ '%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/files', diff --git a/Tests/DependencyInjection/Fixtures/php/validation_multiple_static_methods.php b/Tests/DependencyInjection/Fixtures/php/validation_multiple_static_methods.php index 7527c0ce3..ad2bd817a 100644 --- a/Tests/DependencyInjection/Fixtures/php/validation_multiple_static_methods.php +++ b/Tests/DependencyInjection/Fixtures/php/validation_multiple_static_methods.php @@ -1,14 +1,9 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'secret' => 's3cr3t', 'validation' => [ 'enabled' => true, - 'email_validation_mode' => 'html5', 'static_method' => ['loadFoo', 'loadBar'], ], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/validation_no_static_method.php b/Tests/DependencyInjection/Fixtures/php/validation_no_static_method.php index 375b42d6a..a9d98e17c 100644 --- a/Tests/DependencyInjection/Fixtures/php/validation_no_static_method.php +++ b/Tests/DependencyInjection/Fixtures/php/validation_no_static_method.php @@ -1,14 +1,9 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'secret' => 's3cr3t', 'validation' => [ 'enabled' => true, - 'email_validation_mode' => 'html5', 'static_method' => false, ], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/validation_translation_domain.php b/Tests/DependencyInjection/Fixtures/php/validation_translation_domain.php index 434ebf3c6..42ea07130 100644 --- a/Tests/DependencyInjection/Fixtures/php/validation_translation_domain.php +++ b/Tests/DependencyInjection/Fixtures/php/validation_translation_domain.php @@ -1,12 +1,7 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'validation' => [ - 'email_validation_mode' => 'html5', 'translation_domain' => 'messages', ], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/web_link.php b/Tests/DependencyInjection/Fixtures/php/web_link.php index 8952afab2..44d52e402 100644 --- a/Tests/DependencyInjection/Fixtures/php/web_link.php +++ b/Tests/DependencyInjection/Fixtures/php/web_link.php @@ -1,9 +1,5 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'web_link' => ['enabled' => true], ]); diff --git a/Tests/DependencyInjection/Fixtures/php/webhook.php b/Tests/DependencyInjection/Fixtures/php/webhook.php index d529a8fee..18686b3f6 100644 --- a/Tests/DependencyInjection/Fixtures/php/webhook.php +++ b/Tests/DependencyInjection/Fixtures/php/webhook.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'webhook' => ['enabled' => true], 'http_client' => ['enabled' => true], 'serializer' => ['enabled' => true], diff --git a/Tests/DependencyInjection/Fixtures/php/webhook_without_serializer.php b/Tests/DependencyInjection/Fixtures/php/webhook_without_serializer.php index 64a8f9fa9..318c4ff09 100644 --- a/Tests/DependencyInjection/Fixtures/php/webhook_without_serializer.php +++ b/Tests/DependencyInjection/Fixtures/php/webhook_without_serializer.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'webhook' => ['enabled' => true], 'http_client' => ['enabled' => true], 'serializer' => ['enabled' => false], diff --git a/Tests/DependencyInjection/Fixtures/php/workflow_not_valid.php b/Tests/DependencyInjection/Fixtures/php/workflow_not_valid.php index 13f28571c..cfad547bd 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflow_not_valid.php +++ b/Tests/DependencyInjection/Fixtures/php/workflow_not_valid.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'my_workflow' => [ 'type' => 'state_machine', diff --git a/Tests/DependencyInjection/Fixtures/php/workflow_with_guard_expression.php b/Tests/DependencyInjection/Fixtures/php/workflow_with_guard_expression.php index a6679e082..1b4dbfefd 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflow_with_guard_expression.php +++ b/Tests/DependencyInjection/Fixtures/php/workflow_with_guard_expression.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'article' => [ 'type' => 'workflow', diff --git a/Tests/DependencyInjection/Fixtures/php/workflow_with_multiple_transitions_with_same_name.php b/Tests/DependencyInjection/Fixtures/php/workflow_with_multiple_transitions_with_same_name.php index f4956eccb..aef7f5095 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflow_with_multiple_transitions_with_same_name.php +++ b/Tests/DependencyInjection/Fixtures/php/workflow_with_multiple_transitions_with_same_name.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'article' => [ 'type' => 'workflow', diff --git a/Tests/DependencyInjection/Fixtures/php/workflow_with_no_events_to_dispatch.php b/Tests/DependencyInjection/Fixtures/php/workflow_with_no_events_to_dispatch.php index 623e59425..287095895 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflow_with_no_events_to_dispatch.php +++ b/Tests/DependencyInjection/Fixtures/php/workflow_with_no_events_to_dispatch.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'my_workflow' => [ 'type' => 'state_machine', diff --git a/Tests/DependencyInjection/Fixtures/php/workflow_with_specified_events_to_dispatch.php b/Tests/DependencyInjection/Fixtures/php/workflow_with_specified_events_to_dispatch.php index 70add8e74..9d825c9a6 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflow_with_specified_events_to_dispatch.php +++ b/Tests/DependencyInjection/Fixtures/php/workflow_with_specified_events_to_dispatch.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'my_workflow' => [ 'type' => 'state_machine', diff --git a/Tests/DependencyInjection/Fixtures/php/workflow_with_support_and_support_strategy.php b/Tests/DependencyInjection/Fixtures/php/workflow_with_support_and_support_strategy.php index ac66a8789..c2acce156 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflow_with_support_and_support_strategy.php +++ b/Tests/DependencyInjection/Fixtures/php/workflow_with_support_and_support_strategy.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'my_workflow' => [ 'type' => 'workflow', diff --git a/Tests/DependencyInjection/Fixtures/php/workflow_without_support_and_support_strategy.php b/Tests/DependencyInjection/Fixtures/php/workflow_without_support_and_support_strategy.php index 434e75141..5eef5cc4d 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflow_without_support_and_support_strategy.php +++ b/Tests/DependencyInjection/Fixtures/php/workflow_without_support_and_support_strategy.php @@ -1,10 +1,6 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'my_workflow' => [ 'type' => 'workflow', diff --git a/Tests/DependencyInjection/Fixtures/php/workflows.php b/Tests/DependencyInjection/Fixtures/php/workflows.php index 2c29b8489..b0a6acb59 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflows.php +++ b/Tests/DependencyInjection/Fixtures/php/workflows.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'article' => [ 'type' => 'workflow', diff --git a/Tests/DependencyInjection/Fixtures/php/workflows_enabled.php b/Tests/DependencyInjection/Fixtures/php/workflows_enabled.php index 94b0fe1c0..eb1773194 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflows_enabled.php +++ b/Tests/DependencyInjection/Fixtures/php/workflows_enabled.php @@ -1,9 +1,5 @@ loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => null, ]); diff --git a/Tests/DependencyInjection/Fixtures/php/workflows_explicitly_enabled.php b/Tests/DependencyInjection/Fixtures/php/workflows_explicitly_enabled.php index 85f1df2da..53ce0ec07 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflows_explicitly_enabled.php +++ b/Tests/DependencyInjection/Fixtures/php/workflows_explicitly_enabled.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'enabled' => true, 'foo' => [ diff --git a/Tests/DependencyInjection/Fixtures/php/workflows_explicitly_enabled_named_workflows.php b/Tests/DependencyInjection/Fixtures/php/workflows_explicitly_enabled_named_workflows.php index 6c2db5961..b954889b6 100644 --- a/Tests/DependencyInjection/Fixtures/php/workflows_explicitly_enabled_named_workflows.php +++ b/Tests/DependencyInjection/Fixtures/php/workflows_explicitly_enabled_named_workflows.php @@ -3,10 +3,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase; $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'enabled' => true, 'workflows' => [ diff --git a/Tests/DependencyInjection/Fixtures/xml/asset_mapper.xml b/Tests/DependencyInjection/Fixtures/xml/asset_mapper.xml index 8007170ce..e9887ffa0 100644 --- a/Tests/DependencyInjection/Fixtures/xml/asset_mapper.xml +++ b/Tests/DependencyInjection/Fixtures/xml/asset_mapper.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + - - + - diff --git a/Tests/DependencyInjection/Fixtures/xml/assets.xml b/Tests/DependencyInjection/Fixtures/xml/assets.xml index a5fa23955..dadee4529 100644 --- a/Tests/DependencyInjection/Fixtures/xml/assets.xml +++ b/Tests/DependencyInjection/Fixtures/xml/assets.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + http://cdn.example.com diff --git a/Tests/DependencyInjection/Fixtures/xml/assets_disabled.xml b/Tests/DependencyInjection/Fixtures/xml/assets_disabled.xml index abe10c7b3..3c1303144 100644 --- a/Tests/DependencyInjection/Fixtures/xml/assets_disabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/assets_disabled.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/assets_version_strategy_as_service.xml b/Tests/DependencyInjection/Fixtures/xml/assets_version_strategy_as_service.xml index 605286b00..7bc70332b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/assets_version_strategy_as_service.xml +++ b/Tests/DependencyInjection/Fixtures/xml/assets_version_strategy_as_service.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + http://cdn.example.com diff --git a/Tests/DependencyInjection/Fixtures/xml/cache.xml b/Tests/DependencyInjection/Fixtures/xml/cache.xml index b4625a26d..7c75178c8 100644 --- a/Tests/DependencyInjection/Fixtures/xml/cache.xml +++ b/Tests/DependencyInjection/Fixtures/xml/cache.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware.xml b/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware.xml index b63171c60..2929e87e2 100644 --- a/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware.xml +++ b/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + cache.adapter.redis_tag_aware diff --git a/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml b/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml index 7c3dbdf5c..65c06a1da 100644 --- a/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml +++ b/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + cache.redis_tag_aware.foo diff --git a/Tests/DependencyInjection/Fixtures/xml/csrf.xml b/Tests/DependencyInjection/Fixtures/xml/csrf.xml index ef018e00b..6e8a569ea 100644 --- a/Tests/DependencyInjection/Fixtures/xml/csrf.xml +++ b/Tests/DependencyInjection/Fixtures/xml/csrf.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/csrf_disabled.xml b/Tests/DependencyInjection/Fixtures/xml/csrf_disabled.xml index 0c50759e8..63a26d384 100644 --- a/Tests/DependencyInjection/Fixtures/xml/csrf_disabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/csrf_disabled.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml b/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml index 0b7a28793..a9e168638 100644 --- a/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml +++ b/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/default_config.xml b/Tests/DependencyInjection/Fixtures/xml/default_config.xml index 21fddeec9..560046e70 100644 --- a/Tests/DependencyInjection/Fixtures/xml/default_config.xml +++ b/Tests/DependencyInjection/Fixtures/xml/default_config.xml @@ -5,8 +5,6 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/esi_and_ssi_without_fragments.xml b/Tests/DependencyInjection/Fixtures/xml/esi_and_ssi_without_fragments.xml index 94c6ee410..5fe9be69b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/esi_and_ssi_without_fragments.xml +++ b/Tests/DependencyInjection/Fixtures/xml/esi_and_ssi_without_fragments.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/esi_disabled.xml b/Tests/DependencyInjection/Fixtures/xml/esi_disabled.xml index 35ad69453..d4a46b62f 100644 --- a/Tests/DependencyInjection/Fixtures/xml/esi_disabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/esi_disabled.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/exceptions.xml b/Tests/DependencyInjection/Fixtures/xml/exceptions.xml index 277febba4..eca150a8f 100644 --- a/Tests/DependencyInjection/Fixtures/xml/exceptions.xml +++ b/Tests/DependencyInjection/Fixtures/xml/exceptions.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/form_csrf_field_attr.xml b/Tests/DependencyInjection/Fixtures/xml/form_csrf_field_attr.xml index 1889703be..777956790 100644 --- a/Tests/DependencyInjection/Fixtures/xml/form_csrf_field_attr.xml +++ b/Tests/DependencyInjection/Fixtures/xml/form_csrf_field_attr.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/form_default_csrf.xml b/Tests/DependencyInjection/Fixtures/xml/form_default_csrf.xml index cdbecc9b9..45b2135bf 100644 --- a/Tests/DependencyInjection/Fixtures/xml/form_default_csrf.xml +++ b/Tests/DependencyInjection/Fixtures/xml/form_default_csrf.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml b/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml index de1418108..13720755c 100644 --- a/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml +++ b/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/fragments_and_hinclude.xml b/Tests/DependencyInjection/Fixtures/xml/fragments_and_hinclude.xml index ecf8ab2fa..fb007313b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/fragments_and_hinclude.xml +++ b/Tests/DependencyInjection/Fixtures/xml/fragments_and_hinclude.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/full.xml b/Tests/DependencyInjection/Fixtures/xml/full.xml index 851a6c24b..9716b075e 100644 --- a/Tests/DependencyInjection/Fixtures/xml/full.xml +++ b/Tests/DependencyInjection/Fixtures/xml/full.xml @@ -32,7 +32,6 @@ %kernel.project_dir%/Fixtures/translations - diff --git a/Tests/DependencyInjection/Fixtures/xml/html_sanitizer.xml b/Tests/DependencyInjection/Fixtures/xml/html_sanitizer.xml index 7cb6758d9..dad449f72 100644 --- a/Tests/DependencyInjection/Fixtures/xml/html_sanitizer.xml +++ b/Tests/DependencyInjection/Fixtures/xml/html_sanitizer.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/html_sanitizer_default_config.xml b/Tests/DependencyInjection/Fixtures/xml/html_sanitizer_default_config.xml index 709692f99..14ce555bb 100644 --- a/Tests/DependencyInjection/Fixtures/xml/html_sanitizer_default_config.xml +++ b/Tests/DependencyInjection/Fixtures/xml/html_sanitizer_default_config.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/http_client_default_options.xml b/Tests/DependencyInjection/Fixtures/xml/http_client_default_options.xml index ddea12b15..c00eb3144 100644 --- a/Tests/DependencyInjection/Fixtures/xml/http_client_default_options.xml +++ b/Tests/DependencyInjection/Fixtures/xml/http_client_default_options.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + - - - + - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/http_client_override_default_options.xml b/Tests/DependencyInjection/Fixtures/xml/http_client_override_default_options.xml index 9a31ceb1f..ba92d51a3 100644 --- a/Tests/DependencyInjection/Fixtures/xml/http_client_override_default_options.xml +++ b/Tests/DependencyInjection/Fixtures/xml/http_client_override_default_options.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + bar diff --git a/Tests/DependencyInjection/Fixtures/xml/http_client_rate_limiter.xml b/Tests/DependencyInjection/Fixtures/xml/http_client_rate_limiter.xml index 8c9dbcdad..58437cf47 100644 --- a/Tests/DependencyInjection/Fixtures/xml/http_client_rate_limiter.xml +++ b/Tests/DependencyInjection/Fixtures/xml/http_client_rate_limiter.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/http_client_retry.xml b/Tests/DependencyInjection/Fixtures/xml/http_client_retry.xml index 296d1b29c..eb7798914 100644 --- a/Tests/DependencyInjection/Fixtures/xml/http_client_retry.xml +++ b/Tests/DependencyInjection/Fixtures/xml/http_client_retry.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + - - - + - - - + 127.0.0.1 diff --git a/Tests/DependencyInjection/Fixtures/xml/json_streamer.xml b/Tests/DependencyInjection/Fixtures/xml/json_streamer.xml index 5c79cb840..7da62288f 100644 --- a/Tests/DependencyInjection/Fixtures/xml/json_streamer.xml +++ b/Tests/DependencyInjection/Fixtures/xml/json_streamer.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/lock.xml b/Tests/DependencyInjection/Fixtures/xml/lock.xml index 2796cb3f9..2b4bb4bd8 100644 --- a/Tests/DependencyInjection/Fixtures/xml/lock.xml +++ b/Tests/DependencyInjection/Fixtures/xml/lock.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/lock_named.xml b/Tests/DependencyInjection/Fixtures/xml/lock_named.xml index b8d4b4a3f..ca9dccab6 100644 --- a/Tests/DependencyInjection/Fixtures/xml/lock_named.xml +++ b/Tests/DependencyInjection/Fixtures/xml/lock_named.xml @@ -9,9 +9,7 @@ redis://paas.com - - - + semaphore flock diff --git a/Tests/DependencyInjection/Fixtures/xml/lock_service.xml b/Tests/DependencyInjection/Fixtures/xml/lock_service.xml index a175526a9..4a335bf39 100644 --- a/Tests/DependencyInjection/Fixtures/xml/lock_service.xml +++ b/Tests/DependencyInjection/Fixtures/xml/lock_service.xml @@ -9,9 +9,7 @@ - - - + my_service diff --git a/Tests/DependencyInjection/Fixtures/xml/mailer_with_disabled_message_bus.xml b/Tests/DependencyInjection/Fixtures/xml/mailer_with_disabled_message_bus.xml index 5cc9697d5..e6d3a47e3 100644 --- a/Tests/DependencyInjection/Fixtures/xml/mailer_with_disabled_message_bus.xml +++ b/Tests/DependencyInjection/Fixtures/xml/mailer_with_disabled_message_bus.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/mailer_with_dsn.xml b/Tests/DependencyInjection/Fixtures/xml/mailer_with_dsn.xml index d48b7423a..e3ec1bae3 100644 --- a/Tests/DependencyInjection/Fixtures/xml/mailer_with_dsn.xml +++ b/Tests/DependencyInjection/Fixtures/xml/mailer_with_dsn.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + sender@example.org diff --git a/Tests/DependencyInjection/Fixtures/xml/mailer_with_specific_message_bus.xml b/Tests/DependencyInjection/Fixtures/xml/mailer_with_specific_message_bus.xml index fd5d1a93b..116ba032a 100644 --- a/Tests/DependencyInjection/Fixtures/xml/mailer_with_specific_message_bus.xml +++ b/Tests/DependencyInjection/Fixtures/xml/mailer_with_specific_message_bus.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/mailer_with_transports.xml b/Tests/DependencyInjection/Fixtures/xml/mailer_with_transports.xml index 9bfd18d91..6be88fcae 100644 --- a/Tests/DependencyInjection/Fixtures/xml/mailer_with_transports.xml +++ b/Tests/DependencyInjection/Fixtures/xml/mailer_with_transports.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + smtp://example1.com smtp://example2.com diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger.xml b/Tests/DependencyInjection/Fixtures/xml/messenger.xml index a600a6e38..6b72e9a75 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_bus_name_stamp.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_bus_name_stamp.xml index 5e0b17851..361282635 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_bus_name_stamp.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_bus_name_stamp.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_disabled.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_disabled.xml index 7284b0455..83561dacf 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_disabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_disabled.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_buses_with_deduplicate_middleware.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_buses_with_deduplicate_middleware.xml index 67decad20..c5a2fb3b3 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_buses_with_deduplicate_middleware.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_buses_with_deduplicate_middleware.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_buses_without_deduplicate_middleware.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_buses_without_deduplicate_middleware.xml index 3f0d96249..06b27cd85 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_buses_without_deduplicate_middleware.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_buses_without_deduplicate_middleware.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_failure_transports.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_failure_transports.xml index 7ddc598c1..b8e9f1975 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_failure_transports.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_failure_transports.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_failure_transports_global.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_failure_transports_global.xml index ee9e6e0db..c6e5c530f 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_failure_transports_global.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_multiple_failure_transports_global.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_routing.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_routing.xml index 5e3613ad2..a71d52d96 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_routing.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_routing.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_routing_invalid_transport.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_routing_invalid_transport.xml index 44c9382b6..98c487fbf 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_routing_invalid_transport.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_routing_invalid_transport.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_routing_invalid_wildcard.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_routing_invalid_wildcard.xml index 4002fbf43..93ddb789f 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_routing_invalid_wildcard.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_routing_invalid_wildcard.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_routing_single.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_routing_single.xml index aa6db8515..349a3728d 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_routing_single.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_routing_single.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_schedule.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_schedule.xml index ee8cf3dcf..f2152626b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_schedule.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_schedule.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_transport.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_transport.xml index 167e4b64e..e5e60a398 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_transport.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_transport.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml b/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml index b42473601..338e0c8de 100644 --- a/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml +++ b/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/notifier.xml b/Tests/DependencyInjection/Fixtures/xml/notifier.xml index 0cc1bceac..47e2e2b0c 100644 --- a/Tests/DependencyInjection/Fixtures/xml/notifier.xml +++ b/Tests/DependencyInjection/Fixtures/xml/notifier.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/notifier_with_disabled_message_bus.xml b/Tests/DependencyInjection/Fixtures/xml/notifier_with_disabled_message_bus.xml index 9a2a7e2f6..599bd23cb 100644 --- a/Tests/DependencyInjection/Fixtures/xml/notifier_with_disabled_message_bus.xml +++ b/Tests/DependencyInjection/Fixtures/xml/notifier_with_disabled_message_bus.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/notifier_with_specific_message_bus.xml b/Tests/DependencyInjection/Fixtures/xml/notifier_with_specific_message_bus.xml index 5250151d4..623734970 100644 --- a/Tests/DependencyInjection/Fixtures/xml/notifier_with_specific_message_bus.xml +++ b/Tests/DependencyInjection/Fixtures/xml/notifier_with_specific_message_bus.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/notifier_without_mailer.xml b/Tests/DependencyInjection/Fixtures/xml/notifier_without_mailer.xml index 118564ae7..1c62b5265 100644 --- a/Tests/DependencyInjection/Fixtures/xml/notifier_without_mailer.xml +++ b/Tests/DependencyInjection/Fixtures/xml/notifier_without_mailer.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/notifier_without_messenger.xml b/Tests/DependencyInjection/Fixtures/xml/notifier_without_messenger.xml index fa6b6991f..7417de697 100644 --- a/Tests/DependencyInjection/Fixtures/xml/notifier_without_messenger.xml +++ b/Tests/DependencyInjection/Fixtures/xml/notifier_without_messenger.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/notifier_without_transports.xml b/Tests/DependencyInjection/Fixtures/xml/notifier_without_transports.xml index c6060c435..36afb9039 100644 --- a/Tests/DependencyInjection/Fixtures/xml/notifier_without_transports.xml +++ b/Tests/DependencyInjection/Fixtures/xml/notifier_without_transports.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/php_errors_disabled.xml b/Tests/DependencyInjection/Fixtures/xml/php_errors_disabled.xml index 2c10cc713..cb50daa65 100644 --- a/Tests/DependencyInjection/Fixtures/xml/php_errors_disabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/php_errors_disabled.xml @@ -5,8 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/php_errors_enabled.xml b/Tests/DependencyInjection/Fixtures/xml/php_errors_enabled.xml index 9c1345b76..f608a2375 100644 --- a/Tests/DependencyInjection/Fixtures/xml/php_errors_enabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/php_errors_enabled.xml @@ -5,8 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + + diff --git a/Tests/DependencyInjection/Fixtures/xml/php_errors_log_level.xml b/Tests/DependencyInjection/Fixtures/xml/php_errors_log_level.xml index 591d717d4..ebd794845 100644 --- a/Tests/DependencyInjection/Fixtures/xml/php_errors_log_level.xml +++ b/Tests/DependencyInjection/Fixtures/xml/php_errors_log_level.xml @@ -5,8 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/php_errors_log_levels.xml b/Tests/DependencyInjection/Fixtures/xml/php_errors_log_levels.xml index d9b94e926..1b6642a57 100644 --- a/Tests/DependencyInjection/Fixtures/xml/php_errors_log_levels.xml +++ b/Tests/DependencyInjection/Fixtures/xml/php_errors_log_levels.xml @@ -5,8 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/profiler.xml b/Tests/DependencyInjection/Fixtures/xml/profiler.xml index 34d44d91c..55c766efe 100644 --- a/Tests/DependencyInjection/Fixtures/xml/profiler.xml +++ b/Tests/DependencyInjection/Fixtures/xml/profiler.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/property_accessor.xml b/Tests/DependencyInjection/Fixtures/xml/property_accessor.xml index 46d8bd939..9406919e9 100644 --- a/Tests/DependencyInjection/Fixtures/xml/property_accessor.xml +++ b/Tests/DependencyInjection/Fixtures/xml/property_accessor.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/property_info.xml b/Tests/DependencyInjection/Fixtures/xml/property_info.xml index 5f49aabaa..7bf63b654 100644 --- a/Tests/DependencyInjection/Fixtures/xml/property_info.xml +++ b/Tests/DependencyInjection/Fixtures/xml/property_info.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/property_info_without_constructor_extractor.xml b/Tests/DependencyInjection/Fixtures/xml/property_info_without_constructor_extractor.xml index 19bac44d9..a04b348c0 100644 --- a/Tests/DependencyInjection/Fixtures/xml/property_info_without_constructor_extractor.xml +++ b/Tests/DependencyInjection/Fixtures/xml/property_info_without_constructor_extractor.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/rate_limiter.xml b/Tests/DependencyInjection/Fixtures/xml/rate_limiter.xml index 54f8e5587..35488c853 100644 --- a/Tests/DependencyInjection/Fixtures/xml/rate_limiter.xml +++ b/Tests/DependencyInjection/Fixtures/xml/rate_limiter.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/semaphore.xml b/Tests/DependencyInjection/Fixtures/xml/semaphore.xml index dcab80326..5266e7fa6 100644 --- a/Tests/DependencyInjection/Fixtures/xml/semaphore.xml +++ b/Tests/DependencyInjection/Fixtures/xml/semaphore.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + redis://localhost diff --git a/Tests/DependencyInjection/Fixtures/xml/semaphore_named.xml b/Tests/DependencyInjection/Fixtures/xml/semaphore_named.xml index 7e454c2fd..73d696d7b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/semaphore_named.xml +++ b/Tests/DependencyInjection/Fixtures/xml/semaphore_named.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + redis://paas.com %env(REDIS_DSN)% diff --git a/Tests/DependencyInjection/Fixtures/xml/semaphore_service.xml b/Tests/DependencyInjection/Fixtures/xml/semaphore_service.xml index 814823802..1d33738cb 100644 --- a/Tests/DependencyInjection/Fixtures/xml/semaphore_service.xml +++ b/Tests/DependencyInjection/Fixtures/xml/semaphore_service.xml @@ -9,9 +9,7 @@ - - - + my_service diff --git a/Tests/DependencyInjection/Fixtures/xml/serializer_disabled.xml b/Tests/DependencyInjection/Fixtures/xml/serializer_disabled.xml index 89a48c59a..0c62272c5 100644 --- a/Tests/DependencyInjection/Fixtures/xml/serializer_disabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/serializer_disabled.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/serializer_enabled.xml b/Tests/DependencyInjection/Fixtures/xml/serializer_enabled.xml index 343ad58c0..3d59d6283 100644 --- a/Tests/DependencyInjection/Fixtures/xml/serializer_enabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/serializer_enabled.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/serializer_mapping.xml b/Tests/DependencyInjection/Fixtures/xml/serializer_mapping.xml index 165669fe6..9b8f47607 100644 --- a/Tests/DependencyInjection/Fixtures/xml/serializer_mapping.xml +++ b/Tests/DependencyInjection/Fixtures/xml/serializer_mapping.xml @@ -4,9 +4,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:framework="http://symfony.com/schema/dic/symfony"> - - - + %kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/files diff --git a/Tests/DependencyInjection/Fixtures/xml/serializer_mapping_without_annotations.xml b/Tests/DependencyInjection/Fixtures/xml/serializer_mapping_without_attributes.xml similarity index 82% rename from Tests/DependencyInjection/Fixtures/xml/serializer_mapping_without_annotations.xml rename to Tests/DependencyInjection/Fixtures/xml/serializer_mapping_without_attributes.xml index bb8dccf9c..4bc2d5022 100644 --- a/Tests/DependencyInjection/Fixtures/xml/serializer_mapping_without_annotations.xml +++ b/Tests/DependencyInjection/Fixtures/xml/serializer_mapping_without_attributes.xml @@ -4,9 +4,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:framework="http://symfony.com/schema/dic/symfony"> - - - + %kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/files diff --git a/Tests/DependencyInjection/Fixtures/xml/serializer_without_translator.xml b/Tests/DependencyInjection/Fixtures/xml/serializer_without_translator.xml index 584937b0a..d3e71f0a1 100644 --- a/Tests/DependencyInjection/Fixtures/xml/serializer_without_translator.xml +++ b/Tests/DependencyInjection/Fixtures/xml/serializer_without_translator.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/session.xml b/Tests/DependencyInjection/Fixtures/xml/session.xml index 2091b419d..46a70f3e7 100644 --- a/Tests/DependencyInjection/Fixtures/xml/session.xml +++ b/Tests/DependencyInjection/Fixtures/xml/session.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/session_cookie_secure_auto.xml b/Tests/DependencyInjection/Fixtures/xml/session_cookie_secure_auto.xml index 9c237407d..84bdfc686 100644 --- a/Tests/DependencyInjection/Fixtures/xml/session_cookie_secure_auto.xml +++ b/Tests/DependencyInjection/Fixtures/xml/session_cookie_secure_auto.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/ssi_disabled.xml b/Tests/DependencyInjection/Fixtures/xml/ssi_disabled.xml index 144012fdc..6aa752a46 100644 --- a/Tests/DependencyInjection/Fixtures/xml/ssi_disabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/ssi_disabled.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/translator_cache_dir_disabled.xml b/Tests/DependencyInjection/Fixtures/xml/translator_cache_dir_disabled.xml index b135907da..5704ff7cd 100644 --- a/Tests/DependencyInjection/Fixtures/xml/translator_cache_dir_disabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/translator_cache_dir_disabled.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/translator_fallbacks.xml b/Tests/DependencyInjection/Fixtures/xml/translator_fallbacks.xml index b12f54f6f..521f8e381 100644 --- a/Tests/DependencyInjection/Fixtures/xml/translator_fallbacks.xml +++ b/Tests/DependencyInjection/Fixtures/xml/translator_fallbacks.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + en fr diff --git a/Tests/DependencyInjection/Fixtures/xml/translator_globals.xml b/Tests/DependencyInjection/Fixtures/xml/translator_globals.xml index 017fd9393..9532794f2 100644 --- a/Tests/DependencyInjection/Fixtures/xml/translator_globals.xml +++ b/Tests/DependencyInjection/Fixtures/xml/translator_globals.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + My application diff --git a/Tests/DependencyInjection/Fixtures/xml/translator_without_globals.xml b/Tests/DependencyInjection/Fixtures/xml/translator_without_globals.xml index 6c686bd30..a47890243 100644 --- a/Tests/DependencyInjection/Fixtures/xml/translator_without_globals.xml +++ b/Tests/DependencyInjection/Fixtures/xml/translator_without_globals.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/type_info.xml b/Tests/DependencyInjection/Fixtures/xml/type_info.xml index 0fe4d525d..d7e7eb26b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/type_info.xml +++ b/Tests/DependencyInjection/Fixtures/xml/type_info.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/validation_attributes.xml b/Tests/DependencyInjection/Fixtures/xml/validation_attributes.xml index fe269612a..fb00a949d 100644 --- a/Tests/DependencyInjection/Fixtures/xml/validation_attributes.xml +++ b/Tests/DependencyInjection/Fixtures/xml/validation_attributes.xml @@ -6,10 +6,8 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - - + + diff --git a/Tests/DependencyInjection/Fixtures/xml/validation_auto_mapping.xml b/Tests/DependencyInjection/Fixtures/xml/validation_auto_mapping.xml index c60691b0b..a05aaf801 100644 --- a/Tests/DependencyInjection/Fixtures/xml/validation_auto_mapping.xml +++ b/Tests/DependencyInjection/Fixtures/xml/validation_auto_mapping.xml @@ -3,11 +3,9 @@ - - - + - + foo bar diff --git a/Tests/DependencyInjection/Fixtures/xml/validation_email_validation_mode.xml b/Tests/DependencyInjection/Fixtures/xml/validation_email_validation_mode.xml index a55681e8f..9472b7af1 100644 --- a/Tests/DependencyInjection/Fixtures/xml/validation_email_validation_mode.xml +++ b/Tests/DependencyInjection/Fixtures/xml/validation_email_validation_mode.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - - + + diff --git a/Tests/DependencyInjection/Fixtures/xml/validation_mapping.xml b/Tests/DependencyInjection/Fixtures/xml/validation_mapping.xml index 28e3917c1..8d74ebb21 100644 --- a/Tests/DependencyInjection/Fixtures/xml/validation_mapping.xml +++ b/Tests/DependencyInjection/Fixtures/xml/validation_mapping.xml @@ -4,10 +4,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:framework="http://symfony.com/schema/dic/symfony"> - - - - + + %kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/files %kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yml diff --git a/Tests/DependencyInjection/Fixtures/xml/validation_multiple_static_methods.xml b/Tests/DependencyInjection/Fixtures/xml/validation_multiple_static_methods.xml index ba43487e0..c2e84c3b9 100644 --- a/Tests/DependencyInjection/Fixtures/xml/validation_multiple_static_methods.xml +++ b/Tests/DependencyInjection/Fixtures/xml/validation_multiple_static_methods.xml @@ -6,10 +6,8 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - - + + loadFoo loadBar diff --git a/Tests/DependencyInjection/Fixtures/xml/validation_no_static_method.xml b/Tests/DependencyInjection/Fixtures/xml/validation_no_static_method.xml index b73890cff..61770d88a 100644 --- a/Tests/DependencyInjection/Fixtures/xml/validation_no_static_method.xml +++ b/Tests/DependencyInjection/Fixtures/xml/validation_no_static_method.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - - + + diff --git a/Tests/DependencyInjection/Fixtures/xml/validation_translation_domain.xml b/Tests/DependencyInjection/Fixtures/xml/validation_translation_domain.xml index 4f7027a05..3690f9e10 100644 --- a/Tests/DependencyInjection/Fixtures/xml/validation_translation_domain.xml +++ b/Tests/DependencyInjection/Fixtures/xml/validation_translation_domain.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - - + + diff --git a/Tests/DependencyInjection/Fixtures/xml/web_link.xml b/Tests/DependencyInjection/Fixtures/xml/web_link.xml index 62aa77125..718ceb31a 100644 --- a/Tests/DependencyInjection/Fixtures/xml/web_link.xml +++ b/Tests/DependencyInjection/Fixtures/xml/web_link.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/webhook.xml b/Tests/DependencyInjection/Fixtures/xml/webhook.xml index fba138407..411ea9b81 100644 --- a/Tests/DependencyInjection/Fixtures/xml/webhook.xml +++ b/Tests/DependencyInjection/Fixtures/xml/webhook.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/webhook_without_serializer.xml b/Tests/DependencyInjection/Fixtures/xml/webhook_without_serializer.xml index 8e4ec9443..4bc4dfd33 100644 --- a/Tests/DependencyInjection/Fixtures/xml/webhook_without_serializer.xml +++ b/Tests/DependencyInjection/Fixtures/xml/webhook_without_serializer.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/workflow_not_valid.xml b/Tests/DependencyInjection/Fixtures/xml/workflow_not_valid.xml index c2126f0f3..1aa7b099a 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflow_not_valid.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflow_not_valid.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase diff --git a/Tests/DependencyInjection/Fixtures/xml/workflow_with_guard_expression.xml b/Tests/DependencyInjection/Fixtures/xml/workflow_with_guard_expression.xml index 56070b016..6420f099b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflow_with_guard_expression.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflow_with_guard_expression.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + draft Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase diff --git a/Tests/DependencyInjection/Fixtures/xml/workflow_with_multiple_transitions_with_same_name.xml b/Tests/DependencyInjection/Fixtures/xml/workflow_with_multiple_transitions_with_same_name.xml index 0435447b6..815c83aff 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflow_with_multiple_transitions_with_same_name.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflow_with_multiple_transitions_with_same_name.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + draft Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase diff --git a/Tests/DependencyInjection/Fixtures/xml/workflow_with_no_events_to_dispatch.xml b/Tests/DependencyInjection/Fixtures/xml/workflow_with_no_events_to_dispatch.xml index 1e1ae4746..4842e54bf 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflow_with_no_events_to_dispatch.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflow_with_no_events_to_dispatch.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + one diff --git a/Tests/DependencyInjection/Fixtures/xml/workflow_with_specified_events_to_dispatch.xml b/Tests/DependencyInjection/Fixtures/xml/workflow_with_specified_events_to_dispatch.xml index e51495001..aa5cca25b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflow_with_specified_events_to_dispatch.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflow_with_specified_events_to_dispatch.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + one diff --git a/Tests/DependencyInjection/Fixtures/xml/workflow_with_support_and_support_strategy.xml b/Tests/DependencyInjection/Fixtures/xml/workflow_with_support_and_support_strategy.xml index f36890a5b..c6170b6fe 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflow_with_support_and_support_strategy.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflow_with_support_and_support_strategy.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase diff --git a/Tests/DependencyInjection/Fixtures/xml/workflow_without_support_and_support_strategy.xml b/Tests/DependencyInjection/Fixtures/xml/workflow_without_support_and_support_strategy.xml index fe43059da..c6ee7d77b 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflow_without_support_and_support_strategy.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflow_without_support_and_support_strategy.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/workflows.xml b/Tests/DependencyInjection/Fixtures/xml/workflows.xml index c5dae479d..ae3b72112 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflows.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflows.xml @@ -6,9 +6,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + draft diff --git a/Tests/DependencyInjection/Fixtures/xml/workflows_enabled.xml b/Tests/DependencyInjection/Fixtures/xml/workflows_enabled.xml index dcd9a89db..26e622e9e 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflows_enabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflows_enabled.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + diff --git a/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled.xml b/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled.xml index 9960de99a..c27c51d06 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase bar diff --git a/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled_named_workflows.xml b/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled_named_workflows.xml index 7ee4c5136..34e58c86d 100644 --- a/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled_named_workflows.xml +++ b/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled_named_workflows.xml @@ -5,9 +5,7 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> - - - + bar Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase diff --git a/Tests/DependencyInjection/Fixtures/yml/asset_mapper_without_assets.yml b/Tests/DependencyInjection/Fixtures/yml/asset_mapper_without_assets.yml index 51f302b66..5c09f79ae 100644 --- a/Tests/DependencyInjection/Fixtures/yml/asset_mapper_without_assets.yml +++ b/Tests/DependencyInjection/Fixtures/yml/asset_mapper_without_assets.yml @@ -1,8 +1,3 @@ framework: - annotations: false asset_mapper: ~ assets: false - handle_all_throwables: true - http_method_override: false - php_errors: - log: true diff --git a/Tests/DependencyInjection/Fixtures/yml/assets.yml b/Tests/DependencyInjection/Fixtures/yml/assets.yml index 6340f50d7..cfd4f07b0 100644 --- a/Tests/DependencyInjection/Fixtures/yml/assets.yml +++ b/Tests/DependencyInjection/Fixtures/yml/assets.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true assets: version: SomeVersionScheme version_format: '%%s?version=%%s' diff --git a/Tests/DependencyInjection/Fixtures/yml/assets_disabled.yml b/Tests/DependencyInjection/Fixtures/yml/assets_disabled.yml index eb8aecb1e..17ba4e90a 100644 --- a/Tests/DependencyInjection/Fixtures/yml/assets_disabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/assets_disabled.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true assets: enabled: false diff --git a/Tests/DependencyInjection/Fixtures/yml/assets_version_strategy_as_service.yml b/Tests/DependencyInjection/Fixtures/yml/assets_version_strategy_as_service.yml index 73614bde6..2528462f8 100644 --- a/Tests/DependencyInjection/Fixtures/yml/assets_version_strategy_as_service.yml +++ b/Tests/DependencyInjection/Fixtures/yml/assets_version_strategy_as_service.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true assets: version_strategy: assets.custom_version_strategy base_urls: http://cdn.example.com diff --git a/Tests/DependencyInjection/Fixtures/yml/cache.yml b/Tests/DependencyInjection/Fixtures/yml/cache.yml index e88c77f1c..c89c027f5 100644 --- a/Tests/DependencyInjection/Fixtures/yml/cache.yml +++ b/Tests/DependencyInjection/Fixtures/yml/cache.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true cache: pools: cache.foo: diff --git a/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware.yml b/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware.yml index c19943a8e..b1c89adaf 100644 --- a/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware.yml +++ b/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true cache: app: cache.adapter.redis_tag_aware diff --git a/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml b/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml index 35df91a24..9eb8b83c7 100644 --- a/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml +++ b/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true cache: app: cache.redis_tag_aware.foo pools: diff --git a/Tests/DependencyInjection/Fixtures/yml/csrf.yml b/Tests/DependencyInjection/Fixtures/yml/csrf.yml index 6e24d410d..e222e108f 100644 --- a/Tests/DependencyInjection/Fixtures/yml/csrf.yml +++ b/Tests/DependencyInjection/Fixtures/yml/csrf.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true secret: s3cr3t csrf_protection: ~ session: diff --git a/Tests/DependencyInjection/Fixtures/yml/csrf_needs_session.yml b/Tests/DependencyInjection/Fixtures/yml/csrf_needs_session.yml index 1f6e73d0c..b8065b6fb 100644 --- a/Tests/DependencyInjection/Fixtures/yml/csrf_needs_session.yml +++ b/Tests/DependencyInjection/Fixtures/yml/csrf_needs_session.yml @@ -1,7 +1,2 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true csrf_protection: ~ diff --git a/Tests/DependencyInjection/Fixtures/yml/default_config.yml b/Tests/DependencyInjection/Fixtures/yml/default_config.yml index 0fb93a414..6455b36d2 100644 --- a/Tests/DependencyInjection/Fixtures/yml/default_config.yml +++ b/Tests/DependencyInjection/Fixtures/yml/default_config.yml @@ -1,6 +1 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true diff --git a/Tests/DependencyInjection/Fixtures/yml/esi_and_ssi_without_fragments.yml b/Tests/DependencyInjection/Fixtures/yml/esi_and_ssi_without_fragments.yml index 428a2fa04..49d63c8d6 100644 --- a/Tests/DependencyInjection/Fixtures/yml/esi_and_ssi_without_fragments.yml +++ b/Tests/DependencyInjection/Fixtures/yml/esi_and_ssi_without_fragments.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true fragments: enabled: false esi: diff --git a/Tests/DependencyInjection/Fixtures/yml/esi_disabled.yml b/Tests/DependencyInjection/Fixtures/yml/esi_disabled.yml index 255a3a863..2a78e6da0 100644 --- a/Tests/DependencyInjection/Fixtures/yml/esi_disabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/esi_disabled.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true esi: enabled: false diff --git a/Tests/DependencyInjection/Fixtures/yml/exceptions.yml b/Tests/DependencyInjection/Fixtures/yml/exceptions.yml index 3744d5402..3958c4c5f 100644 --- a/Tests/DependencyInjection/Fixtures/yml/exceptions.yml +++ b/Tests/DependencyInjection/Fixtures/yml/exceptions.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true exceptions: Symfony\Component\HttpKernel\Exception\BadRequestHttpException: log_level: info diff --git a/Tests/DependencyInjection/Fixtures/yml/form_csrf_disabled.yml b/Tests/DependencyInjection/Fixtures/yml/form_csrf_disabled.yml index 20350c9e8..9319019c8 100644 --- a/Tests/DependencyInjection/Fixtures/yml/form_csrf_disabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/form_csrf_disabled.yml @@ -1,9 +1,4 @@ framework: - annotations: false csrf_protection: false form: csrf_protection: true - http_method_override: false - handle_all_throwables: true - php_errors: - log: true diff --git a/Tests/DependencyInjection/Fixtures/yml/form_csrf_field_attr.yml b/Tests/DependencyInjection/Fixtures/yml/form_csrf_field_attr.yml index db5199775..8307b6d14 100644 --- a/Tests/DependencyInjection/Fixtures/yml/form_csrf_field_attr.yml +++ b/Tests/DependencyInjection/Fixtures/yml/form_csrf_field_attr.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true csrf_protection: enabled: true form: diff --git a/Tests/DependencyInjection/Fixtures/yml/form_default_csrf.yml b/Tests/DependencyInjection/Fixtures/yml/form_default_csrf.yml index 001f7c4ca..fbe2aaa71 100644 --- a/Tests/DependencyInjection/Fixtures/yml/form_default_csrf.yml +++ b/Tests/DependencyInjection/Fixtures/yml/form_default_csrf.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true session: storage_factory_id: session.storage.factory.native handler_id: null diff --git a/Tests/DependencyInjection/Fixtures/yml/form_no_csrf.yml b/Tests/DependencyInjection/Fixtures/yml/form_no_csrf.yml index a86432f8d..e3ac7e8da 100644 --- a/Tests/DependencyInjection/Fixtures/yml/form_no_csrf.yml +++ b/Tests/DependencyInjection/Fixtures/yml/form_no_csrf.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true form: csrf_protection: enabled: false diff --git a/Tests/DependencyInjection/Fixtures/yml/fragments_and_hinclude.yml b/Tests/DependencyInjection/Fixtures/yml/fragments_and_hinclude.yml index 876ff7289..b03f37da7 100644 --- a/Tests/DependencyInjection/Fixtures/yml/fragments_and_hinclude.yml +++ b/Tests/DependencyInjection/Fixtures/yml/fragments_and_hinclude.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true fragments: enabled: true hinclude_default_template: global_hinclude_template diff --git a/Tests/DependencyInjection/Fixtures/yml/full.yml b/Tests/DependencyInjection/Fixtures/yml/full.yml index 515381638..28111b589 100644 --- a/Tests/DependencyInjection/Fixtures/yml/full.yml +++ b/Tests/DependencyInjection/Fixtures/yml/full.yml @@ -48,7 +48,6 @@ framework: validation: enabled: true email_validation_mode: html5 - annotations: false serializer: enabled: true enable_attributes: true diff --git a/Tests/DependencyInjection/Fixtures/yml/html_sanitizer.yml b/Tests/DependencyInjection/Fixtures/yml/html_sanitizer.yml index f0d515e41..fd7fbd1c3 100644 --- a/Tests/DependencyInjection/Fixtures/yml/html_sanitizer.yml +++ b/Tests/DependencyInjection/Fixtures/yml/html_sanitizer.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true html_sanitizer: sanitizers: custom: diff --git a/Tests/DependencyInjection/Fixtures/yml/html_sanitizer_default_allowed_link_and_media_hosts.yml b/Tests/DependencyInjection/Fixtures/yml/html_sanitizer_default_allowed_link_and_media_hosts.yml index c5b79e9da..ab77b0144 100644 --- a/Tests/DependencyInjection/Fixtures/yml/html_sanitizer_default_allowed_link_and_media_hosts.yml +++ b/Tests/DependencyInjection/Fixtures/yml/html_sanitizer_default_allowed_link_and_media_hosts.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true html_sanitizer: sanitizers: custom_default: ~ diff --git a/Tests/DependencyInjection/Fixtures/yml/html_sanitizer_default_config.yml b/Tests/DependencyInjection/Fixtures/yml/html_sanitizer_default_config.yml index e7f48e904..7b4c5cb09 100644 --- a/Tests/DependencyInjection/Fixtures/yml/html_sanitizer_default_config.yml +++ b/Tests/DependencyInjection/Fixtures/yml/html_sanitizer_default_config.yml @@ -1,7 +1,2 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true html_sanitizer: ~ diff --git a/Tests/DependencyInjection/Fixtures/yml/http_client_default_options.yml b/Tests/DependencyInjection/Fixtures/yml/http_client_default_options.yml index d062da83e..6828f8ec2 100644 --- a/Tests/DependencyInjection/Fixtures/yml/http_client_default_options.yml +++ b/Tests/DependencyInjection/Fixtures/yml/http_client_default_options.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true http_client: max_host_connections: 4 default_options: ~ diff --git a/Tests/DependencyInjection/Fixtures/yml/http_client_full_default_options.yml b/Tests/DependencyInjection/Fixtures/yml/http_client_full_default_options.yml index ee88b7213..e0263544e 100644 --- a/Tests/DependencyInjection/Fixtures/yml/http_client_full_default_options.yml +++ b/Tests/DependencyInjection/Fixtures/yml/http_client_full_default_options.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true http_client: default_options: headers: diff --git a/Tests/DependencyInjection/Fixtures/yml/http_client_mock_response_factory.yml b/Tests/DependencyInjection/Fixtures/yml/http_client_mock_response_factory.yml index 92c40b459..b95859108 100644 --- a/Tests/DependencyInjection/Fixtures/yml/http_client_mock_response_factory.yml +++ b/Tests/DependencyInjection/Fixtures/yml/http_client_mock_response_factory.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true http_client: default_options: ~ mock_response_factory: my_response_factory diff --git a/Tests/DependencyInjection/Fixtures/yml/http_client_override_default_options.yml b/Tests/DependencyInjection/Fixtures/yml/http_client_override_default_options.yml index dcc77c7d9..baa29b1ab 100644 --- a/Tests/DependencyInjection/Fixtures/yml/http_client_override_default_options.yml +++ b/Tests/DependencyInjection/Fixtures/yml/http_client_override_default_options.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true http_client: max_host_connections: 4 default_options: diff --git a/Tests/DependencyInjection/Fixtures/yml/http_client_rate_limiter.yml b/Tests/DependencyInjection/Fixtures/yml/http_client_rate_limiter.yml index 6376192b7..5a0eb41a9 100644 --- a/Tests/DependencyInjection/Fixtures/yml/http_client_rate_limiter.yml +++ b/Tests/DependencyInjection/Fixtures/yml/http_client_rate_limiter.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true rate_limiter: foo_limiter: lock_factory: null diff --git a/Tests/DependencyInjection/Fixtures/yml/http_client_retry.yml b/Tests/DependencyInjection/Fixtures/yml/http_client_retry.yml index ea59b82d9..eba686819 100644 --- a/Tests/DependencyInjection/Fixtures/yml/http_client_retry.yml +++ b/Tests/DependencyInjection/Fixtures/yml/http_client_retry.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true http_client: default_options: retry_failed: diff --git a/Tests/DependencyInjection/Fixtures/yml/http_client_scoped_without_query_option.yml b/Tests/DependencyInjection/Fixtures/yml/http_client_scoped_without_query_option.yml index 63435d075..ecfc9d41f 100644 --- a/Tests/DependencyInjection/Fixtures/yml/http_client_scoped_without_query_option.yml +++ b/Tests/DependencyInjection/Fixtures/yml/http_client_scoped_without_query_option.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true http_client: scoped_clients: foo: diff --git a/Tests/DependencyInjection/Fixtures/yml/http_client_xml_key.yml b/Tests/DependencyInjection/Fixtures/yml/http_client_xml_key.yml index b3cab477a..dc87555a9 100644 --- a/Tests/DependencyInjection/Fixtures/yml/http_client_xml_key.yml +++ b/Tests/DependencyInjection/Fixtures/yml/http_client_xml_key.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true http_client: default_options: resolve: diff --git a/Tests/DependencyInjection/Fixtures/yml/json_streamer.yml b/Tests/DependencyInjection/Fixtures/yml/json_streamer.yml index 8873fea97..62d23aebc 100644 --- a/Tests/DependencyInjection/Fixtures/yml/json_streamer.yml +++ b/Tests/DependencyInjection/Fixtures/yml/json_streamer.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true type_info: enabled: true json_streamer: diff --git a/Tests/DependencyInjection/Fixtures/yml/lock.yml b/Tests/DependencyInjection/Fixtures/yml/lock.yml index d5db440e5..70f578a14 100644 --- a/Tests/DependencyInjection/Fixtures/yml/lock.yml +++ b/Tests/DependencyInjection/Fixtures/yml/lock.yml @@ -1,7 +1,2 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true lock: ~ diff --git a/Tests/DependencyInjection/Fixtures/yml/lock_named.yml b/Tests/DependencyInjection/Fixtures/yml/lock_named.yml index 631574030..3e32f4f0a 100644 --- a/Tests/DependencyInjection/Fixtures/yml/lock_named.yml +++ b/Tests/DependencyInjection/Fixtures/yml/lock_named.yml @@ -2,11 +2,6 @@ parameters: env(REDIS_DSN): redis://paas.com framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true lock: foo: semaphore bar: flock diff --git a/Tests/DependencyInjection/Fixtures/yml/lock_service.yml b/Tests/DependencyInjection/Fixtures/yml/lock_service.yml index 1b5dfea17..4a7e77cfc 100644 --- a/Tests/DependencyInjection/Fixtures/yml/lock_service.yml +++ b/Tests/DependencyInjection/Fixtures/yml/lock_service.yml @@ -3,9 +3,4 @@ services: class: \Redis framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true lock: my_service diff --git a/Tests/DependencyInjection/Fixtures/yml/mailer_with_disabled_message_bus.yml b/Tests/DependencyInjection/Fixtures/yml/mailer_with_disabled_message_bus.yml index d6e62c3ce..f941f7c8c 100644 --- a/Tests/DependencyInjection/Fixtures/yml/mailer_with_disabled_message_bus.yml +++ b/Tests/DependencyInjection/Fixtures/yml/mailer_with_disabled_message_bus.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true mailer: dsn: 'smtp://example.com' message_bus: false diff --git a/Tests/DependencyInjection/Fixtures/yml/mailer_with_dsn.yml b/Tests/DependencyInjection/Fixtures/yml/mailer_with_dsn.yml index ea703bdad..a9aafa4ab 100644 --- a/Tests/DependencyInjection/Fixtures/yml/mailer_with_dsn.yml +++ b/Tests/DependencyInjection/Fixtures/yml/mailer_with_dsn.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true mailer: dsn: 'smtp://example.com' envelope: diff --git a/Tests/DependencyInjection/Fixtures/yml/mailer_with_specific_message_bus.yml b/Tests/DependencyInjection/Fixtures/yml/mailer_with_specific_message_bus.yml index 10942315e..ddfc7a479 100644 --- a/Tests/DependencyInjection/Fixtures/yml/mailer_with_specific_message_bus.yml +++ b/Tests/DependencyInjection/Fixtures/yml/mailer_with_specific_message_bus.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true mailer: dsn: 'smtp://example.com' message_bus: app.another_bus diff --git a/Tests/DependencyInjection/Fixtures/yml/mailer_with_transports.yml b/Tests/DependencyInjection/Fixtures/yml/mailer_with_transports.yml index ae10f6aee..cc15a174d 100644 --- a/Tests/DependencyInjection/Fixtures/yml/mailer_with_transports.yml +++ b/Tests/DependencyInjection/Fixtures/yml/mailer_with_transports.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true mailer: transports: transport1: 'smtp://example1.com' diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger.yml b/Tests/DependencyInjection/Fixtures/yml/messenger.yml index fc22c3a2e..a463c4a10 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true scheduler: true messenger: routing: diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_bus_name_stamp.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_bus_name_stamp.yml index 79f8d7c87..9eb913ec5 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_bus_name_stamp.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_bus_name_stamp.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true lock: false messenger: default_bus: messenger.bus.commands diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_disabled.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_disabled.yml index 2d2b18519..4c1508c74 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_disabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_disabled.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: false scheduler: false diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_middleware_factory_erroneous_format.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_middleware_factory_erroneous_format.yml index 0c12e95d5..74431414b 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_middleware_factory_erroneous_format.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_middleware_factory_erroneous_format.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: buses: command_bus: diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_buses_with_deduplicate_middleware.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_buses_with_deduplicate_middleware.yml index ed52564c7..0b57eaeca 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_buses_with_deduplicate_middleware.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_buses_with_deduplicate_middleware.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true lock: ~ messenger: default_bus: messenger.bus.commands diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_buses_without_deduplicate_middleware.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_buses_without_deduplicate_middleware.yml index 38fca5737..e60cbf84c 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_buses_without_deduplicate_middleware.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_buses_without_deduplicate_middleware.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true lock: false messenger: default_bus: messenger.bus.commands diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_failure_transports.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_failure_transports.yml index 38ad9f4f2..863f18a7d 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_failure_transports.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_failure_transports.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: transports: transport_1: diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_failure_transports_global.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_failure_transports_global.yml index 7348cb01e..10023edb0 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_failure_transports_global.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_multiple_failure_transports_global.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: failure_transport: failure_transport_global transports: diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_routing.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_routing.yml index 44f298a25..be91c828c 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_routing.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_routing.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true serializer: true messenger: serializer: diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_routing_invalid_transport.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_routing_invalid_transport.yml index f3b847010..3bf0f2ddf 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_routing_invalid_transport.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_routing_invalid_transport.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true serializer: true messenger: serializer: diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_routing_invalid_wildcard.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_routing_invalid_wildcard.yml index a847ca62c..ed22e0afc 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_routing_invalid_wildcard.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_routing_invalid_wildcard.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true serializer: true messenger: serializer: diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_routing_single.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_routing_single.yml index 21f51aeff..caa886418 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_routing_single.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_routing_single.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: routing: 'Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummyMessage': [amqp] diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_schedule.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_schedule.yml index e7c0e78be..a8e4cb010 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_schedule.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_schedule.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: transports: schedule: 'schedule://default' diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_transport.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_transport.yml index 040be0530..b51feb73b 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_transport.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_transport.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true serializer: true messenger: serializer: diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml index 6fb095a3e..36e429a2e 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true serializer: true messenger: failure_transport: failed diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_with_disabled_reset_on_message.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_with_disabled_reset_on_message.yml index 7fb1cdc05..f67395c85 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_with_disabled_reset_on_message.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_with_disabled_reset_on_message.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: reset_on_message: false routing: diff --git a/Tests/DependencyInjection/Fixtures/yml/messenger_with_explict_reset_on_message_legacy.yml b/Tests/DependencyInjection/Fixtures/yml/messenger_with_explict_reset_on_message_legacy.yml index 20e7ace17..3bf374f47 100644 --- a/Tests/DependencyInjection/Fixtures/yml/messenger_with_explict_reset_on_message_legacy.yml +++ b/Tests/DependencyInjection/Fixtures/yml/messenger_with_explict_reset_on_message_legacy.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: reset_on_message: true routing: diff --git a/Tests/DependencyInjection/Fixtures/yml/notifier.yml b/Tests/DependencyInjection/Fixtures/yml/notifier.yml index 0263b587b..586cb98a4 100644 --- a/Tests/DependencyInjection/Fixtures/yml/notifier.yml +++ b/Tests/DependencyInjection/Fixtures/yml/notifier.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: enabled: true mailer: diff --git a/Tests/DependencyInjection/Fixtures/yml/notifier_with_disabled_message_bus.yml b/Tests/DependencyInjection/Fixtures/yml/notifier_with_disabled_message_bus.yml index 945f60838..08b3d6ad6 100644 --- a/Tests/DependencyInjection/Fixtures/yml/notifier_with_disabled_message_bus.yml +++ b/Tests/DependencyInjection/Fixtures/yml/notifier_with_disabled_message_bus.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: enabled: true mailer: diff --git a/Tests/DependencyInjection/Fixtures/yml/notifier_with_specific_message_bus.yml b/Tests/DependencyInjection/Fixtures/yml/notifier_with_specific_message_bus.yml index 65efbf567..1851717bd 100644 --- a/Tests/DependencyInjection/Fixtures/yml/notifier_with_specific_message_bus.yml +++ b/Tests/DependencyInjection/Fixtures/yml/notifier_with_specific_message_bus.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true messenger: enabled: true mailer: diff --git a/Tests/DependencyInjection/Fixtures/yml/notifier_without_mailer.yml b/Tests/DependencyInjection/Fixtures/yml/notifier_without_mailer.yml index 7c5817cdf..75fa3cf88 100644 --- a/Tests/DependencyInjection/Fixtures/yml/notifier_without_mailer.yml +++ b/Tests/DependencyInjection/Fixtures/yml/notifier_without_mailer.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true mailer: enabled: false messenger: diff --git a/Tests/DependencyInjection/Fixtures/yml/notifier_without_messenger.yml b/Tests/DependencyInjection/Fixtures/yml/notifier_without_messenger.yml index f6f6572ec..be48fb168 100644 --- a/Tests/DependencyInjection/Fixtures/yml/notifier_without_messenger.yml +++ b/Tests/DependencyInjection/Fixtures/yml/notifier_without_messenger.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true mailer: dsn: 'smtp://example.com' messenger: diff --git a/Tests/DependencyInjection/Fixtures/yml/notifier_without_transports.yml b/Tests/DependencyInjection/Fixtures/yml/notifier_without_transports.yml index afc9913d3..856b0cd7c 100644 --- a/Tests/DependencyInjection/Fixtures/yml/notifier_without_transports.yml +++ b/Tests/DependencyInjection/Fixtures/yml/notifier_without_transports.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true notifier: enabled: true diff --git a/Tests/DependencyInjection/Fixtures/yml/php_errors_disabled.yml b/Tests/DependencyInjection/Fixtures/yml/php_errors_disabled.yml index f63424f12..e31944f5a 100644 --- a/Tests/DependencyInjection/Fixtures/yml/php_errors_disabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/php_errors_disabled.yml @@ -1,7 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true php_errors: log: false throw: false diff --git a/Tests/DependencyInjection/Fixtures/yml/php_errors_enabled.yml b/Tests/DependencyInjection/Fixtures/yml/php_errors_enabled.yml index f9f5b4fd4..6897f9623 100644 --- a/Tests/DependencyInjection/Fixtures/yml/php_errors_enabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/php_errors_enabled.yml @@ -1,7 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true php_errors: - log: true throw: true diff --git a/Tests/DependencyInjection/Fixtures/yml/php_errors_log_level.yml b/Tests/DependencyInjection/Fixtures/yml/php_errors_log_level.yml index 4bcc0e4ec..e5cff7767 100644 --- a/Tests/DependencyInjection/Fixtures/yml/php_errors_log_level.yml +++ b/Tests/DependencyInjection/Fixtures/yml/php_errors_log_level.yml @@ -1,6 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true php_errors: log: 8 diff --git a/Tests/DependencyInjection/Fixtures/yml/php_errors_log_levels.yml b/Tests/DependencyInjection/Fixtures/yml/php_errors_log_levels.yml index e89eb64aa..ad9fd3066 100644 --- a/Tests/DependencyInjection/Fixtures/yml/php_errors_log_levels.yml +++ b/Tests/DependencyInjection/Fixtures/yml/php_errors_log_levels.yml @@ -1,7 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true php_errors: log: !php/const \E_NOTICE: !php/const Psr\Log\LogLevel::ERROR diff --git a/Tests/DependencyInjection/Fixtures/yml/profiler.yml b/Tests/DependencyInjection/Fixtures/yml/profiler.yml index 2ccec1685..8cc59ab8f 100644 --- a/Tests/DependencyInjection/Fixtures/yml/profiler.yml +++ b/Tests/DependencyInjection/Fixtures/yml/profiler.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true profiler: enabled: true collect_serializer_data: true diff --git a/Tests/DependencyInjection/Fixtures/yml/property_accessor.yml b/Tests/DependencyInjection/Fixtures/yml/property_accessor.yml index b690216c8..931b50383 100644 --- a/Tests/DependencyInjection/Fixtures/yml/property_accessor.yml +++ b/Tests/DependencyInjection/Fixtures/yml/property_accessor.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true property_access: magic_call: true magic_get: true diff --git a/Tests/DependencyInjection/Fixtures/yml/property_info.yml b/Tests/DependencyInjection/Fixtures/yml/property_info.yml index de05e6bb7..fbdf7a7b0 100644 --- a/Tests/DependencyInjection/Fixtures/yml/property_info.yml +++ b/Tests/DependencyInjection/Fixtures/yml/property_info.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true property_info: enabled: true diff --git a/Tests/DependencyInjection/Fixtures/yml/property_info_without_constructor_extractor.yml b/Tests/DependencyInjection/Fixtures/yml/property_info_without_constructor_extractor.yml index 4fde73710..20dc3340a 100644 --- a/Tests/DependencyInjection/Fixtures/yml/property_info_without_constructor_extractor.yml +++ b/Tests/DependencyInjection/Fixtures/yml/property_info_without_constructor_extractor.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true property_info: enabled: true with_constructor_extractor: false diff --git a/Tests/DependencyInjection/Fixtures/yml/request.yml b/Tests/DependencyInjection/Fixtures/yml/request.yml index 8d6520c5a..9beae1dc5 100644 --- a/Tests/DependencyInjection/Fixtures/yml/request.yml +++ b/Tests/DependencyInjection/Fixtures/yml/request.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true request: formats: ~ diff --git a/Tests/DependencyInjection/Fixtures/yml/semaphore.yml b/Tests/DependencyInjection/Fixtures/yml/semaphore.yml index 5fd71f69d..47b132351 100644 --- a/Tests/DependencyInjection/Fixtures/yml/semaphore.yml +++ b/Tests/DependencyInjection/Fixtures/yml/semaphore.yml @@ -1,7 +1,2 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true semaphore: redis://localhost diff --git a/Tests/DependencyInjection/Fixtures/yml/semaphore_named.yml b/Tests/DependencyInjection/Fixtures/yml/semaphore_named.yml index 0428a2e88..0a29e4ea8 100644 --- a/Tests/DependencyInjection/Fixtures/yml/semaphore_named.yml +++ b/Tests/DependencyInjection/Fixtures/yml/semaphore_named.yml @@ -2,11 +2,6 @@ parameters: env(REDIS_DSN): redis://paas.com framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true semaphore: foo: redis://paas.com qux: "%env(REDIS_DSN)%" diff --git a/Tests/DependencyInjection/Fixtures/yml/semaphore_service.yml b/Tests/DependencyInjection/Fixtures/yml/semaphore_service.yml index 62765ac91..ed3d6fa77 100644 --- a/Tests/DependencyInjection/Fixtures/yml/semaphore_service.yml +++ b/Tests/DependencyInjection/Fixtures/yml/semaphore_service.yml @@ -3,9 +3,4 @@ services: class: \Redis framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true semaphore: my_service diff --git a/Tests/DependencyInjection/Fixtures/yml/serializer_disabled.yml b/Tests/DependencyInjection/Fixtures/yml/serializer_disabled.yml index ad53d643e..330e19a69 100644 --- a/Tests/DependencyInjection/Fixtures/yml/serializer_disabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/serializer_disabled.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true serializer: enabled: false diff --git a/Tests/DependencyInjection/Fixtures/yml/serializer_enabled.yml b/Tests/DependencyInjection/Fixtures/yml/serializer_enabled.yml index 40d7c604e..40a1ff7d6 100644 --- a/Tests/DependencyInjection/Fixtures/yml/serializer_enabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/serializer_enabled.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true serializer: enabled: true diff --git a/Tests/DependencyInjection/Fixtures/yml/serializer_mapping.yml b/Tests/DependencyInjection/Fixtures/yml/serializer_mapping.yml index b2966b0ed..54d46ac61 100644 --- a/Tests/DependencyInjection/Fixtures/yml/serializer_mapping.yml +++ b/Tests/DependencyInjection/Fixtures/yml/serializer_mapping.yml @@ -1,9 +1,4 @@ framework: - http_method_override: false - handle_all_throwables: true - php_errors: - log: true - annotations: false serializer: enable_attributes: true mapping: diff --git a/Tests/DependencyInjection/Fixtures/yml/serializer_mapping_without_annotations.yml b/Tests/DependencyInjection/Fixtures/yml/serializer_mapping_without_attributes.yml similarity index 78% rename from Tests/DependencyInjection/Fixtures/yml/serializer_mapping_without_annotations.yml rename to Tests/DependencyInjection/Fixtures/yml/serializer_mapping_without_attributes.yml index 46425dc94..a6658d24f 100644 --- a/Tests/DependencyInjection/Fixtures/yml/serializer_mapping_without_annotations.yml +++ b/Tests/DependencyInjection/Fixtures/yml/serializer_mapping_without_attributes.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true serializer: enable_attributes: false mapping: diff --git a/Tests/DependencyInjection/Fixtures/yml/serializer_without_translator.yml b/Tests/DependencyInjection/Fixtures/yml/serializer_without_translator.yml index 33ee3f4b8..3699306a6 100644 --- a/Tests/DependencyInjection/Fixtures/yml/serializer_without_translator.yml +++ b/Tests/DependencyInjection/Fixtures/yml/serializer_without_translator.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true serializer: enabled: true translator: diff --git a/Tests/DependencyInjection/Fixtures/yml/session.yml b/Tests/DependencyInjection/Fixtures/yml/session.yml index cddbf5a69..904fd3511 100644 --- a/Tests/DependencyInjection/Fixtures/yml/session.yml +++ b/Tests/DependencyInjection/Fixtures/yml/session.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true session: storage_factory_id: session.storage.factory.native handler_id: null diff --git a/Tests/DependencyInjection/Fixtures/yml/session_cookie_secure_auto.yml b/Tests/DependencyInjection/Fixtures/yml/session_cookie_secure_auto.yml index 04825830b..783f19c13 100644 --- a/Tests/DependencyInjection/Fixtures/yml/session_cookie_secure_auto.yml +++ b/Tests/DependencyInjection/Fixtures/yml/session_cookie_secure_auto.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true session: storage_factory_id: session.storage.factory.native handler_id: ~ diff --git a/Tests/DependencyInjection/Fixtures/yml/ssi_disabled.yml b/Tests/DependencyInjection/Fixtures/yml/ssi_disabled.yml index 5a1b61021..3a8a820c7 100644 --- a/Tests/DependencyInjection/Fixtures/yml/ssi_disabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/ssi_disabled.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true ssi: enabled: false diff --git a/Tests/DependencyInjection/Fixtures/yml/translator_cache_dir_disabled.yml b/Tests/DependencyInjection/Fixtures/yml/translator_cache_dir_disabled.yml index 0d37c5562..6ad1c7330 100644 --- a/Tests/DependencyInjection/Fixtures/yml/translator_cache_dir_disabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/translator_cache_dir_disabled.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true translator: cache_dir: ~ diff --git a/Tests/DependencyInjection/Fixtures/yml/translator_fallbacks.yml b/Tests/DependencyInjection/Fixtures/yml/translator_fallbacks.yml index 7a950774b..271d78118 100644 --- a/Tests/DependencyInjection/Fixtures/yml/translator_fallbacks.yml +++ b/Tests/DependencyInjection/Fixtures/yml/translator_fallbacks.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true translator: fallbacks: [en, fr] diff --git a/Tests/DependencyInjection/Fixtures/yml/translator_globals.yml b/Tests/DependencyInjection/Fixtures/yml/translator_globals.yml index ed42b676c..fba56beb9 100644 --- a/Tests/DependencyInjection/Fixtures/yml/translator_globals.yml +++ b/Tests/DependencyInjection/Fixtures/yml/translator_globals.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true translator: globals: '%%app_name%%': 'My application' diff --git a/Tests/DependencyInjection/Fixtures/yml/translator_without_globals.yml b/Tests/DependencyInjection/Fixtures/yml/translator_without_globals.yml index dc7323868..ad6c13178 100644 --- a/Tests/DependencyInjection/Fixtures/yml/translator_without_globals.yml +++ b/Tests/DependencyInjection/Fixtures/yml/translator_without_globals.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true translator: globals: [] diff --git a/Tests/DependencyInjection/Fixtures/yml/type_info.yml b/Tests/DependencyInjection/Fixtures/yml/type_info.yml index 4d6b405b2..d60c2a6a6 100644 --- a/Tests/DependencyInjection/Fixtures/yml/type_info.yml +++ b/Tests/DependencyInjection/Fixtures/yml/type_info.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true type_info: enabled: true diff --git a/Tests/DependencyInjection/Fixtures/yml/validation_attributes.yml b/Tests/DependencyInjection/Fixtures/yml/validation_attributes.yml index 2b62f8a3e..16ae007fc 100644 --- a/Tests/DependencyInjection/Fixtures/yml/validation_attributes.yml +++ b/Tests/DependencyInjection/Fixtures/yml/validation_attributes.yml @@ -1,14 +1,8 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true secret: s3cr3t validation: enabled: true enable_attributes: true - email_validation_mode: html5 services: validator.alias: diff --git a/Tests/DependencyInjection/Fixtures/yml/validation_auto_mapping.yml b/Tests/DependencyInjection/Fixtures/yml/validation_auto_mapping.yml index 55a43886f..7686c0a49 100644 --- a/Tests/DependencyInjection/Fixtures/yml/validation_auto_mapping.yml +++ b/Tests/DependencyInjection/Fixtures/yml/validation_auto_mapping.yml @@ -1,13 +1,7 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true - property_info: { enabled: true } - validation: - email_validation_mode: html5 - auto_mapping: - 'App\': ['foo', 'bar'] - 'Symfony\': ['a', 'b'] - 'Foo\': [] + property_info: { enabled: true } + validation: + auto_mapping: + 'App\': ['foo', 'bar'] + 'Symfony\': ['a', 'b'] + 'Foo\': [] diff --git a/Tests/DependencyInjection/Fixtures/yml/validation_email_validation_mode.yml b/Tests/DependencyInjection/Fixtures/yml/validation_email_validation_mode.yml index f84d52237..22f1d2d41 100644 --- a/Tests/DependencyInjection/Fixtures/yml/validation_email_validation_mode.yml +++ b/Tests/DependencyInjection/Fixtures/yml/validation_email_validation_mode.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true validation: - email_validation_mode: html5 + email_validation_mode: html5-allow-no-tld diff --git a/Tests/DependencyInjection/Fixtures/yml/validation_mapping.yml b/Tests/DependencyInjection/Fixtures/yml/validation_mapping.yml index 4c15245da..02d198f88 100644 --- a/Tests/DependencyInjection/Fixtures/yml/validation_mapping.yml +++ b/Tests/DependencyInjection/Fixtures/yml/validation_mapping.yml @@ -1,13 +1,7 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true - validation: - email_validation_mode: html5 - mapping: - paths: - - "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/files" - - "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yml" - - "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yaml" + validation: + mapping: + paths: + - "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/files" + - "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yml" + - "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yaml" diff --git a/Tests/DependencyInjection/Fixtures/yml/validation_multiple_static_methods.yml b/Tests/DependencyInjection/Fixtures/yml/validation_multiple_static_methods.yml index e6cbbf5ac..4ff60d88b 100644 --- a/Tests/DependencyInjection/Fixtures/yml/validation_multiple_static_methods.yml +++ b/Tests/DependencyInjection/Fixtures/yml/validation_multiple_static_methods.yml @@ -1,11 +1,5 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true secret: s3cr3t validation: - enabled: true - email_validation_mode: html5 + enabled: true static_method: [loadFoo, loadBar] diff --git a/Tests/DependencyInjection/Fixtures/yml/validation_no_static_method.yml b/Tests/DependencyInjection/Fixtures/yml/validation_no_static_method.yml index 96035d358..ca5214964 100644 --- a/Tests/DependencyInjection/Fixtures/yml/validation_no_static_method.yml +++ b/Tests/DependencyInjection/Fixtures/yml/validation_no_static_method.yml @@ -1,11 +1,5 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true secret: s3cr3t validation: enabled: true - email_validation_mode: html5 static_method: false diff --git a/Tests/DependencyInjection/Fixtures/yml/validation_translation_domain.yml b/Tests/DependencyInjection/Fixtures/yml/validation_translation_domain.yml index 79c48c231..167b5fcce 100644 --- a/Tests/DependencyInjection/Fixtures/yml/validation_translation_domain.yml +++ b/Tests/DependencyInjection/Fixtures/yml/validation_translation_domain.yml @@ -1,9 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true validation: - email_validation_mode: html5 translation_domain: messages diff --git a/Tests/DependencyInjection/Fixtures/yml/web_link.yml b/Tests/DependencyInjection/Fixtures/yml/web_link.yml index c6786a344..4276aacbe 100644 --- a/Tests/DependencyInjection/Fixtures/yml/web_link.yml +++ b/Tests/DependencyInjection/Fixtures/yml/web_link.yml @@ -1,8 +1,3 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true web_link: enabled: true diff --git a/Tests/DependencyInjection/Fixtures/yml/webhook.yml b/Tests/DependencyInjection/Fixtures/yml/webhook.yml index 171f7919f..a91ba7fee 100644 --- a/Tests/DependencyInjection/Fixtures/yml/webhook.yml +++ b/Tests/DependencyInjection/Fixtures/yml/webhook.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true webhook: enabled: true http_client: diff --git a/Tests/DependencyInjection/Fixtures/yml/webhook_without_serializer.yml b/Tests/DependencyInjection/Fixtures/yml/webhook_without_serializer.yml index 63370200d..962548ffc 100644 --- a/Tests/DependencyInjection/Fixtures/yml/webhook_without_serializer.yml +++ b/Tests/DependencyInjection/Fixtures/yml/webhook_without_serializer.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true webhook: enabled: true http_client: diff --git a/Tests/DependencyInjection/Fixtures/yml/workflow_not_valid.yml b/Tests/DependencyInjection/Fixtures/yml/workflow_not_valid.yml index 08e1de448..2228751bf 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflow_not_valid.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflow_not_valid.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: my_workflow: type: state_machine diff --git a/Tests/DependencyInjection/Fixtures/yml/workflow_with_guard_expression.yml b/Tests/DependencyInjection/Fixtures/yml/workflow_with_guard_expression.yml index 2475cf41f..d3012f77a 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflow_with_guard_expression.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflow_with_guard_expression.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: article: type: workflow diff --git a/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml b/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml index 67eccb425..d5e3f7fec 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: article: type: workflow diff --git a/Tests/DependencyInjection/Fixtures/yml/workflow_with_no_events_to_dispatch.yml b/Tests/DependencyInjection/Fixtures/yml/workflow_with_no_events_to_dispatch.yml index 7cac249d8..dadc41899 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflow_with_no_events_to_dispatch.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflow_with_no_events_to_dispatch.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: my_workflow: type: state_machine diff --git a/Tests/DependencyInjection/Fixtures/yml/workflow_with_specified_events_to_dispatch.yml b/Tests/DependencyInjection/Fixtures/yml/workflow_with_specified_events_to_dispatch.yml index 850b91011..1ffd21e1b 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflow_with_specified_events_to_dispatch.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflow_with_specified_events_to_dispatch.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: my_workflow: type: state_machine diff --git a/Tests/DependencyInjection/Fixtures/yml/workflow_with_support_and_support_strategy.yml b/Tests/DependencyInjection/Fixtures/yml/workflow_with_support_and_support_strategy.yml index 781feb392..1b043700b 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflow_with_support_and_support_strategy.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflow_with_support_and_support_strategy.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: my_workflow: type: workflow diff --git a/Tests/DependencyInjection/Fixtures/yml/workflow_without_support_and_support_strategy.yml b/Tests/DependencyInjection/Fixtures/yml/workflow_without_support_and_support_strategy.yml index a91cdf62d..de74adbe5 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflow_without_support_and_support_strategy.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflow_without_support_and_support_strategy.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: my_workflow: type: workflow diff --git a/Tests/DependencyInjection/Fixtures/yml/workflows.yml b/Tests/DependencyInjection/Fixtures/yml/workflows.yml index cac5f6f23..285bee872 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflows.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflows.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: article: type: workflow diff --git a/Tests/DependencyInjection/Fixtures/yml/workflows_enabled.yml b/Tests/DependencyInjection/Fixtures/yml/workflows_enabled.yml index 7c3fbc758..2a716ff0a 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflows_enabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflows_enabled.yml @@ -1,7 +1,2 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: ~ diff --git a/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled.yml b/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled.yml index a24609130..685ea9733 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: enabled: true workflows: diff --git a/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled_named_workflows.yml b/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled_named_workflows.yml index 6e22964cb..d97e72bb3 100644 --- a/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled_named_workflows.yml +++ b/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled_named_workflows.yml @@ -1,9 +1,4 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true workflows: enabled: true workflows: diff --git a/Tests/DependencyInjection/FrameworkExtensionTestCase.php b/Tests/DependencyInjection/FrameworkExtensionTestCase.php index 87f36011c..88242901c 100644 --- a/Tests/DependencyInjection/FrameworkExtensionTestCase.php +++ b/Tests/DependencyInjection/FrameworkExtensionTestCase.php @@ -661,7 +661,7 @@ public function testRouterRequiresResourceOption() $this->expectException(InvalidConfigurationException::class); - $loader->load([['http_method_override' => false, 'handle_all_throwables' => true, 'php_errors' => ['log' => true], 'router' => true]], $container); + $loader->load([['router' => true]], $container); } public function testSession() @@ -1313,9 +1313,9 @@ public function testValidation() $calls = $container->getDefinition('validator.builder')->getMethodCalls(); - $annotations = !class_exists(FullStack::class); + $attributes = !class_exists(FullStack::class); - $this->assertCount($annotations ? 8 : 7, $calls); + $this->assertCount($attributes ? 8 : 7, $calls); $this->assertSame('setConstraintValidatorFactory', $calls[0][0]); $this->assertEquals([new Reference('validator.validator_factory')], $calls[0][1]); $this->assertSame('setGroupProviderLocator', $calls[1][0]); @@ -1327,7 +1327,7 @@ public function testValidation() $this->assertSame('addXmlMappings', $calls[4][0]); $this->assertSame([$xmlMappings], $calls[4][1]); $i = 4; - if ($annotations) { + if ($attributes) { $this->assertSame('enableAttributeMapping', $calls[++$i][0]); } $this->assertSame('addMethodMapping', $calls[++$i][0]); @@ -1343,18 +1343,6 @@ public function testValidationService() $this->assertInstanceOf(ValidatorInterface::class, $container->get('validator.alias')); } - public function testAnnotations() - { - $this->expectException(InvalidConfigurationException::class); - $this->expectExceptionMessage('Invalid configuration for path "framework.annotations": Enabling the doctrine/annotations integration is not supported anymore.'); - - $this->createContainerFromClosure(function (ContainerBuilder $container) { - $container->loadFromExtension('framework', [ - 'annotations' => true, - ]); - }); - } - public function testFileLinkFormat() { if (\ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) { @@ -1450,24 +1438,24 @@ public function testValidationNoStaticMethod() $calls = $container->getDefinition('validator.builder')->getMethodCalls(); - $annotations = !class_exists(FullStack::class); + $attributes = !class_exists(FullStack::class); - $this->assertCount($annotations ? 7 : 6, $calls); + $this->assertCount($attributes ? 7 : 6, $calls); $this->assertSame('addXmlMappings', $calls[4][0]); $i = 4; - if ($annotations) { + if ($attributes) { $this->assertSame('enableAttributeMapping', $calls[++$i][0]); } $this->assertSame('setMappingCache', $calls[++$i][0]); $this->assertEquals([new Reference('validator.mapping.cache.adapter')], $calls[$i][1]); - // no cache, no annotations, no static methods + // no cache, no attributes, no static methods } public function testEmailValidationModeIsPassedToEmailValidator() { $container = $this->createContainerFromFile('validation_email_validation_mode'); - $this->assertSame('html5', $container->getDefinition('validator.email')->getArgument(0)); + $this->assertSame('html5-allow-no-tld', $container->getDefinition('validator.email')->getArgument(0)); } public function testValidationTranslationDomain() @@ -1723,19 +1711,19 @@ public function testSerializerCacheActivated() $this->assertEquals(new Reference('serializer.mapping.cache.symfony'), $cache); } - public function testSerializerCacheUsedWithoutAnnotationsAndMappingFiles() + public function testSerializerCacheUsedWithoutAttributesAndMappingFiles() { - $container = $this->createContainerFromFile('serializer_mapping_without_annotations', ['kernel.debug' => true, 'kernel.container_class' => __CLASS__]); + $container = $this->createContainerFromFile('serializer_mapping_without_attributes', ['kernel.debug' => true, 'kernel.container_class' => __CLASS__]); $this->assertFalse($container->hasDefinition('serializer.mapping.cache_class_metadata_factory')); } - public function testSerializerCacheUsedWithoutAnnotationsAndMappingFilesNoDebug() + public function testSerializerCacheUsedWithoutAttributesAndMappingFilesNoDebug() { - $container = $this->createContainerFromFile('serializer_mapping_without_annotations', ['kernel.debug' => false, 'kernel.container_class' => __CLASS__]); + $container = $this->createContainerFromFile('serializer_mapping_without_attributes', ['kernel.debug' => false, 'kernel.container_class' => __CLASS__]); $this->assertTrue($container->hasDefinition('serializer.mapping.cache_class_metadata_factory')); } - public function testSerializerCacheNotActivatedWithAnnotations() + public function testSerializerCacheNotActivatedWithAttributes() { $container = $this->createContainerFromFile('serializer_mapping', ['kernel.debug' => true, 'kernel.container_class' => __CLASS__]); $this->assertFalse($container->hasDefinition('serializer.mapping.cache_class_metadata_factory')); @@ -1743,7 +1731,7 @@ public function testSerializerCacheNotActivatedWithAnnotations() public function testSerializerMapping() { - $container = $this->createContainerFromFile('serializer_mapping_without_annotations', ['kernel.bundles_metadata' => ['TestBundle' => ['namespace' => 'Symfony\\Bundle\\FrameworkBundle\\Tests', 'path' => __DIR__.'/Fixtures/TestBundle']]]); + $container = $this->createContainerFromFile('serializer_mapping_without_attributes', ['kernel.bundles_metadata' => ['TestBundle' => ['namespace' => 'Symfony\\Bundle\\FrameworkBundle\\Tests', 'path' => __DIR__.'/Fixtures/TestBundle']]]); $projectDir = $container->getParameter('kernel.project_dir'); $configDir = __DIR__.'/Fixtures/TestBundle/Resources/config'; $expectedLoaders = [ @@ -2012,11 +2000,11 @@ public function testCachePoolInvalidateTagsCommandRegistered() public function testRemovesResourceCheckerConfigCacheFactoryArgumentOnlyIfNoDebug() { $container = $this->createContainer(['kernel.debug' => true]); - (new FrameworkExtension())->load([['annotations' => false, 'http_method_override' => false, 'handle_all_throwables' => true, 'php_errors' => ['log' => true]]], $container); + (new FrameworkExtension())->load([], $container); $this->assertCount(1, $container->getDefinition('config_cache_factory')->getArguments()); $container = $this->createContainer(['kernel.debug' => false]); - (new FrameworkExtension())->load([['annotations' => false, 'http_method_override' => false, 'handle_all_throwables' => true, 'php_errors' => ['log' => true]]], $container); + (new FrameworkExtension())->load([], $container); $this->assertSame([], $container->getDefinition('config_cache_factory')->getArguments()); } @@ -2047,21 +2035,21 @@ public function testSessionCookieSecureAuto() public function testRobotsTagListenerIsRegisteredInDebugMode() { $container = $this->createContainer(['kernel.debug' => true]); - (new FrameworkExtension())->load([['annotations' => false, 'http_method_override' => false, 'handle_all_throwables' => true, 'php_errors' => ['log' => true]]], $container); + (new FrameworkExtension())->load([], $container); $this->assertTrue($container->has('disallow_search_engine_index_response_listener'), 'DisallowRobotsIndexingListener should be registered'); $definition = $container->getDefinition('disallow_search_engine_index_response_listener'); $this->assertTrue($definition->hasTag('kernel.event_subscriber'), 'DisallowRobotsIndexingListener should have the correct tag'); $container = $this->createContainer(['kernel.debug' => true]); - (new FrameworkExtension())->load([['annotations' => false, 'http_method_override' => false, 'handle_all_throwables' => true, 'php_errors' => ['log' => true], 'disallow_search_engine_index' => false]], $container); + (new FrameworkExtension())->load([['disallow_search_engine_index' => false]], $container); $this->assertFalse( $container->has('disallow_search_engine_index_response_listener'), 'DisallowRobotsIndexingListener should not be registered when explicitly disabled' ); $container = $this->createContainer(['kernel.debug' => false]); - (new FrameworkExtension())->load([['annotations' => false, 'http_method_override' => false, 'handle_all_throwables' => true, 'php_errors' => ['log' => true]]], $container); + (new FrameworkExtension())->load([], $container); $this->assertFalse($container->has('disallow_search_engine_index_response_listener'), 'DisallowRobotsIndexingListener should NOT be registered'); } diff --git a/Tests/DependencyInjection/PhpFrameworkExtensionTest.php b/Tests/DependencyInjection/PhpFrameworkExtensionTest.php index c4f67c2f1..86e3af711 100644 --- a/Tests/DependencyInjection/PhpFrameworkExtensionTest.php +++ b/Tests/DependencyInjection/PhpFrameworkExtensionTest.php @@ -38,10 +38,6 @@ public function testAssetsCannotHavePathAndUrl() $this->expectException(\LogicException::class); $this->createContainerFromClosure(function ($container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'assets' => [ 'base_urls' => 'http://cdn.example.com', 'base_path' => '/foo', @@ -55,10 +51,6 @@ public function testAssetPackageCannotHavePathAndUrl() $this->expectException(\LogicException::class); $this->createContainerFromClosure(function ($container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'assets' => [ 'packages' => [ 'impossible' => [ @@ -107,10 +99,6 @@ public function testWorkflowValidationStateMachine() $this->expectExceptionMessage('A transition from a place/state must have an unique name. Multiple transitions named "a_to_b" from place/state "a" were found on StateMachine "article".'); $this->createContainerFromClosure(function (ContainerBuilder $container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'article' => [ 'type' => 'state_machine', @@ -144,10 +132,6 @@ public function testWorkflowValidationCustomBroken(string $class, string $messag $this->expectExceptionMessage($message); $this->createContainerFromClosure(function ($container) use ($class) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'article' => [ 'type' => 'state_machine', @@ -186,10 +170,6 @@ public function testWorkflowDefaultMarkingStoreDefinition() { $container = $this->createContainerFromClosure(function ($container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'workflows' => [ 'workflow_a' => [ 'type' => 'state_machine', @@ -247,10 +227,6 @@ public function testRateLimiterLockFactoryWithLockDisabled() try { $this->createContainerFromClosure(function (ContainerBuilder $container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'lock' => false, 'rate_limiter' => [ 'with_lock' => ['policy' => 'fixed_window', 'limit' => 10, 'interval' => '1 hour', 'lock_factory' => 'lock.factory'], @@ -268,10 +244,6 @@ public function testRateLimiterAutoLockFactoryWithLockEnabled() { $container = $this->createContainerFromClosure(function (ContainerBuilder $container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'lock' => true, 'rate_limiter' => [ 'with_lock' => ['policy' => 'fixed_window', 'limit' => 10, 'interval' => '1 hour'], @@ -287,11 +259,7 @@ public function testRateLimiterAutoLockFactoryWithLockDisabled() { $container = $this->createContainerFromClosure(function (ContainerBuilder $container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, 'lock' => false, - 'php_errors' => ['log' => true], 'rate_limiter' => [ 'without_lock' => ['policy' => 'fixed_window', 'limit' => 10, 'interval' => '1 hour'], ], @@ -308,11 +276,7 @@ public function testRateLimiterDisableLockFactory() { $container = $this->createContainerFromClosure(function (ContainerBuilder $container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, 'lock' => true, - 'php_errors' => ['log' => true], 'rate_limiter' => [ 'without_lock' => ['policy' => 'fixed_window', 'limit' => 10, 'interval' => '1 hour', 'lock_factory' => null], ], @@ -329,10 +293,6 @@ public function testRateLimiterIsTagged() { $container = $this->createContainerFromClosure(function (ContainerBuilder $container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'lock' => true, 'rate_limiter' => [ 'first' => ['policy' => 'fixed_window', 'limit' => 10, 'interval' => '1 hour'], @@ -353,10 +313,6 @@ public function testRateLimiterCompoundPolicy() $container = $this->createContainerFromClosure(function (ContainerBuilder $container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'lock' => true, 'rate_limiter' => [ 'first' => ['policy' => 'fixed_window', 'limit' => 10, 'interval' => '1 hour'], @@ -400,10 +356,6 @@ public function testRateLimiterCompoundPolicyNoLimiters() $this->expectException(\LogicException::class); $this->createContainerFromClosure(function ($container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'rate_limiter' => [ 'compound' => ['policy' => 'compound'], ], @@ -420,10 +372,6 @@ public function testRateLimiterCompoundPolicyInvalidLimiters() $this->expectException(\LogicException::class); $this->createContainerFromClosure(function ($container) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'rate_limiter' => [ 'compound' => ['policy' => 'compound', 'limiters' => ['invalid1', 'invalid2']], ], @@ -440,10 +388,6 @@ public function testValidatorEmailValidationMode(string $mode) $this->createContainerFromClosure(function (ContainerBuilder $container) use ($mode) { $container->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'validation' => [ 'email_validation_mode' => $mode, ], diff --git a/Tests/Functional/app/config/framework.yml b/Tests/Functional/app/config/framework.yml index ac051614b..7c0a1b2bc 100644 --- a/Tests/Functional/app/config/framework.yml +++ b/Tests/Functional/app/config/framework.yml @@ -1,10 +1,7 @@ framework: - annotations: false - http_method_override: false - handle_all_throwables: true secret: test - router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml", utf8: true } - validation: { enabled: true, enable_attributes: true, email_validation_mode: html5 } + router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml" } + validation: { enabled: true, enable_attributes: true } csrf_protection: true form: enabled: true @@ -16,8 +13,6 @@ framework: storage_factory_id: session.storage.factory.mock_file cookie_secure: auto cookie_samesite: lax - php_errors: - log: true profiler: collect_serializer_data: true diff --git a/Tests/Kernel/ConcreteMicroKernel.php b/Tests/Kernel/ConcreteMicroKernel.php index a69618099..901d814b9 100644 --- a/Tests/Kernel/ConcreteMicroKernel.php +++ b/Tests/Kernel/ConcreteMicroKernel.php @@ -75,12 +75,7 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load { $c->register('logger', NullLogger::class); $c->loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], 'secret' => '$ecret', - 'router' => ['utf8' => true], ]); $c->setParameter('halloween', 'Have a great day!'); diff --git a/Tests/Kernel/MicroKernelTraitTest.php b/Tests/Kernel/MicroKernelTraitTest.php index 159dd21eb..f936e2c5a 100644 --- a/Tests/Kernel/MicroKernelTraitTest.php +++ b/Tests/Kernel/MicroKernelTraitTest.php @@ -122,13 +122,7 @@ public function helloAction(): Response protected function configureContainer(ContainerConfigurator $c): void { - $c->extension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'router' => ['utf8' => true], - ]); + $c->extension('framework', []); $c->services()->set('logger', NullLogger::class); } diff --git a/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php b/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php index 6f7c84d8b..d791a70de 100644 --- a/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php +++ b/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php @@ -100,12 +100,6 @@ protected function configureContainer(ContainerConfigurator $c): void ->factory([$this, 'createHalloween']) ->arg('$halloween', '%halloween%'); - $c->extension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'router' => ['utf8' => true], - ]); + $c->extension('framework', []); } } From 9d62b2811d38929d10a39d6caeb7d296a4f1ac11 Mon Sep 17 00:00:00 2001 From: corradogrimoldi <148071405+corradogrimoldi@users.noreply.github.com> Date: Sun, 20 Jul 2025 15:53:07 +0200 Subject: [PATCH 39/59] [Validator] Remove exclusion of Constraints/Validator/ExpressionLanguageSyntaxValidator --- Resources/config/validator.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Resources/config/validator.php b/Resources/config/validator.php index 535b42edc..0e7e4493d 100644 --- a/Resources/config/validator.php +++ b/Resources/config/validator.php @@ -73,7 +73,6 @@ ]) ->load('Symfony\Component\Validator\Constraints\\', $validatorsDir.'/*Validator.php') - ->exclude($validatorsDir.'/ExpressionLanguageSyntaxValidator.php') ->abstract() ->tag('container.excluded') ->tag('validator.constraint_validator') From d91f522286b882da0f180410da4f29d16c6b340d Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 21 Jul 2025 14:12:39 +0200 Subject: [PATCH 40/59] [FrameworkBundle] Remove TranslationUpdateCommand --- CHANGELOG.md | 1 + Command/TranslationUpdateCommand.php | 34 ------------------- DependencyInjection/Configuration.php | 2 +- DependencyInjection/FrameworkExtension.php | 6 +--- .../DependencyInjection/ConfigurationTest.php | 3 +- 5 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 Command/TranslationUpdateCommand.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f392e35b..6fd0f1b1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ CHANGELOG * Remove `session.sid_length` and `session.sid_bits_per_character` config options * Remove the `router.cache_dir` config option * Remove the `validation.cache` option + * Remove `TranslationUpdateCommand` in favor of `TranslationExtractCommand` 7.4 --- diff --git a/Command/TranslationUpdateCommand.php b/Command/TranslationUpdateCommand.php deleted file mode 100644 index de5aa9389..000000000 --- a/Command/TranslationUpdateCommand.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Translation\Extractor\ExtractorInterface; -use Symfony\Component\Translation\Reader\TranslationReaderInterface; -use Symfony\Component\Translation\Writer\TranslationWriterInterface; - -class TranslationUpdateCommand extends TranslationExtractCommand -{ - public function __construct( - private TranslationWriterInterface $writer, - private TranslationReaderInterface $reader, - private ExtractorInterface $extractor, - private string $defaultLocale, - private ?string $defaultTransPath = null, - private ?string $defaultViewsPath = null, - private array $transPaths = [], - private array $codePaths = [], - private array $enabledLocales = [], - ) { - trigger_deprecation('symfony/framework-bundle', '7.3', 'The "%s" class is deprecated, use "%s" instead.', __CLASS__, TranslationExtractCommand::class); - parent::__construct($writer, $reader, $extractor, $defaultLocale, $defaultTransPath, $defaultViewsPath, $transPaths, $codePaths, $enabledLocales); - } -} diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index d405004f9..419d9b206 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -354,7 +354,7 @@ private function addProfilerSection(ArrayNodeDefinition $rootNode): void ->booleanNode('only_exceptions')->defaultFalse()->end() ->booleanNode('only_main_requests')->defaultFalse()->end() ->scalarNode('dsn')->defaultValue('file:%kernel.cache_dir%/profiler')->end() - ->booleanNode('collect_serializer_data')->info('Enables the serializer data collector and profiler panel.')->defaultFalse()->end() + ->enumNode('collect_serializer_data')->values([true])->defaultTrue()->end() // to be @deprecated in Symfony 8.1 ->end() ->end() ->end() diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index 9a3798cca..0f47b4fe4 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -972,11 +972,7 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $ $loader->load('notifier_debug.php'); } - if (false === $config['collect_serializer_data']) { - trigger_deprecation('symfony/framework-bundle', '7.3', 'Setting the "framework.profiler.collect_serializer_data" config option to "false" is deprecated.'); - } - - if ($this->isInitializedConfigEnabled('serializer') && $config['collect_serializer_data']) { + if ($this->isInitializedConfigEnabled('serializer')) { $loader->load('serializer_debug.php'); } diff --git a/Tests/DependencyInjection/ConfigurationTest.php b/Tests/DependencyInjection/ConfigurationTest.php index 3d69cee75..91e849f26 100644 --- a/Tests/DependencyInjection/ConfigurationTest.php +++ b/Tests/DependencyInjection/ConfigurationTest.php @@ -25,7 +25,6 @@ use Symfony\Component\JsonStreamer\JsonStreamWriter; use Symfony\Component\Lock\Store\SemaphoreStore; use Symfony\Component\Mailer\Mailer; -use Symfony\Component\Messenger\MessageBusInterface; use Symfony\Component\Notifier\Notifier; use Symfony\Component\RateLimiter\Policy\TokenBucketLimiter; use Symfony\Component\RemoteEvent\RemoteEvent; @@ -688,7 +687,7 @@ protected static function getBundleDefaultConfig() 'dsn' => 'file:%kernel.cache_dir%/profiler', 'collect' => true, 'collect_parameter' => null, - 'collect_serializer_data' => false, + 'collect_serializer_data' => true, ], 'translator' => [ 'enabled' => !class_exists(FullStack::class), From 603431e08124666e0322fffe013148302c259489 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 22 Jul 2025 11:57:33 +0200 Subject: [PATCH 41/59] [FrameworkBundle] Fix Configuration --- DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index b69056fc3..45a780c73 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -953,7 +953,7 @@ private function addAssetMapperSection(ArrayNodeDefinition $rootNode, callable $ ->info('Array of extensions to compress. The entire list must be provided, no merging occurs.') ->prototype('scalar')->end() ->performNoDeepMerging() - ->defaultValue(CompressorInterface::DEFAULT_EXTENSIONS) + ->defaultValue(interface_exists(CompressorInterface::class) ? CompressorInterface::DEFAULT_EXTENSIONS : []) ->end() ->end() ->end() From b0c570d08de0d5a67efb7064968aac859b3075e7 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 24 Jul 2025 14:45:41 +0200 Subject: [PATCH 42/59] Fix typos --- Tests/Functional/ContainerDebugCommandTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/Functional/ContainerDebugCommandTest.php b/Tests/Functional/ContainerDebugCommandTest.php index d21d4d113..9b70c7bb3 100644 --- a/Tests/Functional/ContainerDebugCommandTest.php +++ b/Tests/Functional/ContainerDebugCommandTest.php @@ -214,10 +214,10 @@ public function testGetDeprecation() file_put_contents($path, serialize([[ 'type' => 16384, 'message' => 'The "Symfony\Bundle\FrameworkBundle\Controller\Controller" class is deprecated since Symfony 4.2, use Symfony\Bundle\FrameworkBundle\Controller\AbstractController instead.', - 'file' => '/home/hamza/projet/contrib/sf/vendor/symfony/framework-bundle/Controller/Controller.php', + 'file' => '/home/hamza/project/contrib/sf/vendor/symfony/framework-bundle/Controller/Controller.php', 'line' => 17, 'trace' => [[ - 'file' => '/home/hamza/projet/contrib/sf/src/Controller/DefaultController.php', + 'file' => '/home/hamza/project/contrib/sf/src/Controller/DefaultController.php', 'line' => 9, 'function' => 'spl_autoload_call', ]], @@ -233,7 +233,7 @@ public function testGetDeprecation() $tester->assertCommandIsSuccessful(); $this->assertStringContainsString('Symfony\Bundle\FrameworkBundle\Controller\Controller', $tester->getDisplay()); - $this->assertStringContainsString('/home/hamza/projet/contrib/sf/vendor/symfony/framework-bundle/Controller/Controller.php', $tester->getDisplay()); + $this->assertStringContainsString('/home/hamza/project/contrib/sf/vendor/symfony/framework-bundle/Controller/Controller.php', $tester->getDisplay()); } public function testGetDeprecationNone() From e5fcc444ed047dd2de86f78d5a40513add19a860 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Mon, 16 Jun 2025 16:37:14 +0200 Subject: [PATCH 43/59] [Validator] Add `min` and `max` in both error messages of `LengthValidator` --- Tests/Functional/ApiAttributesTest.php | 9 +++++++++ composer.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Tests/Functional/ApiAttributesTest.php b/Tests/Functional/ApiAttributesTest.php index 0dcfeaeba..8831fcd64 100644 --- a/Tests/Functional/ApiAttributesTest.php +++ b/Tests/Functional/ApiAttributesTest.php @@ -405,6 +405,7 @@ public static function mapRequestPayloadProvider(): iterable "parameters": { "{{ value }}": "\"\"", "{{ limit }}": "10", + "{{ min }}": "10", "{{ value_length }}": "0" }, "type": "urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45" @@ -439,6 +440,7 @@ public static function mapRequestPayloadProvider(): iterable "H" 10 + 10 1 urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45 @@ -476,6 +478,7 @@ public static function mapRequestPayloadProvider(): iterable "parameters": { "{{ value }}": "\"\"", "{{ limit }}": "10", + "{{ min }}": "10", "{{ value_length }}": "0" }, "type": "urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45" @@ -646,6 +649,7 @@ public static function mapRequestPayloadProvider(): iterable "parameters": { "{{ value }}": "\"\"", "{{ limit }}": "10", + "{{ min }}": "10", "{{ value_length }}": "0" }, "type": "urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45" @@ -680,6 +684,7 @@ public static function mapRequestPayloadProvider(): iterable "H" 10 + 10 1 urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45 @@ -717,6 +722,7 @@ public static function mapRequestPayloadProvider(): iterable "parameters": { "{{ value }}": "\"\"", "{{ limit }}": "10", + "{{ min }}": "10", "{{ value_length }}": "0" }, "type": "urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45" @@ -892,6 +898,7 @@ public static function mapRequestPayloadProvider(): iterable "parameters": { "{{ value }}": "\"\"", "{{ limit }}": "10", + "{{ min }}": "10", "{{ value_length }}": "0" }, "type": "urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45" @@ -926,6 +933,7 @@ public static function mapRequestPayloadProvider(): iterable "H" 10 + 10 1 urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45 @@ -963,6 +971,7 @@ public static function mapRequestPayloadProvider(): iterable "parameters": { "{{ value }}": "\"\"", "{{ limit }}": "10", + "{{ min }}": "10", "{{ value_length }}": "0" }, "type": "urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45" diff --git a/composer.json b/composer.json index ff3f8bd2e..0c3dfd4c4 100644 --- a/composer.json +++ b/composer.json @@ -67,7 +67,7 @@ "symfony/translation": "^7.3|^8.0", "symfony/twig-bundle": "^6.4|^7.0|^8.0", "symfony/type-info": "^7.1.8|^8.0", - "symfony/validator": "^6.4|^7.0|^8.0", + "symfony/validator": "^7.4|^8.0", "symfony/workflow": "^7.3|^8.0", "symfony/yaml": "^6.4|^7.0|^8.0", "symfony/property-info": "^6.4|^7.0|^8.0", From 159c766c65aacccbe55c8d5639f783a84ff0d335 Mon Sep 17 00:00:00 2001 From: Gary PEGEOT Date: Wed, 23 Jul 2025 11:32:32 +0200 Subject: [PATCH 44/59] [DependencyInjection] Update `ResolveClassPass` to check class existence --- .../TestServiceContainerRefPassesTest.php | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php b/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php index fc69d5bd1..3a6824e4f 100644 --- a/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php +++ b/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php @@ -33,44 +33,44 @@ public function testProcess() $container->addCompilerPass(new TestServiceContainerWeakRefPass(), PassConfig::TYPE_BEFORE_REMOVING, -32); $container->addCompilerPass(new TestServiceContainerRealRefPass(), PassConfig::TYPE_AFTER_REMOVING); - $container->register('Test\public_service') + $container->register('test.public_service', 'stdClass') ->setPublic(true) - ->addArgument(new Reference('Test\private_used_shared_service')) - ->addArgument(new Reference('Test\private_used_non_shared_service')) - ->addArgument(new Reference('Test\soon_private_service')) + ->addArgument(new Reference('test.private_used_shared_service')) + ->addArgument(new Reference('test.private_used_non_shared_service')) + ->addArgument(new Reference('test.soon_private_service')) ; - $container->register('Test\soon_private_service') + $container->register('test.soon_private_service', 'stdClass') ->setPublic(true) ->addTag('container.private', ['package' => 'foo/bar', 'version' => '1.42']) ; - $container->register('Test\soon_private_service_decorated') + $container->register('test.soon_private_service_decorated', 'stdClass') ->setPublic(true) ->addTag('container.private', ['package' => 'foo/bar', 'version' => '1.42']) ; - $container->register('Test\soon_private_service_decorator') - ->setDecoratedService('Test\soon_private_service_decorated') - ->setArguments(['Test\soon_private_service_decorator.inner']); + $container->register('test.soon_private_service_decorator', 'stdClass') + ->setDecoratedService('test.soon_private_service_decorated') + ->setArguments(['test.soon_private_service_decorator.inner']); - $container->register('Test\private_used_shared_service'); - $container->register('Test\private_unused_shared_service'); - $container->register('Test\private_used_non_shared_service')->setShared(false); - $container->register('Test\private_unused_non_shared_service')->setShared(false); + $container->register('test.private_used_shared_service', 'stdClass'); + $container->register('test.private_unused_shared_service', 'stdClass'); + $container->register('test.private_used_non_shared_service', 'stdClass')->setShared(false); + $container->register('test.private_unused_non_shared_service', 'stdClass')->setShared(false); $container->compile(); $expected = [ - 'Test\private_used_shared_service' => new ServiceClosureArgument(new Reference('Test\private_used_shared_service')), - 'Test\private_used_non_shared_service' => new ServiceClosureArgument(new Reference('Test\private_used_non_shared_service')), - 'Test\soon_private_service' => new ServiceClosureArgument(new Reference('.container.private.Test\soon_private_service')), - 'Test\soon_private_service_decorator' => new ServiceClosureArgument(new Reference('.container.private.Test\soon_private_service_decorated')), - 'Test\soon_private_service_decorated' => new ServiceClosureArgument(new Reference('.container.private.Test\soon_private_service_decorated')), + 'test.private_used_shared_service' => new ServiceClosureArgument(new Reference('test.private_used_shared_service')), + 'test.private_used_non_shared_service' => new ServiceClosureArgument(new Reference('test.private_used_non_shared_service')), + 'test.soon_private_service' => new ServiceClosureArgument(new Reference('.container.private.test.soon_private_service')), + 'test.soon_private_service_decorator' => new ServiceClosureArgument(new Reference('.container.private.test.soon_private_service_decorated')), + 'test.soon_private_service_decorated' => new ServiceClosureArgument(new Reference('.container.private.test.soon_private_service_decorated')), ]; $privateServices = $container->getDefinition('test.private_services_locator')->getArgument(0); unset($privateServices[\Symfony\Component\DependencyInjection\ContainerInterface::class], $privateServices[ContainerInterface::class]); $this->assertEquals($expected, $privateServices); - $this->assertFalse($container->getDefinition('Test\private_used_non_shared_service')->isShared()); + $this->assertFalse($container->getDefinition('test.private_used_non_shared_service')->isShared()); } } From 335fabe41ff7c2746d78be9b2df2c56faac36d28 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 9 Oct 2024 11:06:51 +0200 Subject: [PATCH 45/59] run tests using PHPUnit 11.5 --- .../Descriptor/AbstractDescriptorTestCase.php | 20 +++++++++---------- Tests/Functional/PropertyInfoTest.php | 7 ++++--- composer.json | 8 +++++++- phpunit.xml.dist | 11 +++++++--- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/Tests/Console/Descriptor/AbstractDescriptorTestCase.php b/Tests/Console/Descriptor/AbstractDescriptorTestCase.php index eb18fbcc7..d09fa8e4f 100644 --- a/Tests/Console/Descriptor/AbstractDescriptorTestCase.php +++ b/Tests/Console/Descriptor/AbstractDescriptorTestCase.php @@ -11,6 +11,9 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\FooUnitEnum; use Symfony\Component\Console\Input\ArrayInput; @@ -185,12 +188,11 @@ public static function getDescribeContainerDefinitionWhichIsAnAliasTestData(): a } /** - * The legacy group must be kept as deprecations will always be raised. - * - * @group legacy - * - * @dataProvider getDescribeContainerParameterTestData + * The #[IgnoreDeprecation] attribute must be kept as deprecations will always be raised. */ + #[IgnoreDeprecations] + #[Group('legacy')] + #[DataProvider('getDescribeContainerParameterTestData')] public function testDescribeContainerParameter($parameter, $expectedDescription, array $options) { $this->assertDescription($expectedDescription, $parameter, $options); @@ -235,11 +237,9 @@ public static function getDescribeCallableTestData(): array return static::getDescriptionTestData(ObjectsProvider::getCallables()); } - /** - * @group legacy - * - * @dataProvider getDescribeDeprecatedCallableTestData - */ + #[IgnoreDeprecations] + #[Group('legacy')] + #[DataProvider('getDescribeDeprecatedCallableTestData')] public function testDescribeDeprecatedCallable($callable, $expectedDescription) { $this->assertDescription($expectedDescription, $callable); diff --git a/Tests/Functional/PropertyInfoTest.php b/Tests/Functional/PropertyInfoTest.php index 18cd61b08..128932311 100644 --- a/Tests/Functional/PropertyInfoTest.php +++ b/Tests/Functional/PropertyInfoTest.php @@ -11,6 +11,8 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; use Symfony\Component\PropertyInfo\Type as LegacyType; use Symfony\Component\TypeInfo\Type; @@ -29,9 +31,8 @@ public function testPhpDocPriority() $this->assertEquals(Type::list(Type::int()), $propertyInfo->getType(Dummy::class, 'codes')); } - /** - * @group legacy - */ + #[IgnoreDeprecations] + #[Group('legacy')] public function testPhpDocPriorityLegacy() { static::bootKernel(['test_case' => 'Serializer']); diff --git a/composer.json b/composer.json index 0c3dfd4c4..3f7a22462 100644 --- a/composer.json +++ b/composer.json @@ -58,6 +58,7 @@ "symfony/object-mapper": "^7.3|^8.0", "symfony/process": "^6.4|^7.0|^8.0", "symfony/rate-limiter": "^6.4|^7.0|^8.0", + "symfony/runtime": "^6.4.13|^7.1.6|^8.0", "symfony/scheduler": "^6.4.4|^7.0.4|^8.0", "symfony/security-bundle": "^6.4|^7.0|^8.0", "symfony/semaphore": "^6.4|^7.0|^8.0", @@ -116,5 +117,10 @@ "/Tests/" ] }, - "minimum-stability": "dev" + "minimum-stability": "dev", + "config": { + "allow-plugins": { + "symfony/runtime": false + } + } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d00ee0f1e..90e1a751e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,11 @@ @@ -20,7 +21,7 @@ - + ./ @@ -29,5 +30,9 @@ ./Tests ./vendor - + + + + + From cf857df724f6f83bcd6e3da8349e0a6e7aa1bbfc Mon Sep 17 00:00:00 2001 From: matlec Date: Sat, 2 Aug 2025 18:55:44 +0200 Subject: [PATCH 46/59] [FrameworkBundle] Escape parameters when serializing a ContainerBuilder --- .../Compiler/ContainerBuilderDebugDumpPass.php | 16 +++++++++++++++- Tests/Functional/ContainerLintCommandTest.php | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php b/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php index b3a036c37..ff9020796 100644 --- a/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php +++ b/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php @@ -54,7 +54,7 @@ public function process(ContainerBuilder $container): void if (($bag = $container->getParameterBag()) instanceof EnvPlaceholderParameterBag) { (new ResolveEnvPlaceholdersPass(null))->process($dump); - $dump->__construct(new EnvPlaceholderParameterBag($container->resolveEnvPlaceholders($bag->all()))); + $dump->__construct(new EnvPlaceholderParameterBag($container->resolveEnvPlaceholders($this->escapeParameters($bag->all())))); } $fs = new Filesystem(); @@ -68,4 +68,18 @@ public function process(ContainerBuilder $container): void } } } + + private function escapeParameters(array $parameters): array + { + $params = []; + foreach ($parameters as $k => $v) { + $params[$k] = match (true) { + \is_array($v) => $this->escapeParameters($v), + \is_string($v) => str_replace('%', '%%', $v), + default => $v, + }; + } + + return $params; + } } diff --git a/Tests/Functional/ContainerLintCommandTest.php b/Tests/Functional/ContainerLintCommandTest.php index f0b6b4bd5..106f6b776 100644 --- a/Tests/Functional/ContainerLintCommandTest.php +++ b/Tests/Functional/ContainerLintCommandTest.php @@ -44,6 +44,7 @@ public static function containerLintProvider(): array { return [ ['escaped_percent.yml', false, 0, 'The container was linted successfully'], + ['escaped_percent.yml', true, 0, 'The container was linted successfully'], ['missing_env_var.yml', false, 0, 'The container was linted successfully'], ['missing_env_var.yml', true, 1, 'Environment variable not found: "BAR"'], ]; From 515d9936bd6a97ffba71775471c7aab83b793d04 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 3 Aug 2025 21:21:25 +0200 Subject: [PATCH 47/59] fix low deps tests --- Tests/Functional/ContainerLintCommandTest.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Tests/Functional/ContainerLintCommandTest.php b/Tests/Functional/ContainerLintCommandTest.php index 106f6b776..a4af3649a 100644 --- a/Tests/Functional/ContainerLintCommandTest.php +++ b/Tests/Functional/ContainerLintCommandTest.php @@ -13,6 +13,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\DependencyInjection\Argument\ArgumentTrait; /** * @group functional @@ -40,14 +41,16 @@ public function testLintContainer(string $configFile, bool $resolveEnvVars, int $this->assertStringContainsString($expectedOutput, $tester->getDisplay()); } - public static function containerLintProvider(): array + public static function containerLintProvider(): iterable { - return [ - ['escaped_percent.yml', false, 0, 'The container was linted successfully'], - ['escaped_percent.yml', true, 0, 'The container was linted successfully'], - ['missing_env_var.yml', false, 0, 'The container was linted successfully'], - ['missing_env_var.yml', true, 1, 'Environment variable not found: "BAR"'], - ]; + yield ['escaped_percent.yml', false, 0, 'The container was linted successfully']; + + if (trait_exists(ArgumentTrait::class)) { + yield ['escaped_percent.yml', true, 0, 'The container was linted successfully']; + } + + yield ['missing_env_var.yml', false, 0, 'The container was linted successfully']; + yield ['missing_env_var.yml', true, 1, 'Environment variable not found: "BAR"']; } private function createCommandTester(): CommandTester From 7095ef54a5a257e943025dbec5e3bb3506e2f388 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 31 Jul 2025 14:36:46 +0200 Subject: [PATCH 48/59] replace PHPUnit annotations with attributes --- .../CacheWarmer/SerializerCacheWarmerTest.php | 13 +-- Tests/Command/CachePoolClearCommandTest.php | 5 +- Tests/Command/CachePoolDeleteCommandTest.php | 5 +- .../EventDispatcherDebugCommandTest.php | 5 +- Tests/Command/SecretsListCommandTest.php | 5 +- Tests/Command/SecretsRemoveCommandTest.php | 5 +- Tests/Command/SecretsRevealCommandTest.php | 9 +- Tests/Command/SecretsSetCommandTest.php | 5 +- Tests/Command/TranslationDebugCommandTest.php | 5 +- ...ranslationExtractCommandCompletionTest.php | 5 +- .../Command/TranslationExtractCommandTest.php | 5 +- Tests/Command/WorkflowDumpCommandTest.php | 5 +- .../Descriptor/AbstractDescriptorTestCase.php | 34 +++--- .../Console/Descriptor/TextDescriptorTest.php | 3 +- Tests/Controller/AbstractControllerTest.php | 10 +- Tests/Controller/RedirectControllerTest.php | 13 +-- .../Compiler/ProfilerPassTest.php | 5 +- .../DependencyInjection/ConfigurationTest.php | 25 ++--- .../FrameworkExtensionTestCase.php | 13 +-- .../PhpFrameworkExtensionTest.php | 9 +- Tests/Fixtures/Descriptor/route_1_link.txt | 2 +- Tests/Fixtures/Descriptor/route_2_link.txt | 2 +- .../AbstractAttributeRoutingTestCase.php | 5 +- Tests/Functional/ApiAttributesTest.php | 11 +- .../Functional/CachePoolClearCommandTest.php | 5 +- Tests/Functional/CachePoolListCommandTest.php | 5 +- Tests/Functional/CachePoolsTest.php | 21 ++-- Tests/Functional/ConfigDebugCommandTest.php | 101 ++++++------------ .../ConfigDumpReferenceCommandTest.php | 47 +++----- .../Functional/ContainerDebugCommandTest.php | 14 +-- Tests/Functional/ContainerLintCommandTest.php | 10 +- .../Functional/DebugAutowiringCommandTest.php | 10 +- Tests/Functional/FragmentTest.php | 6 +- Tests/Functional/NotificationTest.php | 7 +- Tests/Functional/ProfilerTest.php | 10 +- Tests/Functional/RouterDebugCommandTest.php | 21 ++-- .../RoutingConditionServiceTest.php | 6 +- Tests/Functional/SecurityTest.php | 5 +- Tests/Functional/SessionTest.php | 15 ++- Tests/Functional/SluggerLocaleAwareTest.php | 10 +- Tests/Functional/TestServiceContainerTest.php | 10 +- .../TranslationDebugCommandTest.php | 5 +- Tests/Routing/RouterTest.php | 13 +-- Tests/Secrets/SodiumVaultTest.php | 5 +- Tests/Test/WebTestCaseTest.php | 17 +-- Tests/Translation/TranslatorTest.php | 3 +- 46 files changed, 208 insertions(+), 342 deletions(-) diff --git a/Tests/CacheWarmer/SerializerCacheWarmerTest.php b/Tests/CacheWarmer/SerializerCacheWarmerTest.php index f17aad0e3..5c19d2a3f 100644 --- a/Tests/CacheWarmer/SerializerCacheWarmerTest.php +++ b/Tests/CacheWarmer/SerializerCacheWarmerTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; +use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer; use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Component\Cache\Adapter\NullAdapter; @@ -38,9 +39,7 @@ private function getArrayPool(string $file): PhpArrayAdapter return $this->arrayPool = new PhpArrayAdapter($file, new NullAdapter()); } - /** - * @dataProvider loaderProvider - */ + #[DataProvider('loaderProvider')] public function testWarmUp(array $loaders) { $file = sys_get_temp_dir().'/cache-serializer.php'; @@ -57,9 +56,7 @@ public function testWarmUp(array $loaders) $this->assertTrue($arrayPool->getItem('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author')->isHit()); } - /** - * @dataProvider loaderProvider - */ + #[DataProvider('loaderProvider')] public function testWarmUpAbsoluteFilePath(array $loaders) { $file = sys_get_temp_dir().'/0/cache-serializer.php'; @@ -79,9 +76,7 @@ public function testWarmUpAbsoluteFilePath(array $loaders) $this->assertTrue($arrayPool->getItem('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author')->isHit()); } - /** - * @dataProvider loaderProvider - */ + #[DataProvider('loaderProvider')] public function testWarmUpWithoutBuildDir(array $loaders) { $file = sys_get_temp_dir().'/cache-serializer.php'; diff --git a/Tests/Command/CachePoolClearCommandTest.php b/Tests/Command/CachePoolClearCommandTest.php index c98d7ed92..dcf788134 100644 --- a/Tests/Command/CachePoolClearCommandTest.php +++ b/Tests/Command/CachePoolClearCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\MockObject\MockObject; use Psr\Cache\CacheItemPoolInterface; use Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand; @@ -30,9 +31,7 @@ protected function setUp(): void $this->cachePool = $this->createMock(CacheItemPoolInterface::class); } - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(array $input, array $expectedSuggestions) { $application = new Application($this->getKernel()); diff --git a/Tests/Command/CachePoolDeleteCommandTest.php b/Tests/Command/CachePoolDeleteCommandTest.php index b4c11d4db..afd3ecdd7 100644 --- a/Tests/Command/CachePoolDeleteCommandTest.php +++ b/Tests/Command/CachePoolDeleteCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\MockObject\MockObject; use Psr\Cache\CacheItemPoolInterface; use Symfony\Bundle\FrameworkBundle\Command\CachePoolDeleteCommand; @@ -84,9 +85,7 @@ public function testCommandDeleteFailed() $tester->execute(['pool' => 'foo', 'key' => 'bar']); } - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(array $input, array $expectedSuggestions) { $application = new Application($this->getKernel()); diff --git a/Tests/Command/EventDispatcherDebugCommandTest.php b/Tests/Command/EventDispatcherDebugCommandTest.php index 359196e11..7dc1e0dc6 100644 --- a/Tests/Command/EventDispatcherDebugCommandTest.php +++ b/Tests/Command/EventDispatcherDebugCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand; use Symfony\Component\Console\Tester\CommandCompletionTester; @@ -20,9 +21,7 @@ class EventDispatcherDebugCommandTest extends TestCase { - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(array $input, array $expectedSuggestions) { $tester = $this->createCommandCompletionTester(); diff --git a/Tests/Command/SecretsListCommandTest.php b/Tests/Command/SecretsListCommandTest.php index 12d3ab2e8..de09d8941 100644 --- a/Tests/Command/SecretsListCommandTest.php +++ b/Tests/Command/SecretsListCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\BackupGlobals; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Command\SecretsListCommand; use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; @@ -19,9 +20,7 @@ class SecretsListCommandTest extends TestCase { - /** - * @backupGlobals enabled - */ + #[BackupGlobals(true)] public function testExecute() { $vault = $this->createMock(AbstractVault::class); diff --git a/Tests/Command/SecretsRemoveCommandTest.php b/Tests/Command/SecretsRemoveCommandTest.php index 2c12b6128..d09fa3c01 100644 --- a/Tests/Command/SecretsRemoveCommandTest.php +++ b/Tests/Command/SecretsRemoveCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Command\SecretsRemoveCommand; use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; @@ -18,9 +19,7 @@ class SecretsRemoveCommandTest extends TestCase { - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(bool $withLocalVault, array $input, array $expectedSuggestions) { $vault = $this->createMock(AbstractVault::class); diff --git a/Tests/Command/SecretsRevealCommandTest.php b/Tests/Command/SecretsRevealCommandTest.php index d77d303d5..37065d1c0 100644 --- a/Tests/Command/SecretsRevealCommandTest.php +++ b/Tests/Command/SecretsRevealCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\BackupGlobals; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Command\SecretsRevealCommand; use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; @@ -59,9 +60,7 @@ public function testFailedDecrypt() $this->assertStringContainsString('The secret "secretKey" could not be decrypted.', trim($tester->getDisplay(true))); } - /** - * @backupGlobals enabled - */ + #[BackupGlobals(true)] public function testLocalVaultOverride() { $vault = $this->createMock(AbstractVault::class); @@ -78,9 +77,7 @@ public function testLocalVaultOverride() $this->assertEquals('newSecretValue', trim($tester->getDisplay(true))); } - /** - * @backupGlobals enabled - */ + #[BackupGlobals(true)] public function testOnlyLocalVaultContainsName() { $vault = $this->createMock(AbstractVault::class); diff --git a/Tests/Command/SecretsSetCommandTest.php b/Tests/Command/SecretsSetCommandTest.php index 678fb417c..57db9c529 100644 --- a/Tests/Command/SecretsSetCommandTest.php +++ b/Tests/Command/SecretsSetCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Command\SecretsSetCommand; use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; @@ -18,9 +19,7 @@ class SecretsSetCommandTest extends TestCase { - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(array $input, array $expectedSuggestions) { $vault = $this->createMock(AbstractVault::class); diff --git a/Tests/Command/TranslationDebugCommandTest.php b/Tests/Command/TranslationDebugCommandTest.php index 1b114ad49..e0e49fd2e 100644 --- a/Tests/Command/TranslationDebugCommandTest.php +++ b/Tests/Command/TranslationDebugCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; @@ -240,9 +241,7 @@ private function getBundle($path) return $bundle; } - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(array $input, array $expectedSuggestions) { $extractedMessagesWithDomains = [ diff --git a/Tests/Command/TranslationExtractCommandCompletionTest.php b/Tests/Command/TranslationExtractCommandCompletionTest.php index a47b0913f..49874fe7c 100644 --- a/Tests/Command/TranslationExtractCommandCompletionTest.php +++ b/Tests/Command/TranslationExtractCommandCompletionTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Command\TranslationExtractCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; @@ -30,9 +31,7 @@ class TranslationExtractCommandCompletionTest extends TestCase private Filesystem $fs; private string $translationDir; - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(array $input, array $expectedSuggestions) { $tester = $this->createCommandCompletionTester(['messages' => ['foo' => 'foo']]); diff --git a/Tests/Command/TranslationExtractCommandTest.php b/Tests/Command/TranslationExtractCommandTest.php index 22927d210..89361e825 100644 --- a/Tests/Command/TranslationExtractCommandTest.php +++ b/Tests/Command/TranslationExtractCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Command\TranslationExtractCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; @@ -177,9 +178,7 @@ public function testFilterDuplicateTransPaths() $this->assertEquals($expectedPaths, $filteredTransPaths); } - /** - * @dataProvider removeNoFillProvider - */ + #[DataProvider('removeNoFillProvider')] public function testRemoveNoFillTranslationsMethod($noFillCounter, $messages) { // Preparing mock diff --git a/Tests/Command/WorkflowDumpCommandTest.php b/Tests/Command/WorkflowDumpCommandTest.php index 34009756a..d7d17a923 100644 --- a/Tests/Command/WorkflowDumpCommandTest.php +++ b/Tests/Command/WorkflowDumpCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Command; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand; use Symfony\Component\Console\Application; @@ -19,9 +20,7 @@ class WorkflowDumpCommandTest extends TestCase { - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(array $input, array $expectedSuggestions) { $application = new Application(); diff --git a/Tests/Console/Descriptor/AbstractDescriptorTestCase.php b/Tests/Console/Descriptor/AbstractDescriptorTestCase.php index d09fa8e4f..f52a1d8de 100644 --- a/Tests/Console/Descriptor/AbstractDescriptorTestCase.php +++ b/Tests/Console/Descriptor/AbstractDescriptorTestCase.php @@ -42,7 +42,7 @@ protected function tearDown(): void putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); } - /** @dataProvider getDescribeRouteCollectionTestData */ + #[DataProvider('getDescribeRouteCollectionTestData')] public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription) { $this->assertDescription($expectedDescription, $routes); @@ -53,7 +53,7 @@ public static function getDescribeRouteCollectionTestData(): array return static::getDescriptionTestData(ObjectsProvider::getRouteCollections()); } - /** @dataProvider getDescribeRouteCollectionWithHttpMethodFilterTestData */ + #[DataProvider('getDescribeRouteCollectionWithHttpMethodFilterTestData')] public function testDescribeRouteCollectionWithHttpMethodFilter(string $httpMethod, RouteCollection $routes, $expectedDescription) { $this->assertDescription($expectedDescription, $routes, ['method' => $httpMethod]); @@ -68,7 +68,7 @@ public static function getDescribeRouteCollectionWithHttpMethodFilterTestData(): } } - /** @dataProvider getDescribeRouteTestData */ + #[DataProvider('getDescribeRouteTestData')] public function testDescribeRoute(Route $route, $expectedDescription) { $this->assertDescription($expectedDescription, $route); @@ -79,7 +79,7 @@ public static function getDescribeRouteTestData(): array return static::getDescriptionTestData(ObjectsProvider::getRoutes()); } - /** @dataProvider getDescribeContainerParametersTestData */ + #[DataProvider('getDescribeContainerParametersTestData')] public function testDescribeContainerParameters(ParameterBag $parameters, $expectedDescription) { $this->assertDescription($expectedDescription, $parameters); @@ -90,7 +90,7 @@ public static function getDescribeContainerParametersTestData(): array return static::getDescriptionTestData(ObjectsProvider::getContainerParameters()); } - /** @dataProvider getDescribeContainerBuilderTestData */ + #[DataProvider('getDescribeContainerBuilderTestData')] public function testDescribeContainerBuilder(ContainerBuilder $builder, $expectedDescription, array $options) { $this->assertDescription($expectedDescription, $builder, $options); @@ -101,9 +101,7 @@ public static function getDescribeContainerBuilderTestData(): array return static::getContainerBuilderDescriptionTestData(ObjectsProvider::getContainerBuilders()); } - /** - * @dataProvider getDescribeContainerExistingClassDefinitionTestData - */ + #[DataProvider('getDescribeContainerExistingClassDefinitionTestData')] public function testDescribeContainerExistingClassDefinition(Definition $definition, $expectedDescription) { $this->assertDescription($expectedDescription, $definition); @@ -114,7 +112,7 @@ public static function getDescribeContainerExistingClassDefinitionTestData(): ar return static::getDescriptionTestData(ObjectsProvider::getContainerDefinitionsWithExistingClasses()); } - /** @dataProvider getDescribeContainerDefinitionTestData */ + #[DataProvider('getDescribeContainerDefinitionTestData')] public function testDescribeContainerDefinition(Definition $definition, $expectedDescription) { $this->assertDescription($expectedDescription, $definition); @@ -125,7 +123,7 @@ public static function getDescribeContainerDefinitionTestData(): array return static::getDescriptionTestData(ObjectsProvider::getContainerDefinitions()); } - /** @dataProvider getDescribeContainerDefinitionWithArgumentsShownTestData */ + #[DataProvider('getDescribeContainerDefinitionWithArgumentsShownTestData')] public function testDescribeContainerDefinitionWithArgumentsShown(Definition $definition, $expectedDescription) { $this->assertDescription($expectedDescription, $definition, []); @@ -145,7 +143,7 @@ public static function getDescribeContainerDefinitionWithArgumentsShownTestData( return static::getDescriptionTestData($definitionsWithArgs); } - /** @dataProvider getDescribeContainerAliasTestData */ + #[DataProvider('getDescribeContainerAliasTestData')] public function testDescribeContainerAlias(Alias $alias, $expectedDescription) { $this->assertDescription($expectedDescription, $alias); @@ -156,7 +154,7 @@ public static function getDescribeContainerAliasTestData(): array return static::getDescriptionTestData(ObjectsProvider::getContainerAliases()); } - /** @dataProvider getDescribeContainerDefinitionWhichIsAnAliasTestData */ + #[DataProvider('getDescribeContainerDefinitionWhichIsAnAliasTestData')] public function testDescribeContainerDefinitionWhichIsAnAlias(Alias $alias, $expectedDescription, ContainerBuilder $builder, $options = []) { $this->assertDescription($expectedDescription, $builder, $options); @@ -215,7 +213,7 @@ public static function getDescribeContainerParameterTestData(): array return $data; } - /** @dataProvider getDescribeEventDispatcherTestData */ + #[DataProvider('getDescribeEventDispatcherTestData')] public function testDescribeEventDispatcher(EventDispatcher $eventDispatcher, $expectedDescription, array $options) { $this->assertDescription($expectedDescription, $eventDispatcher, $options); @@ -226,7 +224,7 @@ public static function getDescribeEventDispatcherTestData(): array return static::getEventDispatcherDescriptionTestData(ObjectsProvider::getEventDispatchers()); } - /** @dataProvider getDescribeCallableTestData */ + #[DataProvider('getDescribeCallableTestData')] public function testDescribeCallable($callable, $expectedDescription) { $this->assertDescription($expectedDescription, $callable); @@ -250,7 +248,7 @@ public static function getDescribeDeprecatedCallableTestData(): array return static::getDescriptionTestData(ObjectsProvider::getDeprecatedCallables()); } - /** @dataProvider getClassDescriptionTestData */ + #[DataProvider('getClassDescriptionTestData')] public function testGetClassDescription($object, $expectedDescription) { $this->assertEquals($expectedDescription, $this->getDescriptor()->getClassDescription($object)); @@ -266,9 +264,7 @@ public static function getClassDescriptionTestData(): array ]; } - /** - * @dataProvider getDeprecationsTestData - */ + #[DataProvider('getDeprecationsTestData')] public function testGetDeprecations(ContainerBuilder $builder, $expectedDescription) { $this->assertDescription($expectedDescription, $builder, ['deprecations' => true]); @@ -357,7 +353,7 @@ private static function getEventDispatcherDescriptionTestData(array $objects): a return $data; } - /** @dataProvider getDescribeContainerBuilderWithPriorityTagsTestData */ + #[DataProvider('getDescribeContainerBuilderWithPriorityTagsTestData')] public function testDescribeContainerBuilderWithPriorityTags(ContainerBuilder $builder, $expectedDescription, array $options) { $this->assertDescription($expectedDescription, $builder, $options); diff --git a/Tests/Console/Descriptor/TextDescriptorTest.php b/Tests/Console/Descriptor/TextDescriptorTest.php index 34e16f5e4..0dc4bb18b 100644 --- a/Tests/Console/Descriptor/TextDescriptorTest.php +++ b/Tests/Console/Descriptor/TextDescriptorTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor; +use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor; use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter; use Symfony\Component\Routing\Route; @@ -45,7 +46,7 @@ public static function getDescribeRouteWithControllerLinkTestData() return $getDescribeData; } - /** @dataProvider getDescribeRouteWithControllerLinkTestData */ + #[DataProvider('getDescribeRouteWithControllerLinkTestData')] public function testDescribeRouteWithControllerLink(Route $route, $expectedDescription) { static::$fileLinkFormatter = new FileLinkFormatter('myeditor://open?file=%f&line=%l'); diff --git a/Tests/Controller/AbstractControllerTest.php b/Tests/Controller/AbstractControllerTest.php index 6ad0113fa..f778aa4be 100644 --- a/Tests/Controller/AbstractControllerTest.php +++ b/Tests/Controller/AbstractControllerTest.php @@ -11,6 +11,8 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\RunInSeparateProcess; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Component\DependencyInjection\Container; @@ -389,9 +391,7 @@ public function testdenyAccessUnlessGranted() } } - /** - * @dataProvider provideDenyAccessUnlessGrantedSetsAttributesAsArray - */ + #[DataProvider('provideDenyAccessUnlessGrantedSetsAttributesAsArray')] public function testdenyAccessUnlessGrantedSetsAttributesAsArray($attribute, $exceptionAttributes) { $authorizationChecker = $this->createMock(AuthorizationCheckerInterface::class); @@ -526,9 +526,7 @@ public function testRedirectToRoute() $this->assertSame(302, $response->getStatusCode()); } - /** - * @runInSeparateProcess - */ + #[RunInSeparateProcess] public function testAddFlash() { $flashBag = new FlashBag(); diff --git a/Tests/Controller/RedirectControllerTest.php b/Tests/Controller/RedirectControllerTest.php index 161424e0e..55f3b33c3 100644 --- a/Tests/Controller/RedirectControllerTest.php +++ b/Tests/Controller/RedirectControllerTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; +use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Bundle\FrameworkBundle\Controller\RedirectController; use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Component\HttpFoundation\ParameterBag; @@ -60,9 +61,7 @@ public function testEmptyRoute() } } - /** - * @dataProvider provider - */ + #[DataProvider('provider')] public function testRoute($permanent, $keepRequestMethod, $keepQueryParams, $ignoreAttributes, $expectedCode, $expectedAttributes) { $request = new Request(); @@ -255,9 +254,7 @@ public static function urlRedirectProvider(): array ]; } - /** - * @dataProvider urlRedirectProvider - */ + #[DataProvider('urlRedirectProvider')] public function testUrlRedirect($scheme, $httpPort, $httpsPort, $requestScheme, $requestPort, $expectedPort) { $host = 'www.example.com'; @@ -287,9 +284,7 @@ public static function pathQueryParamsProvider(): array ]; } - /** - * @dataProvider pathQueryParamsProvider - */ + #[DataProvider('pathQueryParamsProvider')] public function testPathQueryParams($expectedUrl, $path, $queryString) { $scheme = 'http'; diff --git a/Tests/DependencyInjection/Compiler/ProfilerPassTest.php b/Tests/DependencyInjection/Compiler/ProfilerPassTest.php index 5a2215009..12dfc085d 100644 --- a/Tests/DependencyInjection/Compiler/ProfilerPassTest.php +++ b/Tests/DependencyInjection/Compiler/ProfilerPassTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\DataCollector\AbstractDataCollector; use Symfony\Bundle\FrameworkBundle\DataCollector\TemplateAwareDataCollectorInterface; @@ -98,9 +99,7 @@ public static function getTemplate(): string }]; } - /** - * @dataProvider provideValidCollectorWithTemplateUsingAutoconfigure - */ + #[DataProvider('provideValidCollectorWithTemplateUsingAutoconfigure')] public function testValidCollectorWithTemplateUsingAutoconfigure(TemplateAwareDataCollectorInterface $dataCollector) { $container = new ContainerBuilder(); diff --git a/Tests/DependencyInjection/ConfigurationTest.php b/Tests/DependencyInjection/ConfigurationTest.php index c8142e98a..9bf8d5593 100644 --- a/Tests/DependencyInjection/ConfigurationTest.php +++ b/Tests/DependencyInjection/ConfigurationTest.php @@ -12,6 +12,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection; use Doctrine\DBAL\Connection; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Configuration; use Symfony\Bundle\FullStack; @@ -61,9 +62,7 @@ public function getTestValidSessionName() ]; } - /** - * @dataProvider getTestInvalidSessionName - */ + #[DataProvider('getTestInvalidSessionName')] public function testInvalidSessionName($sessionName) { $processor = new Processor(); @@ -153,9 +152,7 @@ public function testAssetMapperCanBeEnabled() $this->assertEquals($defaultConfig, $config['asset_mapper']); } - /** - * @dataProvider provideImportmapPolyfillTests - */ + #[DataProvider('provideImportmapPolyfillTests')] public function testAssetMapperPolyfillValue(mixed $polyfillValue, bool $isValid, mixed $expected) { $processor = new Processor(); @@ -189,9 +186,7 @@ public static function provideImportmapPolyfillTests() yield [false, true, false]; } - /** - * @dataProvider provideValidAssetsPackageNameConfigurationTests - */ + #[DataProvider('provideValidAssetsPackageNameConfigurationTests')] public function testValidAssetsPackageNameConfiguration($packageName) { $processor = new Processor(); @@ -221,9 +216,7 @@ public static function provideValidAssetsPackageNameConfigurationTests(): array ]; } - /** - * @dataProvider provideInvalidAssetConfigurationTests - */ + #[DataProvider('provideInvalidAssetConfigurationTests')] public function testInvalidAssetsConfiguration(array $assetConfig, $expectedMessage) { $processor = new Processor(); @@ -275,9 +268,7 @@ public static function provideInvalidAssetConfigurationTests(): iterable yield [$createPackageConfig($config), 'You cannot use both "version" and "json_manifest_path" at the same time under "assets" packages.']; } - /** - * @dataProvider provideValidLockConfigurationTests - */ + #[DataProvider('provideValidLockConfigurationTests')] public function testValidLockConfiguration($lockConfig, $processedConfig) { $processor = new Processor(); @@ -375,9 +366,7 @@ public function testLockMergeConfigs() ); } - /** - * @dataProvider provideValidSemaphoreConfigurationTests - */ + #[DataProvider('provideValidSemaphoreConfigurationTests')] public function testValidSemaphoreConfiguration($semaphoreConfig, $processedConfig) { $processor = new Processor(); diff --git a/Tests/DependencyInjection/FrameworkExtensionTestCase.php b/Tests/DependencyInjection/FrameworkExtensionTestCase.php index b5f5f1ef5..f7aad3925 100644 --- a/Tests/DependencyInjection/FrameworkExtensionTestCase.php +++ b/Tests/DependencyInjection/FrameworkExtensionTestCase.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection; +use PHPUnit\Framework\Attributes\DataProvider; use Psr\Cache\CacheItemPoolInterface; use Psr\Log\LoggerAwareInterface; use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension; @@ -1934,9 +1935,7 @@ public function testRedisTagAwareAdapter() } } - /** - * @dataProvider appRedisTagAwareConfigProvider - */ + #[DataProvider('appRedisTagAwareConfigProvider')] public function testAppRedisTagAwareAdapter(string $configFile) { $container = $this->createContainerFromFile($configFile); @@ -1980,9 +1979,7 @@ public function testCacheTaggableTagAppliedToPools() } } - /** - * @dataProvider appRedisTagAwareConfigProvider - */ + #[DataProvider('appRedisTagAwareConfigProvider')] public function testCacheTaggableTagAppliedToRedisAwareAppPool(string $configFile) { $container = $this->createContainerFromFile($configFile); @@ -2222,9 +2219,7 @@ public static function provideMailer(): iterable ]; } - /** - * @dataProvider provideMailer - */ + #[DataProvider('provideMailer')] public function testMailer(string $configFile, array $expectedTransports, array $expectedRecipients, array $expectedAllowedRecipients) { $container = $this->createContainerFromFile($configFile); diff --git a/Tests/DependencyInjection/PhpFrameworkExtensionTest.php b/Tests/DependencyInjection/PhpFrameworkExtensionTest.php index c4f67c2f1..d3c1f8ef4 100644 --- a/Tests/DependencyInjection/PhpFrameworkExtensionTest.php +++ b/Tests/DependencyInjection/PhpFrameworkExtensionTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection; +use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -135,9 +136,7 @@ public function testWorkflowValidationStateMachine() }); } - /** - * @dataProvider provideWorkflowValidationCustomTests - */ + #[DataProvider('provideWorkflowValidationCustomTests')] public function testWorkflowValidationCustomBroken(string $class, string $message) { $this->expectException(InvalidConfigurationException::class); @@ -431,9 +430,7 @@ public function testRateLimiterCompoundPolicyInvalidLimiters() }); } - /** - * @dataProvider emailValidationModeProvider - */ + #[DataProvider('emailValidationModeProvider')] public function testValidatorEmailValidationMode(string $mode) { $this->expectNotToPerformAssertions(); diff --git a/Tests/Fixtures/Descriptor/route_1_link.txt b/Tests/Fixtures/Descriptor/route_1_link.txt index ad7a4c8c8..b44fb4dbd 100644 --- a/Tests/Fixtures/Descriptor/route_1_link.txt +++ b/Tests/Fixtures/Descriptor/route_1_link.txt @@ -10,7 +10,7 @@ | Method | GET|HEAD | | Requirements | name: [a-z]+ | | Class | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub | -| Defaults | _controller: ]8;;myeditor://open?file=[:file:]&line=58\Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\MyController::__invoke()]8;;\ | +| Defaults | _controller: ]8;;myeditor://open?file=[:file:]&line=59\Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\MyController::__invoke()]8;;\ | | | name: Joseph | | Options | compiler_class: Symfony\Component\Routing\RouteCompiler | | | opt1: val1 | diff --git a/Tests/Fixtures/Descriptor/route_2_link.txt b/Tests/Fixtures/Descriptor/route_2_link.txt index 8e3fe4ca7..f033787a7 100644 --- a/Tests/Fixtures/Descriptor/route_2_link.txt +++ b/Tests/Fixtures/Descriptor/route_2_link.txt @@ -10,7 +10,7 @@ | Method | PUT|POST | | Requirements | NO CUSTOM | | Class | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub | -| Defaults | _controller: ]8;;myeditor://open?file=[:file:]&line=58\Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\MyController::__invoke()]8;;\ | +| Defaults | _controller: ]8;;myeditor://open?file=[:file:]&line=59\Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\MyController::__invoke()]8;;\ | | Options | compiler_class: Symfony\Component\Routing\RouteCompiler | | | opt1: val1 | | | opt2: val2 | diff --git a/Tests/Functional/AbstractAttributeRoutingTestCase.php b/Tests/Functional/AbstractAttributeRoutingTestCase.php index 5166c8dda..842d7268f 100644 --- a/Tests/Functional/AbstractAttributeRoutingTestCase.php +++ b/Tests/Functional/AbstractAttributeRoutingTestCase.php @@ -11,13 +11,12 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Component\HttpFoundation\Request; abstract class AbstractAttributeRoutingTestCase extends AbstractWebTestCase { - /** - * @dataProvider getRoutes - */ + #[DataProvider('getRoutes')] public function testAnnotatedController(string $path, string $expectedValue) { $client = $this->createClient(['test_case' => $this->getTestCaseApp(), 'root_config' => 'config.yml']); diff --git a/Tests/Functional/ApiAttributesTest.php b/Tests/Functional/ApiAttributesTest.php index 4848976ae..313c6d386 100644 --- a/Tests/Functional/ApiAttributesTest.php +++ b/Tests/Functional/ApiAttributesTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Component\DomCrawler\Crawler; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; @@ -21,9 +22,7 @@ class ApiAttributesTest extends AbstractWebTestCase { - /** - * @dataProvider mapQueryStringProvider - */ + #[DataProvider('mapQueryStringProvider')] public function testMapQueryString(string $uri, array $query, string $expectedResponse, int $expectedStatusCode) { $client = self::createClient(['test_case' => 'ApiAttributesTest']); @@ -214,9 +213,7 @@ public static function mapQueryStringProvider(): iterable ]; } - /** - * @dataProvider mapRequestPayloadProvider - */ + #[DataProvider('mapRequestPayloadProvider')] public function testMapRequestPayload(string $uri, string $format, array $parameters, ?string $content, callable $responseAssertion, int $expectedStatusCode) { $client = self::createClient(['test_case' => 'ApiAttributesTest']); @@ -603,7 +600,7 @@ public static function mapRequestPayloadProvider(): iterable self::assertIsArray($json['violations'] ?? null); self::assertCount(1, $json['violations']); self::assertSame('approved', $json['violations'][0]['propertyPath'] ?? null); -}, + }, 'expectedStatusCode' => 422, ]; diff --git a/Tests/Functional/CachePoolClearCommandTest.php b/Tests/Functional/CachePoolClearCommandTest.php index a2966b5a2..53e8b5c48 100644 --- a/Tests/Functional/CachePoolClearCommandTest.php +++ b/Tests/Functional/CachePoolClearCommandTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Cache\Adapter\FilesystemAdapter; @@ -19,9 +20,7 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use Symfony\Component\Finder\SplFileInfo; -/** - * @group functional - */ +#[Group('functional')] class CachePoolClearCommandTest extends AbstractWebTestCase { protected function setUp(): void diff --git a/Tests/Functional/CachePoolListCommandTest.php b/Tests/Functional/CachePoolListCommandTest.php index eec484026..6dcbc4294 100644 --- a/Tests/Functional/CachePoolListCommandTest.php +++ b/Tests/Functional/CachePoolListCommandTest.php @@ -11,13 +11,12 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Command\CachePoolListCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Tester\CommandTester; -/** - * @group functional - */ +#[Group('functional')] class CachePoolListCommandTest extends AbstractWebTestCase { protected function setUp(): void diff --git a/Tests/Functional/CachePoolsTest.php b/Tests/Functional/CachePoolsTest.php index 23f4a116e..64829949a 100644 --- a/Tests/Functional/CachePoolsTest.php +++ b/Tests/Functional/CachePoolsTest.php @@ -11,6 +11,9 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; +use PHPUnit\Framework\Error\Warning; use Symfony\Component\Cache\Adapter\AdapterInterface; use Symfony\Component\Cache\Adapter\RedisAdapter; use Symfony\Component\Cache\Adapter\TagAwareAdapter; @@ -24,18 +27,15 @@ public function testCachePools() $this->doTestCachePools([], AdapterInterface::class); } - /** - * @requires extension redis - * - * @group integration - */ + #[RequiresPhpExtension('redis')] + #[Group('integration')] public function testRedisCachePools() { $this->skipIfRedisUnavailable(); try { $this->doTestCachePools(['root_config' => 'redis_config.yml', 'environment' => 'redis_cache'], RedisAdapter::class); - } catch (\PHPUnit\Framework\Error\Warning $e) { + } catch (Warning $e) { if (!str_starts_with($e->getMessage(), 'unable to connect to')) { throw $e; } @@ -48,18 +48,15 @@ public function testRedisCachePools() } } - /** - * @requires extension redis - * - * @group integration - */ + #[RequiresPhpExtension('redis')] + #[Group('integration')] public function testRedisCustomCachePools() { $this->skipIfRedisUnavailable(); try { $this->doTestCachePools(['root_config' => 'redis_custom_config.yml', 'environment' => 'custom_redis_cache'], RedisAdapter::class); - } catch (\PHPUnit\Framework\Error\Warning $e) { + } catch (Warning $e) { if (!str_starts_with($e->getMessage(), 'unable to connect to')) { throw $e; } diff --git a/Tests/Functional/ConfigDebugCommandTest.php b/Tests/Functional/ConfigDebugCommandTest.php index 1819e7f4e..6a06e22d7 100644 --- a/Tests/Functional/ConfigDebugCommandTest.php +++ b/Tests/Functional/ConfigDebugCommandTest.php @@ -11,6 +11,9 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\TestWith; use Symfony\Bundle\FrameworkBundle\Command\ConfigDebugCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Exception\InvalidArgumentException; @@ -19,15 +22,11 @@ use Symfony\Component\Console\Tester\CommandCompletionTester; use Symfony\Component\Console\Tester\CommandTester; -/** - * @group functional - */ +#[Group('functional')] class ConfigDebugCommandTest extends AbstractWebTestCase { - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testShowList(bool $debug) { $tester = $this->createCommandTester($debug); @@ -44,10 +43,8 @@ public function testShowList(bool $debug) $this->assertStringContainsString(' test_dump', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpKernelExtension(bool $debug) { $tester = $this->createCommandTester($debug); @@ -58,10 +55,8 @@ public function testDumpKernelExtension(bool $debug) $this->assertStringContainsString(' foo: bar', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpBundleName(bool $debug) { $tester = $this->createCommandTester($debug); @@ -71,10 +66,8 @@ public function testDumpBundleName(bool $debug) $this->assertStringContainsString('custom: foo', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpBundleOption(bool $debug) { $tester = $this->createCommandTester($debug); @@ -84,10 +77,8 @@ public function testDumpBundleOption(bool $debug) $this->assertStringContainsString('foo', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpWithoutTitleIsValidJson(bool $debug) { $tester = $this->createCommandTester($debug); @@ -97,10 +88,8 @@ public function testDumpWithoutTitleIsValidJson(bool $debug) $this->assertJson($tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpWithUnsupportedFormat(bool $debug) { $tester = $this->createCommandTester($debug); @@ -114,10 +103,8 @@ public function testDumpWithUnsupportedFormat(bool $debug) ]); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testParametersValuesAreResolved(bool $debug) { $tester = $this->createCommandTester($debug); @@ -128,10 +115,8 @@ public function testParametersValuesAreResolved(bool $debug) $this->assertStringContainsString('secret: test', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testParametersValuesAreFullyResolved(bool $debug) { $tester = $this->createCommandTester($debug); @@ -144,10 +129,8 @@ public function testParametersValuesAreFullyResolved(bool $debug) $this->assertStringContainsString('ide: '.$debug ? ($_ENV['SYMFONY_IDE'] ?? $_SERVER['SYMFONY_IDE'] ?? 'null') : 'null', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDefaultParameterValueIsResolvedIfConfigIsExisting(bool $debug) { $tester = $this->createCommandTester($debug); @@ -158,10 +141,8 @@ public function testDefaultParameterValueIsResolvedIfConfigIsExisting(bool $debu $this->assertStringContainsString(\sprintf("dsn: 'file:%s/profiler'", $kernelCacheDir), $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpExtensionConfigWithoutBundle(bool $debug) { $tester = $this->createCommandTester($debug); @@ -171,10 +152,8 @@ public function testDumpExtensionConfigWithoutBundle(bool $debug) $this->assertStringContainsString('enabled: true', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpUndefinedBundleOption(bool $debug) { $tester = $this->createCommandTester($debug); @@ -183,10 +162,8 @@ public function testDumpUndefinedBundleOption(bool $debug) $this->assertStringContainsString('Unable to find configuration for "test.foo"', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpWithPrefixedEnv(bool $debug) { $tester = $this->createCommandTester($debug); @@ -195,10 +172,8 @@ public function testDumpWithPrefixedEnv(bool $debug) $this->assertStringContainsString("cookie_httponly: '%env(bool:COOKIE_HTTPONLY)%'", $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpFallsBackToDefaultConfigAndResolvesParameterValue(bool $debug) { $tester = $this->createCommandTester($debug); @@ -208,10 +183,8 @@ public function testDumpFallsBackToDefaultConfigAndResolvesParameterValue(bool $ $this->assertStringContainsString('foo: bar', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpFallsBackToDefaultConfigAndResolvesEnvPlaceholder(bool $debug) { $tester = $this->createCommandTester($debug); @@ -221,10 +194,8 @@ public function testDumpFallsBackToDefaultConfigAndResolvesEnvPlaceholder(bool $ $this->assertStringContainsString("baz: '%env(BAZ)%'", $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpThrowsExceptionWhenDefaultConfigFallbackIsImpossible(bool $debug) { $this->expectException(\LogicException::class); @@ -234,9 +205,7 @@ public function testDumpThrowsExceptionWhenDefaultConfigFallbackIsImpossible(boo $tester->execute(['name' => 'ExtensionWithoutConfigTestBundle']); } - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(bool $debug, array $input, array $expectedSuggestions) { $application = $this->createApplication($debug); diff --git a/Tests/Functional/ConfigDumpReferenceCommandTest.php b/Tests/Functional/ConfigDumpReferenceCommandTest.php index a16d8e046..f630173c7 100644 --- a/Tests/Functional/ConfigDumpReferenceCommandTest.php +++ b/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -11,6 +11,9 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\TestWith; use Symfony\Bundle\FrameworkBundle\Command\ConfigDumpReferenceCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Input\ArrayInput; @@ -18,15 +21,11 @@ use Symfony\Component\Console\Tester\CommandCompletionTester; use Symfony\Component\Console\Tester\CommandTester; -/** - * @group functional - */ +#[Group('functional')] class ConfigDumpReferenceCommandTest extends AbstractWebTestCase { - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testShowList(bool $debug) { $tester = $this->createCommandTester($debug); @@ -43,10 +42,8 @@ public function testShowList(bool $debug) $this->assertStringContainsString(' test_dump', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpKernelExtension(bool $debug) { $tester = $this->createCommandTester($debug); @@ -57,10 +54,8 @@ public function testDumpKernelExtension(bool $debug) $this->assertStringContainsString(' bar', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpBundleName(bool $debug) { $tester = $this->createCommandTester($debug); @@ -71,10 +66,8 @@ public function testDumpBundleName(bool $debug) $this->assertStringContainsString(' custom:', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpExtensionConfigWithoutBundle(bool $debug) { $tester = $this->createCommandTester($debug); @@ -84,10 +77,8 @@ public function testDumpExtensionConfigWithoutBundle(bool $debug) $this->assertStringContainsString('enabled: true', $tester->getDisplay()); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpAtPath(bool $debug) { $tester = $this->createCommandTester($debug); @@ -108,10 +99,8 @@ public function testDumpAtPath(bool $debug) , $tester->getDisplay(true)); } - /** - * @testWith [true] - * [false] - */ + #[TestWith([true])] + #[TestWith([false])] public function testDumpAtPathXml(bool $debug) { $tester = $this->createCommandTester($debug); @@ -125,9 +114,7 @@ public function testDumpAtPathXml(bool $debug) $this->assertStringContainsString('[ERROR] The "path" option is only available for the "yaml" format.', $tester->getDisplay()); } - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(bool $debug, array $input, array $expectedSuggestions) { $application = $this->createApplication($debug); diff --git a/Tests/Functional/ContainerDebugCommandTest.php b/Tests/Functional/ContainerDebugCommandTest.php index 9b70c7bb3..36e730d0a 100644 --- a/Tests/Functional/ContainerDebugCommandTest.php +++ b/Tests/Functional/ContainerDebugCommandTest.php @@ -11,6 +11,8 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\BackslashClass; use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\ContainerExcluded; @@ -18,9 +20,7 @@ use Symfony\Component\Console\Tester\CommandCompletionTester; use Symfony\Component\HttpKernel\HttpKernelInterface; -/** - * @group functional - */ +#[Group('functional')] class ContainerDebugCommandTest extends AbstractWebTestCase { public function testDumpContainerIfNotExists() @@ -113,9 +113,7 @@ public function testExcludedService() $this->assertStringNotContainsString(ContainerExcluded::class, $tester->getDisplay()); } - /** - * @dataProvider provideIgnoreBackslashWhenFindingService - */ + #[DataProvider('provideIgnoreBackslashWhenFindingService')] public function testIgnoreBackslashWhenFindingService(string $validServiceId) { static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml']); @@ -282,9 +280,7 @@ public static function provideIgnoreBackslashWhenFindingService(): array ]; } - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(array $input, array $expectedSuggestions, array $notExpectedSuggestions = []) { static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml', 'debug' => true]); diff --git a/Tests/Functional/ContainerLintCommandTest.php b/Tests/Functional/ContainerLintCommandTest.php index f0b6b4bd5..4cb989af3 100644 --- a/Tests/Functional/ContainerLintCommandTest.php +++ b/Tests/Functional/ContainerLintCommandTest.php @@ -11,19 +11,17 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Tester\CommandTester; -/** - * @group functional - */ +#[Group('functional')] class ContainerLintCommandTest extends AbstractWebTestCase { private Application $application; - /** - * @dataProvider containerLintProvider - */ + #[DataProvider('containerLintProvider')] public function testLintContainer(string $configFile, bool $resolveEnvVars, int $expectedExitCode, string $expectedOutput) { $kernel = static::createKernel([ diff --git a/Tests/Functional/DebugAutowiringCommandTest.php b/Tests/Functional/DebugAutowiringCommandTest.php index b43a12ed6..de94a1e71 100644 --- a/Tests/Functional/DebugAutowiringCommandTest.php +++ b/Tests/Functional/DebugAutowiringCommandTest.php @@ -11,6 +11,8 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Psr\Log\LoggerInterface; use Symfony\Bundle\FrameworkBundle\Command\DebugAutowiringCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; @@ -20,9 +22,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\Routing\RouterInterface; -/** - * @group functional - */ +#[Group('functional')] class DebugAutowiringCommandTest extends AbstractWebTestCase { public function testBasicFunctionality() @@ -116,9 +116,7 @@ public function testNotConfusedByClassAliases() $this->assertStringContainsString(ClassAliasExampleClass::class, $tester->getDisplay()); } - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(array $input, array $expectedSuggestions) { $kernel = static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml']); diff --git a/Tests/Functional/FragmentTest.php b/Tests/Functional/FragmentTest.php index 48d5c327a..b26601af6 100644 --- a/Tests/Functional/FragmentTest.php +++ b/Tests/Functional/FragmentTest.php @@ -11,11 +11,11 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; + class FragmentTest extends AbstractWebTestCase { - /** - * @dataProvider getConfigs - */ + #[DataProvider('getConfigs')] public function testFragment($insulate) { $client = $this->createClient(['test_case' => 'Fragment', 'root_config' => 'config.yml', 'debug' => true]); diff --git a/Tests/Functional/NotificationTest.php b/Tests/Functional/NotificationTest.php index 03b947a0f..7511591cb 100644 --- a/Tests/Functional/NotificationTest.php +++ b/Tests/Functional/NotificationTest.php @@ -11,11 +11,12 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\RequiresMethod; +use Symfony\Bundle\MercureBundle\MercureBundle; + final class NotificationTest extends AbstractWebTestCase { - /** - * @requires function \Symfony\Bundle\MercureBundle\MercureBundle::build - */ + #[RequiresMethod(MercureBundle::class, 'build')] public function testNotifierAssertion() { $client = $this->createClient(['test_case' => 'Notifier', 'root_config' => 'config.yml', 'debug' => true]); diff --git a/Tests/Functional/ProfilerTest.php b/Tests/Functional/ProfilerTest.php index d78259795..b5853dd1a 100644 --- a/Tests/Functional/ProfilerTest.php +++ b/Tests/Functional/ProfilerTest.php @@ -11,11 +11,11 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; + class ProfilerTest extends AbstractWebTestCase { - /** - * @dataProvider getConfigs - */ + #[DataProvider('getConfigs')] public function testProfilerIsDisabled($insulate) { $client = $this->createClient(['test_case' => 'Profiler', 'root_config' => 'config.yml']); @@ -36,9 +36,7 @@ public function testProfilerIsDisabled($insulate) $this->assertNull($client->getProfile()); } - /** - * @dataProvider getConfigs - */ + #[DataProvider('getConfigs')] public function testProfilerCollectParameter($insulate) { $client = $this->createClient(['test_case' => 'ProfilerCollectParameter', 'root_config' => 'config.yml']); diff --git a/Tests/Functional/RouterDebugCommandTest.php b/Tests/Functional/RouterDebugCommandTest.php index 614078804..910e3b6f7 100644 --- a/Tests/Functional/RouterDebugCommandTest.php +++ b/Tests/Functional/RouterDebugCommandTest.php @@ -11,13 +11,14 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\TestWith; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Tester\CommandCompletionTester; use Symfony\Component\Console\Tester\CommandTester; -/** - * @group functional - */ +#[Group('functional')] class RouterDebugCommandTest extends AbstractWebTestCase { private Application $application; @@ -89,21 +90,17 @@ public function testSearchWithThrow() $tester->execute(['name' => 'gerard'], ['interactive' => true]); } - /** - * @dataProvider provideCompletionSuggestions - */ + #[DataProvider('provideCompletionSuggestions')] public function testComplete(array $input, array $expectedSuggestions) { $tester = new CommandCompletionTester($this->application->get('debug:router')); $this->assertSame($expectedSuggestions, $tester->complete($input)); } - /** - * @testWith ["txt"] - * ["xml"] - * ["json"] - * ["md"] - */ + #[TestWith(['txt'])] + #[TestWith(['xml'])] + #[TestWith(['json'])] + #[TestWith(['md'])] public function testShowAliases(string $format) { $tester = $this->createCommandTester(); diff --git a/Tests/Functional/RoutingConditionServiceTest.php b/Tests/Functional/RoutingConditionServiceTest.php index 4f4caa6eb..f1f4f14cf 100644 --- a/Tests/Functional/RoutingConditionServiceTest.php +++ b/Tests/Functional/RoutingConditionServiceTest.php @@ -11,11 +11,11 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; + class RoutingConditionServiceTest extends AbstractWebTestCase { - /** - * @dataProvider provideRoutes - */ + #[DataProvider('provideRoutes')] public function testCondition(int $code, string $path) { $client = static::createClient(['test_case' => 'RoutingConditionService']); diff --git a/Tests/Functional/SecurityTest.php b/Tests/Functional/SecurityTest.php index c26fa717d..ab06b5f6c 100644 --- a/Tests/Functional/SecurityTest.php +++ b/Tests/Functional/SecurityTest.php @@ -11,13 +11,12 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Component\Security\Core\User\InMemoryUser; class SecurityTest extends AbstractWebTestCase { - /** - * @dataProvider getUsers - */ + #[DataProvider('getUsers')] public function testLoginUser(string $username, array $roles, ?string $firewallContext) { $user = new InMemoryUser($username, 'the-password', $roles); diff --git a/Tests/Functional/SessionTest.php b/Tests/Functional/SessionTest.php index 4c1b92ccf..88ea3230a 100644 --- a/Tests/Functional/SessionTest.php +++ b/Tests/Functional/SessionTest.php @@ -11,13 +11,14 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\DataProvider; + class SessionTest extends AbstractWebTestCase { /** * Tests session attributes persist. - * - * @dataProvider getConfigs */ + #[DataProvider('getConfigs')] public function testWelcome($config, $insulate) { $client = $this->createClient(['test_case' => 'Session', 'root_config' => $config]); @@ -48,9 +49,8 @@ public function testWelcome($config, $insulate) /** * Tests flash messages work in practice. - * - * @dataProvider getConfigs */ + #[DataProvider('getConfigs')] public function testFlash($config, $insulate) { $client = $this->createClient(['test_case' => 'Session', 'root_config' => $config]); @@ -72,9 +72,8 @@ public function testFlash($config, $insulate) /** * See if two separate insulated clients can run without * polluting each other's session data. - * - * @dataProvider getConfigs */ + #[DataProvider('getConfigs')] public function testTwoClients($config, $insulate) { // start first client @@ -128,9 +127,7 @@ public function testTwoClients($config, $insulate) $this->assertStringContainsString('Welcome back client2, nice to meet you.', $crawler2->text()); } - /** - * @dataProvider getConfigs - */ + #[DataProvider('getConfigs')] public function testCorrectCacheControlHeadersForCacheableAction($config, $insulate) { $client = $this->createClient(['test_case' => 'Session', 'root_config' => $config]); diff --git a/Tests/Functional/SluggerLocaleAwareTest.php b/Tests/Functional/SluggerLocaleAwareTest.php index 769012461..d09f969b0 100644 --- a/Tests/Functional/SluggerLocaleAwareTest.php +++ b/Tests/Functional/SluggerLocaleAwareTest.php @@ -11,16 +11,14 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Slugger\SlugConstructArgService; -/** - * @group functional - */ +#[Group('functional')] class SluggerLocaleAwareTest extends AbstractWebTestCase { - /** - * @requires extension intl - */ + #[RequiresPhpExtension('intl')] public function testLocalizedSlugger() { $kernel = static::createKernel(['test_case' => 'Slugger', 'root_config' => 'config.yml']); diff --git a/Tests/Functional/TestServiceContainerTest.php b/Tests/Functional/TestServiceContainerTest.php index fe7093081..8b8898ad8 100644 --- a/Tests/Functional/TestServiceContainerTest.php +++ b/Tests/Functional/TestServiceContainerTest.php @@ -11,6 +11,8 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\Depends; +use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; use Symfony\Bundle\FrameworkBundle\Test\TestContainer; use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestServiceContainer\NonPublicService; use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestServiceContainer\PrivateService; @@ -68,17 +70,13 @@ public function testSetDecoratedService() $this->assertSame($service, $container->get('decorated')->inner); } - /** - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] public function testBootKernel() { static::bootKernel(['test_case' => 'TestServiceContainer']); } - /** - * @depends testBootKernel - */ + #[Depends('testBootKernel')] public function testKernelIsNotInitialized() { self::assertNull(self::$class); diff --git a/Tests/Functional/TranslationDebugCommandTest.php b/Tests/Functional/TranslationDebugCommandTest.php index 5e396440c..1d7e2952b 100644 --- a/Tests/Functional/TranslationDebugCommandTest.php +++ b/Tests/Functional/TranslationDebugCommandTest.php @@ -11,13 +11,12 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; +use PHPUnit\Framework\Attributes\Group; use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Tester\CommandTester; -/** - * @group functional - */ +#[Group('functional')] class TranslationDebugCommandTest extends AbstractWebTestCase { private Application $application; diff --git a/Tests/Routing/RouterTest.php b/Tests/Routing/RouterTest.php index d2c021563..f46522a97 100644 --- a/Tests/Routing/RouterTest.php +++ b/Tests/Routing/RouterTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Routing; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface; use Symfony\Bundle\FrameworkBundle\Routing\Router; @@ -438,9 +439,7 @@ public function testExceptionOnNonStringParameterWithSfContainer() $router->getRouteCollection(); } - /** - * @dataProvider getNonStringValues - */ + #[DataProvider('getNonStringValues')] public function testDefaultValuesAsNonStrings($value) { $routes = new RouteCollection(); @@ -455,9 +454,7 @@ public function testDefaultValuesAsNonStrings($value) $this->assertSame($value, $route->getDefault('foo')); } - /** - * @dataProvider getNonStringValues - */ + #[DataProvider('getNonStringValues')] public function testDefaultValuesAsNonStringsWithSfContainer($value) { $routes = new RouteCollection(); @@ -525,9 +522,7 @@ public static function getNonStringValues() return [[null], [false], [true], [new \stdClass()], [['foo', 'bar']], [[[]]]]; } - /** - * @dataProvider getContainerParameterForRoute - */ + #[DataProvider('getContainerParameterForRoute')] public function testCacheValidityWithContainerParameters($parameter) { $cacheDir = tempnam(sys_get_temp_dir(), 'sf_router_'); diff --git a/Tests/Secrets/SodiumVaultTest.php b/Tests/Secrets/SodiumVaultTest.php index f91f4bced..6d050386b 100644 --- a/Tests/Secrets/SodiumVaultTest.php +++ b/Tests/Secrets/SodiumVaultTest.php @@ -11,14 +11,13 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Secrets; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\String\LazyString; -/** - * @requires extension sodium - */ +#[RequiresPhpExtension('sodium')] class SodiumVaultTest extends TestCase { private string $secretsDir; diff --git a/Tests/Test/WebTestCaseTest.php b/Tests/Test/WebTestCaseTest.php index fd65b18d8..a058d3628 100644 --- a/Tests/Test/WebTestCaseTest.php +++ b/Tests/Test/WebTestCaseTest.php @@ -12,6 +12,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Test; use PHPUnit\Framework\AssertionFailedError; +use PHPUnit\Framework\Attributes\RequiresMethod; use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -192,9 +193,7 @@ public function testAssertBrowserCookieValueSame() $this->getClientTester()->assertBrowserCookieValueSame('foo', 'babar', false, '/path'); } - /** - * @requires function \Symfony\Component\BrowserKit\History::isFirstPage - */ + #[RequiresMethod(History::class, 'isFirstPage')] public function testAssertBrowserHistoryIsOnFirstPage() { $this->createHistoryTester('isFirstPage', true)->assertBrowserHistoryIsOnFirstPage(); @@ -203,9 +202,7 @@ public function testAssertBrowserHistoryIsOnFirstPage() $this->createHistoryTester('isFirstPage', false)->assertBrowserHistoryIsOnFirstPage(); } - /** - * @requires function \Symfony\Component\BrowserKit\History::isFirstPage - */ + #[RequiresMethod(History::class, 'isFirstPage')] public function testAssertBrowserHistoryIsNotOnFirstPage() { $this->createHistoryTester('isFirstPage', false)->assertBrowserHistoryIsNotOnFirstPage(); @@ -214,9 +211,7 @@ public function testAssertBrowserHistoryIsNotOnFirstPage() $this->createHistoryTester('isFirstPage', true)->assertBrowserHistoryIsNotOnFirstPage(); } - /** - * @requires function \Symfony\Component\BrowserKit\History::isLastPage - */ + #[RequiresMethod(History::class, 'isLastPage')] public function testAssertBrowserHistoryIsOnLastPage() { $this->createHistoryTester('isLastPage', true)->assertBrowserHistoryIsOnLastPage(); @@ -225,9 +220,7 @@ public function testAssertBrowserHistoryIsOnLastPage() $this->createHistoryTester('isLastPage', false)->assertBrowserHistoryIsOnLastPage(); } - /** - * @requires function \Symfony\Component\BrowserKit\History::isLastPage - */ + #[RequiresMethod(History::class, 'isLastPage')] public function testAssertBrowserHistoryIsNotOnLastPage() { $this->createHistoryTester('isLastPage', false)->assertBrowserHistoryIsNotOnLastPage(); diff --git a/Tests/Translation/TranslatorTest.php b/Tests/Translation/TranslatorTest.php index e481a965e..d5f5d88eb 100644 --- a/Tests/Translation/TranslatorTest.php +++ b/Tests/Translation/TranslatorTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Translation; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Translation\Translator; use Symfony\Component\Config\Resource\DirectoryResource; @@ -130,7 +131,7 @@ public function testInvalidOptions() new Translator(new Container(), new MessageFormatter(), 'en', [], ['foo' => 'bar']); } - /** @dataProvider getDebugModeAndCacheDirCombinations */ + #[DataProvider('getDebugModeAndCacheDirCombinations')] public function testResourceFilesOptionLoadsBeforeOtherAddedResources($debug, $enableCache) { $someCatalogue = $this->getCatalogue('some_locale', []); From 6f5f9d2b9c4671b881336afa0a2591ff3d5dc75f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 4 Aug 2025 09:53:42 +0200 Subject: [PATCH 49/59] CS fixes --- Command/ContainerLintCommand.php | 1 - DependencyInjection/FrameworkExtension.php | 16 +++++++----- Resources/config/console.php | 3 ++- .../FrameworkExtensionTestCase.php | 25 +++++++++++-------- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/Command/ContainerLintCommand.php b/Command/ContainerLintCommand.php index a806c6399..2fc0be7c5 100644 --- a/Command/ContainerLintCommand.php +++ b/Command/ContainerLintCommand.php @@ -25,7 +25,6 @@ use Symfony\Component\DependencyInjection\Compiler\PassConfig; use Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass; use Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass; -use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index e055f5f8b..79bf63d40 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -33,6 +33,7 @@ use Symfony\Bundle\FrameworkBundle\Routing\RouteLoaderInterface; use Symfony\Bundle\FullStack; use Symfony\Bundle\MercureBundle\MercureBundle; +use Symfony\Component\Asset\Package; use Symfony\Component\Asset\PackageInterface; use Symfony\Component\AssetMapper\AssetMapper; use Symfony\Component\AssetMapper\Compiler\AssetCompilerInterface; @@ -133,6 +134,8 @@ use Symfony\Component\Messenger\MessageBusInterface; use Symfony\Component\Messenger\Middleware\DeduplicateMiddleware; use Symfony\Component\Messenger\Middleware\RouterContextMiddleware; +use Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory; +use Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory; use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface; use Symfony\Component\Messenger\Transport\TransportFactoryInterface as MessengerTransportFactoryInterface; use Symfony\Component\Messenger\Transport\TransportInterface; @@ -176,6 +179,7 @@ use Symfony\Component\Scheduler\Messenger\Serializer\Normalizer\SchedulerTriggerNormalizer; use Symfony\Component\Security\Core\AuthenticationEvents; use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Csrf\CsrfToken; use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; use Symfony\Component\Semaphore\PersistingStoreInterface as SemaphoreStoreInterface; use Symfony\Component\Semaphore\Semaphore; @@ -389,7 +393,7 @@ public function load(array $configs, ContainerBuilder $container): void } if ($this->readConfigEnabled('assets', $container, $config['assets'])) { - if (!class_exists(\Symfony\Component\Asset\Package::class)) { + if (!class_exists(Package::class)) { throw new LogicException('Asset support cannot be enabled as the Asset component is not installed. Try running "composer require symfony/asset".'); } @@ -594,9 +598,9 @@ public function load(array $configs, ContainerBuilder $container): void $container->removeDefinition('cache.messenger.restart_workers_signal'); if ($container->hasDefinition('messenger.transport.amqp.factory') && !class_exists(MessengerBridge\Amqp\Transport\AmqpTransportFactory::class)) { - if (class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory::class)) { + if (class_exists(AmqpTransportFactory::class)) { $container->getDefinition('messenger.transport.amqp.factory') - ->setClass(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory::class) + ->setClass(AmqpTransportFactory::class) ->addTag('messenger.transport_factory'); } else { $container->removeDefinition('messenger.transport.amqp.factory'); @@ -604,9 +608,9 @@ public function load(array $configs, ContainerBuilder $container): void } if ($container->hasDefinition('messenger.transport.redis.factory') && !class_exists(MessengerBridge\Redis\Transport\RedisTransportFactory::class)) { - if (class_exists(\Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory::class)) { + if (class_exists(RedisTransportFactory::class)) { $container->getDefinition('messenger.transport.redis.factory') - ->setClass(\Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory::class) + ->setClass(RedisTransportFactory::class) ->addTag('messenger.transport_factory'); } else { $container->removeDefinition('messenger.transport.redis.factory'); @@ -1971,7 +1975,7 @@ private function registerSecurityCsrfConfiguration(array $config, ContainerBuild return; } - if (!class_exists(\Symfony\Component\Security\Csrf\CsrfToken::class)) { + if (!class_exists(CsrfToken::class)) { throw new LogicException('CSRF support cannot be enabled as the Security CSRF component is not installed. Try running "composer require symfony/security-csrf".'); } if (!$config['stateless_token_ids'] && !$this->isInitializedConfigEnabled('session')) { diff --git a/Resources/config/console.php b/Resources/config/console.php index 7ef10bb52..fda2f75d7 100644 --- a/Resources/config/console.php +++ b/Resources/config/console.php @@ -45,6 +45,7 @@ use Symfony\Component\Console\Messenger\RunCommandMessageHandler; use Symfony\Component\Dotenv\Command\DebugCommand as DotenvDebugCommand; use Symfony\Component\ErrorHandler\Command\ErrorDumpCommand; +use Symfony\Component\Form\Command\DebugCommand; use Symfony\Component\Messenger\Command\ConsumeMessagesCommand; use Symfony\Component\Messenger\Command\DebugCommand as MessengerDebugCommand; use Symfony\Component\Messenger\Command\FailedMessagesRemoveCommand; @@ -327,7 +328,7 @@ ]) ->tag('console.command') - ->set('console.command.form_debug', \Symfony\Component\Form\Command\DebugCommand::class) + ->set('console.command.form_debug', DebugCommand::class) ->args([ service('form.registry'), [], // All form types namespaces are stored here by FormPass diff --git a/Tests/DependencyInjection/FrameworkExtensionTestCase.php b/Tests/DependencyInjection/FrameworkExtensionTestCase.php index f7aad3925..ad1448c71 100644 --- a/Tests/DependencyInjection/FrameworkExtensionTestCase.php +++ b/Tests/DependencyInjection/FrameworkExtensionTestCase.php @@ -14,6 +14,7 @@ use PHPUnit\Framework\Attributes\DataProvider; use Psr\Cache\CacheItemPoolInterface; use Psr\Log\LoggerAwareInterface; +use Psr\Log\LogLevel; use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Fixtures\Workflow\Validator\DefinitionValidator; @@ -59,6 +60,10 @@ use Symfony\Component\HttpClient\ThrottlingHttpClient; use Symfony\Component\HttpFoundation\IpUtils; use Symfony\Component\HttpKernel\DependencyInjection\LoggerPass; +use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; +use Symfony\Component\HttpKernel\Exception\ConflictHttpException; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException; use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface; use Symfony\Component\Lock\Store\SemaphoreStore; use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsTransportFactory; @@ -599,8 +604,8 @@ public function testPhpErrorsWithLogLevels() $definition = $container->getDefinition('debug.error_handler_configurator'); $this->assertEquals(new Reference('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE), $definition->getArgument(0)); $this->assertSame([ - \E_NOTICE => \Psr\Log\LogLevel::ERROR, - \E_WARNING => \Psr\Log\LogLevel::ERROR, + \E_NOTICE => LogLevel::ERROR, + \E_WARNING => LogLevel::ERROR, ], $definition->getArgument(1)); } @@ -611,35 +616,35 @@ public function testExceptionsConfig() $configuration = $container->getDefinition('exception_listener')->getArgument(3); $this->assertSame([ - \Symfony\Component\HttpKernel\Exception\BadRequestHttpException::class, - \Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class, - \Symfony\Component\HttpKernel\Exception\ConflictHttpException::class, - \Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException::class, + BadRequestHttpException::class, + NotFoundHttpException::class, + ConflictHttpException::class, + ServiceUnavailableHttpException::class, ], array_keys($configuration)); $this->assertEqualsCanonicalizing([ 'log_channel' => null, 'log_level' => 'info', 'status_code' => 422, - ], $configuration[\Symfony\Component\HttpKernel\Exception\BadRequestHttpException::class]); + ], $configuration[BadRequestHttpException::class]); $this->assertEqualsCanonicalizing([ 'log_channel' => null, 'log_level' => 'info', 'status_code' => null, - ], $configuration[\Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class]); + ], $configuration[NotFoundHttpException::class]); $this->assertEqualsCanonicalizing([ 'log_channel' => null, 'log_level' => 'info', 'status_code' => null, - ], $configuration[\Symfony\Component\HttpKernel\Exception\ConflictHttpException::class]); + ], $configuration[ConflictHttpException::class]); $this->assertEqualsCanonicalizing([ 'log_channel' => null, 'log_level' => null, 'status_code' => 500, - ], $configuration[\Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException::class]); + ], $configuration[ServiceUnavailableHttpException::class]); } public function testRouter() From fd6f97536dbc2eaa9871260f0a70be1a9513d994 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 4 Aug 2025 17:29:10 +0200 Subject: [PATCH 50/59] [FrameworkBundle] Decouple ControllerResolverTest from HttpKernel --- Tests/Controller/ControllerResolverTest.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Tests/Controller/ControllerResolverTest.php b/Tests/Controller/ControllerResolverTest.php index 7c7398fd3..ce14ca559 100644 --- a/Tests/Controller/ControllerResolverTest.php +++ b/Tests/Controller/ControllerResolverTest.php @@ -11,15 +11,15 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; +use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface as Psr11ContainerInterface; use Psr\Log\LoggerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Tests\Controller\ContainerControllerResolverTest; -class ControllerResolverTest extends ContainerControllerResolverTest +class ControllerResolverTest extends TestCase { public function testAbstractControllerGetsContainerWhenNotSet() { @@ -111,11 +111,6 @@ protected function createControllerResolver(?LoggerInterface $logger = null, ?Ps return new ControllerResolver($container, $logger); } - - protected function createMockParser() - { - return $this->createMock(ControllerNameParser::class); - } } class DummyController extends AbstractController From e1fbaac6099fc213cb82d3fb295e4f51914c3a46 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 4 Aug 2025 17:50:26 +0200 Subject: [PATCH 51/59] Remove some unneeded var annotations --- Command/AssetsInstallCommand.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/Command/AssetsInstallCommand.php b/Command/AssetsInstallCommand.php index 5dc8c828e..d8a4f345f 100644 --- a/Command/AssetsInstallCommand.php +++ b/Command/AssetsInstallCommand.php @@ -23,7 +23,6 @@ use Symfony\Component\Filesystem\Exception\IOException; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Component\HttpKernel\KernelInterface; /** @@ -119,7 +118,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int $copyUsed = false; $exitCode = 0; $validAssetDirs = []; - /** @var BundleInterface $bundle */ foreach ($kernel->getBundles() as $bundle) { if (!is_dir($originDir = $bundle->getPath().'/Resources/public') && !is_dir($originDir = $bundle->getPath().'/public')) { continue; From 78c35c192530264e3ef9abfccee5c6623256510f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 4 Aug 2025 18:39:53 +0200 Subject: [PATCH 52/59] Fix merge --- DependencyInjection/FrameworkExtension.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index b76176001..70f576473 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -127,8 +127,6 @@ use Symfony\Component\Messenger\MessageBusInterface; use Symfony\Component\Messenger\Middleware\DeduplicateMiddleware; use Symfony\Component\Messenger\Middleware\RouterContextMiddleware; -use Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory; -use Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory; use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface; use Symfony\Component\Messenger\Transport\TransportFactoryInterface as MessengerTransportFactoryInterface; use Symfony\Component\Messenger\Transport\TransportInterface; From 8f2e1890c4921be4b02151e094b13fb8ea3f10d3 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 24 Jun 2025 13:39:09 +0100 Subject: [PATCH 53/59] Remove some implicit bool type juggling --- Command/DebugAutowiringCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Command/DebugAutowiringCommand.php b/Command/DebugAutowiringCommand.php index 85f546c2f..841c90d5c 100644 --- a/Command/DebugAutowiringCommand.php +++ b/Command/DebugAutowiringCommand.php @@ -184,7 +184,7 @@ private function getFileLink(string $class): string return ''; } - return (string) $this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine()); + return $r->getFileName() ? ($this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine()) ?: '') : ''; } public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void From 6efbca9db75b4e6ed745912df7d3644b47bdf4af Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Thu, 31 Jul 2025 09:35:48 +0200 Subject: [PATCH 54/59] [Mailer] Add MicrosoftGraph API Transport --- DependencyInjection/FrameworkExtension.php | 1 + Resources/config/mailer_transports.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index 79bf63d40..521786371 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -2887,6 +2887,7 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co MailerBridge\Mailomat\Transport\MailomatTransportFactory::class => 'mailer.transport_factory.mailomat', MailerBridge\MailPace\Transport\MailPaceTransportFactory::class => 'mailer.transport_factory.mailpace', MailerBridge\Mailchimp\Transport\MandrillTransportFactory::class => 'mailer.transport_factory.mailchimp', + MailerBridge\MicrosoftGraph\Transport\MicrosoftGraphTransportFactory::class => 'mailer.transport_factory.microsoftgraph', MailerBridge\Postal\Transport\PostalTransportFactory::class => 'mailer.transport_factory.postal', MailerBridge\Postmark\Transport\PostmarkTransportFactory::class => 'mailer.transport_factory.postmark', MailerBridge\Mailtrap\Transport\MailtrapTransportFactory::class => 'mailer.transport_factory.mailtrap', diff --git a/Resources/config/mailer_transports.php b/Resources/config/mailer_transports.php index 2c79b4d55..e88e95166 100644 --- a/Resources/config/mailer_transports.php +++ b/Resources/config/mailer_transports.php @@ -24,6 +24,7 @@ use Symfony\Component\Mailer\Bridge\Mailomat\Transport\MailomatTransportFactory; use Symfony\Component\Mailer\Bridge\MailPace\Transport\MailPaceTransportFactory; use Symfony\Component\Mailer\Bridge\Mailtrap\Transport\MailtrapTransportFactory; +use Symfony\Component\Mailer\Bridge\MicrosoftGraph\Transport\MicrosoftGraphTransportFactory; use Symfony\Component\Mailer\Bridge\Postal\Transport\PostalTransportFactory; use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory; use Symfony\Component\Mailer\Bridge\Resend\Transport\ResendTransportFactory; @@ -60,6 +61,7 @@ 'mailjet' => MailjetTransportFactory::class, 'mailomat' => MailomatTransportFactory::class, 'mailpace' => MailPaceTransportFactory::class, + 'microsoftgraph' => MicrosoftGraphTransportFactory::class, 'native' => NativeTransportFactory::class, 'null' => NullTransportFactory::class, 'postal' => PostalTransportFactory::class, From be639dea579fdcdad8c58af53bebe21e66db5628 Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Sun, 10 Aug 2025 00:28:14 +0200 Subject: [PATCH 55/59] chore: heredoc indentation as of PHP 7.3 https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc --- Command/AboutCommand.php | 8 +-- Command/AssetsInstallCommand.php | 22 +++---- Command/CacheClearCommand.php | 10 +-- Command/CachePoolClearCommand.php | 6 +- Command/CachePoolDeleteCommand.php | 6 +- Command/CachePoolListCommand.php | 4 +- Command/CachePoolPruneCommand.php | 6 +- Command/CacheWarmupCommand.php | 6 +- Command/ConfigDebugCommand.php | 20 +++--- Command/ConfigDumpReferenceCommand.php | 20 +++--- Command/ContainerDebugCommand.php | 56 ++++++++-------- Command/DebugAutowiringCommand.php | 12 ++-- Command/EventDispatcherDebugCommand.php | 14 ++-- Command/RouterDebugCommand.php | 10 +-- Command/RouterMatchCommand.php | 10 +-- Command/SecretsDecryptToLocalCommand.php | 10 +-- Command/SecretsEncryptFromLocalCommand.php | 6 +- Command/SecretsGenerateKeysCommand.php | 14 ++-- Command/SecretsListCommand.php | 10 +-- Command/SecretsRemoveCommand.php | 6 +- Command/SecretsRevealCommand.php | 6 +- Command/SecretsSetCommand.php | 22 +++---- Command/TranslationDebugCommand.php | 32 ++++----- Command/TranslationExtractCommand.php | 36 +++++----- Command/WorkflowDumpCommand.php | 12 ++-- Command/XliffLintCommand.php | 6 +- Command/YamlLintCommand.php | 6 +- KernelBrowser.php | 24 +++---- Tests/Command/XliffLintCommandTest.php | 6 +- Tests/Command/YamlLintCommandTest.php | 6 +- Tests/Functional/ApiAttributesTest.php | 66 +++++++++---------- .../ConfigDumpReferenceCommandTest.php | 10 +-- .../Functional/ContainerDebugCommandTest.php | 26 ++++---- Tests/Functional/FragmentTest.php | 16 ++--- 34 files changed, 265 insertions(+), 265 deletions(-) diff --git a/Command/AboutCommand.php b/Command/AboutCommand.php index 0c6899328..8b4604970 100644 --- a/Command/AboutCommand.php +++ b/Command/AboutCommand.php @@ -36,11 +36,11 @@ protected function configure(): void { $this ->setHelp(<<<'EOT' -The %command.name% command displays information about the current Symfony project. + The %command.name% command displays information about the current Symfony project. -The PHP section displays important configuration that could affect your application. The values might -be different between web and CLI. -EOT + The PHP section displays important configuration that could affect your application. The values might + be different between web and CLI. + EOT ) ; } diff --git a/Command/AssetsInstallCommand.php b/Command/AssetsInstallCommand.php index d8a4f345f..6fbabc865 100644 --- a/Command/AssetsInstallCommand.php +++ b/Command/AssetsInstallCommand.php @@ -57,24 +57,24 @@ protected function configure(): void ->addOption('relative', null, InputOption::VALUE_NONE, 'Make relative symlinks') ->addOption('no-cleanup', null, InputOption::VALUE_NONE, 'Do not remove the assets of the bundles that no longer exist') ->setHelp(<<<'EOT' -The %command.name% command installs bundle assets into a given -directory (e.g. the public directory). + The %command.name% command installs bundle assets into a given + directory (e.g. the public directory). - php %command.full_name% public + php %command.full_name% public -A "bundles" directory will be created inside the target directory and the -"Resources/public" directory of each bundle will be copied into it. + A "bundles" directory will be created inside the target directory and the + "Resources/public" directory of each bundle will be copied into it. -To create a symlink to each bundle instead of copying its assets, use the ---symlink option (will fall back to hard copies when symbolic links aren't possible: + To create a symlink to each bundle instead of copying its assets, use the + --symlink option (will fall back to hard copies when symbolic links aren't possible: - php %command.full_name% public --symlink + php %command.full_name% public --symlink -To make symlink relative, add the --relative option: + To make symlink relative, add the --relative option: - php %command.full_name% public --symlink --relative + php %command.full_name% public --symlink --relative -EOT + EOT ) ; } diff --git a/Command/CacheClearCommand.php b/Command/CacheClearCommand.php index 01ddedde3..3f3960ef8 100644 --- a/Command/CacheClearCommand.php +++ b/Command/CacheClearCommand.php @@ -56,12 +56,12 @@ protected function configure(): void new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'), ]) ->setHelp(<<<'EOF' -The %command.name% command clears and warms up the application cache for a given environment -and debug mode: + The %command.name% command clears and warms up the application cache for a given environment + and debug mode: - php %command.full_name% --env=dev - php %command.full_name% --env=prod --no-debug -EOF + php %command.full_name% --env=dev + php %command.full_name% --env=prod --no-debug + EOF ) ; } diff --git a/Command/CachePoolClearCommand.php b/Command/CachePoolClearCommand.php index 5d840e597..d4bca0d8f 100644 --- a/Command/CachePoolClearCommand.php +++ b/Command/CachePoolClearCommand.php @@ -51,10 +51,10 @@ protected function configure(): void ->addOption('all', null, InputOption::VALUE_NONE, 'Clear all cache pools') ->addOption('exclude', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'A list of cache pools or cache pool clearers to exclude') ->setHelp(<<<'EOF' -The %command.name% command clears the given cache pools or cache pool clearers. + The %command.name% command clears the given cache pools or cache pool clearers. - %command.full_name% [...] -EOF + %command.full_name% [...] + EOF ) ; } diff --git a/Command/CachePoolDeleteCommand.php b/Command/CachePoolDeleteCommand.php index 8fb1d1aaa..c3c23a391 100644 --- a/Command/CachePoolDeleteCommand.php +++ b/Command/CachePoolDeleteCommand.php @@ -47,10 +47,10 @@ protected function configure(): void new InputArgument('key', InputArgument::REQUIRED, 'The cache key to delete from the pool'), ]) ->setHelp(<<<'EOF' -The %command.name% deletes an item from a given cache pool. + The %command.name% deletes an item from a given cache pool. - %command.full_name% -EOF + %command.full_name% + EOF ) ; } diff --git a/Command/CachePoolListCommand.php b/Command/CachePoolListCommand.php index 6b8e71eb0..6aedfb0c0 100644 --- a/Command/CachePoolListCommand.php +++ b/Command/CachePoolListCommand.php @@ -38,8 +38,8 @@ protected function configure(): void { $this ->setHelp(<<<'EOF' -The %command.name% command lists all available cache pools. -EOF + The %command.name% command lists all available cache pools. + EOF ) ; } diff --git a/Command/CachePoolPruneCommand.php b/Command/CachePoolPruneCommand.php index 745a001cc..5036da8ef 100644 --- a/Command/CachePoolPruneCommand.php +++ b/Command/CachePoolPruneCommand.php @@ -39,10 +39,10 @@ protected function configure(): void { $this ->setHelp(<<<'EOF' -The %command.name% command deletes all expired items from all pruneable pools. + The %command.name% command deletes all expired items from all pruneable pools. - %command.full_name% -EOF + %command.full_name% + EOF ) ; } diff --git a/Command/CacheWarmupCommand.php b/Command/CacheWarmupCommand.php index b096b0801..8ade22560 100644 --- a/Command/CacheWarmupCommand.php +++ b/Command/CacheWarmupCommand.php @@ -44,11 +44,11 @@ protected function configure(): void new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'), ]) ->setHelp(<<<'EOF' -The %command.name% command warms up the cache. + The %command.name% command warms up the cache. -Before running this command, the cache must be empty. + Before running this command, the cache must be empty. -EOF + EOF ) ; } diff --git a/Command/ConfigDebugCommand.php b/Command/ConfigDebugCommand.php index 8d5f85cee..50c8dddf5 100644 --- a/Command/ConfigDebugCommand.php +++ b/Command/ConfigDebugCommand.php @@ -49,23 +49,23 @@ protected function configure(): void new InputOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), class_exists(Yaml::class) ? 'txt' : 'json'), ]) ->setHelp(<<%command.name% command dumps the current configuration for an -extension/bundle. + The %command.name% command dumps the current configuration for an + extension/bundle. -Either the extension alias or bundle name can be used: + Either the extension alias or bundle name can be used: - php %command.full_name% framework - php %command.full_name% FrameworkBundle + php %command.full_name% framework + php %command.full_name% FrameworkBundle -The --format option specifies the format of the command output: + The --format option specifies the format of the command output: - php %command.full_name% framework --format=json + php %command.full_name% framework --format=json -For dumping a specific option, add its path as second argument: + For dumping a specific option, add its path as second argument: - php %command.full_name% framework serializer.enabled + php %command.full_name% framework serializer.enabled -EOF + EOF ) ; } diff --git a/Command/ConfigDumpReferenceCommand.php b/Command/ConfigDumpReferenceCommand.php index 3cb744d74..3a6d1252d 100644 --- a/Command/ConfigDumpReferenceCommand.php +++ b/Command/ConfigDumpReferenceCommand.php @@ -47,23 +47,23 @@ protected function configure(): void new InputOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), 'yaml'), ]) ->setHelp(<<%command.name% command dumps the default configuration for an -extension/bundle. + The %command.name% command dumps the default configuration for an + extension/bundle. -Either the extension alias or bundle name can be used: + Either the extension alias or bundle name can be used: - php %command.full_name% framework - php %command.full_name% FrameworkBundle + php %command.full_name% framework + php %command.full_name% FrameworkBundle -The --format option specifies the format of the command output: + The --format option specifies the format of the command output: - php %command.full_name% FrameworkBundle --format=json + php %command.full_name% FrameworkBundle --format=json -For dumping a specific option, add its path as second argument (only available for the yaml format): + For dumping a specific option, add its path as second argument (only available for the yaml format): - php %command.full_name% framework http_client.default_options + php %command.full_name% framework http_client.default_options -EOF + EOF ) ; } diff --git a/Command/ContainerDebugCommand.php b/Command/ContainerDebugCommand.php index 17c71bdca..f0f7d5a1b 100644 --- a/Command/ContainerDebugCommand.php +++ b/Command/ContainerDebugCommand.php @@ -57,59 +57,59 @@ protected function configure(): void new InputOption('deprecations', null, InputOption::VALUE_NONE, 'Display deprecations generated when compiling and warming up the container'), ]) ->setHelp(<<<'EOF' -The %command.name% command displays all configured public services: + The %command.name% command displays all configured public services: - php %command.full_name% + php %command.full_name% -To see deprecations generated during container compilation and cache warmup, use the --deprecations option: + To see deprecations generated during container compilation and cache warmup, use the --deprecations option: - php %command.full_name% --deprecations + php %command.full_name% --deprecations -To get specific information about a service, specify its name: + To get specific information about a service, specify its name: - php %command.full_name% validator + php %command.full_name% validator -To get specific information about a service including all its arguments, use the --show-arguments flag: + To get specific information about a service including all its arguments, use the --show-arguments flag: - php %command.full_name% validator --show-arguments + php %command.full_name% validator --show-arguments -To see available types that can be used for autowiring, use the --types flag: + To see available types that can be used for autowiring, use the --types flag: - php %command.full_name% --types + php %command.full_name% --types -To see environment variables used by the container, use the --env-vars flag: + To see environment variables used by the container, use the --env-vars flag: - php %command.full_name% --env-vars + php %command.full_name% --env-vars -Display a specific environment variable by specifying its name with the --env-var option: + Display a specific environment variable by specifying its name with the --env-var option: - php %command.full_name% --env-var=APP_ENV + php %command.full_name% --env-var=APP_ENV -Use the --tags option to display tagged public services grouped by tag: + Use the --tags option to display tagged public services grouped by tag: - php %command.full_name% --tags + php %command.full_name% --tags -Find all services with a specific tag by specifying the tag name with the --tag option: + Find all services with a specific tag by specifying the tag name with the --tag option: - php %command.full_name% --tag=form.type + php %command.full_name% --tag=form.type -Use the --parameters option to display all parameters: + Use the --parameters option to display all parameters: - php %command.full_name% --parameters + php %command.full_name% --parameters -Display a specific parameter by specifying its name with the --parameter option: + Display a specific parameter by specifying its name with the --parameter option: - php %command.full_name% --parameter=kernel.debug + php %command.full_name% --parameter=kernel.debug -By default, internal services are hidden. You can display them -using the --show-hidden flag: + By default, internal services are hidden. You can display them + using the --show-hidden flag: - php %command.full_name% --show-hidden + php %command.full_name% --show-hidden -The --format option specifies the format of the command output: + The --format option specifies the format of the command output: - php %command.full_name% --format=json -EOF + php %command.full_name% --format=json + EOF ) ; } diff --git a/Command/DebugAutowiringCommand.php b/Command/DebugAutowiringCommand.php index 841c90d5c..5c1869c6a 100644 --- a/Command/DebugAutowiringCommand.php +++ b/Command/DebugAutowiringCommand.php @@ -47,16 +47,16 @@ protected function configure(): void new InputOption('all', null, InputOption::VALUE_NONE, 'Show also services that are not aliased'), ]) ->setHelp(<<<'EOF' -The %command.name% command displays the classes and interfaces that -you can use as type-hints for autowiring: + The %command.name% command displays the classes and interfaces that + you can use as type-hints for autowiring: - php %command.full_name% + php %command.full_name% -You can also pass a search term to filter the list: + You can also pass a search term to filter the list: - php %command.full_name% log + php %command.full_name% log -EOF + EOF ) ; } diff --git a/Command/EventDispatcherDebugCommand.php b/Command/EventDispatcherDebugCommand.php index 3c51cb1b7..43766ed92 100644 --- a/Command/EventDispatcherDebugCommand.php +++ b/Command/EventDispatcherDebugCommand.php @@ -53,18 +53,18 @@ protected function configure(): void new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw description'), ]) ->setHelp(<<<'EOF' -The %command.name% command displays all configured listeners: + The %command.name% command displays all configured listeners: - php %command.full_name% + php %command.full_name% -To get specific listeners for an event, specify its name: + To get specific listeners for an event, specify its name: - php %command.full_name% kernel.request + php %command.full_name% kernel.request -The --format option specifies the format of the command output: + The --format option specifies the format of the command output: - php %command.full_name% --format=json -EOF + php %command.full_name% --format=json + EOF ) ; } diff --git a/Command/RouterDebugCommand.php b/Command/RouterDebugCommand.php index e54377115..3daf865b3 100644 --- a/Command/RouterDebugCommand.php +++ b/Command/RouterDebugCommand.php @@ -58,14 +58,14 @@ protected function configure(): void new InputOption('method', null, InputOption::VALUE_REQUIRED, 'Filter by HTTP method', '', ['GET', 'POST', 'PUT', 'DELETE', 'PATCH']), ]) ->setHelp(<<<'EOF' -The %command.name% displays the configured routes: + The %command.name% displays the configured routes: - php %command.full_name% + php %command.full_name% -The --format option specifies the format of the command output: + The --format option specifies the format of the command output: - php %command.full_name% --format=json -EOF + php %command.full_name% --format=json + EOF ) ; } diff --git a/Command/RouterMatchCommand.php b/Command/RouterMatchCommand.php index 3f0ea3cb5..dee448517 100644 --- a/Command/RouterMatchCommand.php +++ b/Command/RouterMatchCommand.php @@ -53,15 +53,15 @@ protected function configure(): void new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Set the URI host'), ]) ->setHelp(<<<'EOF' -The %command.name% shows which routes match a given request and which don't and for what reason: + The %command.name% shows which routes match a given request and which don't and for what reason: - php %command.full_name% /foo + php %command.full_name% /foo -or + or - php %command.full_name% /foo --method POST --scheme https --host symfony.com --verbose + php %command.full_name% /foo --method POST --scheme https --host symfony.com --verbose -EOF + EOF ) ; } diff --git a/Command/SecretsDecryptToLocalCommand.php b/Command/SecretsDecryptToLocalCommand.php index 4e392b677..3dee29450 100644 --- a/Command/SecretsDecryptToLocalCommand.php +++ b/Command/SecretsDecryptToLocalCommand.php @@ -40,14 +40,14 @@ protected function configure(): void $this ->addOption('force', 'f', InputOption::VALUE_NONE, 'Force overriding of secrets that already exist in the local vault') ->setHelp(<<<'EOF' -The %command.name% command decrypts all secrets and copies them in the local vault. + The %command.name% command decrypts all secrets and copies them in the local vault. - %command.full_name% + %command.full_name% -When the --force option is provided, secrets that already exist in the local vault are overridden. + When the --force option is provided, secrets that already exist in the local vault are overridden. - %command.full_name% --force -EOF + %command.full_name% --force + EOF ) ; } diff --git a/Command/SecretsEncryptFromLocalCommand.php b/Command/SecretsEncryptFromLocalCommand.php index 9740098e5..248f10966 100644 --- a/Command/SecretsEncryptFromLocalCommand.php +++ b/Command/SecretsEncryptFromLocalCommand.php @@ -38,10 +38,10 @@ protected function configure(): void { $this ->setHelp(<<<'EOF' -The %command.name% command encrypts all locally overridden secrets to the vault. + The %command.name% command encrypts all locally overridden secrets to the vault. - %command.full_name% -EOF + %command.full_name% + EOF ) ; } diff --git a/Command/SecretsGenerateKeysCommand.php b/Command/SecretsGenerateKeysCommand.php index f721c786e..e0d5d9c52 100644 --- a/Command/SecretsGenerateKeysCommand.php +++ b/Command/SecretsGenerateKeysCommand.php @@ -43,16 +43,16 @@ protected function configure(): void ->addOption('local', 'l', InputOption::VALUE_NONE, 'Update the local vault.') ->addOption('rotate', 'r', InputOption::VALUE_NONE, 'Re-encrypt existing secrets with the newly generated keys.') ->setHelp(<<<'EOF' -The %command.name% command generates a new encryption key. + The %command.name% command generates a new encryption key. - %command.full_name% + %command.full_name% -If encryption keys already exist, the command must be called with -the --rotate option in order to override those keys and re-encrypt -existing secrets. + If encryption keys already exist, the command must be called with + the --rotate option in order to override those keys and re-encrypt + existing secrets. - %command.full_name% --rotate -EOF + %command.full_name% --rotate + EOF ) ; } diff --git a/Command/SecretsListCommand.php b/Command/SecretsListCommand.php index 920b3b1fc..9057f58d1 100644 --- a/Command/SecretsListCommand.php +++ b/Command/SecretsListCommand.php @@ -43,14 +43,14 @@ protected function configure(): void $this ->addOption('reveal', 'r', InputOption::VALUE_NONE, 'Display decrypted values alongside names') ->setHelp(<<<'EOF' -The %command.name% command list all stored secrets. + The %command.name% command list all stored secrets. - %command.full_name% + %command.full_name% -When the option --reveal is provided, the decrypted secrets are also displayed. + When the option --reveal is provided, the decrypted secrets are also displayed. - %command.full_name% --reveal -EOF + %command.full_name% --reveal + EOF ) ; } diff --git a/Command/SecretsRemoveCommand.php b/Command/SecretsRemoveCommand.php index 59bbe8211..2c3bbb18e 100644 --- a/Command/SecretsRemoveCommand.php +++ b/Command/SecretsRemoveCommand.php @@ -45,10 +45,10 @@ protected function configure(): void ->addArgument('name', InputArgument::REQUIRED, 'The name of the secret') ->addOption('local', 'l', InputOption::VALUE_NONE, 'Update the local vault.') ->setHelp(<<<'EOF' -The %command.name% command removes a secret from the vault. + The %command.name% command removes a secret from the vault. - %command.full_name% -EOF + %command.full_name% + EOF ) ; } diff --git a/Command/SecretsRevealCommand.php b/Command/SecretsRevealCommand.php index c2110ee76..8a678e14d 100644 --- a/Command/SecretsRevealCommand.php +++ b/Command/SecretsRevealCommand.php @@ -38,10 +38,10 @@ protected function configure(): void $this ->addArgument('name', InputArgument::REQUIRED, 'The name of the secret to reveal', null, fn () => array_keys($this->vault->list())) ->setHelp(<<<'EOF' -The %command.name% command reveals a stored secret. + The %command.name% command reveals a stored secret. - %command.full_name% -EOF + %command.full_name% + EOF ) ; } diff --git a/Command/SecretsSetCommand.php b/Command/SecretsSetCommand.php index f7e8eeaa6..c9eabb25a 100644 --- a/Command/SecretsSetCommand.php +++ b/Command/SecretsSetCommand.php @@ -48,24 +48,24 @@ protected function configure(): void ->addOption('local', 'l', InputOption::VALUE_NONE, 'Update the local vault.') ->addOption('random', 'r', InputOption::VALUE_OPTIONAL, 'Generate a random value.', false) ->setHelp(<<<'EOF' -The %command.name% command stores a secret in the vault. + The %command.name% command stores a secret in the vault. - %command.full_name% + %command.full_name% -To reference secrets in services.yaml or any other config -files, use "%env()%". + To reference secrets in services.yaml or any other config + files, use "%env()%". -By default, the secret value should be entered interactively. -Alternatively, provide a file where to read the secret from: + By default, the secret value should be entered interactively. + Alternatively, provide a file where to read the secret from: - php %command.full_name% filename + php %command.full_name% filename -Use "-" as a file name to read from STDIN: + Use "-" as a file name to read from STDIN: - cat filename | php %command.full_name% - + cat filename | php %command.full_name% - -Use --local to override secrets for local needs. -EOF + Use --local to override secrets for local needs. + EOF ) ; } diff --git a/Command/TranslationDebugCommand.php b/Command/TranslationDebugCommand.php index a320130d5..b186646a3 100644 --- a/Command/TranslationDebugCommand.php +++ b/Command/TranslationDebugCommand.php @@ -75,35 +75,35 @@ protected function configure(): void new InputOption('all', null, InputOption::VALUE_NONE, 'Load messages from all registered bundles'), ]) ->setHelp(<<<'EOF' -The %command.name% command helps finding unused or missing translation -messages and comparing them with the fallback ones by inspecting the -templates and translation files of a given bundle or the default translations directory. + The %command.name% command helps finding unused or missing translation + messages and comparing them with the fallback ones by inspecting the + templates and translation files of a given bundle or the default translations directory. -You can display information about bundle translations in a specific locale: + You can display information about bundle translations in a specific locale: - php %command.full_name% en AcmeDemoBundle + php %command.full_name% en AcmeDemoBundle -You can also specify a translation domain for the search: + You can also specify a translation domain for the search: - php %command.full_name% --domain=messages en AcmeDemoBundle + php %command.full_name% --domain=messages en AcmeDemoBundle -You can only display missing messages: + You can only display missing messages: - php %command.full_name% --only-missing en AcmeDemoBundle + php %command.full_name% --only-missing en AcmeDemoBundle -You can only display unused messages: + You can only display unused messages: - php %command.full_name% --only-unused en AcmeDemoBundle + php %command.full_name% --only-unused en AcmeDemoBundle -You can display information about application translations in a specific locale: + You can display information about application translations in a specific locale: - php %command.full_name% en + php %command.full_name% en -You can display information about translations in all registered bundles in a specific locale: + You can display information about translations in all registered bundles in a specific locale: - php %command.full_name% --all en + php %command.full_name% --all en -EOF + EOF ) ; } diff --git a/Command/TranslationExtractCommand.php b/Command/TranslationExtractCommand.php index c8e61b61a..0cd780734 100644 --- a/Command/TranslationExtractCommand.php +++ b/Command/TranslationExtractCommand.php @@ -83,34 +83,34 @@ protected function configure(): void new InputOption('as-tree', null, InputOption::VALUE_REQUIRED, 'Dump the messages as a tree-like structure: The given value defines the level where to switch to inline YAML'), ]) ->setHelp(<<<'EOF' -The %command.name% command extracts translation strings from templates -of a given bundle or the default translations directory. It can display them or merge -the new ones into the translation files. + The %command.name% command extracts translation strings from templates + of a given bundle or the default translations directory. It can display them or merge + the new ones into the translation files. -When new translation strings are found it can automatically add a prefix to the translation -message. However, if the --no-fill option is used, the --prefix -option has no effect, since the translation values are left empty. + When new translation strings are found it can automatically add a prefix to the translation + message. However, if the --no-fill option is used, the --prefix + option has no effect, since the translation values are left empty. -Example running against a Bundle (AcmeBundle) + Example running against a Bundle (AcmeBundle) - php %command.full_name% --dump-messages en AcmeBundle - php %command.full_name% --force --prefix="new_" fr AcmeBundle + php %command.full_name% --dump-messages en AcmeBundle + php %command.full_name% --force --prefix="new_" fr AcmeBundle -Example running against default messages directory + Example running against default messages directory - php %command.full_name% --dump-messages en - php %command.full_name% --force --prefix="new_" fr + php %command.full_name% --dump-messages en + php %command.full_name% --force --prefix="new_" fr -You can sort the output with the --sort flag: + You can sort the output with the --sort flag: - php %command.full_name% --dump-messages --sort=asc en AcmeBundle - php %command.full_name% --force --sort=desc fr + php %command.full_name% --dump-messages --sort=asc en AcmeBundle + php %command.full_name% --force --sort=desc fr -You can dump a tree-like structure using the yaml format with --as-tree flag: + You can dump a tree-like structure using the yaml format with --as-tree flag: - php %command.full_name% --force --format=yaml --as-tree=3 en AcmeBundle + php %command.full_name% --force --format=yaml --as-tree=3 en AcmeBundle -EOF + EOF ) ; } diff --git a/Command/WorkflowDumpCommand.php b/Command/WorkflowDumpCommand.php index 201fb8be8..06570e9ea 100644 --- a/Command/WorkflowDumpCommand.php +++ b/Command/WorkflowDumpCommand.php @@ -59,13 +59,13 @@ protected function configure(): void new InputOption('dump-format', null, InputOption::VALUE_REQUIRED, 'The dump format ['.implode('|', self::DUMP_FORMAT_OPTIONS).']', 'dot'), ]) ->setHelp(<<<'EOF' -The %command.name% command dumps the graphical representation of a -workflow in different formats + The %command.name% command dumps the graphical representation of a + workflow in different formats -DOT: %command.full_name% | dot -Tpng > workflow.png -PUML: %command.full_name% --dump-format=puml | java -jar plantuml.jar -p > workflow.png -MERMAID: %command.full_name% --dump-format=mermaid | mmdc -o workflow.svg -EOF + DOT: %command.full_name% | dot -Tpng > workflow.png + PUML: %command.full_name% --dump-format=puml | java -jar plantuml.jar -p > workflow.png + MERMAID: %command.full_name% --dump-format=mermaid | mmdc -o workflow.svg + EOF ) ; } diff --git a/Command/XliffLintCommand.php b/Command/XliffLintCommand.php index 5b094f165..9bbe39db1 100644 --- a/Command/XliffLintCommand.php +++ b/Command/XliffLintCommand.php @@ -47,11 +47,11 @@ protected function configure(): void $this->setHelp($this->getHelp().<<<'EOF' -Or find all files in a bundle: + Or find all files in a bundle: - php %command.full_name% @AcmeDemoBundle + php %command.full_name% @AcmeDemoBundle -EOF + EOF ); } } diff --git a/Command/YamlLintCommand.php b/Command/YamlLintCommand.php index 141390812..5948add7c 100644 --- a/Command/YamlLintCommand.php +++ b/Command/YamlLintCommand.php @@ -46,11 +46,11 @@ protected function configure(): void $this->setHelp($this->getHelp().<<<'EOF' -Or find all files in a bundle: + Or find all files in a bundle: - php %command.full_name% @AcmeDemoBundle + php %command.full_name% @AcmeDemoBundle -EOF + EOF ); } } diff --git a/KernelBrowser.php b/KernelBrowser.php index add2508ff..d5b4262a4 100644 --- a/KernelBrowser.php +++ b/KernelBrowser.php @@ -205,25 +205,25 @@ protected function getScript(object $request): string $profilerCode = ''; if ($this->profiler) { $profilerCode = <<<'EOF' -$container = $kernel->getContainer(); -$container = $container->has('test.service_container') ? $container->get('test.service_container') : $container; -$container->get('profiler')->enable(); -EOF; + $container = $kernel->getContainer(); + $container = $container->has('test.service_container') ? $container->get('test.service_container') : $container; + $container->get('profiler')->enable(); + EOF; } $code = <<boot(); -$profilerCode + \$kernel = unserialize($kernel); + \$kernel->boot(); + $profilerCode -\$request = unserialize($request); -EOF; + \$request = unserialize($request); + EOF; return $code.$this->getHandleScript(); } diff --git a/Tests/Command/XliffLintCommandTest.php b/Tests/Command/XliffLintCommandTest.php index ed96fbb00..f10834c5b 100644 --- a/Tests/Command/XliffLintCommandTest.php +++ b/Tests/Command/XliffLintCommandTest.php @@ -35,10 +35,10 @@ public function testGetHelp() { $command = new XliffLintCommand(); $expected = <<php %command.full_name% @AcmeDemoBundle -EOF; + php %command.full_name% @AcmeDemoBundle + EOF; $this->assertStringContainsString($expected, $command->getHelp()); } diff --git a/Tests/Command/YamlLintCommandTest.php b/Tests/Command/YamlLintCommandTest.php index 30a73015b..28c55a5ba 100644 --- a/Tests/Command/YamlLintCommandTest.php +++ b/Tests/Command/YamlLintCommandTest.php @@ -73,10 +73,10 @@ public function testGetHelp() { $command = new YamlLintCommand(); $expected = <<php %command.full_name% @AcmeDemoBundle -EOF; + php %command.full_name% @AcmeDemoBundle + EOF; $this->assertStringContainsString($expected, $command->getHelp()); } diff --git a/Tests/Functional/ApiAttributesTest.php b/Tests/Functional/ApiAttributesTest.php index 313c6d386..79c8a704b 100644 --- a/Tests/Functional/ApiAttributesTest.php +++ b/Tests/Functional/ApiAttributesTest.php @@ -145,24 +145,24 @@ public static function mapQueryStringProvider(): iterable ]; $expectedResponse = <<<'JSON' - { - "type": "https:\/\/symfony.com\/errors\/validation", - "title": "Validation Failed", - "status": 404, - "detail": "filter: This value should be of type Symfony\\Bundle\\FrameworkBundle\\Tests\\Functional\\Filter.", - "violations": [ - { - "parameters": { - "hint": "Failed to create object because the class misses the \"filter\" property.", - "{{ type }}": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Functional\\Filter" - }, - "propertyPath": "filter", - "template": "This value should be of type {{ type }}.", - "title": "This value should be of type Symfony\\Bundle\\FrameworkBundle\\Tests\\Functional\\Filter." - } - ] - } - JSON; + { + "type": "https:\/\/symfony.com\/errors\/validation", + "title": "Validation Failed", + "status": 404, + "detail": "filter: This value should be of type Symfony\\Bundle\\FrameworkBundle\\Tests\\Functional\\Filter.", + "violations": [ + { + "parameters": { + "hint": "Failed to create object because the class misses the \"filter\" property.", + "{{ type }}": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Functional\\Filter" + }, + "propertyPath": "filter", + "template": "This value should be of type {{ type }}.", + "title": "This value should be of type Symfony\\Bundle\\FrameworkBundle\\Tests\\Functional\\Filter." + } + ] + } + JSON; yield 'empty query string mapping non-nullable attribute without default value' => [ 'uri' => '/map-query-string-to-non-nullable-attribute-without-default-value.json', @@ -944,11 +944,11 @@ public function __invoke(#[MapRequestPayload] ?RequestBody $body, Request $reque return new Response( << - {$body->comment} - {$body->approved} - - XML + + {$body->comment} + {$body->approved} + + XML ); } } @@ -963,11 +963,11 @@ public function __invoke(Request $request, #[MapRequestPayload] RequestBody $bod return new Response( << - {$body->comment} - {$body->approved} - - XML + + {$body->comment} + {$body->approved} + + XML ); } } @@ -982,11 +982,11 @@ public function __invoke(Request $request, #[MapRequestPayload] RequestBody $bod return new Response( << - {$body->comment} - {$body->approved} - - XML + + {$body->comment} + {$body->approved} + + XML ); } } diff --git a/Tests/Functional/ConfigDumpReferenceCommandTest.php b/Tests/Functional/ConfigDumpReferenceCommandTest.php index f630173c7..ae5e2d0f7 100644 --- a/Tests/Functional/ConfigDumpReferenceCommandTest.php +++ b/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -89,13 +89,13 @@ public function testDumpAtPath(bool $debug) $this->assertSame(0, $ret, 'Returns 0 in case of success'); $this->assertSame(<<<'EOL' -# Default configuration for extension with alias: "test" at path "array" -array: - child1: ~ - child2: ~ + # Default configuration for extension with alias: "test" at path "array" + array: + child1: ~ + child2: ~ -EOL + EOL , $tester->getDisplay(true)); } diff --git a/Tests/Functional/ContainerDebugCommandTest.php b/Tests/Functional/ContainerDebugCommandTest.php index 36e730d0a..6e6d053cc 100644 --- a/Tests/Functional/ContainerDebugCommandTest.php +++ b/Tests/Functional/ContainerDebugCommandTest.php @@ -166,24 +166,24 @@ public function testDescribeEnvVars() $this->assertStringMatchesFormat(<<<'TXT' -Symfony Container Environment Variables -======================================= + Symfony Container Environment Variables + ======================================= - --------- ----------------- ------------%w - Name Default value Real value%w - --------- ----------------- ------------%w - JSON "[1, "2.5", 3]" n/a%w - REAL n/a "value"%w - UNKNOWN n/a n/a%w - --------- ----------------- ------------%w + --------- ----------------- ------------%w + Name Default value Real value%w + --------- ----------------- ------------%w + JSON "[1, "2.5", 3]" n/a%w + REAL n/a "value"%w + UNKNOWN n/a n/a%w + --------- ----------------- ------------%w - // Note real values might be different between web and CLI.%w + // Note real values might be different between web and CLI.%w - [WARNING] The following variables are missing:%w + [WARNING] The following variables are missing:%w - * UNKNOWN + * UNKNOWN -TXT + TXT , $tester->getDisplay(true)); putenv('REAL'); diff --git a/Tests/Functional/FragmentTest.php b/Tests/Functional/FragmentTest.php index b26601af6..d35bea23a 100644 --- a/Tests/Functional/FragmentTest.php +++ b/Tests/Functional/FragmentTest.php @@ -26,14 +26,14 @@ public function testFragment($insulate) $client->request('GET', '/fragment_home'); $this->assertEquals(<<getResponse()->getContent()); } From 060b6e6cbe532af6acfa49c45860edff65e3462e Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 1 Aug 2025 14:58:41 +0200 Subject: [PATCH 56/59] run tests with PHPUnit 12.3 --- .../Descriptor/AbstractDescriptorTestCase.php | 30 +++++++++---------- .../Console/Descriptor/TextDescriptorTest.php | 4 +-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Tests/Console/Descriptor/AbstractDescriptorTestCase.php b/Tests/Console/Descriptor/AbstractDescriptorTestCase.php index f52a1d8de..a6cbd3085 100644 --- a/Tests/Console/Descriptor/AbstractDescriptorTestCase.php +++ b/Tests/Console/Descriptor/AbstractDescriptorTestCase.php @@ -43,7 +43,7 @@ protected function tearDown(): void } #[DataProvider('getDescribeRouteCollectionTestData')] - public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription) + public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $routes); } @@ -54,7 +54,7 @@ public static function getDescribeRouteCollectionTestData(): array } #[DataProvider('getDescribeRouteCollectionWithHttpMethodFilterTestData')] - public function testDescribeRouteCollectionWithHttpMethodFilter(string $httpMethod, RouteCollection $routes, $expectedDescription) + public function testDescribeRouteCollectionWithHttpMethodFilter(string $httpMethod, RouteCollection $routes, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $routes, ['method' => $httpMethod]); } @@ -69,7 +69,7 @@ public static function getDescribeRouteCollectionWithHttpMethodFilterTestData(): } #[DataProvider('getDescribeRouteTestData')] - public function testDescribeRoute(Route $route, $expectedDescription) + public function testDescribeRoute(Route $route, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $route); } @@ -80,7 +80,7 @@ public static function getDescribeRouteTestData(): array } #[DataProvider('getDescribeContainerParametersTestData')] - public function testDescribeContainerParameters(ParameterBag $parameters, $expectedDescription) + public function testDescribeContainerParameters(ParameterBag $parameters, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $parameters); } @@ -91,7 +91,7 @@ public static function getDescribeContainerParametersTestData(): array } #[DataProvider('getDescribeContainerBuilderTestData')] - public function testDescribeContainerBuilder(ContainerBuilder $builder, $expectedDescription, array $options) + public function testDescribeContainerBuilder(ContainerBuilder $builder, $expectedDescription, array $options, $file) { $this->assertDescription($expectedDescription, $builder, $options); } @@ -102,7 +102,7 @@ public static function getDescribeContainerBuilderTestData(): array } #[DataProvider('getDescribeContainerExistingClassDefinitionTestData')] - public function testDescribeContainerExistingClassDefinition(Definition $definition, $expectedDescription) + public function testDescribeContainerExistingClassDefinition(Definition $definition, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $definition); } @@ -113,7 +113,7 @@ public static function getDescribeContainerExistingClassDefinitionTestData(): ar } #[DataProvider('getDescribeContainerDefinitionTestData')] - public function testDescribeContainerDefinition(Definition $definition, $expectedDescription) + public function testDescribeContainerDefinition(Definition $definition, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $definition); } @@ -124,7 +124,7 @@ public static function getDescribeContainerDefinitionTestData(): array } #[DataProvider('getDescribeContainerDefinitionWithArgumentsShownTestData')] - public function testDescribeContainerDefinitionWithArgumentsShown(Definition $definition, $expectedDescription) + public function testDescribeContainerDefinitionWithArgumentsShown(Definition $definition, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $definition, []); } @@ -144,7 +144,7 @@ public static function getDescribeContainerDefinitionWithArgumentsShownTestData( } #[DataProvider('getDescribeContainerAliasTestData')] - public function testDescribeContainerAlias(Alias $alias, $expectedDescription) + public function testDescribeContainerAlias(Alias $alias, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $alias); } @@ -155,7 +155,7 @@ public static function getDescribeContainerAliasTestData(): array } #[DataProvider('getDescribeContainerDefinitionWhichIsAnAliasTestData')] - public function testDescribeContainerDefinitionWhichIsAnAlias(Alias $alias, $expectedDescription, ContainerBuilder $builder, $options = []) + public function testDescribeContainerDefinitionWhichIsAnAlias(Alias $alias, $expectedDescription, ContainerBuilder $builder, $options = [], $file = null) { $this->assertDescription($expectedDescription, $builder, $options); } @@ -191,7 +191,7 @@ public static function getDescribeContainerDefinitionWhichIsAnAliasTestData(): a #[IgnoreDeprecations] #[Group('legacy')] #[DataProvider('getDescribeContainerParameterTestData')] - public function testDescribeContainerParameter($parameter, $expectedDescription, array $options) + public function testDescribeContainerParameter($parameter, $expectedDescription, array $options, $file) { $this->assertDescription($expectedDescription, $parameter, $options); } @@ -214,7 +214,7 @@ public static function getDescribeContainerParameterTestData(): array } #[DataProvider('getDescribeEventDispatcherTestData')] - public function testDescribeEventDispatcher(EventDispatcher $eventDispatcher, $expectedDescription, array $options) + public function testDescribeEventDispatcher(EventDispatcher $eventDispatcher, $expectedDescription, array $options, $file) { $this->assertDescription($expectedDescription, $eventDispatcher, $options); } @@ -225,7 +225,7 @@ public static function getDescribeEventDispatcherTestData(): array } #[DataProvider('getDescribeCallableTestData')] - public function testDescribeCallable($callable, $expectedDescription) + public function testDescribeCallable($callable, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $callable); } @@ -238,7 +238,7 @@ public static function getDescribeCallableTestData(): array #[IgnoreDeprecations] #[Group('legacy')] #[DataProvider('getDescribeDeprecatedCallableTestData')] - public function testDescribeDeprecatedCallable($callable, $expectedDescription) + public function testDescribeDeprecatedCallable($callable, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $callable); } @@ -265,7 +265,7 @@ public static function getClassDescriptionTestData(): array } #[DataProvider('getDeprecationsTestData')] - public function testGetDeprecations(ContainerBuilder $builder, $expectedDescription) + public function testGetDeprecations(ContainerBuilder $builder, $expectedDescription, $file) { $this->assertDescription($expectedDescription, $builder, ['deprecations' => true]); } diff --git a/Tests/Console/Descriptor/TextDescriptorTest.php b/Tests/Console/Descriptor/TextDescriptorTest.php index 0dc4bb18b..101ac68a0 100644 --- a/Tests/Console/Descriptor/TextDescriptorTest.php +++ b/Tests/Console/Descriptor/TextDescriptorTest.php @@ -47,10 +47,10 @@ public static function getDescribeRouteWithControllerLinkTestData() } #[DataProvider('getDescribeRouteWithControllerLinkTestData')] - public function testDescribeRouteWithControllerLink(Route $route, $expectedDescription) + public function testDescribeRouteWithControllerLink(Route $route, $expectedDescription, $file) { static::$fileLinkFormatter = new FileLinkFormatter('myeditor://open?file=%f&line=%l'); - parent::testDescribeRoute($route, str_replace('[:file:]', __FILE__, $expectedDescription)); + parent::testDescribeRoute($route, str_replace('[:file:]', __FILE__, $expectedDescription), $file); } } From 8965ae6d731735ea80ac151d1d127820e8db0c48 Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Sat, 9 Aug 2025 23:58:04 +0200 Subject: [PATCH 57/59] chore: PHP CS Fixer - restore PHP / PHPUnit rulesets --- Command/AssetsInstallCommand.php | 2 +- .../Compiler/ContainerBuilderDebugDumpPass.php | 2 +- Secrets/SodiumVault.php | 2 +- Tests/Command/AboutCommand/AboutCommandTest.php | 8 ++++---- Tests/Command/TranslationExtractCommandTest.php | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Command/AssetsInstallCommand.php b/Command/AssetsInstallCommand.php index d8a4f345f..67b5e7653 100644 --- a/Command/AssetsInstallCommand.php +++ b/Command/AssetsInstallCommand.php @@ -237,7 +237,7 @@ private function symlink(string $originDir, string $targetDir, bool $relative = */ private function hardCopy(string $originDir, string $targetDir): string { - $this->filesystem->mkdir($targetDir, 0777); + $this->filesystem->mkdir($targetDir, 0o777); // We use a custom iterator to ignore VCS files $this->filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir)); diff --git a/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php b/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php index ff9020796..456305bc9 100644 --- a/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php +++ b/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php @@ -59,7 +59,7 @@ public function process(ContainerBuilder $container): void $fs = new Filesystem(); $fs->dumpFile($file, serialize($dump)); - $fs->chmod($file, 0666, umask()); + $fs->chmod($file, 0o666, umask()); } catch (\Throwable $e) { $container->getCompiler()->log($this, $e->getMessage()); // ignore serialization and file-system errors diff --git a/Secrets/SodiumVault.php b/Secrets/SodiumVault.php index 2a8e5dcc8..5abdfdc70 100644 --- a/Secrets/SodiumVault.php +++ b/Secrets/SodiumVault.php @@ -228,7 +228,7 @@ private function export(string $filename, string $data): void private function createSecretsDir(): void { - if ($this->secretsDir && !is_dir($this->secretsDir) && !@mkdir($this->secretsDir, 0777, true) && !is_dir($this->secretsDir)) { + if ($this->secretsDir && !is_dir($this->secretsDir) && !@mkdir($this->secretsDir, 0o777, true) && !is_dir($this->secretsDir)) { throw new \RuntimeException(\sprintf('Unable to create the secrets directory (%s).', $this->secretsDir)); } diff --git a/Tests/Command/AboutCommand/AboutCommandTest.php b/Tests/Command/AboutCommand/AboutCommandTest.php index ee3904be3..044d816e0 100644 --- a/Tests/Command/AboutCommand/AboutCommandTest.php +++ b/Tests/Command/AboutCommand/AboutCommandTest.php @@ -34,7 +34,7 @@ public function testAboutWithReadableFiles() $this->fs->mkdir($kernel->getProjectDir()); $this->fs->dumpFile($kernel->getCacheDir().'/readable_file', 'The file content.'); - $this->fs->chmod($kernel->getCacheDir().'/readable_file', 0777); + $this->fs->chmod($kernel->getCacheDir().'/readable_file', 0o777); $tester = $this->createCommandTester($kernel); $ret = $tester->execute([]); @@ -43,7 +43,7 @@ public function testAboutWithReadableFiles() $this->assertStringContainsString('Cache directory', $tester->getDisplay()); $this->assertStringContainsString('Log directory', $tester->getDisplay()); - $this->fs->chmod($kernel->getCacheDir().'/readable_file', 0777); + $this->fs->chmod($kernel->getCacheDir().'/readable_file', 0o777); try { $this->fs->remove($kernel->getProjectDir()); @@ -62,7 +62,7 @@ public function testAboutWithUnreadableFiles() } $this->fs->dumpFile($kernel->getCacheDir().'/unreadable_file', 'The file content.'); - $this->fs->chmod($kernel->getCacheDir().'/unreadable_file', 0222); + $this->fs->chmod($kernel->getCacheDir().'/unreadable_file', 0o222); $tester = $this->createCommandTester($kernel); $ret = $tester->execute([]); @@ -71,7 +71,7 @@ public function testAboutWithUnreadableFiles() $this->assertStringContainsString('Cache directory', $tester->getDisplay()); $this->assertStringContainsString('Log directory', $tester->getDisplay()); - $this->fs->chmod($kernel->getCacheDir().'/unreadable_file', 0777); + $this->fs->chmod($kernel->getCacheDir().'/unreadable_file', 0o777); try { $this->fs->remove($kernel->getProjectDir()); diff --git a/Tests/Command/TranslationExtractCommandTest.php b/Tests/Command/TranslationExtractCommandTest.php index 89361e825..276af4476 100644 --- a/Tests/Command/TranslationExtractCommandTest.php +++ b/Tests/Command/TranslationExtractCommandTest.php @@ -155,12 +155,12 @@ public function testFilterDuplicateTransPaths() if (preg_match('/\.[a-z]+$/', $transPath)) { if (!realpath(\dirname($transPath))) { - mkdir(\dirname($transPath), 0777, true); + mkdir(\dirname($transPath), 0o777, true); } touch($transPath); } else { - mkdir($transPath, 0777, true); + mkdir($transPath, 0o777, true); } } From ef248dd42df68bd0ae7fe4c045bfa6f3d4fde9cc Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Sun, 10 Aug 2025 00:12:49 +0200 Subject: [PATCH 58/59] chore: PHP CS Fixer - update heredoc handling --- Tests/Functional/ConfigDumpReferenceCommandTest.php | 5 +++-- Tests/Functional/ContainerDebugCommandTest.php | 5 +++-- Tests/Functional/FragmentTest.php | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Tests/Functional/ConfigDumpReferenceCommandTest.php b/Tests/Functional/ConfigDumpReferenceCommandTest.php index ae5e2d0f7..377a530e9 100644 --- a/Tests/Functional/ConfigDumpReferenceCommandTest.php +++ b/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -95,8 +95,9 @@ public function testDumpAtPath(bool $debug) child2: ~ - EOL - , $tester->getDisplay(true)); + EOL, + $tester->getDisplay(true) + ); } #[TestWith([true])] diff --git a/Tests/Functional/ContainerDebugCommandTest.php b/Tests/Functional/ContainerDebugCommandTest.php index 6e6d053cc..e1e7ce084 100644 --- a/Tests/Functional/ContainerDebugCommandTest.php +++ b/Tests/Functional/ContainerDebugCommandTest.php @@ -183,8 +183,9 @@ public function testDescribeEnvVars() * UNKNOWN - TXT - , $tester->getDisplay(true)); + TXT, + $tester->getDisplay(true) + ); putenv('REAL'); } diff --git a/Tests/Functional/FragmentTest.php b/Tests/Functional/FragmentTest.php index d35bea23a..b8cff1f48 100644 --- a/Tests/Functional/FragmentTest.php +++ b/Tests/Functional/FragmentTest.php @@ -33,8 +33,9 @@ public function testFragment($insulate) es -- fr - TXT - , $client->getResponse()->getContent()); + TXT, + $client->getResponse()->getContent() + ); } public static function getConfigs() From 11a5ef8c4e2c60f1e18d78e1f2b705eb631c252e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 14 Aug 2025 09:36:33 +0200 Subject: [PATCH 59/59] Replace __sleep/wakeup() by __(un)serialize() when BC isn't a concern --- Tests/Functional/app/AppKernel.php | 10 ++++++---- Tests/Kernel/ConcreteMicroKernel.php | 4 ++-- Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Tests/Functional/app/AppKernel.php b/Tests/Functional/app/AppKernel.php index 59c28b2a6..5748b61cd 100644 --- a/Tests/Functional/app/AppKernel.php +++ b/Tests/Functional/app/AppKernel.php @@ -89,14 +89,16 @@ protected function build(ContainerBuilder $container): void $container->registerExtension(new TestDumpExtension()); } - public function __sleep(): array + public function __serialize(): array { - return ['varDir', 'testCase', 'rootConfig', 'environment', 'debug']; + return [$this->varDir, $this->testCase, $this->rootConfig, $this->environment, $this->debug]; } - public function __wakeup(): void + public function __unserialize(array $data): void { - foreach ($this as $k => $v) { + [$this->varDir, $this->testCase, $this->rootConfig, $this->environment, $this->debug] = $data; + + foreach ($this as $v) { if (\is_object($v)) { throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); } diff --git a/Tests/Kernel/ConcreteMicroKernel.php b/Tests/Kernel/ConcreteMicroKernel.php index a69618099..eac061e3b 100644 --- a/Tests/Kernel/ConcreteMicroKernel.php +++ b/Tests/Kernel/ConcreteMicroKernel.php @@ -55,12 +55,12 @@ public function getLogDir(): string return $this->cacheDir; } - public function __sleep(): array + public function __serialize(): array { throw new \BadMethodCallException('Cannot serialize '.__CLASS__); } - public function __wakeup(): void + public function __unserialize(array $data): void { throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); } diff --git a/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php b/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php index 6f7c84d8b..5fa641c7f 100644 --- a/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php +++ b/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php @@ -64,12 +64,12 @@ public function getProjectDir(): string return \dirname((new \ReflectionObject($this))->getFileName(), 2); } - public function __sleep(): array + public function __serialize(): array { throw new \BadMethodCallException('Cannot serialize '.__CLASS__); } - public function __wakeup(): void + public function __unserialize(array $data): void { throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); }