Problem/Motivation

class ContextDefinition implements ContextDefinitionInterface {

  use DependencySerializationTrait {
    __sleep as traitSleep;
  }

But traitSleep is never called.

Steps to reproduce

Proposed resolution

Remove DependencySerializationTrait from the class.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3436597

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave created an issue. See original summary.

longwave’s picture

I think this should have been cleaned up in #3081145: Remove BC layers in the Plugin component where __sleep() was removed, but was missed.

longwave’s picture

Status: Active » Needs review
longwave’s picture

Status: Needs review » Needs work

Some test failures, I guess it is used!

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

Spokje’s picture

Status: Needs work » Needs review

Looks like the __sleep alias can be dropped, which would prevent future-us from trying to drop the whole Trait.

Spokje’s picture

Title: Remove unused DependencySerializationTrait from ContextDefinition » Remove unused DependencySerializationTrait alias from ContextDefinition
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems straight forward and didn't break anything. Not sure how else to test.

longwave’s picture

Ah I didn't realise that aliasing a method in a trait meant that the original method is kept (and usually overridden), instead of just renaming it, but it makes sense I guess.

alexpott’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

TIL #10

Committed and pushed 17d96f2df5 to 11.x and f8e990ceb1 to 10.3.x. Thanks!

  • alexpott committed f8e990ce on 10.3.x
    Issue #3436597 by longwave, Spokje: Remove unused...

  • alexpott committed 17d96f2d on 11.x
    Issue #3436597 by longwave, Spokje: Remove unused...

Status: Fixed » Closed (fixed)

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