You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
composer.json allows nikic/php-parser ^4.0 but Extractor requires ^5.0 (uses createForVersion)
Problem description
In Extractor, we are using the method PhpParser\ParserFactory::createForVersion.
You can see the usage here: PHPFileExtractor.php#L36
This method was added in nikic/php-parser starting from version 5.0+.
However, the composer.json file of php-translation/extractor currently allows lower versions:
"nikic/php-parser": "^4.0 || ^5.0",
Composer may therefore install nikic/php-parser 4.x, which does not have the createForVersion method.
This leads to a runtime error when using the Extractor with a 4.x version of nikic/php-parser.