Skip to content

Commit bdb8702

Browse files
Merge branch '5.1' into 5.2
* 5.1: µCS fix CS fix CS fix [travis] use PHP 8.0 to patch return types and run deps=low Add me as a Notifier code owner Update sl_SI translations Don't trigger deprecation for deprecated aliases pointing to deprecated definitions [HttpFoundation] use atomic writes in MockFileSessionStorage Make EmailMessage & SmsMessage transport nullable remove unused argument [DI] fix param annotation [Config] Add \Symfony\Component\Config\Loader::load() return type Simplify PHP CS Fixer config Rename normalize param
2 parents f5fc6f9 + c2ccb5b commit bdb8702

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Message/EmailMessage.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,14 @@ public function getOptions(): ?MessageOptionsInterface
102102
/**
103103
* @return $this
104104
*/
105-
public function transport(string $transport): self
105+
public function transport(?string $transport): self
106106
{
107107
if (!$this->message instanceof Email) {
108108
throw new LogicException('Cannot set a Transport on a RawMessage instance.');
109109
}
110+
if (null === $transport) {
111+
return $this;
112+
}
110113

111114
$this->message->getHeaders()->addTextHeader('X-Transport', $transport);
112115

Message/SmsMessage.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function getSubject(): string
8383
/**
8484
* @return $this
8585
*/
86-
public function transport(string $transport): self
86+
public function transport(?string $transport): self
8787
{
8888
$this->transport = $transport;
8989

0 commit comments

Comments
 (0)