File tree Expand file tree Collapse file tree 3 files changed +21
-18
lines changed Expand file tree Collapse file tree 3 files changed +21
-18
lines changed Original file line number Diff line number Diff line change 66 "nikic/php-parser" : " ^5" ,
77 "phpstan/phpstan" : " ^2.1" ,
88 "phpstan/extension-installer" : " ^1.1" ,
9- "phpstan/phpdoc-parser" : " ^1.4 "
9+ "phpstan/phpdoc-parser" : " ^2.0 "
1010 },
1111 "config" : {
1212 "allow-plugins" : {
Original file line number Diff line number Diff line change 1212use PHPStan \PhpDocParser \Parser \TokenIterator ;
1313use PHPStan \PhpDocParser \Parser \ConstExprParser ;
1414use PHPStan \PhpDocParser \Parser \TypeParser ;
15+ use PHPStan \PhpDocParser \ParserConfig ;
1516use Symfony \Component \Console \Application ;
1617use Symfony \Component \Console \Command \Command ;
1718use Symfony \Component \Console \Input \InputArgument ;
@@ -50,11 +51,13 @@ public function __construct(
5051 parent ::__construct ();
5152 $ this ->parser = $ parser ;
5253 $ this ->printer = $ printer ;
53- $ this ->phpDocLexer = new Lexer ();
5454
55- $ constExprParser = new ConstExprParser ();
56- $ typeParser = new TypeParser ($ constExprParser );
57- $ this ->phpDocParser = new PhpDocParser ($ typeParser , $ constExprParser );
55+ $ config = new ParserConfig (usedAttributes: ['lines ' => true , 'indexes ' => true ]);
56+ $ this ->phpDocLexer = new Lexer ($ config );
57+
58+ $ constExprParser = new ConstExprParser ($ config );
59+ $ typeParser = new TypeParser ($ config , $ constExprParser );
60+ $ this ->phpDocParser = new PhpDocParser ($ config , $ typeParser , $ constExprParser );
5861 }
5962
6063 protected function configure (): void
You can’t perform that action at this time.
0 commit comments