Skip to content

Commit ea4afe2

Browse files
committed
Update phpstan
1 parent 3d80771 commit ea4afe2

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ before_script:
2828
script:
2929
- "! (composer outdated --direct | grep ^)"
3030
- vendor-tools/bin/php-cs-fixer fix --dry-run
31-
- vendor-tools/bin/phpstan analyse --level=5 --configuration=phpstan.neon src tests
31+
- vendor-tools/bin/phpstan analyse --level=7 --configuration=phpstan.neon src tests
3232
- vendor/bin/codecept run $coverage
3333

3434
after_success:

composer-tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"require-dev": {
3-
"friendsofphp/php-cs-fixer": "^2.0.0",
4-
"phpstan/phpstan": "^0.6.3",
5-
"phpstan/phpstan-nette": "^0.6.1"
3+
"friendsofphp/php-cs-fixer": "@stable",
4+
"phpstan/phpstan": "@stable",
5+
"phpstan/phpstan-nette": "@stable"
66
},
77
"config": {
88
"vendor-dir": "vendor-tools"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@test"
5454
],
5555
"fix": "\"vendor-tools/bin/php-cs-fixer\" fix",
56-
"analyse": "\"vendor-tools/bin/phpstan\" analyse --no-progress --level=5 --configuration=phpstan.neon src tests",
56+
"analyse": "\"vendor-tools/bin/phpstan\" analyse --no-progress --level=7 --configuration=phpstan.neon src tests",
5757
"test": [
5858
"\"vendor/bin/codecept\" build",
5959
"\"vendor/bin/codecept\" run --debug"

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ includes:
33
- vendor-tools/phpstan/phpstan-nette/rules.neon
44

55
parameters:
6+
excludes_analyse:
7+
- %rootDir%/../../../tests/_*
8+
69
ignoreErrors:
710
- '#^Access to an undefined property Eloquent\\Phony\\Mock\\Handle\\InstanceHandle::\$[a-zA-Z]++#'
811
- '#^Parameter \#[0-9]++ \$[a-zA-Z]++ of class [a-zA-Z\\]++ constructor expects [a-zA-Z\\]++, Eloquent\\Phony\\Mock\\Mock given#'
912
- '#^Parameter \$[a-zA-Z]++ of method Tests\\Unit\\Classes\\[a-zA-Z]++::[a-zA-Z]++\(\) has invalid typehint type Tests\\Unit\\Classes\\[a-zA-Z0-9]++#'
1013
- '#^Property Tests\\Unit\\Classes\\[a-zA-Z]++::\$[a-zA-Z0-9]++ has unknown class Tests\\Unit\\Classes\\[a-zA-Z0-9]++ as its type#'
1114
- '#^Return typehint of method Tests\\Unit\\Classes\\TestPresenter::createComponentNonexistentComponent\(\) has invalid type Tests\\Unit\\Classes\\NonexistentComponent#'
15+
- '#^Parameter \#1 \$reflection of method Arachne\\EntityLoader\\Application\\ParameterFinder::[a-zA-Z]++\(\) expects [a-zA-Z\\]++, Nette\\Application\\UI\\[a-zA-Z]+Reflection\|null given#'
16+
- '#^Calling method [a-zA-Z]++\(\) on possibly nullable type Nette\\Application\\UI\\[a-zA-Z]+Reflection\|null#'

0 commit comments

Comments
 (0)