Closed (fixed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
entity system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2016 at 11:58 UTC
Updated:
13 Sep 2023 at 12:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
timmillwoodComment #3
timmillwoodComment #4
bojanz commentedWhat we care about is the interface, the base class and trait are just a way to reduce boilerplate. It's fine if we can't.
So let's make NodeInterface and friends extend the new interface. Deprecate old methods that don't match (like Node's getRevisionAuthor(), since we now have getRevisionUser())
Comment #6
timmillwoodThis patch switches Node to implement RevisionLogInterface.
It looks like Block might be trickier as it doesn't yet have a Revision user or a Revision creation time.
Comment #7
amateescu commentedThe patch looks good to me, I only found one small thing:
This use statement is not needed anymore.
Comment #8
timmillwoodUpdated based on #7.
Comment #9
dawehnerNitpick, can be fixed on commit: We use
{@inheritdoc}Comment #10
timmillwoodUpdated based on #9.
Comment #11
catchShouldn't the deprecated methods like getRevisionAuthor call the new methods like getRevisionUser()? I realise they're one-liners but makes the deprecation more explicit.
Where we add the deprecation notices we should say 'Use Blah\Blah instead' as well.
Also needs a follow-up to remove the usage of the deprecated functions and switch to the new ones - for example in Node::preSave().
Comment #12
timmillwoodUpdated base on #11.
Comment #13
tormiMinor typo: User > Use :)
Comment #14
timmillwoodUpdated based on #13.
Comment #15
dawehnerPerfect!
Comment #16
alexpottCommitted f8fd764 and pushed to 8.2.x. Thanks!
Can we get a follow up to replace all usages? Ideally 8.2.0 will not have any. Also the reference to the method should be fully qualified.
Fix made on commit.
Comment #18
alexpottFiled #2718583: Remove deprecated usages of Node::setRevisionAuthorId() and Node::getRevisionAuthor()
Comment #20
quietone commentedpublish the change record