This repository has been archived by the owner on Feb 6, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SwiftmailerBundle] Allow non-file spools
Actually if I have the following configuration: swiftmailer: spool: type: not_file path: some_path The DIC compiler will complain: 'The service "swiftmailer.spool.file" has a dependency on a non-existent parameter "swiftmailer.spool.file.path" Because the file spool service is declared no matter the spool type configured. And it requires the file.path, which is not available. This patch aims to load the file spooler only if required by the configuration.
- Loading branch information
Showing
3 changed files
with
19 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
|
||
<parameters> | ||
<parameter key="swiftmailer.spool.file.class">Swift_FileSpool</parameter> | ||
</parameters> | ||
|
||
<services> | ||
<service id="swiftmailer.spool.file" class="%swiftmailer.spool.file.class%" public="false"> | ||
<argument>%swiftmailer.spool.file.path%</argument> | ||
</service> | ||
</services> | ||
</container> |