Skip to content

Commit 9c3abdb

Browse files
authored
Support PHP 7.4 (#15)
This makes it possible to run PHPStan with this error formatter on projects that need PHP 7.
1 parent 9908f42 commit 9c3abdb

File tree

7 files changed

+420
-272
lines changed

7 files changed

+420
-272
lines changed

.github/workflows/ci.yaml

+14-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
php: [ '8.1', '8.2', '8.3', '8.4' ]
17+
php:
18+
- '7.4'
19+
- '8.0'
20+
- '8.1'
21+
- '8.2'
22+
- '8.3'
23+
- '8.4'
1824
dependency-versions: [ lowest, highest ]
1925
steps:
2026
- name: Checkout
@@ -36,20 +42,23 @@ jobs:
3642

3743
phpstan:
3844
runs-on: ubuntu-latest
39-
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
php:
49+
- '7.4'
50+
- '8.3'
4051
steps:
4152
- name: Checkout code
4253
uses: actions/checkout@v4
4354

4455
- name: Set up PHP
4556
uses: shivammathur/setup-php@v2
4657
with:
47-
php-version: '8.1'
58+
php-version: '${{ matrix.php }}'
4859

4960
- name: Install Composer packages
5061
uses: ramsey/composer-install@v3
51-
with:
52-
dependency-versions: '${{ matrix.dependency-versions }}'
5362

5463
- name: Run PHPStan
5564
run: vendor/bin/phpstan --ansi

composer.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"keywords": ["phpstan", "dev"],
55
"type": "phpstan-extension",
66
"require": {
7-
"php": "^8.1",
7+
"php": "^7.4|^8.0",
88
"phpstan/phpstan": "^1.12.4"
99
},
1010
"license": "MIT",
@@ -26,9 +26,12 @@
2626
}
2727
},
2828
"config": {
29-
"sort-packages": true
29+
"sort-packages": true,
30+
"platform": {
31+
"php": "7.4"
32+
}
3033
},
3134
"require-dev": {
32-
"phpunit/phpunit": "^10.5.35"
35+
"phpunit/phpunit": "^9.6"
3336
}
3437
}

0 commit comments

Comments
 (0)