-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] avoid service id conflicts with Swiftmailer #31928
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
Conversation
Q | A |
---|---|
Branch? | 4.3 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #31906 |
License | MIT |
Doc PR |
@@ -1916,7 +1916,7 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co | |||
} | |||
|
|||
$loader->load('mailer.xml'); | |||
$container->getDefinition('mailer.transport')->setArgument(0, $config['dsn']); | |||
$container->getDefinition('mailer.default_transport')->setArgument(0, $config['dsn']); |
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.
mailer.transport
would conflict with https://github.com/symfony/monolog-bundle/blob/master/DependencyInjection/Compiler/AddSwiftMailerTransportPass.php#L40 if $mailerId
is mailer
alternatively, we can update the compiler pass in MonologBundle and check the transport class there |
<argument type="service" id="messenger.default_bus" on-invalid="ignore" /> | ||
</service> | ||
<service id="mailer" alias="mailer.mailer" /> | ||
<service id="Symfony\Component\Mailer\MailerInterface" alias="mailer.mailer" /> | ||
|
||
<service id="mailer.transport" class="Symfony\Component\Mailer\Transport\TransportInterface"> | ||
<service id="mailer.default_transport" class="Symfony\Component\Mailer\Transport\TransportInterface"> |
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.
changing the id here might cause trouble for developers who have already updated and are using this id
Thank you @xabbuh. |
…ler (xabbuh) This PR was merged into the 4.3 branch. Discussion ---------- [FrameworkBundle] avoid service id conflicts with Swiftmailer | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #31906 | License | MIT | Doc PR | Commits ------- 5ce0ede avoid service id conflicts with Swiftmailer