Skip to content

Commit

Permalink
Fix issue of parsing PHP 8 sources on PHP 7.x (#1184)
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Nov 8, 2021
1 parent f98994d commit b2d1749
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion config/phpstan/parser.neon
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b2d1749

Please sign in to comment.