From cd8394a8dc6fd8012c3295cd36d651f73c5639a0 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 10 Mar 2026 09:37:22 +0100 Subject: [PATCH 01/10] update license year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index bfcf021..2013f40 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2025 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 7a949aadb493986fe373d672fa8ba08dcbdffa89 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 10 Mar 2026 09:40:27 +0100 Subject: [PATCH 02/10] 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 b88998f..429673a 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 7864492..0ad9d6c 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ the [notification pattern](https://martinfowler.com/articles/replaceThrowWithNot ## Requirements -* PHP 8.1 - 8.4 +* PHP 8.2 - 8.5 ## Installation diff --git a/composer.json b/composer.json index 2d9114c..5fa5b80 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "psr15" ], "require": { - "php": "8.1.* || 8.2.* || 8.3.* || 8.4.*", + "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", "ext-json": "*", "psr/http-factory": "^1.0.1", "psr/http-server-middleware": "^1.0.1" From 237e0fdbcc26d5669e086f3cef57eee1e0c6fe0b Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 10 Mar 2026 09:42:44 +0100 Subject: [PATCH 03/10] update psr/http-factory from ^1.0 to ^1.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5fa5b80..6059412 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", "ext-json": "*", - "psr/http-factory": "^1.0.1", + "psr/http-factory": "^1.1.0", "psr/http-server-middleware": "^1.0.1" }, "require-dev": { From 0cfce73975cfbecada1b703fbca13f40d78123f4 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 10 Mar 2026 10:01:30 +0100 Subject: [PATCH 04/10] 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 6059412..7325319 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "friendsofphp/php-cs-fixer": "^3", "nyholm/psr7": "^1.4", "phpstan/phpstan": "^1 || ^2", - "phpunit/phpunit": "^10", + "phpunit/phpunit": "^11", "relay/relay": "^2.0", "slim/psr7": "^1", "squizlabs/php_codesniffer": "^3" 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 d71d9328a54955a90847b4e526da2c29a8e44ff6 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 10 Mar 2026 10:04:23 +0100 Subject: [PATCH 05/10] 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 7325319..d6cf237 100644 --- a/composer.json +++ b/composer.json @@ -43,12 +43,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 b6dfba3b1967d14b36953277791f428ff6db93eb Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 10 Mar 2026 10:20:24 +0100 Subject: [PATCH 06/10] update phpunit tests, removed deprecations --- tests/Encoder/JsonEncoderTest.php | 4 ++-- tests/Exception/ValidationExceptionTest.php | 4 ++-- tests/Middleware/ValidationExceptionMiddlewareTest.php | 4 ++-- tests/Transformer/ErrorDetailsTransformerTest.php | 4 ++-- tests/ValidationErrorTest.php | 4 ++-- tests/ValidationResultTest.php | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/Encoder/JsonEncoderTest.php b/tests/Encoder/JsonEncoderTest.php index e60ec1c..811fdb9 100644 --- a/tests/Encoder/JsonEncoderTest.php +++ b/tests/Encoder/JsonEncoderTest.php @@ -2,15 +2,15 @@ namespace Selective\Validation\Test\Encoder; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Selective\Validation\Encoder\JsonEncoder; use UnexpectedValueException; /** * Tests. - * - * @coversDefaultClass \Selective\Validation\Encoder\JsonEncoder */ +#[CoversClass(JsonEncoder::class)] class JsonEncoderTest extends TestCase { /** diff --git a/tests/Exception/ValidationExceptionTest.php b/tests/Exception/ValidationExceptionTest.php index 2163ac3..b5ad6bf 100644 --- a/tests/Exception/ValidationExceptionTest.php +++ b/tests/Exception/ValidationExceptionTest.php @@ -2,15 +2,15 @@ namespace Selective\Validation\Test\Exception; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Selective\Validation\Exception\ValidationException; use Selective\Validation\Test\TestService; /** * Tests. - * - * @coversDefaultClass \Selective\Validation\Exception\ValidationException */ +#[CoversClass(ValidationException::class)] class ValidationExceptionTest extends TestCase { /** diff --git a/tests/Middleware/ValidationExceptionMiddlewareTest.php b/tests/Middleware/ValidationExceptionMiddlewareTest.php index c099c79..a271f54 100644 --- a/tests/Middleware/ValidationExceptionMiddlewareTest.php +++ b/tests/Middleware/ValidationExceptionMiddlewareTest.php @@ -4,6 +4,7 @@ use Fig\Http\Message\StatusCodeInterface; use Nyholm\Psr7\Factory\Psr17Factory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Selective\Validation\Encoder\JsonEncoder; use Selective\Validation\Middleware\ValidationExceptionMiddleware; @@ -11,9 +12,8 @@ /** * Tests. - * - * @coversDefaultClass \Selective\Validation\Middleware\ValidationExceptionMiddleware */ +#[CoversClass(ValidationExceptionMiddleware::class)] class ValidationExceptionMiddlewareTest extends TestCase { use MiddlewareTestTrait; diff --git a/tests/Transformer/ErrorDetailsTransformerTest.php b/tests/Transformer/ErrorDetailsTransformerTest.php index 2df6aa7..be18db8 100644 --- a/tests/Transformer/ErrorDetailsTransformerTest.php +++ b/tests/Transformer/ErrorDetailsTransformerTest.php @@ -2,15 +2,15 @@ namespace Selective\Validation\Test\Transformer; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Selective\Validation\Transformer\ErrorDetailsResultTransformer; use Selective\Validation\ValidationResult; /** * Tests. - * - * @coversDefaultClass \Selective\Validation\Transformer\ErrorDetailsResultTransformer */ +#[CoversClass(ErrorDetailsResultTransformer::class)] class ErrorDetailsTransformerTest extends TestCase { /** diff --git a/tests/ValidationErrorTest.php b/tests/ValidationErrorTest.php index ad958fd..8ea6976 100644 --- a/tests/ValidationErrorTest.php +++ b/tests/ValidationErrorTest.php @@ -2,14 +2,14 @@ namespace Selective\Validation\Test; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Selective\Validation\ValidationError; /** * Tests. - * - * @coversDefaultClass \Selective\Validation\ValidationError */ +#[CoversClass(ValidationError::class)] class ValidationErrorTest extends TestCase { /** diff --git a/tests/ValidationResultTest.php b/tests/ValidationResultTest.php index 3f3b86c..a6ce4ca 100644 --- a/tests/ValidationResultTest.php +++ b/tests/ValidationResultTest.php @@ -2,15 +2,15 @@ namespace Selective\Validation\Test; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Selective\Validation\ValidationError; use Selective\Validation\ValidationResult; /** * ValidationResult tests. - * - * @coversDefaultClass \Selective\Validation\ValidationResult */ +#[CoversClass(ValidationResult::class)] class ValidationResultTest extends TestCase { /** From d7879abc9e4c9a7b3aa6382f063f0d5152e8e51d Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 10 Mar 2026 10:21:20 +0100 Subject: [PATCH 07/10] removed scrutinized yaml --- .scrutinizer.yml | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .scrutinizer.yml diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 3514e2e..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,41 +0,0 @@ -filter: - paths: [ "src/*" ] - excluded_paths: [ "vendor/*", "tests/*" ] - -checks: - php: - code_rating: true - duplication: true - -tools: - external_code_coverage: false - -build: - environment: - php: - version: 8.1.2 - ini: - xdebug.mode: coverage - mysql: false - node: false - postgresql: false - mongodb: false - elasticsearch: false - redis: false - memcached: false - neo4j: false - rabbitmq: false - nodes: - analysis: - tests: - override: - - php-scrutinizer-run - dependencies: - before: - - composer self-update - tests: - before: - - command: composer test:coverage - coverage: - file: 'build/logs/clover.xml' - format: 'clover' From 64febd5d41b4d32b3eab3aa58c7e40903c41a133 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 10 Mar 2026 10:21:56 +0100 Subject: [PATCH 08/10] removed phpstan ver 1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d6cf237..279d176 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "fig/http-message-util": "^1.1", "friendsofphp/php-cs-fixer": "^3", "nyholm/psr7": "^1.4", - "phpstan/phpstan": "^1 || ^2", + "phpstan/phpstan": "^2", "phpunit/phpunit": "^11", "relay/relay": "^2.0", "slim/psr7": "^1", From a98b859ee06f964c4303c60b6fadc7a809aabf69 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 10 Mar 2026 10:22:46 +0100 Subject: [PATCH 09/10] upgrade cakephp/validation from ^4 to ^5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 279d176..d342b9f 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "psr/http-server-middleware": "^1.0.1" }, "require-dev": { - "cakephp/validation": "^4.2", + "cakephp/validation": "^5.3", "fig/http-message-util": "^1.1", "friendsofphp/php-cs-fixer": "^3", "nyholm/psr7": "^1.4", From 2c76d6cbc3c6c791a46e75d1ba933e5ffb1be0a0 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 10 Mar 2026 10:23:33 +0100 Subject: [PATCH 10/10] upgrade relay/relay from ^2 to ^3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d342b9f..c9f9474 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "nyholm/psr7": "^1.4", "phpstan/phpstan": "^2", "phpunit/phpunit": "^11", - "relay/relay": "^2.0", + "relay/relay": "^3.0", "slim/psr7": "^1", "squizlabs/php_codesniffer": "^3" },