Problem/Motivation

When upgrading to Drupal 11.3, this error occurs:

PHP Fatal error: Drupal\layoutbuilder_search_api\Plugin\search_api\processor\LayoutBuilderReferences and Drupal\layout_builder\LayoutEntityHelperTrait define the same property ($sectionStorageManager) in the composition of Drupal\layoutbuilder_search_api\Plugin\search_api\processor\LayoutBuilderReferences. However, the definition differs and is considered incompatible. Class was composed in [...] layoutbuilder_search_api/src/Plugin/search_api/processor/LayoutBuilderReferences.php on line 34

Steps to reproduce

Upgrade from Drupal 11.2 to 11.3 while using this module, then run drush deploy

Proposed resolution

Add a type declaration to the $sectionStorageManager variable to appease PHP.

Remaining tasks

MR forthcoming.

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

lanny heidbreder created an issue. See original summary.

lanny heidbreder’s picture

Status: Active » Needs review
danflanagan8’s picture

Status: Needs review » Needs work

Instead of adding a type to the declaration, would it make more sense to remove the re-declaration of $sectionStorageManager?

I think so. We don't use that property internally. We should just let the trait manage that property.

webflo made their first commit to this issue’s fork.

webflo’s picture

Category: Task » Bug report
Status: Needs work » Needs review

@danflanagan8 yes!

The property is already defined in the trait. No need to duplicate it in the module.

danflanagan8’s picture

Status: Needs review » Reviewed & tested by the community

RTBC for MR 4

Amusingly, I'm using the patch from MR3 on a project because it, of course, works perfectly well. It's just not as good as MR 4 for merging into the project.

Thanks all!

rollins’s picture

MR 4 works perfectly!
It finally allows me to update Drupal core to 11.3.
Thank you!

dench0’s picture

D11.3 patch

heddn made their first commit to this issue’s fork.

  • heddn committed 7ab6cad4 on 1.0.x authored by webflo
    fix: #3566471 Add type declaration to $sectionStorageManager for Drupal...
heddn’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the fixes.

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.

cassioalmeida’s picture

Hey, guys

This is working properly, however, I can't find a new release with the patch.

Can we have a new release that includes the fix?

Thank you!

Status: Fixed » Closed (fixed)

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