From 4da183d14ddbb69f346fc47ce6ce38bfc13c6a75 Mon Sep 17 00:00:00 2001 From: Stefan Doorn Date: Thu, 16 Mar 2023 16:16:18 +0100 Subject: [PATCH 1/4] Allow testing against Symfony ^6.0 --- .github/workflows/build.yml | 4 +++- composer.json | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59e117dc..0dbf8725 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,11 +22,13 @@ jobs: fail-fast: false matrix: php: ["8.0", "8.1", "8.2"] - symfony: ["^4.4", "^5.4"] + symfony: ["^4.4", "^5.4", "^6.0"] sylius: ["~1.11.0", "~1.12.0"] node: ["14.x"] mysql: ["8.0"] exclude: + - symfony: "^6.0" + sylius: "~1.11.0" - symfony: "^4.4" sylius: "~1.12.0" diff --git a/composer.json b/composer.json index 77a68fd1..82787f57 100644 --- a/composer.json +++ b/composer.json @@ -32,11 +32,11 @@ "phpunit/phpunit": "^9.5", "sensiolabs/security-checker": "^6.0", "sylius-labs/coding-standard": "^4.0", - "symfony/browser-kit": "^4.4 || ^5.4", - "symfony/debug-bundle": "^4.4 || ^5.4", - "symfony/dotenv": "^4.4 || ^5.4", - "symfony/intl": "^4.4 || ^5.4", - "symfony/web-profiler-bundle": "^4.4 || ^5.4", + "symfony/browser-kit": "^4.4 || ^5.4 || ^6.0", + "symfony/debug-bundle": "^4.4 || ^5.4 || ^6.0", + "symfony/dotenv": "^4.4 || ^5.4 || ^6.0", + "symfony/intl": "^4.4 || ^5.4 || ^6.0", + "symfony/web-profiler-bundle": "^4.4 || ^5.4 || ^6.0", "vimeo/psalm": "4.23.0" }, "config": { From 4e89f1f2893600f515333983a6ef661b656c1e4c Mon Sep 17 00:00:00 2001 From: Stefan Doorn Date: Thu, 16 Mar 2023 16:23:35 +0100 Subject: [PATCH 2/4] Remove oauth bundle from require-dev --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 82787f57..9a7944ba 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,6 @@ }, "require-dev": { "api-platform/core": "~2.5.0 || ~2.6.0 || ~2.7.0", - "friendsofsymfony/oauth-server-bundle": "^1.6 || >2.0.0-alpha.0 ^2.0@dev", "lchrusciel/api-test-case": "^5.1", "league/flysystem-bundle": "^2.0 || ^3.0", "matthiasnoback/symfony-dependency-injection-test": "^4.3", From 3719eaef6a6dec5833b2efb0542a7985763be4e5 Mon Sep 17 00:00:00 2001 From: Stefan Doorn Date: Thu, 16 Mar 2023 16:32:28 +0100 Subject: [PATCH 3/4] Update config/bootstrap.php --- tests/Application/config/bootstrap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Application/config/bootstrap.php b/tests/Application/config/bootstrap.php index e23eca03..c9951a7c 100644 --- a/tests/Application/config/bootstrap.php +++ b/tests/Application/config/bootstrap.php @@ -13,6 +13,10 @@ $_ENV += $env; } elseif (!class_exists(Dotenv::class)) { throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); +} elseif (method_exists(Dotenv::class, 'bootEnv')) { + (new Dotenv())->bootEnv(dirname(__DIR__) . '/.env'); + + return; } else { // load all the .env files (new Dotenv(true))->loadEnv(dirname(__DIR__) . '/.env'); From f0eda2f1f70878e41ce674a3327df7c514b628ea Mon Sep 17 00:00:00 2001 From: Stefan Doorn Date: Tue, 28 Mar 2023 12:11:42 +0200 Subject: [PATCH 4/4] Remove SensioLabs Security Checker but install in CI if on lower Symfony version --- .github/workflows/build.yml | 5 +++++ composer.json | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0dbf8725..d0070129 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,6 +98,11 @@ jobs: composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10" composer config extra.symfony.require "${{ matrix.symfony }}" + - + name: Symfony Security Checker + if: matrix.symfony == '^4.4' || matrix.symfony == '^5.4' + run: composer require sensiolabs/security-checker --dev --no-update --no-scripts + - name: Restrict Sylius version if: matrix.sylius != '' diff --git a/composer.json b/composer.json index cfc6d376..17da2da5 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,6 @@ "phpstan/phpstan-symfony": "^1.0", "phpstan/phpstan-webmozart-assert": "^1.0", "phpunit/phpunit": "^9.5", - "sensiolabs/security-checker": "^6.0", "sylius/mailer-bundle": "^1.8 || ^2.0@beta", "sylius-labs/coding-standard": "^4.0", "symfony/browser-kit": "^4.4 || ^5.4 || ^6.0",