You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #54292 [FrameworkBundle] Fix mailer config with XML (lyrixx)
This PR was merged into the 5.4 branch.
Discussion
----------
[FrameworkBundle] Fix mailer config with XML
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
I noticed that, while adding test for #54044
---
Before my patch, if I keep only one recipients:
```
>…ome/gregoire/dev/github.com/lyrixx/symfony(5.4 *) git di
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/mailer_with_dsn.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/mailer_with_dsn.xml
index be53f59..5ccdefaf32 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/mailer_with_dsn.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/mailer_with_dsn.xml
@@ -11,7 +11,7 @@
<framework:envelope>
<framework:sender>[email protected]</framework:sender>
<framework:recipients>[email protected]</framework:recipients>
- <framework:recipients>[email protected]</framework:recipients>
+ <!-- <framework:recipients>[email protected]</framework:recipients> -->
</framework:envelope>
<framework:header name="from">[email protected]</framework:header>
<framework:header name="bcc">[email protected]</framework:header>
>…ome/gregoire/dev/github.com/lyrixx/symfony(5.4 *) ./phpunit src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php --filter 'testMailer#0'
PHPUnit 9.6.16 by Sebastian Bergmann and contributors.
Warning: Your XML configuration validates against a deprecated schema.
Suggestion: Migrate your XML configuration using "--migrate-configuration"!
Testing Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\XmlFrameworkExtensionTest
E 1 / 1 (100%)R
Time: 00:00.103, Memory: 21.88 MB
There was 1 error:
1) Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\XmlFrameworkExtensionTest::testMailer with data set #0 ('mailer_with_dsn', array('smtp://example.com'))
Symfony\Component\Config\Definition\Exception\InvalidTypeException: Invalid type for path "framework.mailer.envelope.recipients". Expected "array", but got "string"
```
And I cannot add more XML configuration, without this patch
Commits
-------
0cfdf2f [FrameworkBundle] Fix mailer config with XML
0 commit comments