Skip to content

Commit 5b3bd2b

Browse files
Increase phpstan level to 8 with baseline to swallow existing errors (#673)
* Increase phpstan level to 8 with baseline to swallow existing errors * Add phpstan to composer.json * docs: a changelog entry --------- Co-authored-by: Danny van der Sluijs <[email protected]>
1 parent 23c8551 commit 5b3bd2b

File tree

7 files changed

+1166
-7
lines changed

7 files changed

+1166
-7
lines changed

.github/workflows/phpstan.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ jobs:
2323
coverage: "none"
2424
extensions: "intl, zip"
2525
ini-values: "memory_limit=-1"
26-
php-version: "7.4"
26+
php-version: "7.2"
2727

2828
- name: "Update dependencies"
2929
run: "composer update ${{ env.COMPOSER_FLAGS }}"
3030

3131
- name: Run PHPStan
3232
run: |
33-
composer require --dev phpstan/phpstan:^1.5 marc-mabe/php-enum-phpstan ${{ env.COMPOSER_FLAGS }}
34-
vendor/bin/phpstan analyse
33+
composer phpstan

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
### Changed
1919
- Bump to minimum PHP 7.2 ([#746](https://github.com/jsonrainbow/json-schema/pull/746))
2020
- Replace traditional syntax array with short syntax array ([#747](https://github.com/jsonrainbow/json-schema/pull/747))
21+
- Increase phpstan level to 8 with baseline to swallow existing errors ([#673](https://github.com/jsonrainbow/json-schema/pull/673))
2122

2223
## [6.0.0] - 2024-07-30
2324
### Added

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
"friendsofphp/php-cs-fixer": "~2.2.20 || ~2.19.0",
3636
"json-schema/json-schema-test-suite": "1.2.0",
3737
"phpunit/phpunit": "^8.5",
38-
"phpspec/prophecy": "^1.19"
38+
"phpspec/prophecy": "^1.19",
39+
"phpstan/phpstan": "^1.12",
40+
"marc-mabe/php-enum-phpstan": "^2.0"
3941
},
4042
"extra": {
4143
"branch-alias": {
@@ -74,6 +76,7 @@
7476
"style-check": "php-cs-fixer fix --dry-run --verbose --diff",
7577
"style-fix": "php-cs-fixer fix --verbose",
7678
"test": "phpunit",
77-
"testOnly": "phpunit --colors --filter"
79+
"testOnly": "phpunit --colors --filter",
80+
"phpstan": "@php phpstan"
7881
}
7982
}

0 commit comments

Comments
 (0)