From b4ce3ff89998121014990cafc4dd597f774cb5a8 Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Fri, 13 Feb 2026 17:25:00 +0100 Subject: [PATCH 1/3] Fix PHPStan return type annotation Co-Authored-By: Claude Opus 4.6 --- tests/Doctrine/DBAL/Types/PercentTypeTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Doctrine/DBAL/Types/PercentTypeTest.php b/tests/Doctrine/DBAL/Types/PercentTypeTest.php index 6f7848c..cd6dad2 100644 --- a/tests/Doctrine/DBAL/Types/PercentTypeTest.php +++ b/tests/Doctrine/DBAL/Types/PercentTypeTest.php @@ -80,7 +80,7 @@ public function testConvertStringToPHPValue(): void } /** - * @return mixed[][] + * @return list> */ public static function invalidPHPValuesProvider(): iterable { From 25e2aa2c513017d49f007e461d1bdf17532f6431 Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Sat, 14 Feb 2026 16:48:47 +0100 Subject: [PATCH 2/3] Require validator-bundle ^2.39.2 for static data providers Co-Authored-By: Claude Opus 4.6 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8f50495..c8d6be1 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "assoconnect/php-percent": "^1.1", "doctrine/dbal": "^2.10|^3.0", "symfony/serializer": "^7.0", - "assoconnect/validator-bundle": "^2.32" + "assoconnect/validator-bundle": "^2.39.2" }, "config": { "allow-plugins": { From 5d05cbb0d37fe1c10da9521b2d9ab70a63002e5c Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Sat, 14 Feb 2026 16:53:11 +0100 Subject: [PATCH 3/3] Make data providers static (Rector) Co-Authored-By: Claude Opus 4.6 --- tests/Validator/Constraints/PercentValidatorTest.php | 4 ++-- .../ConstraintsSetProvider/Field/PercentProviderTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Validator/Constraints/PercentValidatorTest.php b/tests/Validator/Constraints/PercentValidatorTest.php index 99003f7..a0e63b3 100644 --- a/tests/Validator/Constraints/PercentValidatorTest.php +++ b/tests/Validator/Constraints/PercentValidatorTest.php @@ -29,7 +29,7 @@ public function createValidator(): ConstraintValidator return new PercentValidator(); } - public function providerValidValues(): iterable + public static function providerValidValues(): iterable { yield [null]; yield [10.0]; @@ -40,7 +40,7 @@ public function providerValidValues(): iterable yield [new \AssoConnect\PHPPercent\Percent(20)]; } - public function providerInvalidValues(): iterable + public static function providerInvalidValues(): iterable { yield [ 'a', diff --git a/tests/Validator/ConstraintsSetProvider/Field/PercentProviderTest.php b/tests/Validator/ConstraintsSetProvider/Field/PercentProviderTest.php index b24407a..1cffb5f 100644 --- a/tests/Validator/ConstraintsSetProvider/Field/PercentProviderTest.php +++ b/tests/Validator/ConstraintsSetProvider/Field/PercentProviderTest.php @@ -18,7 +18,7 @@ protected function getFactory(): FieldConstraintsSetProviderInterface return new PercentProvider(); } - public function getConstraintsForTypeProvider(): iterable + public static function getConstraintsForTypeProvider(): iterable { yield [ [