Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.Problem/Motivation
PHPUnit tests for Drupal next major are failing due to a missing return type:
PHP Fatal error: Declaration of Drupal\Tests\domain\Functional\DomainTestBase::drupalUserIsLoggedIn(Drupal\Core\Session\AccountInterface $account) must be compatible with Drupal\Tests\BrowserTestBase::drupalUserIsLoggedIn(Drupal\Core\Session\AccountInterface $account): bool in /builds/issue/domain-3479098/domain/tests/src/Functional/DomainTestBase.php on line 203
See for example https://git.drupalcode.org/issue/domain-3479098/-/jobs/2975840
Proposed resolution
Add function return type for DomainTestBase::drupalUserIsLoggedIn
Issue fork domain-3479102
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
Comment #3
idebr commentedThe merge request adds a function return type for DomainTestBase::drupalUserIsLoggedIn and fixes the PHPUnit tests for the next major Drupal version
Comment #4
webflo commentedFixed with https://git.drupalcode.org/project/domain/-/merge_requests/116