Skip to content

Commit

Permalink
Increase phpstan level to 8 with baseline to swallow existing errors (#…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
Seldaek and DannyvdSluijs authored Sep 13, 2024
1 parent 23c8551 commit 5b3bd2b
Show file tree
Hide file tree
Showing 7 changed files with 1,166 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ jobs:
coverage: "none"
extensions: "intl, zip"
ini-values: "memory_limit=-1"
php-version: "7.4"
php-version: "7.2"

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

- name: Run PHPStan
run: |
composer require --dev phpstan/phpstan:^1.5 marc-mabe/php-enum-phpstan ${{ env.COMPOSER_FLAGS }}
vendor/bin/phpstan analyse
composer phpstan
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Bump to minimum PHP 7.2 ([#746](https://github.com/jsonrainbow/json-schema/pull/746))
- Replace traditional syntax array with short syntax array ([#747](https://github.com/jsonrainbow/json-schema/pull/747))
- Increase phpstan level to 8 with baseline to swallow existing errors ([#673](https://github.com/jsonrainbow/json-schema/pull/673))

## [6.0.0] - 2024-07-30
### Added
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
"friendsofphp/php-cs-fixer": "~2.2.20 || ~2.19.0",
"json-schema/json-schema-test-suite": "1.2.0",
"phpunit/phpunit": "^8.5",
"phpspec/prophecy": "^1.19"
"phpspec/prophecy": "^1.19",
"phpstan/phpstan": "^1.12",
"marc-mabe/php-enum-phpstan": "^2.0"
},
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -74,6 +76,7 @@
"style-check": "php-cs-fixer fix --dry-run --verbose --diff",
"style-fix": "php-cs-fixer fix --verbose",
"test": "phpunit",
"testOnly": "phpunit --colors --filter"
"testOnly": "phpunit --colors --filter",
"phpstan": "@php phpstan"
}
}
Loading

0 comments on commit 5b3bd2b

Please sign in to comment.