Skip to content

[Mailer] Consume a PSR-14 event dispatcher #42662

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
merged 1 commit into from
Aug 20, 2021

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Aug 20, 2021

Q A
Branch? 5.4
Bug fix? no
New feature? yes
Deprecations? no
Tickets N/A
License MIT
Doc PR TODO

This PR proposes to swap our own EventDispatcherInterface for the PSR-14 one in mailer. This would allow for a deeper integration of the mailer component into non-Symfony applications that use a different event dispatcher, like https://github.com/thephpleague/event.

Note that we still need Symfony's event dispatcher as a dependency, mainly because of EventSubscriberInterface.

@derrabus derrabus added this to the 5.4 milestone Aug 20, 2021
@derrabus derrabus force-pushed the improvement/mailer-psr-dispatcher branch from bc51e39 to 4f17de0 Compare August 20, 2021 12:52
@derrabus derrabus force-pushed the improvement/mailer-psr-dispatcher branch 2 times, most recently from ab42271 to aa21e5d Compare August 20, 2021 13:13
@derrabus
Copy link
Member Author

By the way, should the Transport class be final actually?

@fabpot
Copy link
Member

fabpot commented Aug 20, 2021

By the way, should the Transport class be final actually?

You're right, it should be final. Same for the Notifier equivalent class.

@fabpot
Copy link
Member

fabpot commented Aug 20, 2021

Tests are broken.

@derrabus derrabus force-pushed the improvement/mailer-psr-dispatcher branch 3 times, most recently from 4c991ec to bd3f9fb Compare August 20, 2021 22:10
Signed-off-by: Alexander M. Turek <me@derrabus.de>
@derrabus derrabus force-pushed the improvement/mailer-psr-dispatcher branch from bd3f9fb to e3c85b2 Compare August 20, 2021 22:29
@chalasr
Copy link
Member

chalasr commented Aug 20, 2021

Thank you @derrabus.

@chalasr chalasr merged commit bf8ecc4 into symfony:5.4 Aug 20, 2021
@derrabus derrabus deleted the improvement/mailer-psr-dispatcher branch August 22, 2021 09:56
fabpot added a commit that referenced this pull request Aug 25, 2021
This PR was merged into the 6.0 branch.

Discussion
----------

[Mailer] Restore Transport signatures

| Q             | A
| ------------- | ---
| Branch?       | 6.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Follow-up to #42662
| License       | MIT
| Doc PR        | N/A

Commits
-------

0d589b9 [Mailer] Restore Transport signatures
This was referenced Nov 5, 2021
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.

7 participants