Skip to content

Commit 3b38e43

Browse files
authored
Add PHPStan for static analysis and add support for PHP 7.4+ (#7)
1 parent 9310c48 commit 3b38e43

File tree

7 files changed

+509
-283
lines changed

7 files changed

+509
-283
lines changed

.github/workflows/checks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
- name: Install dependencies
3535
run: composer install
3636

37+
- name: SAST
38+
run: composer sast
39+
3740
- name: Test
3841
run: composer test
3942

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,19 @@
3838
}
3939
},
4040
"require": {
41-
"psr/log": "^2.0"
41+
"php": "^7.4 || ^8.0",
42+
"ext-json": "*",
43+
"psr/log": "^1.1"
4244
},
4345
"require-dev": {
44-
"php": "^8.0",
45-
"phpunit/phpunit": "^10"
46+
"phpunit/phpunit": "^9",
47+
"phpstan/phpstan": "^2.1"
4648
},
4749
"bin": [
4850
"featurevisor"
4951
],
5052
"scripts": {
53+
"sast": "phpstan analyse --memory-limit=256M",
5154
"test": "phpunit tests"
5255
},
5356
"license": [

0 commit comments

Comments
 (0)