Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
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
Comment #2
longwaveI think this should have been cleaned up in #3081145: Remove BC layers in the Plugin component where
__sleep()
was removed, but was missed.Comment #4
longwaveComment #5
longwaveSome test failures, I guess it is used!
Comment #7
SpokjeLooks like the
__sleep
alias can be dropped, which would prevent future-us from trying to drop the whole Trait.Comment #8
SpokjeComment #9
smustgrave CreditAttribution: smustgrave at Mobomo commentedSeems straight forward and didn't break anything. Not sure how else to test.
Comment #10
longwaveAh 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.
Comment #11
alexpottTIL #10
Committed and pushed 17d96f2df5 to 11.x and f8e990ceb1 to 10.3.x. Thanks!