From c4884823285a4b98e0b5b2556b3d92f96d16829f Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 13 Mar 2026 09:38:58 +0100 Subject: [PATCH 1/9] add PHP 8.5, drop PHP 8.1 --- .github/workflows/build.yml | 2 +- README.md | 2 +- composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae39631..4c3d3a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: operating-system: [ ubuntu-latest ] - php-versions: [ '8.1', '8.2', '8.3', '8.4' ] + php-versions: [ '8.2', '8.3', '8.4', '8.5' ] name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} steps: diff --git a/README.md b/README.md index f8ffbf9..1234047 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ A collection of PHPUnit test traits. ## Requirements -* PHP 8.1+ +* PHP 8.2 - 8.5 ## Installation diff --git a/composer.json b/composer.json index 77efeda..314ac58 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "homepage": "https://github.com/selective-php/test-traits", "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3", From f7b3254c9f6ed5ab50bc36b0216c9a0a4625ef4b Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 13 Mar 2026 09:39:30 +0100 Subject: [PATCH 2/9] update license year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index bf7a9a3..2013f40 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 odan +Copyright (c) 2026 odan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From f5a23db87ae2e06aff65c2c46603691997a83e69 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 13 Mar 2026 09:42:03 +0100 Subject: [PATCH 3/9] fixed PHP_CS_FIXER_IGNORE_ENV deprecation --- composer.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 314ac58..d121b6c 100644 --- a/composer.json +++ b/composer.json @@ -37,12 +37,10 @@ }, "scripts": { "cs:check": [ - "@putenv PHP_CS_FIXER_IGNORE_ENV=1", - "php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi" + "php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi --allow-unsupported-php-version=yes" ], "cs:fix": [ - "@putenv PHP_CS_FIXER_IGNORE_ENV=1", - "php-cs-fixer fix --config=.cs.php --ansi --verbose" + "php-cs-fixer fix --config=.cs.php --ansi --verbose --allow-unsupported-php-version=yes" ], "sniffer:check": "phpcs --standard=phpcs.xml", "sniffer:fix": "phpcbf --standard=phpcs.xml", From 85d696fdc712e054e2571b62b7e2216b7d946b07 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 13 Mar 2026 09:47:08 +0100 Subject: [PATCH 4/9] drop monolog ^2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d121b6c..aade3d2 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^3", - "monolog/monolog": "^2 || ^3", + "monolog/monolog": "^3", "php-di/php-di": "^6 || ^7", "phpstan/phpstan": "^1", "phpunit/phpunit": "^10", From 0a51b460ec914448ce5a4d212401f760b0f9c2c2 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 13 Mar 2026 10:17:22 +0100 Subject: [PATCH 5/9] drop phpstan ^1 and update config for phpstan ^2 --- composer.json | 2 +- phpstan.neon | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index aade3d2..94939d9 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "friendsofphp/php-cs-fixer": "^3", "monolog/monolog": "^3", "php-di/php-di": "^6 || ^7", - "phpstan/phpstan": "^1", + "phpstan/phpstan": "^2", "phpunit/phpunit": "^10", "squizlabs/php_codesniffer": "^3", "symfony/mailer": "^5" diff --git a/phpstan.neon b/phpstan.neon index 0b6508e..afb5baf 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,4 +1,6 @@ parameters: level: 8 paths: - - src \ No newline at end of file + - src + ignoreErrors: + - identifier: trait.unused \ No newline at end of file From 2df43b0f3f5a3d12964185bfb3621d1c23cad728 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 13 Mar 2026 10:20:39 +0100 Subject: [PATCH 6/9] Upgrade of PHPUnit from ^10 to ^11 --- composer.json | 2 +- phpunit.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 94939d9..7ec9fd8 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "monolog/monolog": "^3", "php-di/php-di": "^6 || ^7", "phpstan/phpstan": "^2", - "phpunit/phpunit": "^10", + "phpunit/phpunit": "^11", "squizlabs/php_codesniffer": "^3", "symfony/mailer": "^5" }, diff --git a/phpunit.xml b/phpunit.xml index 2927473..7b7ad74 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -3,7 +3,7 @@ bootstrap="vendor/autoload.php" colors="true" backupGlobals="false" - xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd" + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false"> From c4c3a25841874f82ed0243453147da83fa21a0a8 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 13 Mar 2026 10:36:08 +0100 Subject: [PATCH 7/9] fix, php-cs: Function's nesting level (3) exceeds 2, now nesting level is 3 --- phpcs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpcs.xml b/phpcs.xml index f2f42d9..c36ae0d 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -22,7 +22,7 @@ - + From 657e99b40e99646f60e1d0fd05354a66a2a479da Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 13 Mar 2026 10:36:26 +0100 Subject: [PATCH 8/9] drop php-di ^6 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7ec9fd8..0a73cca 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3", "monolog/monolog": "^3", - "php-di/php-di": "^6 || ^7", + "php-di/php-di": "^7", "phpstan/phpstan": "^2", "phpunit/phpunit": "^11", "squizlabs/php_codesniffer": "^3", From 4670ca879a3c8368b804b443c86e2254fc4f4b5c Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 13 Mar 2026 10:39:00 +0100 Subject: [PATCH 9/9] update symfony/mailer from ^5 to ^8 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0a73cca..d8f11f6 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "phpstan/phpstan": "^2", "phpunit/phpunit": "^11", "squizlabs/php_codesniffer": "^3", - "symfony/mailer": "^5" + "symfony/mailer": "^7" }, "autoload": { "psr-4": {