Skip to content

Commit ae1be23

Browse files
Merge branch '6.4' into 7.0
* 6.4: (32 commits) [Validator] Fix registering "is_valid()" for `#[Expression]` [Scheduler] Trigger unique messages at runtime [Scheduler] Fix CHANGELOG [Clock] Add `DatePoint`: an immutable DateTime implementation with stricter error handling and return types [Scheduler] Allow modifying the schedule at runtime and recalculate heap [Cache] Fix Redis6Proxy [Finder] Disable failing test about open_basedir Fix merge Fix merge Minor CS fixes Deprecate `Kernel::stripComments()` Remove setAccessible reflection call in tests [Notifier] Telegram Bridge add escaping for \ [Component][AssertMapper] add type hint of an argument in asset mapper command [Translation] [Phrase] Refacto ReadConfig and WriteConfig into arrays [Routing] Fix routing collection defaults when adding a new route to a collection [Messenger] Fix cloned TraceableStack not unstacking the stack independently [Translation] Add `--as-tree` option to `translation:pull` command [Mime] Allow to add some headers as a strings [Translation] Give current locale to locale switcher runWithLocale callback ...
2 parents cb7921c + 1aa4273 commit ae1be23

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Header/Headers.php

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ public function addHeader(string $name, mixed $argument, array $more = []): stat
147147
$method = 'addTextHeader';
148148
} elseif ('addIdentificationHeader' === $method) {
149149
$method = 'addIdHeader';
150+
} elseif ('addMailboxListHeader' === $method && !\is_array($argument)) {
151+
$argument = [$argument];
150152
}
151153

152154
return $this->$method($name, $argument, $more);

Tests/Header/HeadersTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function testAddHeader()
6969
{
7070
$headers = new Headers();
7171
$headers->addHeader('from', ['[email protected]']);
72+
$headers->addHeader('reply-to', '[email protected]');
7273
$headers->addHeader('return-path', '[email protected]');
7374
$headers->addHeader('foo', 'bar');
7475
$headers->addHeader('date', $now = new \DateTimeImmutable());
@@ -77,6 +78,9 @@ public function testAddHeader()
7778
$this->assertInstanceOf(MailboxListHeader::class, $headers->get('from'));
7879
$this->assertEquals([new Address('[email protected]')], $headers->get('from')->getBody());
7980

81+
$this->assertInstanceOf(MailboxListHeader::class, $headers->get('reply-to'));
82+
$this->assertEquals([new Address('[email protected]')], $headers->get('reply-to')->getBody());
83+
8084
$this->assertInstanceOf(PathHeader::class, $headers->get('return-path'));
8185
$this->assertEquals(new Address('[email protected]'), $headers->get('return-path')->getBody());
8286

0 commit comments

Comments
 (0)