Skip to content

Commit

Permalink
fix(documentator): Added missed nikic/php-parser requirement + comp…
Browse files Browse the repository at this point in the history
…atibility with v5.

(cherry picked from commit abcae15)
  • Loading branch information
LastDragon-ru committed Jan 18, 2024
1 parent 315737d commit 4a76c86
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"icanhazstring/composer-unused": "^0.8.10",
"laravel/scout": "^9.8.0|^10.0.0",
"mockery/mockery": "^1.6.2",
"nikic/php-parser": "^4.15",
"nikic/php-parser": "^4.18|^5.0",
"larastan/larastan": "2.7.0",
"orchestra/testbench": "^7.0.0|^8.0.0",
"phpstan/phpstan": "1.10.50",
Expand Down
1 change: 1 addition & 0 deletions packages/documentator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"composer/semver": "^3.2",
"laravel/framework": "^9.21.0|^10.0.0",
"league/commonmark": "^2.4",
"nikic/php-parser": "^4.18|^5.0",
"phpdocumentor/reflection-docblock": "^5.2",
"symfony/filesystem": "^6.3.0",
"symfony/finder": "^6.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function process(string $path, string $target, Serializable $parameters):
// Class?
try {
$class = null;
$parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
$parser = (new ParserFactory())->createForNewestSupportedVersion();
$stmts = (array) $parser->parse($content);
$finder = new NodeFinder();
$class = $finder->findFirst($stmts, static function (Node $node): bool {
Expand Down

0 comments on commit 4a76c86

Please sign in to comment.