Skip to content

Commit

Permalink
fix: support for latest phpstan version
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed May 13, 2024
1 parent 4be0cf0 commit 7ba7d70
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"license": "MIT",
"require": {
"php": "^8.1",
"phpstan/phpstan": "^1.10.60",
"tomasvotruba/type-coverage": "^0.2.1",
"phpstan/phpstan": "^1.11.0",
"tomasvotruba/type-coverage": "^0.2.8",
"pestphp/pest-plugin": "^2.1.1"
},
"autoload": {
Expand All @@ -25,7 +25,7 @@
}
},
"require-dev": {
"pestphp/pest": "^2.30.0",
"pestphp/pest": "^2.34.7",
"pestphp/pest-dev-tools": "^2.16.0"
},
"minimum-stability": "dev",
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ parameters:
- src

checkMissingIterableValueType: true
checkGenericClassInNonGenericObjectType: false
reportUnmatchedIgnoredErrors: true

ignoreErrors:
- identifier: missingType.generics
- "#is not allowed to extend#"
- "#is not covered by backward compatibility promise#"
- "#is concrete, but does not have a Test suffix.#"
Expand Down
3 changes: 2 additions & 1 deletion src/PHPStanAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use PhpParser\Node;
use PHPStan\Analyser\Analyser;
use PHPStan\Analyser\FileAnalyser;
use PHPStan\Analyser\LocalIgnoresProcessor;
use PHPStan\Analyser\NodeScopeResolver;
use PHPStan\Analyser\RuleErrorTransformer;
use PHPStan\Collectors\Collector;
Expand Down Expand Up @@ -81,7 +82,7 @@ public static function make(Container $container, array $rules, array $collector
$container->getService('defaultAnalysisParser'), // @phpstan-ignore-line
$container->getByType(DependencyResolver::class),
new RuleErrorTransformer(),
true
$container->getByType(LocalIgnoresProcessor::class),
);

return new Analyser($fileAnalyser, $ruleRegistry, $collectorRegistry, $nodeScopeResolver, 9_999_999_999_999);
Expand Down

0 comments on commit 7ba7d70

Please sign in to comment.