From d36cd0f3e8adb3ed66fa2d019ea78aa34d9f1cf3 Mon Sep 17 00:00:00 2001 From: David Maicher Date: Tue, 4 Nov 2025 21:58:03 +0100 Subject: [PATCH] add Support for Symfony 8 --- .github/workflows/code_checks.yaml | 11 ++++++++++- Tests/Command/RouterDebugExposedCommandTest.php | 7 ++++--- composer.json | 10 +++++----- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml index 146272d..1a4aa45 100644 --- a/.github/workflows/code_checks.yaml +++ b/.github/workflows/code_checks.yaml @@ -57,7 +57,11 @@ jobs: - php: '8.2' dependencies: highest - symfony: '7.0.*' + symfony: '7.3.*' + + - php: '8.4' + dependencies: highest + symfony: '8.0.*' steps: - name: Checkout uses: actions/checkout@v5 @@ -67,6 +71,11 @@ jobs: with: php-version: ${{ matrix.php }} + # until its released + - name: Use dev stability for Symfony 8 + if: matrix.symfony == '8.0.*' + run: composer config minimum-stability dev + - name: Require Symfony version if: matrix.symfony != '*' run: | diff --git a/Tests/Command/RouterDebugExposedCommandTest.php b/Tests/Command/RouterDebugExposedCommandTest.php index a410de0..d6f357d 100644 --- a/Tests/Command/RouterDebugExposedCommandTest.php +++ b/Tests/Command/RouterDebugExposedCommandTest.php @@ -53,9 +53,10 @@ public function testExecute(): void $tester = new CommandTester($command); $tester->execute([]); - $this->assertMatchesRegularExpression('/literal(.*ANY){3}.*\/literal/', $tester->getDisplay()); - $this->assertMatchesRegularExpression('/blog_post(.*ANY){3}.*\/blog-post\/{slug}/', $tester->getDisplay()); - $this->assertMatchesRegularExpression('/list(.*ANY){3}.*\/literal/', $tester->getDisplay()); + // with Symfony 8 Scheme and Host columns are conditionally shown + $this->assertMatchesRegularExpression('/literal(.*ANY){1,3}.*\/literal/', $tester->getDisplay()); + $this->assertMatchesRegularExpression('/blog_post(.*ANY){1,3}.*\/blog-post\/{slug}/', $tester->getDisplay()); + $this->assertMatchesRegularExpression('/list(.*ANY){1,3}.*\/literal/', $tester->getDisplay()); } public function testExecuteWithNameUnknown(): void diff --git a/composer.json b/composer.json index ee1b30e..5634b61 100644 --- a/composer.json +++ b/composer.json @@ -17,17 +17,17 @@ ], "require": { "php": "^8.0", - "symfony/console": "^5.4|^6.4|^7.0", + "symfony/console": "^5.4|^6.4|^7.3|^8.0", "symfony/deprecation-contracts": "^2.1|^3.0", - "symfony/framework-bundle": "^5.4|^6.4|^7.0", - "symfony/serializer": "^5.4|^6.4|^7.0", + "symfony/framework-bundle": "^5.4|^6.4|^7.3|^8.0", + "symfony/serializer": "^5.4|^6.4|^7.3|^8.0", "willdurand/jsonp-callback-validator": "~1.1|^2.0" }, "require-dev": { "neronmoon/scriptsdev": "^0.1", "jakoch/phantomjs-installer": "^3", - "symfony/expression-language": "^5.4|^6.4|^7.0", - "symfony/phpunit-bridge": "^5.4|^6.4|^7.0" + "symfony/expression-language": "^5.4|^6.4|^7.3|^8.0", + "symfony/phpunit-bridge": "^7.3|^8.0" }, "autoload": { "psr-4": { "FOS\\JsRoutingBundle\\": "" },