Skip to content

Commit 5134212

Browse files
PHP 8.0 support
1 parent e2bbc85 commit 5134212

File tree

4 files changed

+105
-43
lines changed

4 files changed

+105
-43
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
},
1212
"require": {
13-
"php": "^7.0",
13+
"php": "^7.2 || ^8.0",
1414
"ext-json": "*",
1515
"guzzlehttp/guzzle": "~7.2",
1616
"monolog/monolog": "^1.24|^2.0",
@@ -19,6 +19,6 @@
1919
"myclabs/php-enum": "^1.7"
2020
},
2121
"require-dev": {
22-
"symfony/var-dumper": "^4.3"
22+
"symfony/var-dumper": "^5.4"
2323
}
2424
}

composer.lock

Lines changed: 100 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Messaging/Mail/Header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(string $name, string $value)
2525
}
2626

2727
if (str_replace(" \n\r", '', $name) != $name) {
28-
throw new InvalidHeaderException(sprintf('Invalid header name "%s", header contains whitespaces'));
28+
throw new InvalidHeaderException(sprintf('Invalid header name "%s", header contains whitespaces', $name));
2929
}
3030

3131
if (strtolower(substr($name, 0,2)) != 'x-') {

src/Messaging/Mail/MailBag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ private function replaceContent(ContentType $contentType, string $body): void
241241

242242
/**
243243
* @param ContentType $contentType
244-
* @return string
244+
* @return Content|null
245245
*/
246-
private function getContent(ContentType $contentType): Content
246+
private function getContent(ContentType $contentType): ?Content
247247
{
248248
foreach ($this->contents as $content) {
249249
if ($content->getContentType() == $contentType) {

0 commit comments

Comments
 (0)