From 3563880fefd4bf24c1aceaf0f442d3b1e689cd9b Mon Sep 17 00:00:00 2001 From: Tobias Feijten Date: Tue, 4 Nov 2025 21:07:10 +0100 Subject: [PATCH] Fix actions due to obsolete Ubuntu runner version --- .github/workflows/code_checks.yaml | 29 ++++++++++++++--------------- Resources/package.json | 2 +- composer.json | 28 +++++++++++++++++++++++----- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml index 55b991d..146272d 100644 --- a/.github/workflows/code_checks.yaml +++ b/.github/workflows/code_checks.yaml @@ -6,25 +6,28 @@ on: ["push", "pull_request"] jobs: js-tests: name: "JS Tests" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v5 - name: Install JS dependencies run: | cd Resources && npm install + - name: Install PHP dependencies (for PhantomJS) + uses: ramsey/composer-install@v3 + - name: Run JS tests run: | - cd Resources && npm run test + cd Resources && OPENSSL_CONF=/dev/null npm run test phpunit: name: "PHP ${{ matrix.php }} + ${{ matrix.dependencies }} dependencies + Symfony ${{ matrix.symfony }}" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: - php: ['8.0', '8.1', '8.2'] + php: ['8.0', '8.1', '8.2', '8.3', '8.4'] dependencies: [highest] symfony: ['*'] include: @@ -34,11 +37,11 @@ jobs: symfony: '*' # Minimum supported dependencies with the latest supported PHP version - - php: '8.2' + - php: '8.4' dependencies: lowest symfony: '*' - - php: '8.2' + - php: '8.4' dependencies: highest symfony: '*' @@ -48,20 +51,16 @@ jobs: dependencies: highest symfony: '5.4.*' - - php: '8.0' - dependencies: highest - symfony: '6.0.*' - - php: '8.1' dependencies: highest - symfony: '6.2.*' + symfony: '6.4.*' - php: '8.2' dependencies: highest symfony: '7.0.*' steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -76,12 +75,12 @@ jobs: composer config extra.symfony.require ${{ matrix.symfony }} - name: Update project dependencies - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: dependency-versions: ${{ matrix.dependencies }} - name: Cache PHPUnit - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor/bin/.phpunit key: ${{ runner.os }}-phpunit-${{ matrix.php }} diff --git a/Resources/package.json b/Resources/package.json index 5d3ab5c..78f71fa 100755 --- a/Resources/package.json +++ b/Resources/package.json @@ -44,7 +44,7 @@ "scripts": { "build": "gulp && npm run build:types", "build:types": "tsc --declaration --emitDeclarationOnly", - "test": "npm run build && npm run test:types && phantomjs js/run_jsunit.js js/router_test.html", + "test": "npm run build && npm run test:types && ../vendor/bin/phantomjs js/run_jsunit.js js/router_test.html", "test:types": "tsd", "prepublish": "npm run build" }, diff --git a/composer.json b/composer.json index b417f4d..700ee87 100644 --- a/composer.json +++ b/composer.json @@ -17,14 +17,16 @@ ], "require": { "php": "^8.0", - "symfony/framework-bundle": "^5.4|^6.0|^7.0", - "symfony/serializer": "^5.4|^6.0.1|^7.0", - "symfony/console": "^5.4|^6.0|^7.0", + "symfony/framework-bundle": "^5.4|^6.4|^7.0", + "symfony/serializer": "^5.4|^6.4|^7.0", + "symfony/console": "^5.4|^6.4|^7.0", "willdurand/jsonp-callback-validator": "~1.1|^2.0" }, "require-dev": { - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/phpunit-bridge": "^5.4|^6.0|^7.0" + "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" }, "autoload": { "psr-4": { "FOS\\JsRoutingBundle\\": "" }, @@ -32,9 +34,25 @@ "/Tests/" ] }, + "config": { + "allow-plugins": { + "neronmoon/scriptsdev": true + } + }, "extra": { "branch-alias": { "dev-master": "3.x-dev" + }, + "scripts-dev": { + "post-install-cmd": [ + "PhantomInstaller\\Installer::installPhantomJS" + ], + "post-update-cmd": [ + "PhantomInstaller\\Installer::installPhantomJS" + ] + }, + "jakoch/phantomjs-installer": { + "cdnurl": "https://github.com/Medium/phantomjs/releases/download/v2.1.1/" } } }