File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ $options = getopt('', [
4949
5050// Second argument is the single kernel file
5151$ dreddKernelPath = $ argv [1 ];
52- $ parser = (new ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
52+ $ parser = (new ParserFactory )->createForNewestSupportedVersion ( );
5353
5454try {
5555 $ statements = $ parser ->parse (file_get_contents ($ dreddKernelPath ));
6060
6161try {
6262 if ($ statements [0 ] instanceof PhpParser \Node \Stmt \Namespace_) {
63- $ kernelClass = implode ('\\' , $ statements [0 ]->name ->parts );
63+ $ kernelClass = implode ('\\' , $ statements [0 ]->name ->getParts () );
6464 foreach ($ statements [0 ]->stmts as $ statement ) {
6565 if ($ statement instanceof PhpParser \Node \Stmt \Class_) {
6666 $ kernelClass .= '\\' . $ statement ->name ;
Original file line number Diff line number Diff line change 44 "type" : " package" ,
55 "require" : {
66 "php" : " >=7.2" ,
7- "nikic/php-parser" : " ^4.2 " ,
7+ "nikic/php-parser" : " ^5.0 " ,
88 "ddelnano/dredd-hooks-php" : " ^2.0"
99 },
1010 "license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments