Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Without this dependency I get the error:
Error: Class 'PHPUnit\Runner\Version' not found in require_once()
Comment | File | Size | Author |
---|---|---|---|
#2 | upgrade_status-3049116.patch | 437 bytes | tobiasb |
Comments
Comment #2
tobiasbThis is the same dependency as the core has.
Comment #3
tobiasbComment #4
herczogzoltanHey @tobiasb !
Thanks for your feedback! Upgrade status depends on phpstan-drupal which already requires "phpunit/phpunit": "^7.5" does that not suffice by itself?
Comment #5
tobiasbOnly as dev-dep. https://github.com/mglaman/phpstan-drupal/blob/master/composer.json#L20 therefore it will not be installed.
Comment #7
herczogzoltanNice catch @tobiasb ! I was able to reproduce the error. Added your patch into the dev branch! It'll be in the next release, thanks!
Comment #8
herczogzoltanComment #10
Gábor HojtsyIn #3106615: Remove dependency on phpunit we are wondering why was this added. Why does Upgrade Status need it as a normal dependency and not a dev dependency (which via drupal core it already has).
Comment #11
tobiasbDev-Deps in a composer.json are only installed, when the composer.json is the root-composer.json.
And phpunit is an explicit dependency, therefore upgrade_status should depend on the phpunit like drupal/core itself.
Comment #12
Gábor Hojtsy@tobiasb: yes, but core also only have phpunit as a dev dependency. Can you try with 2.x-dev of Upgrade Status (that currently does not depend on phpunit), if the same problem reappears?
Comment #13
tobiasbWith 8.x-2.* is all fine.