Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Notifier] Dispatch message event in null transport #35841

Merged
merged 1 commit into from Feb 24, 2020

Conversation

jschaedl
Copy link
Contributor

Q A
Branch? 5.0
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

I think we should be able to log notifications via the NotificationLoggerListener even if they were sent to a null transport. The mailer component does it the same way.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mailer component does it the same way.

I confirm.


public function __construct(EventDispatcherInterface $dispatcher = null)
{
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$this->dispatcher = class_exists(\Symfony\Component\EventDispatcher\Event::class) ? LegacyEventDispatcherProxy::decorate($dispatcher) : $dispatcher;

@fabpot fabpot force-pushed the notifier-null-transport-dispatcher branch from 2786993 to a0d99ce Compare February 24, 2020 17:03
@fabpot
Copy link
Member

fabpot commented Feb 24, 2020

Thank you @jschaedl.

@fabpot fabpot merged commit 8b819ba into symfony:5.0 Feb 24, 2020
@fabpot fabpot mentioned this pull request Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants