diff --git a/.github/workflows/flex.yml b/.github/workflows/flex.yml index 2cd9938..68c2d8e 100644 --- a/.github/workflows/flex.yml +++ b/.github/workflows/flex.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: ['8.1'] + php-versions: ['8.1', '8.2'] composer-options: [''] composer-versions: ['composer:v2'] fail-fast: false @@ -31,7 +31,7 @@ jobs: key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} restore-keys: ${{ runner.os }}-composer- - name: Install dependencies - run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }} + run: composer update --prefer-dist --no-progress --ignore-platform-req=php+ ${{ matrix.composer-options }} - name: Build flex files run: php scripts/build-flex.php - name: Check if flex files are up to date diff --git a/composer.json b/composer.json index e2776e0..6f797bc 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,8 @@ "sort-packages": true, "allow-plugins": { "phpro/grumphp-shim": true, - "phpstan/extension-installer": true + "phpstan/extension-installer": true, + "symfony/flex": true } }, "extra": { @@ -34,6 +35,6 @@ } }, "require-dev": { - "azjezz/psl": "^1.9" + "azjezz/psl": "^2.1" } } diff --git a/scripts/build-flex.php b/scripts/build-flex.php index fcdd1bb..7e71dea 100644 --- a/scripts/build-flex.php +++ b/scripts/build-flex.php @@ -1,10 +1,11 @@ [ - 'contents' => explode("\n", read_file($file)), + 'contents' => explode("\n", read($file)), 'executable' => false, ]; @@ -68,13 +69,13 @@ $recipesDir . '/' . replace($package, '/', '.') . '.' . $version . '.json'; $writeJson = static function (string $file, array $contents): void { - write_file($file, encode( + write($file, encode( [ 'WARNING' => 'This file is auto-generated and may only be changed by computers!', ...$contents, ], true - )); + ), WriteMode::TRUNCATE); }; $index = [];