Skip to content

Commit

Permalink
BC fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vol4onok committed Mar 12, 2024
1 parent 7b6009a commit 882eebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Parser/PhpParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PhpParser implements PhpParserInterface
*/
public function __construct(ParserFactory $parserFactory)
{
$this->parser = $parserFactory->createForNewestSupportedVersion();
$this->parser = method_exists($parserFactory, 'createForNewestSupportedVersion') ? $parserFactory->createForNewestSupportedVersion() : $parserFactory->create(ParserFactory::PREFER_PHP7);
}

/**
Expand Down

0 comments on commit 882eebe

Please sign in to comment.