Skip to content

Commit fc337c5

Browse files
committed
update dependencies; phpstan integration
1 parent 57d761b commit fc337c5

File tree

5 files changed

+848
-88
lines changed

5 files changed

+848
-88
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ install:
2626
script:
2727
- ./vendor/bin/phpunit --configuration ./phpunit.xml --coverage-clover=coverage.clover
2828
- if [ "$TRAVIS_PHP_VERSION" == "7.2" ]; then ./vendor/bin/psalm --config=psalm.xml; fi
29+
- if [ "$TRAVIS_PHP_VERSION" == "7.2" ]; then ./vendor/bin/phpstan analyse src --level 7; fi
2930
- if [ "$TRAVIS_PHP_VERSION" == "7.2" ]; then ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run; fi
3031

3132
after_script:

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ For a simple check of the code standard, there is a command:
2222
composer cs-check
2323
```
2424
## Static analysis
25-
To improve the quality of the code used static analysis (via `psalm`). You can start it with the command:
25+
To improve the quality of the code used static analysis (via `psalm` and `phpstan`). You can start it with the command:
2626
```bash
27-
composer psalm
27+
composer psalm && composer phpstan
2828
```
2929
## Running the tests
3030
The following tests must pass before we will accept a pull request. If any of these do not pass, it will result in a complete build failure.

composer.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,19 @@
3434
"require-dev": {
3535
"php-service-bus/code-style-config": "^v0.1",
3636
"phpunit/phpunit": "^8",
37-
"vimeo/psalm": "^v3"
37+
"vimeo/psalm": "^v3",
38+
"phpstan/phpstan": "^0.11.5"
3839
},
3940
"prefer-stable": true,
4041
"minimum-stability": "dev",
4142
"scripts": {
4243
"psalm": "./vendor/bin/psalm --config=psalm.xml",
44+
"phpstan": "./vendor/bin/phpstan analyse src --level 7",
4345
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --verbose",
4446
"coverage": "./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --verbose",
4547
"cs-check": "./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
4648
"cs-fix": "./vendor/bin/php-cs-fixer fix --allow-risky=yes",
47-
"pre-commit": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes && ./vendor/bin/psalm --config=psalm.xml && ./vendor/bin/phpunit --configuration phpunit.xml --verbose"
49+
"pre-commit": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes && ./vendor/bin/psalm --config=psalm.xml && ./vendor/bin/phpstan analyse src --level 7 && ./vendor/bin/phpunit --configuration phpunit.xml --verbose"
4850
},
4951
"config": {
5052
"optimize-autoloader": true

0 commit comments

Comments
 (0)