Skip to content

Commit

Permalink
bug #31928 [FrameworkBundle] avoid service id conflicts with Swiftmai…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
nicolas-grekas committed Jun 7, 2019
2 parents 770162a + 5ce0ede commit 3b90c98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -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']);
}

/**
Expand Down
Expand Up @@ -6,23 +6,23 @@

<services>
<service id="mailer.mailer" class="Symfony\Component\Mailer\Mailer">
<argument type="service" id="mailer.transport" />
<argument type="service" id="mailer.default_transport" />
<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">
<factory class="Symfony\Component\Mailer\Transport" method="fromDsn" />
<argument /> <!-- env(MAILER_DSN) -->
<argument type="service" id="event_dispatcher" />
<argument type="service" id="http_client" on-invalid="ignore" />
<argument type="service" id="logger" on-invalid="ignore" />
</service>
<service id="Symfony\Component\Mailer\Transport\TransportInterface" alias="mailer.transport" />
<service id="Symfony\Component\Mailer\Transport\TransportInterface" alias="mailer.default_transport" />

<service id="mailer.messenger.message_handler" class="Symfony\Component\Mailer\Messenger\MessageHandler">
<argument type="service" id="mailer.transport" />
<argument type="service" id="mailer.default_transport" />
<tag name="messenger.message_handler" />
</service>
</services>
Expand Down

0 comments on commit 3b90c98

Please sign in to comment.