diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php index 6a3cb1887c..bc1e5a9365 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php @@ -26,6 +26,10 @@ class TestServiceContainerWeakRefPass implements CompilerPassInterface public function __construct(string $privateTagName = 'container.private') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/framework-bundle', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->privateTagName = $privateTagName; } diff --git a/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php b/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php index 6bbab9da4f..0bc7bc78e0 100644 --- a/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php +++ b/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php @@ -32,6 +32,10 @@ class CacheCollectorPass implements CompilerPassInterface public function __construct(string $dataCollectorCacheId = 'data_collector.cache', string $cachePoolTag = 'cache.pool', string $cachePoolRecorderInnerSuffix = '.recorder_inner') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->dataCollectorCacheId = $dataCollectorCacheId; $this->cachePoolTag = $cachePoolTag; $this->cachePoolRecorderInnerSuffix = $cachePoolRecorderInnerSuffix; diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php index 3ca89a36a5..c9b04addab 100644 --- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php +++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php @@ -24,6 +24,10 @@ class CachePoolClearerPass implements CompilerPassInterface public function __construct(string $cachePoolClearerTag = 'cache.pool.clearer') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->cachePoolClearerTag = $cachePoolClearerTag; } diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php index b62a120f6f..1fc68af5c2 100644 --- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php +++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php @@ -40,6 +40,10 @@ class CachePoolPass implements CompilerPassInterface public function __construct(string $cachePoolTag = 'cache.pool', string $kernelResetTag = 'kernel.reset', string $cacheClearerId = 'cache.global_clearer', string $cachePoolClearerTag = 'cache.pool.clearer', string $cacheSystemClearerId = 'cache.system_clearer', string $cacheSystemClearerTag = 'kernel.cache_clearer', string $reverseContainerId = 'reverse_container', string $reversibleTag = 'container.reversible', string $messageHandlerId = 'cache.early_expiration_handler') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->cachePoolTag = $cachePoolTag; $this->kernelResetTag = $kernelResetTag; $this->cacheClearerId = $cacheClearerId; diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php index e5699623e5..86a1906adc 100644 --- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php +++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php @@ -28,6 +28,10 @@ class CachePoolPrunerPass implements CompilerPassInterface public function __construct(string $cacheCommandServiceId = 'console.command.cache_pool_prune', string $cachePoolTag = 'cache.pool') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->cacheCommandServiceId = $cacheCommandServiceId; $this->cachePoolTag = $cachePoolTag; } diff --git a/src/Symfony/Component/Cache/composer.json b/src/Symfony/Component/Cache/composer.json index e907d3b478..9b61e71108 100644 --- a/src/Symfony/Component/Cache/composer.json +++ b/src/Symfony/Component/Cache/composer.json @@ -25,6 +25,7 @@ "psr/cache": "^1.0|^2.0", "psr/log": "^1.1", "symfony/cache-contracts": "^1.1.7|^2", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-php80": "^1.15", "symfony/service-contracts": "^1.1|^2", "symfony/var-exporter": "^4.4|^5.0" diff --git a/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php b/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php index 42ec2eabad..b4e8e23f92 100644 --- a/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php +++ b/src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php @@ -36,6 +36,10 @@ class AddConsoleCommandPass implements CompilerPassInterface public function __construct(string $commandLoaderServiceId = 'console.command_loader', string $commandTag = 'console.command', string $noPreloadTag = 'container.no_preload', string $privateTagName = 'container.private') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/console', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->commandLoaderServiceId = $commandLoaderServiceId; $this->commandTag = $commandTag; $this->noPreloadTag = $noPreloadTag; diff --git a/src/Symfony/Component/Console/composer.json b/src/Symfony/Component/Console/composer.json index 6d051f1869..fa720142ae 100644 --- a/src/Symfony/Component/Console/composer.json +++ b/src/Symfony/Component/Console/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", "symfony/polyfill-php80": "^1.15", diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AliasDeprecatedPublicServicesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AliasDeprecatedPublicServicesPass.php index 802c407662..defb9d1b1c 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AliasDeprecatedPublicServicesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AliasDeprecatedPublicServicesPass.php @@ -23,6 +23,10 @@ final class AliasDeprecatedPublicServicesPass extends AbstractRecursivePass public function __construct(string $tagName = 'container.private') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->tagName = $tagName; } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AttributeAutoconfigurationPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AttributeAutoconfigurationPass.php index ba6478d66d..aefa7c0c61 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AttributeAutoconfigurationPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AttributeAutoconfigurationPass.php @@ -19,13 +19,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; */ final class AttributeAutoconfigurationPass implements CompilerPassInterface { - private $ignoreAttributesTag; - - public function __construct(string $ignoreAttributesTag = 'container.ignore_attributes') - { - $this->ignoreAttributesTag = $ignoreAttributesTag; - } - public function process(ContainerBuilder $container): void { if (80000 > \PHP_VERSION_ID) { @@ -37,7 +30,7 @@ final class AttributeAutoconfigurationPass implements CompilerPassInterface foreach ($container->getDefinitions() as $id => $definition) { if (!$definition->isAutoconfigured() || $definition->isAbstract() - || $definition->hasTag($this->ignoreAttributesTag) + || $definition->hasTag('container.ignore_attributes') || !($reflector = $container->getReflectionClass($definition->getClass(), false)) ) { continue; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php b/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php index 9313d7a6e6..527eec80ef 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php @@ -30,6 +30,10 @@ class DecoratorServicePass extends AbstractRecursivePass public function __construct(?string $innerId = '.inner') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->innerId = $innerId; } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php index d332406271..29630bdb8e 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php @@ -24,17 +24,14 @@ use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; */ final class RegisterAutoconfigureAttributesPass implements CompilerPassInterface { - private $ignoreAttributesTag; private $registerForAutoconfiguration; - public function __construct(string $ignoreAttributesTag = 'container.ignore_attributes') + public function __construct() { if (80000 > \PHP_VERSION_ID) { return; } - $this->ignoreAttributesTag = $ignoreAttributesTag; - $parseDefinitions = new \ReflectionMethod(YamlFileLoader::class, 'parseDefinitions'); $parseDefinitions->setAccessible(true); $yamlLoader = $parseDefinitions->getDeclaringClass()->newInstanceWithoutConstructor(); @@ -80,7 +77,7 @@ final class RegisterAutoconfigureAttributesPass implements CompilerPassInterface public function accept(Definition $definition): bool { - return 80000 <= \PHP_VERSION_ID && $definition->isAutoconfigured() && !$definition->hasTag($this->ignoreAttributesTag); + return 80000 <= \PHP_VERSION_ID && $definition->isAutoconfigured() && !$definition->hasTag('container.ignore_attributes'); } public function processClass(ContainerBuilder $container, \ReflectionClass $class) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RegisterReverseContainerPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RegisterReverseContainerPass.php index 571eab3ef8..c5eb9bf08b 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RegisterReverseContainerPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RegisterReverseContainerPass.php @@ -28,6 +28,10 @@ class RegisterReverseContainerPass implements CompilerPassInterface public function __construct(bool $beforeRemoving, string $serviceId = 'reverse_container', string $tagName = 'container.reversible') { + if (1 < \func_num_args()) { + trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->beforeRemoving = $beforeRemoving; $this->serviceId = $serviceId; $this->tagName = $tagName; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveDecoratorStackPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveDecoratorStackPass.php index 61202adf33..4914b3ac9d 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveDecoratorStackPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveDecoratorStackPass.php @@ -28,6 +28,10 @@ class ResolveDecoratorStackPass implements CompilerPassInterface public function __construct(string $tag = 'container.stack') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->tag = $tag; } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php index f6942c45d9..dee2dc6bef 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php @@ -28,6 +28,10 @@ class ResolveHotPathPass extends AbstractRecursivePass public function __construct(string $tagName = 'container.hot_path') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->tagName = $tagName; } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php index 50c35dff3d..016be55b3d 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php @@ -29,6 +29,10 @@ class ResolveNoPreloadPass extends AbstractRecursivePass public function __construct(string $tagName = 'container.no_preload') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->tagName = $tagName; } diff --git a/src/Symfony/Component/EventDispatcher/DependencyInjection/AddEventAliasesPass.php b/src/Symfony/Component/EventDispatcher/DependencyInjection/AddEventAliasesPass.php index c4ea50f786..6e7292b4a1 100644 --- a/src/Symfony/Component/EventDispatcher/DependencyInjection/AddEventAliasesPass.php +++ b/src/Symfony/Component/EventDispatcher/DependencyInjection/AddEventAliasesPass.php @@ -26,6 +26,10 @@ class AddEventAliasesPass implements CompilerPassInterface public function __construct(array $eventAliases, string $eventAliasesParameter = 'event_dispatcher.event_aliases') { + if (1 < \func_num_args()) { + trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->eventAliases = $eventAliases; $this->eventAliasesParameter = $eventAliasesParameter; } diff --git a/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php b/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php index 4b236a5b43..8d8d567bc0 100644 --- a/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php +++ b/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php @@ -37,6 +37,10 @@ class RegisterListenersPass implements CompilerPassInterface public function __construct(string $dispatcherService = 'event_dispatcher', string $listenerTag = 'kernel.event_listener', string $subscriberTag = 'kernel.event_subscriber', string $eventAliasesParameter = 'event_dispatcher.event_aliases') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->dispatcherService = $dispatcherService; $this->listenerTag = $listenerTag; $this->subscriberTag = $subscriberTag; diff --git a/src/Symfony/Component/Form/DependencyInjection/FormPass.php b/src/Symfony/Component/Form/DependencyInjection/FormPass.php index 6097ab564d..0ba46117c5 100644 --- a/src/Symfony/Component/Form/DependencyInjection/FormPass.php +++ b/src/Symfony/Component/Form/DependencyInjection/FormPass.php @@ -38,6 +38,10 @@ class FormPass implements CompilerPassInterface public function __construct(string $formExtensionService = 'form.extension', string $formTypeTag = 'form.type', string $formTypeExtensionTag = 'form.type_extension', string $formTypeGuesserTag = 'form.type_guesser', string $formDebugCommandService = 'console.command.form_debug') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->formExtensionService = $formExtensionService; $this->formTypeTag = $formTypeTag; $this->formTypeExtensionTag = $formTypeExtensionTag; diff --git a/src/Symfony/Component/HttpClient/DependencyInjection/HttpClientPass.php b/src/Symfony/Component/HttpClient/DependencyInjection/HttpClientPass.php index 787fbc3853..5ed88909eb 100644 --- a/src/Symfony/Component/HttpClient/DependencyInjection/HttpClientPass.php +++ b/src/Symfony/Component/HttpClient/DependencyInjection/HttpClientPass.php @@ -23,6 +23,10 @@ final class HttpClientPass implements CompilerPassInterface public function __construct(string $clientTag = 'http_client.client') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/http-client', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->clientTag = $clientTag; } diff --git a/src/Symfony/Component/HttpClient/composer.json b/src/Symfony/Component/HttpClient/composer.json index be66a8f5c2..98a1f22847 100644 --- a/src/Symfony/Component/HttpClient/composer.json +++ b/src/Symfony/Component/HttpClient/composer.json @@ -23,6 +23,7 @@ "require": { "php": ">=7.2.5", "psr/log": "^1.0", + "symfony/deprecation-contracts": "^2.1", "symfony/http-client-contracts": "^2.4", "symfony/polyfill-php73": "^1.11", "symfony/polyfill-php80": "^1.15", diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ControllerArgumentValueResolverPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ControllerArgumentValueResolverPass.php index 705c88dbfa..d925ed6b0e 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/ControllerArgumentValueResolverPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ControllerArgumentValueResolverPass.php @@ -34,6 +34,10 @@ class ControllerArgumentValueResolverPass implements CompilerPassInterface public function __construct(string $argumentResolverService = 'argument_resolver', string $argumentValueResolverTag = 'controller.argument_value_resolver', string $traceableResolverStopwatch = 'debug.stopwatch') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->argumentResolverService = $argumentResolverService; $this->argumentValueResolverTag = $argumentValueResolverTag; $this->traceableResolverStopwatch = $traceableResolverStopwatch; diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php index 432f767202..f26baeca9d 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php @@ -30,6 +30,10 @@ class FragmentRendererPass implements CompilerPassInterface public function __construct(string $handlerService = 'fragment.handler', string $rendererTag = 'kernel.fragment_renderer') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->handlerService = $handlerService; $this->rendererTag = $rendererTag; } diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index e24e0e6d64..eba2430b20 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -39,6 +39,10 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface public function __construct(string $resolverServiceId = 'argument_resolver.service', string $controllerTag = 'controller.service_arguments', string $controllerLocator = 'argument_resolver.controller_locator', string $notTaggedControllerResolverServiceId = 'argument_resolver.not_tagged_controller') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->resolverServiceId = $resolverServiceId; $this->controllerTag = $controllerTag; $this->controllerLocator = $controllerLocator; diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterLocaleAwareServicesPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterLocaleAwareServicesPass.php index 0efb164b72..f0b801b8d6 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterLocaleAwareServicesPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterLocaleAwareServicesPass.php @@ -28,6 +28,10 @@ class RegisterLocaleAwareServicesPass implements CompilerPassInterface public function __construct(string $listenerServiceId = 'locale_aware_listener', string $localeAwareTag = 'kernel.locale_aware') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->listenerServiceId = $listenerServiceId; $this->localeAwareTag = $localeAwareTag; } diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php index 5f54e9c164..2d077a0cb5 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php @@ -25,6 +25,10 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface public function __construct(string $controllerLocator = 'argument_resolver.controller_locator') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->controllerLocator = $controllerLocator; } diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php index b5e46106a7..0cd8e6d7c9 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php @@ -27,6 +27,10 @@ class ResettableServicePass implements CompilerPassInterface public function __construct(string $tagName = 'kernel.reset') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->tagName = $tagName; } diff --git a/src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php b/src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php index 25ffe4b869..5b77326270 100644 --- a/src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php +++ b/src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php @@ -36,6 +36,10 @@ class MessengerPass implements CompilerPassInterface public function __construct(string $handlerTag = 'messenger.message_handler', string $busTag = 'messenger.bus', string $receiverTag = 'messenger.receiver') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/messenger', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->handlerTag = $handlerTag; $this->busTag = $busTag; $this->receiverTag = $receiverTag; diff --git a/src/Symfony/Component/Mime/DependencyInjection/AddMimeTypeGuesserPass.php b/src/Symfony/Component/Mime/DependencyInjection/AddMimeTypeGuesserPass.php index e24beb0da1..00eef94ee8 100644 --- a/src/Symfony/Component/Mime/DependencyInjection/AddMimeTypeGuesserPass.php +++ b/src/Symfony/Component/Mime/DependencyInjection/AddMimeTypeGuesserPass.php @@ -27,6 +27,10 @@ class AddMimeTypeGuesserPass implements CompilerPassInterface public function __construct(string $mimeTypesService = 'mime_types', string $mimeTypeGuesserTag = 'mime.mime_type_guesser') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/mime', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->mimeTypesService = $mimeTypesService; $this->mimeTypeGuesserTag = $mimeTypeGuesserTag; } diff --git a/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoConstructorPass.php b/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoConstructorPass.php index 2fb4f94d76..cab31b3651 100644 --- a/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoConstructorPass.php +++ b/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoConstructorPass.php @@ -30,6 +30,10 @@ final class PropertyInfoConstructorPass implements CompilerPassInterface public function __construct(string $service = 'property_info.constructor_extractor', string $tag = 'property_info.constructor_extractor') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->service = $service; $this->tag = $tag; } diff --git a/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoPass.php b/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoPass.php index f45514888f..289b114f10 100644 --- a/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoPass.php +++ b/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoPass.php @@ -34,6 +34,10 @@ class PropertyInfoPass implements CompilerPassInterface public function __construct(string $propertyInfoService = 'property_info', string $listExtractorTag = 'property_info.list_extractor', string $typeExtractorTag = 'property_info.type_extractor', string $descriptionExtractorTag = 'property_info.description_extractor', string $accessExtractorTag = 'property_info.access_extractor', string $initializableExtractorTag = 'property_info.initializable_extractor') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->propertyInfoService = $propertyInfoService; $this->listExtractorTag = $listExtractorTag; $this->typeExtractorTag = $typeExtractorTag; diff --git a/src/Symfony/Component/Routing/DependencyInjection/RoutingResolverPass.php b/src/Symfony/Component/Routing/DependencyInjection/RoutingResolverPass.php index 7068825fef..0e9b9c8931 100644 --- a/src/Symfony/Component/Routing/DependencyInjection/RoutingResolverPass.php +++ b/src/Symfony/Component/Routing/DependencyInjection/RoutingResolverPass.php @@ -30,6 +30,10 @@ class RoutingResolverPass implements CompilerPassInterface public function __construct(string $resolverServiceId = 'routing.resolver', string $loaderTag = 'routing.loader') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/routing', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->resolverServiceId = $resolverServiceId; $this->loaderTag = $loaderTag; } diff --git a/src/Symfony/Component/Serializer/DependencyInjection/SerializerPass.php b/src/Symfony/Component/Serializer/DependencyInjection/SerializerPass.php index 155a6f00ec..3bc73b792e 100644 --- a/src/Symfony/Component/Serializer/DependencyInjection/SerializerPass.php +++ b/src/Symfony/Component/Serializer/DependencyInjection/SerializerPass.php @@ -33,6 +33,10 @@ class SerializerPass implements CompilerPassInterface public function __construct(string $serializerService = 'serializer', string $normalizerTag = 'serializer.normalizer', string $encoderTag = 'serializer.encoder') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/serializer', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->serializerService = $serializerService; $this->normalizerTag = $normalizerTag; $this->encoderTag = $encoderTag; diff --git a/src/Symfony/Component/Serializer/composer.json b/src/Symfony/Component/Serializer/composer.json index 629747f174..e336cd6930 100644 --- a/src/Symfony/Component/Serializer/composer.json +++ b/src/Symfony/Component/Serializer/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-php80": "^1.15" }, diff --git a/src/Symfony/Component/Translation/DependencyInjection/TranslationDumperPass.php b/src/Symfony/Component/Translation/DependencyInjection/TranslationDumperPass.php index 930f36d721..6d78342bc3 100644 --- a/src/Symfony/Component/Translation/DependencyInjection/TranslationDumperPass.php +++ b/src/Symfony/Component/Translation/DependencyInjection/TranslationDumperPass.php @@ -25,6 +25,10 @@ class TranslationDumperPass implements CompilerPassInterface public function __construct(string $writerServiceId = 'translation.writer', string $dumperTag = 'translation.dumper') { + if (1 < \func_num_args()) { + trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->writerServiceId = $writerServiceId; $this->dumperTag = $dumperTag; } diff --git a/src/Symfony/Component/Translation/DependencyInjection/TranslationExtractorPass.php b/src/Symfony/Component/Translation/DependencyInjection/TranslationExtractorPass.php index d08b2ba5ff..fab6b20ae9 100644 --- a/src/Symfony/Component/Translation/DependencyInjection/TranslationExtractorPass.php +++ b/src/Symfony/Component/Translation/DependencyInjection/TranslationExtractorPass.php @@ -26,6 +26,10 @@ class TranslationExtractorPass implements CompilerPassInterface public function __construct(string $extractorServiceId = 'translation.extractor', string $extractorTag = 'translation.extractor') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->extractorServiceId = $extractorServiceId; $this->extractorTag = $extractorTag; } diff --git a/src/Symfony/Component/Translation/DependencyInjection/TranslatorPass.php b/src/Symfony/Component/Translation/DependencyInjection/TranslatorPass.php index 27315f6152..c6a1306eb3 100644 --- a/src/Symfony/Component/Translation/DependencyInjection/TranslatorPass.php +++ b/src/Symfony/Component/Translation/DependencyInjection/TranslatorPass.php @@ -26,6 +26,10 @@ class TranslatorPass implements CompilerPassInterface public function __construct(string $translatorServiceId = 'translator.default', string $readerServiceId = 'translation.reader', string $loaderTag = 'translation.loader', string $debugCommandServiceId = 'console.command.translation_debug', string $updateCommandServiceId = 'console.command.translation_update') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->translatorServiceId = $translatorServiceId; $this->readerServiceId = $readerServiceId; $this->loaderTag = $loaderTag; diff --git a/src/Symfony/Component/Translation/DependencyInjection/TranslatorPathsPass.php b/src/Symfony/Component/Translation/DependencyInjection/TranslatorPathsPass.php index 80071eee74..18c024882e 100644 --- a/src/Symfony/Component/Translation/DependencyInjection/TranslatorPathsPass.php +++ b/src/Symfony/Component/Translation/DependencyInjection/TranslatorPathsPass.php @@ -33,6 +33,10 @@ class TranslatorPathsPass extends AbstractRecursivePass public function __construct(string $translatorServiceId = 'translator', string $debugCommandServiceId = 'console.command.translation_debug', string $updateCommandServiceId = 'console.command.translation_update', string $resolverServiceId = 'argument_resolver.service') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->translatorServiceId = $translatorServiceId; $this->debugCommandServiceId = $debugCommandServiceId; $this->updateCommandServiceId = $updateCommandServiceId; diff --git a/src/Symfony/Component/Translation/composer.json b/src/Symfony/Component/Translation/composer.json index 56d81e84d8..3f2c16d3b6 100644 --- a/src/Symfony/Component/Translation/composer.json +++ b/src/Symfony/Component/Translation/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php80": "^1.15", "symfony/translation-contracts": "^2.3" diff --git a/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php b/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php index ed4b18aab5..c46f7ef21d 100644 --- a/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php +++ b/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php @@ -27,6 +27,10 @@ class AddAutoMappingConfigurationPass implements CompilerPassInterface public function __construct(string $validatorBuilderService = 'validator.builder', string $tag = 'validator.auto_mapper') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/validator', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->validatorBuilderService = $validatorBuilderService; $this->tag = $tag; } diff --git a/src/Symfony/Component/Validator/DependencyInjection/AddConstraintValidatorsPass.php b/src/Symfony/Component/Validator/DependencyInjection/AddConstraintValidatorsPass.php index 42636a3379..a3c6559892 100644 --- a/src/Symfony/Component/Validator/DependencyInjection/AddConstraintValidatorsPass.php +++ b/src/Symfony/Component/Validator/DependencyInjection/AddConstraintValidatorsPass.php @@ -27,6 +27,10 @@ class AddConstraintValidatorsPass implements CompilerPassInterface public function __construct(string $validatorFactoryServiceId = 'validator.validator_factory', string $constraintValidatorTag = 'validator.constraint_validator') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/validator', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->validatorFactoryServiceId = $validatorFactoryServiceId; $this->constraintValidatorTag = $constraintValidatorTag; } diff --git a/src/Symfony/Component/Validator/DependencyInjection/AddValidatorInitializersPass.php b/src/Symfony/Component/Validator/DependencyInjection/AddValidatorInitializersPass.php index affd930425..0ea8eef715 100644 --- a/src/Symfony/Component/Validator/DependencyInjection/AddValidatorInitializersPass.php +++ b/src/Symfony/Component/Validator/DependencyInjection/AddValidatorInitializersPass.php @@ -26,6 +26,10 @@ class AddValidatorInitializersPass implements CompilerPassInterface public function __construct(string $builderService = 'validator.builder', string $initializerTag = 'validator.initializer') { + if (0 < \func_num_args()) { + trigger_deprecation('symfony/validator', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); + } + $this->builderService = $builderService; $this->initializerTag = $initializerTag; }