Our site is running Drupal 8.8.13 and we want to move to Drupal 9. I've installed the Upgrade Status module v3.3. When I scan a module, like Admin Toolbar, it reports the problem:


Internal error: PHPUnit\Framework\TestCase is not an interface 
Run PHPStan with --debug option and post the stack trace to: 

Lots of other modules have the same problem.

Is this warning legit? or is there a problem with the configuration of Upgrade Status module?


Are you using the latest versions?

Upgrade Status recently released a new version (3.3) a couple days ago, and it seems something is wrong with PHPStan.

Testing on Drupal 8.9.13 with Upgrade Status 3.3 and Admin Toolbar 3.0, after scanning Admin Toolbar, I get only this issue:

web/PHPStan failed  0   PHP API deprecations cannot be checked. Reason: Array ( )

Which is linked to the bug report listed above.

In any case, regarding your error, if you go to the Admin Toolbar module page on drupal.org, you'll see that both the 3.x and 2.x versions are marked as compatible with Drupal 9.

In general, it's safe to trust modules that say they are compatible with Drupal 9 on their module pages whose most recent release is after the release of Drupal 9.0 (June 3, 2020). Maintainers of some modules that were last updated earlier in 2020 marked their modules as compatible with Drupal 9 while it was still in alpha or beta, and then Drupal 9 changed before the release, breaking compatibility with those modules.

  • Yes, I'm using Upgrade Status 3.3.
    – bwaindwain
    Feb 1 '21 at 18:46
  • I can confirm that in a clean install of Drupal 8.9.13, Admin Toolbar v3.0.0 and Upgrade Stauts v3.3, the PHPUnit warning does not occur. So, I guess there's some other dependency wackiness going on in our composer project. We have about 170 packages in the require section of composer.json.
    – bwaindwain
    Feb 1 '21 at 19:24
  • @bwaindwain Try removing PHPUnit from composer.json if you have it installed. Feb 2 '21 at 0:19
  • When I do composer remove phpunit/phpunit it says "Nothing to install or update". When I do composer why phpunit/phpunit it says drupal/core-dev 8.9.13 requires phpunit/phpunit (^6.5 || ^7)
    – bwaindwain
    Feb 2 '21 at 18:14
  • 1
    @bwaindwain I would just ignore the error then. Drupal 9.1 includes PHPUnit 9, so there are some differences with the tests between 8 + 9, but regardless, automated tests on contrib modules won't interfere with the upgrade. Feb 3 '21 at 13:09

This issue has been reported at https://github.com/mglaman/drupal-check/issues/202

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.