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.
Hey folks,
maybe you can help me with following conspicuousness:
Problem/Motivation
Running drupal/upgrade_status drush command: "upgrade_status:analyze" leads to warnings in numerous modules regarding automated tests.
This is the warning I get most of the times.
Reflection error: Drupal\Tests\PhpunitCompatibilityTrait not found.
Steps to reproduce
-> install drupal 8.x composer based setup
-> require drupal/upgrade_status
-> running " drush upgrade_status:analyze"
Anyone else having same troubles? Do I have a misconfiguration or is this a general problem?
Best
Comment | File | Size | Author |
---|---|---|---|
#8 | 3172382.patch | 354 bytes | Gábor Hojtsy |
Comments
Comment #2
r81d3r CreditAttribution: r81d3r as a volunteer commentedComment #3
r81d3r CreditAttribution: r81d3r as a volunteer commentedI solved this problem on my setup with a complete reinstallation of phpunit and drupal/upgradestatus the following way:
after upgrade_status runs trough no warnings have been detected
edit: could someone explain to me what this warnings are about?
Comment #4
Arlina CreditAttribution: Arlina at Chapter Three commentedExperiencing similar errors. Found out the issue started happening after the latest release of phpstan/phpstan 0.12.43. Issue has been reported on the mglaman/drupal-check project: https://github.com/mglaman/drupal-check/issues/186
Quick fix for a project using this would be to manually require the previous version for the time being:
composer require phpstan/phpstan:"0.12.42"
Comment #5
mglamanThis is a bug in PHPStan Drupal's compact with PHPStan, as @Arlina has noted.
Comment #6
Gábor HojtsyShould we have a composer conflict added?
Comment #7
mglamanI think a conflict would be the best approach until I can set aside time to fix the autoloading in PHPStan Drupal
Comment #8
Gábor HojtsySo this is what we need I guess.
Comment #9
Gábor HojtsyComment #11
Gábor HojtsyFixed for now. Will tag a new release of 3.x soon and 2.x soon.
Comment #13
mglamanGood call. I'm trying to figure out what broke phpstan-drupal in nikic/php-parser to 4.10.0 or ondrejmirtes/better-reflection to 4.3.29 for PHPStan 0.12.43.
Comment #14
Gábor HojtsyReleased for now in 8.x-2.11 and 8.x-3.0-beta2.