From dd9cd004193bb367b4037b30781ec3a4815c8076 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20B=C3=BCrk?= <stefan@buerk.tech>
Date: Sat, 27 Aug 2022 14:14:12 +0200
Subject: [PATCH] [TASK] Temporarly skip mailer unit test execution with PHP8.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Symfony recently released new version v5.4.12 and v6.1.4 of the
framework which contains a change in `symfony/mailer` throwing
a TransportException and passing null as 2nd ($code) argument.
This is deprecated since PHP8.1 and emits now a corresponding
depcreaction warning in some circumenstances and breaking one
mailer unit test.

See: https://github.com/symfony/symfony/issues/47402

This change temporarly skips the test for PHP8.1 until the fix
has been merged and released a new version by symfony.

Resolves: #98216
Releases: main, 11.5
Change-Id: I12a18f425bd573e1943dddad909c7c3256c1fd87
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75557
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
---
 typo3/sysext/core/Tests/Unit/Mail/TransportFactoryTest.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/typo3/sysext/core/Tests/Unit/Mail/TransportFactoryTest.php b/typo3/sysext/core/Tests/Unit/Mail/TransportFactoryTest.php
index c8950b80c733..72d8fc43e3c8 100644
--- a/typo3/sysext/core/Tests/Unit/Mail/TransportFactoryTest.php
+++ b/typo3/sysext/core/Tests/Unit/Mail/TransportFactoryTest.php
@@ -293,6 +293,8 @@ class TransportFactoryTest extends UnitTestCase
 
     /**
      * @test
+     * @requires PHP < 8.1
+     * @todo Temporarly restrict to PHP version before 8.1, until symfony/mailer deprecation issue has been fixed.
      */
     public function sendmailTransportCallsDispatchOfDispatcher(): void
     {
-- 
GitLab