From 6d4daf026316c7fc8dbd737990108d4749402b7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20B=C3=BCrk?= <stefan@buerk.tech>
Date: Sat, 8 Jun 2024 19:12:24 +0200
Subject: [PATCH] [TASK] Add `phpunit 11.2.0` as conflict version due to
 regression
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

PHPUnit refactored the double creation to support doubling
readonly classes [1], thus breaking classes where the class
constructor is called with constructor arguments, but calling
itself a class method which is mocked using the `onlyMethods()`
setup option. This leads now to some internal state setup issue
and is reported as `regression` [2] providing steps to reproduce
it.

This change adds `phpunit 11.2.0` as conflict to the monorepo
version to avoid using it in nightly tests for now, until a
proper regression fix has been implemented in phpunit.

Used command(s):

  \
    cat \
    <<< $(jq --indent 1 --tab \
      '."conflict" += {"phpunit/phpunit": "11.2.0"}' \
      composer.json) > composer.json \
    && Build/Scripts/runTests.sh -s composer -- update --lock

[1] https://github.com/sebastianbergmann/phpunit/pull/5804
[2] https://github.com/sebastianbergmann/phpunit/issues/5857

Resolves: #104007
Releases: main
Change-Id: Ia384ff98a9ea4e318738a48bd9ff8afcc4faff15
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84533
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com>
Tested-by: Stefan Bürk <stefan@buerk.tech>
---
 composer.json | 12 ++++++++++--
 composer.lock |  2 +-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/composer.json b/composer.json
index 889a39124b55..ff3c97c8f85e 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,12 @@
 {
 	"name": "typo3/cms",
 	"description": "TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.",
-	"keywords": ["typo3", "cms", "content management system", "extbase"],
+	"keywords": [
+		"typo3",
+		"cms",
+		"content management system",
+		"extbase"
+	],
 	"homepage": "https://typo3.org/",
 	"type": "typo3-cms-core",
 	"license": "GPL-2.0-or-later",
@@ -307,7 +312,7 @@
 			"TYPO3Tests\\TestEid\\": "typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_eid/Classes/",
 			"TYPO3Tests\\FluidTest\\": "typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/Classes/",
 			"TYPO3Tests\\TestTranslate\\": "typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/test_translate/Classes/",
-			"TYPO3Tests\\FormCachingTests\\" : "typo3/sysext/form/Tests/Functional/RequestHandling/Fixtures/Extensions/form_caching_tests/Classes/",
+			"TYPO3Tests\\FormCachingTests\\": "typo3/sysext/form/Tests/Functional/RequestHandling/Fixtures/Extensions/form_caching_tests/Classes/",
 			"TYPO3Tests\\RequestMirror\\": "typo3/sysext/frontend/Tests/Functional/Fixtures/Extensions/test_request_mirror/Classes/",
 			"TYPO3Tests\\TestValidators\\": "typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_validators/Classes/",
 			"TYPO3Tests\\TestDatahandler\\": "typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler/Classes/",
@@ -325,5 +330,8 @@
 			"TYPO3Tests\\ViewhelperLibrary\\": "typo3/sysext/fluid/Tests/Functional/Fixtures/Libraries/viewhelper_library/src/",
 			"TYPO3\\CMS\\PHPStan\\": "Build/phpstan/src/"
 		}
+	},
+	"conflict": {
+		"phpunit/phpunit": "11.2.0"
 	}
 }
diff --git a/composer.lock b/composer.lock
index 6b2ebeb5636f..c2673f056cf5 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "532f2e7db4abb02dae0c56f623683c91",
+    "content-hash": "82c43b81d9f17d2a286049ff4217372c",
     "packages": [
         {
             "name": "bacon/bacon-qr-code",
-- 
GitLab