File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 19
19
"php" : " ^7.1|^8.0" ,
20
20
"doctrine/dbal" : " ~2.3|^3.3" ,
21
21
"phpdocumentor/graphviz" : " ^1.0" ,
22
- "nikic/php-parser" : " ^2.0|^3.0|^4.0"
22
+ "nikic/php-parser" : " ^2.0|^3.0|^4.0|^5.0 "
23
23
},
24
24
"require-dev" : {
25
25
"larapack/dd" : " ^1.0" ,
Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ public function getModelsInDirectory(string $directory): Collection
54
54
55
55
protected function getFullyQualifiedClassNameFromFile (string $ path ): string
56
56
{
57
- $ parser = (new ParserFactory ())->create (ParserFactory::PREFER_PHP7 );
57
+ $ factory = new ParserFactory ();
58
+ $ parser = method_exists ($ factory , 'createForHostVersion ' )
59
+ ? $ factory ->createForHostVersion ()
60
+ : $ factory ->create (ParserFactory::PREFER_PHP7 );
58
61
59
62
$ traverser = new NodeTraverser ();
60
63
$ traverser ->addVisitor (new NameResolver ());
You can’t perform that action at this time.
0 commit comments