From b253675917c62fd7bb0f74d5d2f0c70bbbbac699 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Tue, 26 Nov 2024 14:53:19 +0100 Subject: [PATCH] mimemailparser: Fix implicitly nullable parameter declarations for PHP 8.4 Summary: Backport upstream's https://github.com/php-mime-mail-parser/php-mime-mail-parser/commit/39633e054b4b3290775c5e9b43d3bb8f47128433 for PHP 8.4 compatibility. Test Plan: Run static code analysis. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25840 --- externals/mimemailparser/MiddlewareStack.php | 2 +- externals/mimemailparser/Parser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/externals/mimemailparser/MiddlewareStack.php b/externals/mimemailparser/MiddlewareStack.php index 3ef6da9349..ecab6445b4 100644 --- a/externals/mimemailparser/MiddlewareStack.php +++ b/externals/mimemailparser/MiddlewareStack.php @@ -29,7 +29,7 @@ class MiddlewareStack * * @param Middleware $middleware */ - public function __construct(MiddleWareContracts $middleware = null) + public function __construct(?MiddleWareContracts $middleware = null) { $this->middleware = $middleware; } diff --git a/externals/mimemailparser/Parser.php b/externals/mimemailparser/Parser.php index 7f8a1de94d..7c30a6104d 100644 --- a/externals/mimemailparser/Parser.php +++ b/externals/mimemailparser/Parser.php @@ -74,7 +74,7 @@ class Parser * * @param CharsetManager|null $charset */ - public function __construct(CharsetManager $charset = null) + public function __construct(?CharsetManager $charset = null) { if ($charset == null) { $charset = new Charset();