Problem/Motivation

Drupal\content_moderation\ModerationInformation->shouldModerateEntitiesOfBundle()() (Line: 82) causes deprecations on PHP 8.5 because \Drupal\content_moderation\EntityTypeInfo::formAlter() will pass NULLs in as the bundle ID when the creating a new bundle.

Steps to reproduce

Run \Drupal\Tests\content_moderation\Functional\WorkspaceContentModerationIntegrationTest::testModerationInWorkspace

Proposed resolution

Fix \Drupal\content_moderation\EntityTypeInfo::formAlter()

Remaining tasks

User interface changes

None

Introduced terminology

N/a

API changes

None

Data model changes

None

Release notes snippet

N/a

Issue fork drupal-3557556

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

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review

alexpott’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Tested locally with 8.5.0RC3

This one was weird as locally it actually failed

1) Drupal\Tests\content_moderation\Functional\WorkspaceContentModerationIntegrationTest::testModerationInWorkspace
Exception: Deprecated function: Using null as an array offset is deprecated, use an empty string instead
Drupal\content_moderation\ModerationInformation->shouldModerateEntitiesOfBundle()() (Line: 82)

But with the MR it's all green

LGTM

  • catch committed 2c5cae15 on 11.3.x
    fix: #3557556 Drupal\content_moderation\ModerationInformation->...

  • catch committed 05364537 on 11.x
    fix: #3557556 Drupal\content_moderation\ModerationInformation->...

catch’s picture

Committed/pushed to 11.x and cherry-picked to 11.3.x, thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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