From b837a166cb57ac5402eac18554a2d43007606503 Mon Sep 17 00:00:00 2001 From: SonataCI Date: Mon, 4 Dec 2023 08:25:53 +0000 Subject: [PATCH 1/8] DevKit updates --- .github/workflows/test.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f9a7e616d4..655f0fe256 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -57,6 +57,11 @@ jobs: allowed-to-fail: false symfony-require: 6.3.* variant: symfony/symfony:"6.3.*" + - php-version: '8.2' + dependencies: highest + allowed-to-fail: false + symfony-require: 7.0.* + variant: symfony/symfony:"7.0.*" steps: - name: Checkout From d24df5975ab2b00ccb08b49511d3b2c38198f92b Mon Sep 17 00:00:00 2001 From: Jordi Sala Morales Date: Mon, 4 Dec 2023 11:40:49 +0100 Subject: [PATCH 2/8] Fix one psalm issue --- src/DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 0fae9659bf..8c6b9d64b0 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -173,7 +173,7 @@ final class Configuration implements ConfigurationInterface { /** - * @psalm-suppress PossiblyNullReference, UndefinedInterfaceMethod + * @psalm-suppress UndefinedInterfaceMethod * * @see https://github.com/psalm/psalm-plugin-symfony/issues/174 */ From e2ebcab155b5623182fc183c1ecc18af9ffaff89 Mon Sep 17 00:00:00 2001 From: Jordi Sala Morales Date: Mon, 4 Dec 2023 11:51:22 +0100 Subject: [PATCH 3/8] Fix another psalm issue --- src/Route/AdminPoolLoader.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Route/AdminPoolLoader.php b/src/Route/AdminPoolLoader.php index ed4d1cfcb0..125a949e92 100644 --- a/src/Route/AdminPoolLoader.php +++ b/src/Route/AdminPoolLoader.php @@ -20,6 +20,8 @@ /** * @author Thomas Rabaix + * + * @psalm-suppress PropertyNotSetInConstructor */ final class AdminPoolLoader extends Loader { From b7eae9bb00b26a69eab255efffb512f9157996eb Mon Sep 17 00:00:00 2001 From: Jordi Sala Morales Date: Mon, 4 Dec 2023 11:54:50 +0100 Subject: [PATCH 4/8] Fix PHPStan --- src/ArgumentResolver/CompatibleValueResolverInterface.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ArgumentResolver/CompatibleValueResolverInterface.php b/src/ArgumentResolver/CompatibleValueResolverInterface.php index b42b1223d1..35b2335552 100644 --- a/src/ArgumentResolver/CompatibleValueResolverInterface.php +++ b/src/ArgumentResolver/CompatibleValueResolverInterface.php @@ -23,7 +23,11 @@ interface CompatibleValueResolverInterface extends ValueResolverInterface { } } else { - /** @internal */ + /** + * @internal + * + * @phpstan-ignore-next-line + */ interface CompatibleValueResolverInterface extends ArgumentValueResolverInterface { } From 5cb914c5897f6ee7415e57edd49ad41bb5b0cf19 Mon Sep 17 00:00:00 2001 From: SonataCI Date: Thu, 7 Dec 2023 04:11:25 +0000 Subject: [PATCH 5/8] DevKit updates --- rector.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/rector.php b/rector.php index dd4380e380..2456d3ec54 100644 --- a/rector.php +++ b/rector.php @@ -19,7 +19,6 @@ use Rector\Config\RectorConfig; use Rector\Php70\Rector\FunctionLike\ExceptionHandlerTypehintRector; -use Rector\Php71\Rector\FuncCall\CountOnNullRector; use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector; use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector; use Rector\PHPUnit\Set\PHPUnitLevelSetList; @@ -41,7 +40,6 @@ $rectorConfig->importNames(); $rectorConfig->importShortClasses(false); $rectorConfig->skip([ - CountOnNullRector::class, ExceptionHandlerTypehintRector::class, AddSeeTestAnnotationRector::class, PreferPHPUnitThisCallRector::class, From e90fcfd1b58be91da60ce2695164753d3fb5695a Mon Sep 17 00:00:00 2001 From: SonataCI Date: Thu, 7 Dec 2023 16:11:35 +0000 Subject: [PATCH 6/8] DevKit updates --- .github/workflows/test.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 655f0fe256..789d563b45 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -50,13 +50,13 @@ jobs: - php-version: '8.2' dependencies: highest allowed-to-fail: false - symfony-require: 6.2.* - variant: symfony/symfony:"6.2.*" + symfony-require: 6.3.* + variant: symfony/symfony:"6.3.*" - php-version: '8.2' dependencies: highest allowed-to-fail: false - symfony-require: 6.3.* - variant: symfony/symfony:"6.3.*" + symfony-require: 6.4.* + variant: symfony/symfony:"6.4.*" - php-version: '8.2' dependencies: highest allowed-to-fail: false From ee882145dc321231f3ddc5b9c0a452bddc804c56 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Fri, 8 Dec 2023 09:22:13 +0100 Subject: [PATCH 7/8] Try --- .../CompatibleValueResolverInterface.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/ArgumentResolver/CompatibleValueResolverInterface.php b/src/ArgumentResolver/CompatibleValueResolverInterface.php index 35b2335552..810a17e3e1 100644 --- a/src/ArgumentResolver/CompatibleValueResolverInterface.php +++ b/src/ArgumentResolver/CompatibleValueResolverInterface.php @@ -17,18 +17,14 @@ use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; // TODO: Remove this interface when dropping support of Symfony < 6.2 and replace its usage with ValueResolverInterface -if (interface_exists(ValueResolverInterface::class)) { +if (interface_exists(ArgumentValueResolverInterface::class)) { /** @internal */ - interface CompatibleValueResolverInterface extends ValueResolverInterface + interface CompatibleValueResolverInterface extends ArgumentValueResolverInterface { } } else { - /** - * @internal - * - * @phpstan-ignore-next-line - */ - interface CompatibleValueResolverInterface extends ArgumentValueResolverInterface + /** @internal */ + interface CompatibleValueResolverInterface extends ValueResolverInterface { } } From 701ab92acd3dd0616c814aa9e165b9f7d14bf055 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Fri, 8 Dec 2023 09:43:22 +0100 Subject: [PATCH 8/8] Add adapter --- tests/Form/Widget/FormChoiceWidgetTest.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tests/Form/Widget/FormChoiceWidgetTest.php b/tests/Form/Widget/FormChoiceWidgetTest.php index 75057ce8d9..5247a5df43 100644 --- a/tests/Form/Widget/FormChoiceWidgetTest.php +++ b/tests/Form/Widget/FormChoiceWidgetTest.php @@ -15,7 +15,6 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormTypeInterface; -use Symfony\Component\HttpKernel\Kernel; final class FormChoiceWidgetTest extends BaseWidgetTest { @@ -41,17 +40,13 @@ public function testLabelRendering(): void $html = $this->renderWidget($choice->createView()); - if (0 !== preg_match("/7\..\../", Kernel::VERSION)) { - static::assertStringContainsString( - '
  • ', - $this->cleanHtmlWhitespace($html) - ); - } else { - static::assertStringContainsString( - '
  • ', - $this->cleanHtmlWhitespace($html) - ); - } + // TODO: Remove this adapter when dropping support for Symfony < 7. + $html = str_replace('value="0" />', 'value="0">', $html); + + static::assertStringContainsString( + '
  • ', + $this->cleanHtmlWhitespace($html) + ); } public function testDefaultValueRendering(): void