diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php index 89beceb5748a4..bf3ee2de2b357 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php @@ -2,14 +2,11 @@ $container->loadFromExtension('framework', [ 'cache' => [ - 'app' => 'cache.redis_tag_aware.bar', + 'app' => 'cache.redis_tag_aware.foo', 'pools' => [ 'cache.redis_tag_aware.foo' => [ 'adapter' => 'cache.adapter.redis_tag_aware', ], - 'cache.redis_tag_aware.bar' => [ - 'adapter' => 'cache.redis_tag_aware.foo', - ], ], ], ]); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml index 063e51810ef07..65c06a1da6df7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml @@ -7,9 +7,8 @@ - cache.redis_tag_aware.bar + cache.redis_tag_aware.foo - diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml index 042ffd01392e2..9eb8b83c775c5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml @@ -1,8 +1,6 @@ framework: cache: - app: cache.redis_tag_aware.bar + app: cache.redis_tag_aware.foo pools: cache.redis_tag_aware.foo: adapter: cache.adapter.redis_tag_aware - cache.redis_tag_aware.bar: - adapter: cache.redis_tag_aware.foo diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 00ac8aa08196b..c054edd268ad1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -1589,11 +1589,11 @@ public function testRedisTagAwareAdapter() } /** - * @dataProvider testAppRedisTagAwareConfigProvider + * @dataProvider appRedisTagAwareConfigProvider */ - public function testAppRedisTagAwareAdapter() + public function testAppRedisTagAwareAdapter(string $configFile) { - $container = $this->createContainerFromFile('cache_app_redis_tag_aware'); + $container = $this->createContainerFromFile($configFile); foreach ([TagAwareCacheInterface::class, CacheInterface::class, CacheItemPoolInterface::class] as $alias) { $def = $container->findDefinition($alias); @@ -1606,7 +1606,7 @@ public function testAppRedisTagAwareAdapter() } } - public function testAppRedisTagAwareConfigProvider(): array + public function appRedisTagAwareConfigProvider(): array { return [ ['cache_app_redis_tag_aware'], diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/mailer.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/mailer.html.twig index bdca4eb968fbd..dab2e9c6c0c67 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/mailer.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/mailer.html.twig @@ -141,42 +141,48 @@ {% if message.htmlBody is defined %} {# Email instance #} -
-

HTML preview

-
-
-                                                            
-                                                        
+ {% set htmlBody = message.htmlBody() %} + {% if htmlBody is not null %} +
+

HTML Preview

+
+
+                                                                
+                                                            
+
-
-
-

HTML Content

-
-
-                                                            {%- if message.htmlCharset() %}
-                                                                {{- message.htmlBody()|convert_encoding('UTF-8', message.htmlCharset()) }}
-                                                            {%- else %}
-                                                                {{- message.htmlBody() }}
-                                                            {%- endif -%}
-                                                        
+
+

HTML Content

+
+
+                                                                {%- if message.htmlCharset() %}
+                                                                    {{- htmlBody|convert_encoding('UTF-8', message.htmlCharset()) }}
+                                                                {%- else %}
+                                                                    {{- htmlBody }}
+                                                                {%- endif -%}
+                                                            
+
-
-
-

Text Content

-
-
-                                                            {%- if message.textCharset() %}
-                                                                {{- message.textBody()|convert_encoding('UTF-8', message.textCharset()) }}
-                                                            {%- else %}
-                                                                {{- message.textBody() }}
-                                                            {%- endif -%}
-                                                        
+ {% endif %} + {% set textBody = message.textBody() %} + {% if textBody is not null %} +
+

Text Content

+
+
+                                                                {%- if message.textCharset() %}
+                                                                    {{- textBody|convert_encoding('UTF-8', message.textCharset()) }}
+                                                                {%- else %}
+                                                                    {{- textBody }}
+                                                                {%- endif -%}
+                                                            
+
-
+ {% endif %} {% for attachment in message.attachments %}

Attachment #{{ loop.index }}

diff --git a/src/Symfony/Component/Mime/Header/Headers.php b/src/Symfony/Component/Mime/Header/Headers.php index 52af9a9a8965a..115928155e961 100644 --- a/src/Symfony/Component/Mime/Header/Headers.php +++ b/src/Symfony/Component/Mime/Header/Headers.php @@ -34,8 +34,8 @@ final class Headers 'cc' => MailboxListHeader::class, 'bcc' => MailboxListHeader::class, 'message-id' => IdentificationHeader::class, - 'in-reply-to' => IdentificationHeader::class, - 'references' => IdentificationHeader::class, + 'in-reply-to' => UnstructuredHeader::class, // `In-Reply-To` and `References` are less strict than RFC 2822 (3.6.4) to allow users entering the original email's ... + 'references' => UnstructuredHeader::class, // ... `Message-ID`, even if that is no valid `msg-id` 'return-path' => PathHeader::class, ]; diff --git a/src/Symfony/Component/Mime/Tests/Header/HeadersTest.php b/src/Symfony/Component/Mime/Tests/Header/HeadersTest.php index 37e3192fbe946..78c4df8533c9c 100644 --- a/src/Symfony/Component/Mime/Tests/Header/HeadersTest.php +++ b/src/Symfony/Component/Mime/Tests/Header/HeadersTest.php @@ -280,6 +280,20 @@ public function testToArray() ], $headers->toArray()); } + public function testInReplyToAcceptsNonIdentifierValues() + { + $headers = new Headers(); + $headers->addHeader('In-Reply-To', 'foobar'); + $this->assertEquals('foobar', $headers->get('In-Reply-To')->getBody()); + } + + public function testReferencesAcceptsNonIdentifierValues() + { + $headers = new Headers(); + $headers->addHeader('References' , 'foobar'); + $this->assertEquals('foobar', $headers->get('References')->getBody()); + } + public function testHeaderBody() { $headers = new Headers();