Skip to content

Commit 7d95e66

Browse files
authored
Update CI workflow, GH Actions, and dev dependencies (#38)
* Update CI workflow, GH Actions, and dev dependencies - Upgrade actions/checkout v2 → v4, remove deprecated actions/cache v2 - Extend PHP matrix: PHPStan 8.1–8.5, Tests 7.2–8.5 - Upgrade PHPStan 1.x → 2.x, phpstan-strict-rules 1.x → 2.x - Remove bleedingEdge.neon include (default in PHPStan 2) - Simplify workflow by dropping dependency caching - Remove deprecated --no-suggest flag and ::set-output syntax * Increase minimum PHP version to 8.0 Drop PHP 7.2 from composer.json require and CI test matrix. * Add PHP 8.0 to PHPStan matrix PHPStan 2.x supports PHP ^7.4, so 8.0 should be included.
1 parent 2e6d2f6 commit 7d95e66

3 files changed

Lines changed: 11 additions & 42 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ on:
77
- main
88
- v*.*
99

10-
env:
11-
php-extensions: mbstring, intl
12-
php-extensions-key: v1
13-
php-tools: "composer:v2"
14-
1510
jobs:
1611
phpstan:
1712
name: PHPStan
@@ -20,28 +15,17 @@ jobs:
2015

2116
strategy:
2217
matrix:
23-
php-version: [ '7.2', '8.1', '8.2', '8.3' ]
18+
php-version: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
2419

2520
steps:
2621
- name: Checkout
27-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2823

29-
- name: Setup PHP with pecl extension
24+
- name: Setup PHP
3025
uses: shivammathur/setup-php@v2
3126
with:
3227
php-version: ${{ matrix.php-version }}
3328

34-
- name: Get composer cache directory
35-
id: composercache
36-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
37-
38-
- name: Cache dependencies
39-
uses: actions/cache@v2
40-
with:
41-
path: ${{ steps.composercache.outputs.dir }}
42-
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
43-
restore-keys: ${{ runner.os }}-composer-
44-
4529
- name: Install dependencies
4630
run: composer install --prefer-dist
4731

@@ -54,35 +38,23 @@ jobs:
5438
strategy:
5539
fail-fast: false
5640
matrix:
57-
php-version: [ '7.2', '8.0', '8.1', '8.2', '8.3' ]
41+
php-version: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
5842

5943
runs-on: ubuntu-latest
6044

6145
steps:
6246
- name: Checkout
63-
uses: actions/checkout@v2
47+
uses: actions/checkout@v4
6448

65-
- name: Setup PHP with pecl extension
49+
- name: Setup PHP
6650
uses: shivammathur/setup-php@v2
6751
with:
6852
php-version: ${{ matrix.php-version }}
69-
extensions: ${{ env.php-extensions }}
70-
tools: ${{ env.php-tools }}
53+
tools: composer:v2
7154
coverage: pcov
7255

73-
- name: Get composer cache directory
74-
id: composercache
75-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
76-
77-
- name: Cache dependencies
78-
uses: actions/cache@v2
79-
with:
80-
path: ${{ steps.composercache.outputs.dir }}
81-
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
82-
restore-keys: ${{ runner.os }}-composer-
83-
8456
- name: Install dependencies
85-
run: composer install --prefer-dist --no-interaction --no-progress --no-suggest
57+
run: composer install --prefer-dist --no-interaction --no-progress
8658

8759
- name: Tests
8860
run: ./vendor/bin/tester ./tests/cases

.phpstan.neon

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
includes:
2-
- phar://%rootDir%/phpstan.phar/conf/bleedingEdge.neon
3-
41
parameters:
52
level: max
63
paths:

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
"issues": "https://github.com/nextras/multi-query-parser/issues"
2121
},
2222
"require": {
23-
"php": "~7.2 || ~8.0"
23+
"php": "~8.0"
2424
},
2525
"require-dev": {
2626
"nette/tester": "~2.0",
27-
"phpstan/phpstan": "1.12.7",
27+
"phpstan/phpstan": "2.1.17",
2828
"phpstan/extension-installer": "1.4.3",
29-
"phpstan/phpstan-strict-rules": "1.6.1"
29+
"phpstan/phpstan-strict-rules": "2.0.4"
3030
},
3131
"autoload": {
3232
"psr-4": {

0 commit comments

Comments
 (0)