Skip to content

[Notifier] Update fake SMS transports to use contracts event dispatcher #60885

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

Merged

Conversation

paulferrett
Copy link
Contributor

Q A
Branch? 6.4
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

Update FakeSmsLoggerTransport and FakeSmsEmailTransport to depend on Symfony\Contracts\EventDispatcher\EventDispatcherInterface instead of Symfony\Component\EventDispatcher\EventDispatcherInterface.

This ensures compatibility with internal projects with decorated dispatchers.

Update FakeSmsLoggerTransport and FakeSmsEmailTransport to depend on Symfony\Contracts\EventDispatcher\EventDispatcherInterface instead of Symfony\Component\EventDispatcher\EventDispatcherInterface.

This ensures compatibility with internal projects with decorated dispatchers.
@stof
Copy link
Member

stof commented Jun 24, 2025

this should even use Psr\EventDispatcher\EventDispatcherInterface like in the AbstractTransport.

@paulferrett
Copy link
Contributor Author

paulferrett commented Jun 24, 2025

this should even use Psr\EventDispatcher\EventDispatcherInterface like in the AbstractTransport.

@stof unless I'm mistaken the AbstractTransport uses Symfony\Contracts\EventDispatcher\EventDispatcherInterface hence the change. Sorry, am I looking in the wrong place?

@stof
Copy link
Member

stof commented Jun 24, 2025

Ah indeed. I looked at the AbstractTransport of Mailer instead of Notifier.

We should probably add support for any PSR dispatcher though. The notifier AbstractTransport uses the event dispatcher in a way compatible with the PSR interface. But that's for a separate PR targeting 7.4.

@OskarStark OskarStark changed the title [Notifier] Update fake SMS transports to use contracts event dispatcher. [Notifier] Update fake SMS transports to use contracts event dispatcher Jun 24, 2025
@nicolas-grekas
Copy link
Member

Thank you @paulferrett.

@nicolas-grekas nicolas-grekas merged commit 1eae08e into symfony:6.4 Jun 26, 2025
11 checks passed
@paulferrett paulferrett deleted the event-dispatcher-interface-fix branch June 26, 2025 09:47
This was referenced Jun 28, 2025
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.

6 participants