From 253cc980bce119d50a3b6ba1466e4fcfb02ebc01 Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Tue, 27 Jan 2026 15:48:12 +0100 Subject: [PATCH 1/2] Upgrade assoconnect/php-quality-config to v2 Co-Authored-By: Claude Opus 4.5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cf0e252..b2fae01 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "symfony/framework-bundle": "^6.4|^7.0", "symfony/yaml": "^6.4|^7.0", "dg/bypass-finals": "^1.1", - "assoconnect/php-quality-config": "^1.16", + "assoconnect/php-quality-config": "^2", "guzzlehttp/guzzle": "^7.7", "guzzlehttp/psr7": "^2.4.5", "phpstan/phpstan-symfony": "^1.3.7" From 390e8253e045dc4ea85b721b58b187d5c8718d4d Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Tue, 27 Jan 2026 16:45:30 +0100 Subject: [PATCH 2/2] Fixes --- composer.json | 2 +- src/Test/Functional/App/TestKernel.php | 14 ++++---------- src/Validator/Constraints/ComposeValidator.php | 2 +- src/Validator/Constraints/EntityValidator.php | 2 +- src/Validator/Constraints/Phone.php | 2 +- .../Field/FieldConstraintsSetProviderInterface.php | 2 +- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index b2fae01..22dbe9c 100644 --- a/composer.json +++ b/composer.json @@ -55,7 +55,7 @@ "assoconnect/php-quality-config": "^2", "guzzlehttp/guzzle": "^7.7", "guzzlehttp/psr7": "^2.4.5", - "phpstan/phpstan-symfony": "^1.3.7" + "phpstan/phpstan-symfony": "^2" }, "config": { "allow-plugins": { diff --git a/src/Test/Functional/App/TestKernel.php b/src/Test/Functional/App/TestKernel.php index 44fe075..ad52bdd 100644 --- a/src/Test/Functional/App/TestKernel.php +++ b/src/Test/Functional/App/TestKernel.php @@ -8,21 +8,15 @@ use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Component\HttpKernel\Kernel; class TestKernel extends Kernel { - /** - * @return array - */ - public function registerBundles(): array + public function registerBundles(): iterable { - return [ - new FrameworkBundle(), - new AssoConnectValidatorBundle(), - new DoctrineBundle(), - ]; + yield new FrameworkBundle(); + yield new AssoConnectValidatorBundle(); + yield new DoctrineBundle(); } public function getCacheDir(): string diff --git a/src/Validator/Constraints/ComposeValidator.php b/src/Validator/Constraints/ComposeValidator.php index 80b3242..71605e8 100644 --- a/src/Validator/Constraints/ComposeValidator.php +++ b/src/Validator/Constraints/ComposeValidator.php @@ -19,7 +19,7 @@ abstract class ComposeValidator extends ConstraintValidator abstract protected function getSupportedConstraint(): string; /** - * @return array + * @return list */ abstract protected function getValidatorsAndConstraints(mixed $value, Constraint $constraint): array; diff --git a/src/Validator/Constraints/EntityValidator.php b/src/Validator/Constraints/EntityValidator.php index 1e3564f..4be7612 100644 --- a/src/Validator/Constraints/EntityValidator.php +++ b/src/Validator/Constraints/EntityValidator.php @@ -80,7 +80,7 @@ public function validate(mixed $entity, Constraint $constraint): void /** * @param FieldMapping $fieldMapping - * @return Constraint[] + * @return list */ public function getConstraintsForType(array $fieldMapping): array { diff --git a/src/Validator/Constraints/Phone.php b/src/Validator/Constraints/Phone.php index b834e32..b41f1e4 100644 --- a/src/Validator/Constraints/Phone.php +++ b/src/Validator/Constraints/Phone.php @@ -22,7 +22,7 @@ class Phone extends Constraint public const INVALID_COUNTRY_CODE = '5530a448-f887-48c0-8ef8-77f206aa52b6'; /** - * @return array + * @return list */ public function getValidTypes(): array { diff --git a/src/Validator/ConstraintsSetProvider/Field/FieldConstraintsSetProviderInterface.php b/src/Validator/ConstraintsSetProvider/Field/FieldConstraintsSetProviderInterface.php index ddc8285..4b2e9a0 100644 --- a/src/Validator/ConstraintsSetProvider/Field/FieldConstraintsSetProviderInterface.php +++ b/src/Validator/ConstraintsSetProvider/Field/FieldConstraintsSetProviderInterface.php @@ -16,7 +16,7 @@ public function supports(string $type): bool; /** * @param FieldMapping $fieldMapping - * @return Constraint[] + * @return list */ public function getConstraints(array $fieldMapping): array; }