Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2014 at 13:02 UTC
Updated:
24 Dec 2014 at 17:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alexpottPatch attached
Comment #2
berdirMakes sense to me.
The related question is how to properly identify if an entity type is config or content, we have different approaches for that, the old code here or the isSubclassOf() method, but that's not related to this (anymore).
Comment #3
xjmComment #4
wim leersLooks good :)
Comment #5
dawehnerOH, are we sure that this is right here? ... so do we really support referencing a basic entity? Are we sure that the behaviour is exactly like for content entities? In case we do, we could also skip the implementation in the ContentEntityType
Comment #6
alexpott@dawehner I thought I added a comment to address that. Patch now contains a comment.
Comment #7
xjmLet's add a unit test and/or check or document the implicit test coverage?
Comment #8
alexpottThere is explicit test coverage of where entity reference in
\Drupal\entity_reference\Tests\EntityReferenceIntegrationTest. I don't think we should be adding a test method to EntityTypeTest to check that getConfigDependencyKey() returns a string.Comment #9
amateescu commentedLooks good to me as well, and I agree about the existing test coverage. Assuming the testbot will come back green at some point.. RTBC :)
Comment #10
alexpottThis patch will also be helpful for #2372855: Add content & config entity dependencies to views
Comment #11
webchickThis definitely looks a lot cleaner. Entity Reference definitely won't be the last module to try and differentiate between entity types.
Committed and pushed to 8.0.x. Thanks!
Comment #13
alexpottDrupal\config\Tests\ConfigDependencyTestcontains complete coverage of the difference between content and config dependences.Comment #16
alexpottThis was commit before testing was complete. HEAD is green post commit - so all good here.