At core 9.1 we get
PHP Fatal error: Declaration of Drupal\Tests\commerce\Functional\CommerceBrowserTestBase::tearDown() must be compatible with Drupal\Tests\BrowserTestBase::tearDown(): void in /var/www/html/modules/contrib/commerce/tests/src/Functional/CommerceBrowserTestBase.php on line 83

Change Record https://www.drupal.org/node/3114724

Adding the tearDown(): void type hint wiill require PHP7.1 minimum, although this only affects the test files.

this is complimentary to #3216989: [9.1] Declaring ::setUp without a void return typehint is deprecated

CommentFileSizeAuthor
#2 3306470-2.patch1.43 KBandypost

Comments

andypost created an issue. See original summary.

andypost’s picture

Version: 3.0.x-dev » 8.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new1.43 KB

As I get it should go 2.x and 3.x branches

This is real blocker for email_registration module https://www.drupal.org/pift-ci-job/2462113

andypost’s picture

Issue tags: +blocker

10.x still broken but the issue is blocker

  • jsacksick committed 004b241 on 3.0.x
    Issue #3306470 by andypost: [9.1] Declaring ::tearDown without a void...

  • jsacksick committed 9f60d0b on 8.x-2.x
    Issue #3306470 by andypost: [9.1] Declaring ::tearDown without a void...
jsacksick’s picture

Status: Needs review » Fixed

It's funny that this deprecation was introduced in Drupal core 9.1 as core 9.5 doesn't have the :void return type hint (See https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/tests/Drupa...).

But since tests are still passing with 9.x, I'm inclined to commit this, thanks for the patch.

andypost’s picture

andypost’s picture

andypost’s picture

Assigned: andypost » Unassigned
Issue tags: -blocker

Status: Fixed » Closed (fixed)

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