Problem/Motivation

  public function getDefaultRegion() {
    // This cannot be provided by the trait due to
    // https://bugs.php.net/bug.php?id=71414 which is fixed in PHP 7.0.6.
    return $this->getLayoutDefinition($this->getLayoutId())->getDefaultRegion();
  }

With #3053363: Remove support for PHP 5 in Drupal 8.8 we'll no longer be affect by this bug.

Proposed resolution

Move getDefaultRegion to \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait

Remaining tasks

User interface changes

None

API changes

New method on trait - this method is currently implemented in both usages in core.

Data model changes

None

Release notes snippet

N/a

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

iuana’s picture

Assigned: Unassigned » iuana
iuana’s picture

I removed from both classes the method "getDefaultRegion" in favor of FieldLayoutEntityDisplayTrait which will share with both classes the same methods.

iuana’s picture

Assigned: iuana » Unassigned
iuana’s picture

I forgot to remove the comment from the function.

alexpott’s picture

Status: Postponed » Needs work

The blocker is in!

alexpott’s picture

Status: Needs work » Needs review

Let's fire up the testbot!

Berdir’s picture

Status: Needs review » Needs work

Needs a reroll because the comments changed.

yogeshmpawar’s picture

Assigned: Unassigned » yogeshmpawar
yogeshmpawar’s picture

Assigned: yogeshmpawar » Unassigned
Status: Needs work » Needs review
FileSize
2.31 KB

Re-rolled the patch against 8.8.x branch.

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

I think this doesn't need a CR or so, nothing will break even *if* someone used that trait which seems highly unlikely and not currently the case in contrib.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 09fb5ce and pushed to 8.8.x. Thanks!

  • alexpott committed 09fb5ce on 8.8.x
    Issue #3054317 by iuana, yogeshmpawar, Berdir: Move...

Status: Fixed » Closed (fixed)

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