Skip to content

Commit 36b7381

Browse files
Deprecate configuring tag names and service ids in compiler passes
1 parent bcbfcf5 commit 36b7381

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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
}

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;

0 commit comments

Comments
 (0)