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:
- 3436597-remove-unused-dependencyserializationtrait
changes, plain diff MR !7215
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
__sleepalias can be dropped, which would prevent future-us from trying to drop the whole Trait.Comment #8
spokjeComment #9
smustgrave 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!