From 124e5e72629a8566bce72a3bc619ee95eef07087 Mon Sep 17 00:00:00 2001 From: Fran Moreno Date: Mon, 22 Jan 2024 18:41:18 +0100 Subject: [PATCH 1/2] Allow Symfony 7 and MongoDBBundle 5 --- .github/workflows/test.yaml | 5 +++++ composer.json | 26 +++++++++++------------ src/DependencyInjection/Configuration.php | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fd063a99..96ec318a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -63,6 +63,11 @@ jobs: allowed-to-fail: false symfony-require: 6.4.* variant: symfony/symfony:"6.4.*" + - php-version: '8.2' + dependencies: highest + allowed-to-fail: false + symfony-require: 7.0.* + variant: symfony/symfony:"7.0.*" steps: - name: Checkout diff --git a/composer.json b/composer.json index 58693170..abf3a4d6 100644 --- a/composer.json +++ b/composer.json @@ -29,24 +29,24 @@ "ext-mongodb": "*", "doctrine/collections": "^1.6 || ^2.0", "doctrine/mongodb-odm": "^2.3", - "doctrine/mongodb-odm-bundle": "^4.4", + "doctrine/mongodb-odm-bundle": "^4.4 || ^5.0", "doctrine/persistence": "^3.0", "sonata-project/admin-bundle": "^4.18", "sonata-project/exporter": "^2.0 || ^3.0", "sonata-project/form-extensions": "^1.7.1 || ^2.0", - "symfony/config": "^5.4 || ^6.2", - "symfony/dependency-injection": "^5.4 || ^6.2", - "symfony/doctrine-bridge": "^5.4 || ^6.2", - "symfony/form": "^5.4 || ^6.2", - "symfony/http-kernel": "^5.4 || ^6.2", - "symfony/property-access": "^5.4 || ^6.2", + "symfony/config": "^5.4 || ^6.2 || ^7.0", + "symfony/dependency-injection": "^5.4 || ^6.2 || ^7.0", + "symfony/doctrine-bridge": "^5.4 || ^6.2 || ^7.0", + "symfony/form": "^5.4 || ^6.2 || ^7.0", + "symfony/http-kernel": "^5.4 || ^6.2 || ^7.0", + "symfony/property-access": "^5.4 || ^6.2 || ^7.0", "twig/twig": "^3.0" }, "require-dev": { "doctrine/data-fixtures": "^1.6", "friendsofphp/php-cs-fixer": "^3.4", - "matthiasnoback/symfony-config-test": "^4.2", - "matthiasnoback/symfony-dependency-injection-test": "^4.1", + "matthiasnoback/symfony-config-test": "^4.2 || ^5.0", + "matthiasnoback/symfony-dependency-injection-test": "^4.1 || ^5.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.0", "phpstan/phpstan-phpunit": "^1.0", @@ -57,11 +57,11 @@ "psalm/plugin-symfony": "^5.0", "rector/rector": "^0.18", "sonata-project/block-bundle": "^4.2 || ^5.0", - "symfony/browser-kit": "^5.4 || ^6.2", - "symfony/css-selector": "^5.4 || ^6.2", + "symfony/browser-kit": "^5.4 || ^6.2 || ^7.0", + "symfony/css-selector": "^5.4 || ^6.2 || ^7.0", "symfony/panther": "^2.0.1", - "symfony/phpunit-bridge": "^6.2", - "symfony/twig-bridge": "^5.4 || ^6.2", + "symfony/phpunit-bridge": "^6.2 || ^7.0", + "symfony/twig-bridge": "^5.4 || ^6.2 || ^7.0", "vimeo/psalm": "^5.7" }, "conflict": { diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 95edeb49..fc064636 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -27,7 +27,7 @@ final class Configuration implements ConfigurationInterface { /** - * @psalm-suppress PossiblyNullReference, UndefinedInterfaceMethod + * @psalm-suppress UndefinedInterfaceMethod * * @see https://github.com/psalm/psalm-plugin-symfony/issues/174 */ From 6fedae65759551d1dd003a73f3f4479f7b628883 Mon Sep 17 00:00:00 2001 From: Fran Moreno Date: Mon, 22 Jan 2024 19:03:45 +0100 Subject: [PATCH 2/2] Use PHP 8.3 and flex as tool --- .github/workflows/test.yaml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 96ec318a..47d0fb4b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -39,6 +39,7 @@ jobs: - '8.0' - '8.1' - '8.2' + - '8.3' dependencies: [highest] allowed-to-fail: [false] symfony-require: [''] @@ -48,17 +49,17 @@ jobs: dependencies: lowest allowed-to-fail: false variant: normal - - php-version: '8.2' + - php-version: '8.3' dependencies: highest allowed-to-fail: false symfony-require: 5.4.* variant: symfony/symfony:"5.4.*" - - php-version: '8.2' + - php-version: '8.3' dependencies: highest allowed-to-fail: false symfony-require: 6.3.* variant: symfony/symfony:"6.3.*" - - php-version: '8.2' + - php-version: '8.3' dependencies: highest allowed-to-fail: false symfony-require: 6.4.* @@ -78,18 +79,12 @@ jobs: with: php-version: ${{ matrix.php-version }} coverage: pcov - tools: composer:v2 + tools: composer:v2, flex extensions: mongodb - name: Add PHPUnit matcher run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Globally install symfony/flex - if: matrix.symfony-require != '' - run: | - composer global config --no-plugins allow-plugins.symfony/flex true - composer global require --no-progress --no-scripts --no-plugins symfony/flex - - name: Install variant if: matrix.variant != 'normal' && !startsWith(matrix.variant, 'symfony/symfony') run: composer require ${{ matrix.variant }} --no-update