Generated with the help of an LLM.

Problem/Motivation

drupal.org CI's phpstan job now fails on 8.x-1.x with three errors. #3554612 covers the attribute discovery one; this issue covers the other two:

  • FieldFormatterEntityEmbedDisplayBase::build() calls the deprecated show().
  • DrupalEntityDeriver stores entity storage in a property (drupal.entityStoragePropertyAssignment).

Proposed resolution

  • Replace show($build[0]) with $build[0]['#printed'] = FALSE;, which is what show() does.
  • Keep the entity type manager in DrupalEntityDeriver and call getStorage('embed_button') in getDerivativeDefinitions().

The Project Update Bot's MR in #3610147 has the same show() fix, but it targets 2.0.x and includes unrelated changes.

AI disclosure

I used Claude Code to find the existing issues and draft this summary; I reviewed the CI errors and chose the fixes.

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

dave reid created an issue. See original summary.

dave reid’s picture

Title: Fix phpstan errors: deprecated show() and entity storage property » Use OOP hooks and fix Drupal 11.3 deprecations

dave reid’s picture

Status: Active » Needs review

  • dave reid committed 8fc23808 on 8.x-1.x
    refactor: #3639285 Use OOP hooks and fix Drupal 11.3 deprecations
    
    By:...
dave reid’s picture

Status: Needs review » 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.

  • dave reid committed d7a2cf79 on 8.x-1.x
    refactor: #3639285 Convert the test modules' hooks to OOP hooks
    
    By:...

  • dave reid committed d7a2cf79 on 2.0.x
    refactor: #3639285 Convert the test modules' hooks to OOP hooks
    
    By:...

  • dave reid committed 8fc23808 on 2.0.x
    refactor: #3639285 Use OOP hooks and fix Drupal 11.3 deprecations
    
    By:...