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
nikic/[email protected] was released 11 hours ago, where the signature of PhpParser\Lexer\Emulative::__construct(array $options = []) was changed to PhpParser\Lexer\Emulative:__construct(?PhpVersion $phpVersion = null) and old signature used in Psalm\Internal\Provider::parseStatements method:
In PHP >= 8.0, since phpunit/[email protected] adds a dependency on nikic/[email protected] (such as when using phpunit/phpunit), if you depend on both nikic/php-parser and phpunit /php-code-coverage, the following error will be thrown:
Uncaught TypeError: PhpParser\Lexer\Emulative::__construct(): Argument #1 ($phpVersion) must be of type ?PhpParser\PhpVersion, array given, called in vendor/vimeo/psalm/src/Psalm/Internal/Provider/StatementsProvider.php on line 402 and defined in vendor/bin/.phpunit/phpunit-9.6-0/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php:38
nikic/[email protected]
was released 11 hours ago, where the signature ofPhpParser\Lexer\Emulative::__construct(array $options = [])
was changed toPhpParser\Lexer\Emulative:__construct(?PhpVersion $phpVersion = null)
and old signature used inPsalm\Internal\Provider::parseStatements
method:In PHP >= 8.0, since
phpunit/[email protected]
adds a dependency onnikic/[email protected]
(such as when usingphpunit/phpunit
), if you depend on bothnikic/php-parser
andphpunit /php-code-coverage
, the following error will be thrown:Please refer to:
https://github.com/vimeo/psalm/blob/b113f3ed0259fd6e212d87c3df80eec95a6abf19/src/Psalm/Internal/Provider/StatementsProvider.php#L400...L403
sebastianbergmann/php-code-coverage@e19555d
https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md#changes-to-the-lexer
https://github.com/siganushka/generic-bundle/actions/runs/7443079097/job/20247867853
Possible solutions
nikic/[email protected]
and add dependency on 5.0nikic/[email protected]
that it conflicts with the specified versionThe text was updated successfully, but these errors were encountered: