-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[FrameworkBundle][Mailer] Add recipient_fetcher option that allows fetching global recipients from a service
#62165
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
base: 8.1
Are you sure you want to change the base?
Conversation
|
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
ef04c78 to
7213ed3
Compare
|
For the failing checks, I do not understand why the |
GromNaN
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the failing checks, I do not understand why the
RecipientFetcherInterfaceinterface cannot be found while the problem does not occur in the other ones.
The failing jobs run the tests after installing the dependencies of src/Symfmony/Bundle/FrameworkBundle/composer.json with lowest and highest versions constraint. Currently the new classes doesn't exist in symfony/mailer in any version (v6.4.0 and 8.0.x-dev 46faf03 are tested).
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php
Outdated
Show resolved
Hide resolved
7213ed3 to
ac6a3c9
Compare
Thank you @GromNaN for giving me the explanation and the hints I needed to make the checks pass. |
recipient_fetcher option that allows fetching global recipients from a servicerecipient_fetcher option that allows fetching global recipients from a service
|
Rebase needed (note that the changelog entry should be moved to a 8.1 section and that the xsd file is gone in 8.x) |
0919ad1 to
159daa2
Compare
…fetching global recipients from a service
159daa2 to
3ef3991
Compare
|
@nicolas-grekas Rebase and changes are done. Failing checks do not seem related. |
Until now, the
Mailercomponent provided two ways to configure recipients globally:mailer.envelope.recipientsoption for static ones,MessageEventevent for dynamic ones.As a new developer joining an existing Symfony project and assigned to work with the
Mailercomponent, your first action would be to look at theconfig/packages/mailer.yamlfile.However, if the recipients were configured through an
EventListener, you would need more time to be aware of its existence.Today, in order to improve the developer experience, I propose to add a
mailer.envelope.recipient_fetcheroption that allows fetching global recipients from a service, and therefore from external sources (database, LDAP, etc.).Example
config/packages/mailer.yamlsrc/Mailer/AdminRecipientFetcher.phpAcknowledgements
api-platform/coreandlexik/LexikJWTAuthenticationBundlewhich taught me how to check in the configuration if a class implements an interface,