-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | e.g. v1.0.3 |
Minimal PHP Code Causing Issue
in a project which contains a dependency to nikic/parser, which leads to install parser v5, we run into a fatal error when in tandem rector is installed.
we see the following error when running a phpunit test-suite, while rector is installed as a dev dependency
PHP Fatal error: Cannot declare interface PhpParser\Parser, because the name is already in use in /home/runner/work/daiber/daiber/vendor/rector/rector/vendor/nikic/php-parser/lib/PhpParser/Parser.php on line 6
Script vendor/bin/phpunit handling the phpunit event returned with error code 255
IMO this is a conflict of the project level nikic/php-parser v5 and the in rector embedded nikic/php-parser v4.
Expected Behaviour
I think either the composer.json of rector/rector needs to declare a fixed dependency on nikic/php-parser v4
or rector needs to be compatible with nikic/php-parser v4 and v5 at the same time
simonschaufi, sebastiaanluca, yassinedoghri and aidan-casey