8000 Deprecate configuring tag names and service ids in compiler passes · symfony/symfony@6fe82d8 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 6fe82d8

Browse files
Deprecate configuring tag names and service ids in compiler passes
1 parent 59e5ac5 commit 6fe82d8

File tree

42 files changed

+148
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+148
-13
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class TestServiceContainerWeakRefPass implements CompilerPassInterface
2626

2727
public function __construct(string $privateTagName = 'container.private')
2828
{
29+
if (0 < \func_num_args()) {
30+
trigger_deprecation('symfony/framework-bundle', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
31+
}
32+
2933
$this->privateTagName = $privateTagName;
3034
}
3135

src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ class CacheCollectorPass implements CompilerPassInterface
3232

3333
public function __construct(string $dataCollectorCacheId = 'data_collector.cache', string $cachePoolTag = 'cache.pool', string $cachePoolRecorderInnerSuffix = '.recorder_inner')
3434
{
35+
if (0 < \func_num_args()) {
36+
trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
37+
}
38+
3539
$this->dataCollectorCacheId = $dataCollectorCacheId;
3640
$this->cachePoolTag = $cachePoolTag;
3741
$this->cachePoolRecorderInnerSuffix = $cachePoolRecorderInnerSuffix;

src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ class CachePoolClearerPass implements CompilerPassInterface
2424

2525
public function __construct(string $cachePoolClearerTag = 'cache.pool.clearer')
2626
{
27+
if (0 < \func_num_args()) {
28+
trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
29+
}
30+
2731
$this->cachePoolClearerTag = $cachePoolClearerTag;
2832
}
2933

src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ class CachePoolPass implements CompilerPassInterface
4040

4141
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')
4242
{
43+
if (0 < \func_num_args()) {
44+
trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
45+
}
46+
4347
$this->cachePoolTag = $cachePoolTag;
4448
$this->kernelResetTag = $kernelResetTag;
4549
$this->cacheClearerId = $cacheClearerId;

src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class CachePoolPrunerPass implements CompilerPassInterface
2828

2929
public function __construct(string $cacheCommandServiceId = 'console.command.cache_pool_prune', string $cachePoolTag = 'cache.pool')
3030
{
31+
if (0 < \func_num_args()) {
32+
trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
33+
}
34+
3135
$this->cacheCommandServiceId = $cacheCommandServiceId;
3236
$this->cachePoolTag = $cachePoolTag;
3337
}

src/Symfony/Component/Cache/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"psr/cache": "^1.0|^2.0",
2626
"psr/log": "^1.1",
2727
"symfony/cache-contracts": "^1.1.7|^2",
28+
"symfony/deprecation-contracts": "^2.1",
2829
"symfony/polyfill-php80": "^1.15",
2930
"symfony/service-contracts": "^1.1|^2",
3031
"symfony/var-exporter": "^4.4|^5.0"

src/Symfony/Component/Console/DependencyInjection/AddConsoleCommandPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ class AddConsoleCommandPass implements CompilerPassInterface
3636

3737
public function __construct(string $commandLoaderServiceId = 'console.command_loader', string $commandTag = 'console.command', string $noPreloadTag = 'container.no_preload', string $privateTagName = 'container.private')
3838
{
39+
if (0 < \func_num_args()) {
40+
trigger_deprecation('symfony/console', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
41+
}
42+
3943
$this->commandLoaderServiceId = $commandLoaderServiceId;
4044
$this->commandTag = $commandTag;
4145
$this->noPreloadTag = $noPreloadTag;

src/Symfony/Component/Console/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=7.2.5",
20+
"symfony/deprecation-contracts": "^2.1",
2021
"symfony/polyfill-mbstring": "~1.0",
2122
"symfony/polyfill-php73": "^1.8",
2223
"symfony/polyfill-php80": "^1.15",

src/Symfony/Component/DependencyInjection/Compiler/AliasDeprecatedPublicServicesPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ final class AliasDeprecatedPublicServicesPass extends AbstractRecursivePass
2323

2424
public function __construct(string $tagName = 'container.private')
2525
{
26+
if (0 < \func_num_args()) {
27+
trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
28+
}
29+
2630
$this->tagName = $tagName;
2731
}
2832

src/Symfony/Component/DependencyInjection/Compiler/AttributeAutoconfigurationPass.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@
1919
*/
2020
final class AttributeAutoconfigurationPass implements CompilerPassInterface
2121
{
22-
private $ignoreAttributesTag;
23-
24-
public function __construct(string $ignoreAttributesTag = 'container.ignore_attributes')
25-
{
26-
$this->ignoreAttributesTag = $ignoreAttributesTag;
27-
}
28-
2922
public function process(ContainerBuilder $container): void
3023
{
3124
if (80000 > \PHP_VERSION_ID) {
@@ -37,7 +30,7 @@ public function process(ContainerBuilder $container): void
3730
foreach ($container->getDefinitions() as $id => $definition) {
3831
if (!$definition->isAutoconfigured()
3932
|| $definition->isAbstract()
40-
|| $definition->hasTag($this->ignoreAttributesTag)
33+
|| $definition->hasTag('container.ignore_attributes')
4134
|| !($reflector = $container->getReflectionClass($definition->getClass(), false))
4235
) {
4336
continue;

src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class DecoratorServicePass extends AbstractRecursivePass
3030

3131
public function __construct(?string $innerId = '.inner')
3232
{
33+
if (0 < \func_num_args()) {
34+
trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
35+
}
36+
3337
$this->innerId = $innerId;
3438
}
3539

src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,14 @@
2424
*/
2525
final class RegisterAutoconfigureAttributesPass implements CompilerPassInterface
2626
{
27-
private $ignoreAttributesTag;
2827
private $registerForAutoconfiguration;
2928

30-
public function __construct(string $ignoreAttributesTag = 'container.ignore_attributes')
29+
public function __construct()
3130
{
3231
if (80000 > \PHP_VERSION_ID) {
3332
return;
3433
}
3534

36-
$this->ignoreAttributesTag = $ignoreAttributesTag;
37-
3835
$parseDefinitions = new \ReflectionMethod(YamlFileLoader::class, 'parseDefinitions');
3936
$parseDefinitions->setAccessible(true);
4037
$yamlLoader = $parseDefinitions->getDeclaringClass()->newInstanceWithoutConstructor();
@@ -80,7 +77,7 @@ public function process(ContainerBuilder $container)
8077

8178
public function accept(Definition $definition): bool
8279
{
83-
return 80000 <= \PHP_VERSION_ID && $definition->isAutoconfigured() && !$definition->hasTag($this->ignoreAttributesTag);
80+
return 80000 <= \PHP_VERSION_ID && $definition->isAutoconfigured() && !$definition->hasTag('container.ignore_attributes');
8481
}
8582

8683
public function processClass(ContainerBuilder $container, \ReflectionClass $class)

src/Symfony/Component/DependencyInjection/Compiler/RegisterReverseContainerPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class RegisterReverseContainerPass implements CompilerPassInterface
2828

2929
public function __construct(bool $beforeRemoving, string $serviceId = 'reverse_container', string $tagName = 'container.reversible')
3030
{
31+
if (1 < \func_num_args()) {
32+
trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
33+
}
34+
3135
$this->beforeRemoving = $beforeRemoving;
3236
$this->serviceId = $serviceId;
3337
$this->tagName = $tagName;

src/Symfony/Component/DependencyInjection/Compiler/ResolveDecoratorStackPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class ResolveDecoratorStackPass implements CompilerPassInterface
2828

2929
public function __construct(string $tag = 'container.stack')
3030
{
31+
if (0 < \func_num_args()) {
32+
trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
33+
}
34+
3135
$this->tag = $tag;
3236
}
3337

src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class ResolveHotPathPass extends AbstractRecursivePass
2828

2929
public function __construct(string $tagName = 'container.hot_path')
3030
{
31+
if (0 < \func_num_args()) {
32+
trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
33+
}
34+
3135
$this->tagName = $tagName;
3236
}
3337

src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ class ResolveNoPreloadPass extends AbstractRecursivePass
2929

3030
public function __construct(string $tagName = 'container.no_preload')
3131
{
32+
if (0 < \func_num_args()) {
33+
trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
34+
}
35+
3236
$this->tagName = $tagName;
3337
}
3438

src/Symfony/Component/EventDispatcher/DependencyInjection/AddEventAliasesPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class AddEventAliasesPass implements CompilerPassInterface
2626

2727
public function __construct(array $eventAliases, string $eventAliasesParameter = 'event_dispatcher.event_aliases')
2828
{
29+
if (1 < \func_num_args()) {
30+
trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
31+
}
32+
2933
$this->eventAliases = $eventAliases;
3034
$this->eventAliasesParameter = $eventAliasesParameter;
3135
}

src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ class RegisterListenersPass implements CompilerPassInterface
3737

3838
public function __construct(string $dispatcherService = 'event_dispatcher', string $listenerTag = 'kernel.event_listener', string $subscriberTag = 'kernel.event_subscriber', string $eventAliasesParameter = 'event_dispatcher.event_aliases')
3939
{
40+
if (0 < \func_num_args()) {
41+
trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
42+
}
43+
4044
$this->dispatcherService = $dispatcherService;
4145
$this->listenerTag = $listenerTag;
4246
$this->subscriberTag = $subscriberTag;

src/Symfony/Component/Form/DependencyInjection/FormPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ class FormPass implements CompilerPassInterface
3838

3939
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')
4040
{
41+
if (0 < \func_num_args()) {
42+
trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
43+
}
44+
4145
$this->formExtensionService = $formExtensionService;
4246
$this->formTypeTag = $formTypeTag;
4347
$this->formTypeExtensionTag = $formTypeExtensionTag;

src/Symfony/Component/HttpClient/DependencyInjection/HttpClientPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ final class HttpClientPass implements CompilerPassInterface
2323

2424
public function __construct(string $clientTag = 'http_client.client')
2525
{
26+
if (0 < \func_num_args()) {
27+
trigger_deprecation('symfony/http-client', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
28+
}
29+
2630
$this->clientTag = $clientTag;
2731
}
2832

src/Symfony/Component/HttpClient/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"require": {
2424
"php": ">=7.2.5",
2525
"psr/log": "^1.0",
26+
"symfony/deprecation-contracts": "^2.1",
2627
"symfony/http-client-contracts": "^2.4",
2728
"symfony/polyfill-php73": "^1.11",
2829
"symfony/polyfill-php80": "^1.15",

src/Symfony/Component/HttpKernel/DependencyInjection/ControllerArgumentValueResolverPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ class ControllerArgumentValueResolverPass implements CompilerPassInterface
3434

3535
public function __construct(string $argumentResolverService = 'argument_resolver', string $argumentValueResolverTag = 'controller.argument_value_resolver', string $traceableResolverStopwatch = 'debug.stopwatch')
3636
{
37+
if (0 < \func_num_args()) {
38+
trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
39+
}
40+
3741
$this->argumentResolverService = $argumentResolverService;
3842
$this->argumentValueResolverTag = $argumentValueResolverTag;
3943
$this->traceableResolverStopwatch = $traceableResolverStopwatch;

src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class FragmentRendererPass implements CompilerPassInterface
3030

3131
public function __construct(string $handlerService = 'fragment.handler', string $rendererTag = 'kernel.fragment_renderer')
3232
{
33+
if (0 < \func_num_args()) {
34+
trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
35+
}
36+
3337
$this->handlerService = $handlerService;
3438
$this->rendererTag = $rendererTag;
3539
}

src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface
3939

4040
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')
4141
{
42+
if (0 < \func_num_args()) {
43+
trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
44+
}
45+
4246
$this->resolverServiceId = $resolverServiceId;
4347
$this->controllerTag = $controllerTag;
4448
$this->controllerLocator = $controllerLocator;

src/Symfony/Component/HttpKernel/DependencyInjection/RegisterLocaleAwareServicesPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class RegisterLocaleAwareServicesPass implements CompilerPassInterface
2828

2929
public function __construct(string $listenerServiceId = 'locale_aware_listener', string $localeAwareTag = 'kernel.locale_aware')
3030
{
31+
if (0 < \func_num_args()) {
32+
trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
33+
}
34+
3135
$this->listenerServiceId = $listenerServiceId;
3236
$this->localeAwareTag = $localeAwareTag;
3337
}

src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface
2525

2626
public function __construct(string $controllerLocator = 'argument_resolver.controller_locator')
2727
{
28+
if (0 < \func_num_args()) {
29+
trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
30+
}
31+
2832
$this->controllerLocator = $controllerLocator;
2933
}
3034

src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class ResettableServicePass implements CompilerPassInterface
2727

2828
public function __construct(string $tagName = 'kernel.reset')
2929
{
30+
if (0 < \func_num_args()) {
31+
trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
32+
}
33+
3034
$this->tagName = $tagName;
3135
}
3236

src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ class MessengerPass implements CompilerPassInterface
3636

3737
public function __construct(string $handlerTag = 'messenger.message_handler', string $busTag = 'messenger.bus', string $receiverTag = 'messenger.receiver')
3838
{
39+
if (0 < \func_num_args()) {
40+
trigger_deprecation('symfony/messenger', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
41+
}
42+
3943
$this->handlerTag = $handlerTag;
4044
$this->busTag = $busTag;
4145
$this->receiverTag = $receiverTag;

src/Symfony/Component/Mime/DependencyInjection/AddMimeTypeGuesserPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class AddMimeTypeGuesserPass implements CompilerPassInterface
2727

2828
public function __construct(string $mimeTypesService = 'mime_types', string $mimeTypeGuesserTag = 'mime.mime_type_guesser')
2929
{
30+
if (0 < \func_num_args()) {
31+
trigger_deprecation('symfony/mime', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
32+
}
33+
3034
$this->mimeTypesService = $mimeTypesService;
3135
$this->mimeTypeGuesserTag = $mimeTypeGuesserTag;
3236
}

src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoConstructorPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ final class PropertyInfoConstructorPass implements CompilerPassInterface
3030

3131
public function __construct(string $service = 'property_info.constructor_extractor', string $tag = 'property_info.constructor_extractor')
3232
{
33+
if (0 < \func_num_args()) {
34+
trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
35+
}
36+
3337
$this->service = $service;
3438
$this->tag = $tag;
3539
}

src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ class PropertyInfoPass implements CompilerPassInterface
3434

3535
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')
3636
{
37+
if (0 < \func_num_args()) {
38+
trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
39+
}
40+
3741
$this->propertyInfoService = $propertyInfoService;
3842
$this->listExtractorTag = $listExtractorTag;
3943
$this->typeExtractorTag = $typeExtractorTag;

src/Symfony/Component/Routing/DependencyInjection/RoutingResolverPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class RoutingResolverPass implements CompilerPassInterface
3030

3131
public function __construct(string $resolverServiceId = 'routing.resolver', string $loaderTag = 'routing.loader')
3232
{
33+
if (0 < \func_num_args()) {
34+
trigger_deprecation('symfony/routing', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
35+
}
36+
3337
$this->resolverServiceId = $resolverServiceId;
3438
$this->loaderTag = $loaderTag;
3539
}

src/Symfony/Component/Serializer/DependencyInjection/SerializerPass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ class SerializerPass implements CompilerPassInterface
3333

3434
public function __construct(string $serializerService = 'serializer', string $normalizerTag = 'serializer.normalizer', string $encoderTag = 'serializer.encoder')
3535
{
36+
if (0 < \func_num_args()) {
37+
trigger_deprecation('symfony/serializer', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
38+
}
39+
3640
$this->serializerService = $serializerService;
3741
$this->normalizerTag = $normalizerTag;
3842
$this->encoderTag = $encoderTag;

src/Symfony/Component/Serializer/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=7.2.5",
20+
"symfony/deprecation-contracts": "^2.1",
2021
"symfony/polyfill-ctype": "~1.8",
2122
"symfony/polyfill-php80": "^1.15"
2223
},

0 commit comments

Comments
 (0)
0