Skip to content
This repository was archived by the owner on Jun 20, 2020. It is now read-only.

Commit 0d7d03a

Browse files
author
desperado
committed
update dependencies; phpstan integration
1 parent 94ec4ce commit 0d7d03a

File tree

5 files changed

+866
-107
lines changed

5 files changed

+866
-107
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ install:
2929
script:
3030
- ./vendor/bin/phpunit --configuration ./phpunit.xml --coverage-clover=coverage.clover
3131
- if [ "$TRAVIS_PHP_VERSION" == "7.2" ]; then ./vendor/bin/psalm --config=psalm.xml; fi
32+
- if [ "$TRAVIS_PHP_VERSION" == "7.2" ]; then ./vendor/bin/phpstan analyse src --level 7; fi
3233
- if [ "$TRAVIS_PHP_VERSION" == "7.2" ]; then ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run; fi
3334

3435
after_script:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,19 @@
3939
"php-service-bus/code-style-config": "^v0.1",
4040
"symfony/dependency-injection": "^v4.2",
4141
"phpunit/phpunit": "^8",
42-
"vimeo/psalm": "^v3"
42+
"vimeo/psalm": "^v3",
43+
"phpstan/phpstan": "^0.11.5"
4344
},
4445
"prefer-stable": true,
4546
"minimum-stability": "dev",
4647
"scripts": {
4748
"psalm": "./vendor/bin/psalm --config=psalm.xml",
49+
"phpstan": "./vendor/bin/phpstan analyse src --level 7",
4850
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --verbose",
4951
"coverage": "./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --verbose",
5052
"cs-check": "./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
5153
"cs-fix": "./vendor/bin/php-cs-fixer fix --allow-risky=yes",
52-
"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"
54+
"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"
5355
},
5456
"config": {
5557
"optimize-autoloader": true

0 commit comments

Comments
 (0)