diff --git a/config/phpstan/parser.neon b/config/phpstan/parser.neon index 51ef853e357..58a28399595 100644 --- a/config/phpstan/parser.neon +++ b/config/phpstan/parser.neon @@ -1,4 +1,18 @@ services: defaultAnalysisParser: - factory: @currentPhpVersionRichParser + factory: @cachedRectorParser arguments!: [] + + cachedRectorParser: + class: PHPStan\Parser\CachedParser + arguments: + originalParser: @rectorParser + cachedNodesByStringCountMax: %cache.nodesByStringCountMax% + autowired: no + + rectorParser: + class: PHPStan\Parser\RichParser + arguments: + parser: @php8PhpParser + lexer: @php8Lexer + autowired: no