Upgrade status is not able to detect the following deprecation:

Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.

Which is visible during the tests execution

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Taran2L created an issue. See original summary.

gábor hojtsy’s picture

Since a base class/interface cannot force a property to exist (that does not exist in the base class), phpstan will not be able to find such problems. We would need to write a custom runtime parser for classes that we can discover in the extension. Not sure exactly how to do it, we would need to discover all test classes and find the ones in the given extension and check if they have the property. A combination of PHP reflection and class discovery code from simpletest could do it. I am not likely to have time to implement this in the foreseeable future unfortunately.

gábor hojtsy’s picture

mglaman’s picture

This should be feasible in phpstan-drupal. Opened an issue: https://github.com/mglaman/phpstan-drupal/issues/191

mglaman’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev

mglaman’s picture

Status: Active » Needs review

I just tagged https://github.com/mglaman/phpstan-drupal/releases/tag/0.12.12 which adds a rule to check for defaultTheme

  • a380b4b committed on 8.x-3.x
    Issue #3114270 by mglaman: Support checking for "Drupal\Tests\...
gábor hojtsy’s picture

Status: Needs review » Fixed

Woot, thanks @mglaman!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.