Skip to content

Commit

Permalink
[FrameworkBundle] Rename service notifier.logger_notification_listene…
Browse files Browse the repository at this point in the history
…r to notifier.notification_logger_listener
  • Loading branch information
ker0x committed Dec 19, 2022
1 parent 52b5bb7 commit f09d8e5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions UPGRADE-6.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ DependencyInjection

* Deprecate `PhpDumper` options `inline_factories_parameter` and `inline_class_loader_parameter`, use `inline_factories` and `inline_class_loader` instead

FrameworkBundle
---------------

* Deprecate the `notifier.logger_notification_listener` service, use the `notifier.notification_logger_listener` service instead

HttpKernel
----------

Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CHANGELOG
* Add `DomCrawlerAssertionsTrait::assertSelectorCount(int $count, string $selector)`
* Allow to avoid `limit` definition in a RateLimiter configuration when using the `no_limit` policy
* Add `--format` option to the `debug:config` command
* Deprecate the `notifier.logger_notification_listener` service, use the `notifier.notification_logger_listener` service instead

6.2
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,9 @@

->set('notifier.logger_notification_listener', NotificationLoggerListener::class)
->tag('kernel.event_subscriber')
->deprecate('symfony/framework-bundle', '6.3', 'The "%service_id%" service is deprecated, use "notifier.notification_logger_listener" instead.')

->set('notifier.notification_logger_listener', NotificationLoggerListener::class)
->tag('kernel.event_subscriber')
;
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
return static function (ContainerConfigurator $container) {
$container->services()
->set('notifier.data_collector', NotificationDataCollector::class)
->args([service('notifier.logger_notification_listener')])
->args([service('notifier.notification_logger_listener')])
->tag('data_collector', ['template' => '@WebProfiler/Collector/notifier.html.twig', 'id' => 'notifier'])
;
};
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ public static function getNotifierMessage(int $index = 0, string $transportName
public static function getNotificationEvents(): NotificationEvents
{
$container = static::getContainer();
if ($container->has('notifier.notification_logger_listener')) {
return $container->get('notifier.notification_logger_listener')->getEvents();
}

if ($container->has('notifier.logger_notification_listener')) {
return $container->get('notifier.logger_notification_listener')->getEvents();
}
Expand Down

0 comments on commit f09d8e5

Please sign in to comment.