Skip to content

Commit

Permalink
feature #48678 [FrameworkBundle] Rename service `notifier.logger_noti…
Browse files Browse the repository at this point in the history
…fication_listener` to `notifier.notification_logger_listener` (ker0x)

This PR was squashed before being merged into the 6.3 branch.

Discussion
----------

[FrameworkBundle] Rename service `notifier.logger_notification_listener` to `notifier.notification_logger_listener`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | yes
| Tickets       | Fix #48519
| License       | MIT
| Doc PR        | -

Commits
-------

fcbfbb1 [FrameworkBundle] Rename service `notifier.logger_notification_listener` to `notifier.notification_logger_listener`
  • Loading branch information
nicolas-grekas committed Jan 9, 2023
2 parents 39be079 + fcbfbb1 commit 5a832f4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions UPGRADE-6.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ FrameworkBundle
</framework:config>
```

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 @@ -10,6 +10,7 @@ CHANGELOG
* Add `--format` option to the `debug:config` command
* Add support to pass namespace wildcard in `framework.messenger.routing`
* Deprecate `framework:exceptions` tag, unwrap it and replace `framework:exception` tags' `name` attribute by `class`
* 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 @@ -126,7 +126,11 @@
->args([service('texter.transports')])
->tag('messenger.message_handler', ['handles' => PushMessage::class])

->set('notifier.logger_notification_listener', NotificationLoggerListener::class)
->set('notifier.notification_logger_listener', NotificationLoggerListener::class)
->tag('kernel.event_subscriber')

->alias('notifier.logger_notification_listener', 'notifier.notification_logger_listener')
->deprecate('symfony/framework-bundle', '6.3', 'The "%alias_id%" service is deprecated, use "notifier.notification_logger_listener" instead.')

;
};
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,8 +91,8 @@ public static function getNotifierMessage(int $index = 0, string $transportName
public static function getNotificationEvents(): NotificationEvents
{
$container = static::getContainer();
if ($container->has('notifier.logger_notification_listener')) {
return $container->get('notifier.logger_notification_listener')->getEvents();
if ($container->has('notifier.notification_logger_listener')) {
return $container->get('notifier.notification_logger_listener')->getEvents();
}

static::fail('A client must have Notifier enabled to make notifications assertions. Did you forget to require symfony/notifier?');
Expand Down

0 comments on commit 5a832f4

Please sign in to comment.