Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Mar 2014 at 12:11 UTC
Updated:
29 Jul 2014 at 23:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fagoComment #2
plachI'd say we should mark the relevant entity types as revisionable :)
Comment #3
plachThat is:
Comment #4
plachComment #5
fagoAs described, the patch checks the revision id - so no need to separately mark them revisionable .
Comment #6
plachI still think we should be using an explicit entity key instead of relying on the revision key, to make revisionability more easily alterable, anyway let's discuss this in a follow-up...
Comment #7
fagook, or we can try to discuss at the ddd to speed up things :)
Comment #8
alexpottd8_entity_revisionable.patch no longer applies.
Comment #9
xanoRe-roll.
Comment #10
fagoRe-roll is good, back to RTBC.
Comment #11
fagoComment #12
tstoecklerYeah, I'm fine with this for now. @plach wants to make the entity key information non-mandatory and provide sensible defaults for them, in which case this has to become a separate property, but since this will centralize the check it should not be a problem to change the implementation at that point.
Also once we have it we can move isRevisionable() along with isTranslatable() onto ContentEntityTypeInterface
Comment #14
tstoeckler9: drupal_2224549_9.patch queued for re-testing.
Comment #16
tstoeckler- Fix unit test
- Switch from (bool) getKey() to hasKey() in isRevisionable()
Also providing a separate patch and interface for moving this method to ContentEntityTypeInterface. I personally think that's the better patch. It's certainly more correct and we will want to do that at some point, but maybe people will want to all appropriate methods at once. I.e. isTranslatable() should be on ContentEntityTypeInterface as well.
Comment #18
tstoecklerThis should fix the test failures for the second patch in #16.
Comment #19
fagoI don't think we can move this to ContentEntityTypeInterface as RevisionableInterface is a separate interface, which entity types may implement independently from ContentEntityTypeInterface. Besides that, it would be weird if you would have to check for ContentEntityTypeInterface before being able to call isRevisionable().
Therefore, I think the first patch from #16 is the one to go + reroll looks good (again). I'm re-uploading the patch to avoid confusion, no changes.
Comment #20
fagoComment #21
plach+1 on #19
Comment #23
catchCommitted/pushed to 8.x, thanks!