From 320a6bce502f664e1cc1c16c16abbcb8a995d009 Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Tue, 27 Jan 2026 15:48:26 +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 5317506..75564d6 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "symfony/framework-bundle": "^6.4|^7.0", "symfony/yaml": "^6.4|^7.0", "symfony/translation": "^6.4|^7.0", - "assoconnect/php-quality-config": "^1.16", + "assoconnect/php-quality-config": "^2", "phpstan/phpstan-symfony": "^1.3.7" }, "require": { From 35f6280ca016cefa690398a363467272e09928dc Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Tue, 27 Jan 2026 18:31:14 +0100 Subject: [PATCH 2/2] Fixes --- composer.json | 14 +++++++------- phpstan-baseline.neon | 15 ++++++++++++--- tests/TestKernel.php | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 75564d6..4ad0e81 100644 --- a/composer.json +++ b/composer.json @@ -26,17 +26,17 @@ } }, "require-dev": { - "symfony/phpunit-bridge": "^6.4.3|^7.0", - "symfony/var-dumper": "^6.4|^7.0", - "symfony/framework-bundle": "^6.4|^7.0", - "symfony/yaml": "^6.4|^7.0", - "symfony/translation": "^6.4|^7.0", + "symfony/phpunit-bridge": "^7.0.1", + "symfony/var-dumper": "^7.0", + "symfony/framework-bundle": "^7.0", + "symfony/yaml": "^7.0", + "symfony/translation": "^7.0", "assoconnect/php-quality-config": "^2", - "phpstan/phpstan-symfony": "^1.3.7" + "phpstan/phpstan-symfony": "^2" }, "require": { "php": "^8.3", - "symfony/cache": "^6.0|^7.0", + "symfony/cache": "^7.0", "symfony/contracts": "^2.5|^3.4", "phpmailer/phpmailer": "^6.6", "thecodingmachine/safe": "^3" diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e43a329..a483cd3 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,16 +1,25 @@ parameters: ignoreErrors: - - message: "#^The string contains an insecure link$#" + message: '#^The string contains an insecure link$#' + identifier: assoconnect.insecureLink count: 1 path: src/Resolver/BounceTypeResolver.php - - message: "#^Cannot call method trans\\(\\) on object\\|null\\.$#" + message: '#^Call to function array_filter\(\) requires parameter \#2 to be passed to avoid loose comparison semantics\.$#' + identifier: arrayFilter.strict + count: 1 + path: src/Translatable/BounceReasonTranslatable.php + + - + message: '#^Call to an undefined method object\:\:trans\(\)\.$#' + identifier: method.notFound count: 1 path: tests/Translatable/BounceReasonTranslatableTest.php - - message: "#^Parameter \\#1 \\$translator of method AssoConnect\\\\SmtpToolbox\\\\Translatable\\\\BounceReasonTranslatable\\:\\:trans\\(\\) expects Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface, object\\|null given\\.$#" + message: '#^Parameter \#1 \$translator of method AssoConnect\\SmtpToolbox\\Translatable\\BounceReasonTranslatable\:\:trans\(\) expects Symfony\\Contracts\\Translation\\TranslatorInterface, object given\.$#' + identifier: argument.type count: 1 path: tests/Translatable/BounceReasonTranslatableTest.php diff --git a/tests/TestKernel.php b/tests/TestKernel.php index e55f474..3747abf 100644 --- a/tests/TestKernel.php +++ b/tests/TestKernel.php @@ -12,7 +12,7 @@ class TestKernel extends Kernel { public function registerBundles(): iterable { - return [new FrameworkBundle()]; + yield new FrameworkBundle(); } public function registerContainerConfiguration(LoaderInterface $loader): void