Problem/Motivation

The Drupal\Tests\content_translation\Functional\ContentTranslationSettingsTest triggers deprecations on PHP 8.1 because it passes a NULL into FormattableMarkup

Steps to reproduce

Run Drupal\Tests\content_translation\Functional\ContentTranslationSettingsTest on PHP 8.1

Proposed resolution

Either pass in the bundle or fix \Drupal\Tests\content_translation\Functional\ContentTranslationSettingsTest::assertSettings to cast $bundle to a string.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

CommentFileSizeAuthor
#2 3240455-2.patch1.69 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
Issue tags: +PHP 8.1
Parent issue: » #3220021: [meta] Ensure compatibility of Drupal 9 with PHP 8.1 (as it evolves)
FileSize
1.69 KB

Here's the fix from the meta.

daffie’s picture

Status: Needs review » Reviewed & tested by the community

The parameter $bundle has been changed from NULL to the default entity bundle for all 3 cases.
Looks good to me.

  • catch committed f800f46 on 9.3.x
    Issue #3240455 by alexpott, daffie: Fix Drupal\Tests\content_translation...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed f800f46 and pushed to 9.3.x. Thanks!

Status: Fixed » Closed (fixed)

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