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 6
6
"nikic/php-parser" : " ^5" ,
7
7
"phpstan/phpstan" : " ^2.1" ,
8
8
"phpstan/extension-installer" : " ^1.1" ,
9
- "phpstan/phpdoc-parser" : " ^1.4 "
9
+ "phpstan/phpdoc-parser" : " ^2.0 "
10
10
},
11
11
"config" : {
12
12
"allow-plugins" : {
Original file line number Diff line number Diff line change 12
12
use PHPStan \PhpDocParser \Parser \TokenIterator ;
13
13
use PHPStan \PhpDocParser \Parser \ConstExprParser ;
14
14
use PHPStan \PhpDocParser \Parser \TypeParser ;
15
+ use PHPStan \PhpDocParser \ParserConfig ;
15
16
use Symfony \Component \Console \Application ;
16
17
use Symfony \Component \Console \Command \Command ;
17
18
use Symfony \Component \Console \Input \InputArgument ;
@@ -50,11 +51,13 @@ public function __construct(
50
51
parent ::__construct ();
51
52
$ this ->parser = $ parser ;
52
53
$ this ->printer = $ printer ;
53
- $ this ->phpDocLexer = new Lexer ();
54
54
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 );
58
61
}
59
62
60
63
protected function configure (): void
You can’t perform that action at this time.
0 commit comments