diff --git a/.gitignore b/.gitignore index 87230d1b..bbf0d8c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,12 @@ +/coverage /vendor /composer.lock +.idea +nbproject +.vscode +.DS_Store + +*.local +*.cache + /phpunit.xml -/.phpunit.result.cache diff --git a/composer.json b/composer.json index d0a338ae..2635bea0 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,10 @@ "friendsofphp/php-cs-fixer": "^3.0", "mikey179/vfsstream": "^1.6.7", "php-mock/php-mock-phpunit": "^2.1", - "phpstan/phpstan": "^0.12.58", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^9.4", "predis/predis": "^1.1", "spatie/async": "^1.5" diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c31d460e..e3844667 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,9 +1,13 @@ +includes: + - phar://phpstan.phar/conf/bleedingEdge.neon + parameters: - level: 5 + level: 6 + checkMissingOverrideMethodAttribute: true paths: - - ./ - excludes_analyse: - - vendor/ + - . + excludePaths: + - vendor - # TODO review once we drop PHP 7.x support - treatPhpDocTypesAsCertain: false + ignoreErrors: + - '~^Unsafe usage of new static\(\)\.$~'