From fa4be4babbf4e3f3856e72ebb04f230e7a41f272 Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Tue, 19 Nov 2024 15:52:03 +0100 Subject: [PATCH 1/5] phpunit: configure defaults, make it more strict --- phpunit.xml.dist | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e7eb04f5..cd1d4a6c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,7 +2,20 @@ From 374de16493cb8e9d713e9676033f8592dcefb412 Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Tue, 19 Nov 2024 15:57:00 +0100 Subject: [PATCH 2/5] phpunit: bump min version for --prefer-lowest which still support all the new config elements --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 005910d3..4290fab3 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "mockery/mockery": "^1.5", "orchestra/testbench-core": "^8.0|^9.0", "phpstan/phpstan": "^1", - "phpunit/phpunit": "^10.5", + "phpunit/phpunit": "^10.5.32", "thecodingmachine/phpstan-safe-rule": "^1" }, "autoload": { From b1e677b28b7755a0241800db061d92157fa79668 Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Tue, 19 Nov 2024 16:08:31 +0100 Subject: [PATCH 3/5] phpunit: don't fail on deprecations (yet) --- phpunit.xml.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index cd1d4a6c..e7f56d7c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -11,9 +11,9 @@ displayDetailsOnTestsThatTriggerErrors="true" displayDetailsOnTestsThatTriggerNotices="true" displayDetailsOnTestsThatTriggerWarnings="true" - failOnDeprecation="true" + failOnDeprecation="false" failOnNotice="true" - failOnPhpunitDeprecation="true" + failOnPhpunitDeprecation="false" failOnRisky="true" failOnWarning="true" > From e0d60be870e4f09159f22e8f714bb9a4a144c00e Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Tue, 19 Nov 2024 16:22:32 +0100 Subject: [PATCH 4/5] gha: use development php.ini file for tests --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2bcd52b5..4e1f6330 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,6 +42,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} + ini-file: development coverage: none extensions: pdo_sqlite From 5a18084bd8ed7b469b52f2c003365a09f34929cc Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Tue, 19 Nov 2024 16:28:18 +0100 Subject: [PATCH 5/5] phpunit: don't fail on output (yet) Because some deprecations are shown with 8.4, breaking the tests --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e7f56d7c..0c8245ad 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" beStrictAboutChangesToGlobalState="true" - beStrictAboutOutputDuringTests="true" + beStrictAboutOutputDuringTests="false" beStrictAboutTestsThatDoNotTestAnything="true" cacheDirectory=".phpunit.result.cache" displayDetailsOnPhpunitDeprecations="true"