Skip to content

Commit 95ba3dd

Browse files
Deprecate configuring tag names and service ids in compiler passes
1 parent d5ac10a commit 95ba3dd

6 files changed

+24
-0
lines changed

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;

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
}

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;

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
}

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

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

0 commit comments

Comments
 (0)