We talked about this today and agreed to just implement the UUID on the ConfigEntityBase class, and enforce this key.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | interdiff-2004336-15.txt | 1.55 KB | damiankloip |
| #16 | 2004336-15.patch | 18.1 KB | damiankloip |
We talked about this today and agreed to just implement the UUID on the ConfigEntityBase class, and enforce this key.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | interdiff-2004336-15.txt | 1.55 KB | damiankloip |
| #16 | 2004336-15.patch | 18.1 KB | damiankloip |
Comments
Comment #2
damiankloip commentedHmmm, we would maybe have to do something like this if we really want to move this... or maybe a step too far? It seems if we make the assumption that everything extending ConfigEntityBase (not implementing ConfigEntityInterface necessarily) and then actually add the uuid key back programmatically for all entities extending ConfigEntityBase. Discuss.
Comment #4
damiankloip commentederrrhhmmm
Comment #6
dawehnerJust a rerole.
I thought config module just provides the UI so we can't rely on that functionality here?
Comment #7
tim.plunkettThis would be easy to do in/after #2119905: Provide @ConfigEntityType and @ContentEntityType to have better defaults
Comment #8
andypostRelated #2182239: Improve ContentEntityBase::id() for better DX supposes that 'id' key works wrong for some config entities
Comment #9
damiankloip commentedThis has basically been done along the way somewhere. We can just clean up the classes now.
Comment #10
damiankloip commentedWe should really default the uuid key in the ConfigEntityType imo. and remove all the duplicate property declarations for uuid ?
Comment #11
damiankloip commentedMaybe that is a more accurate title now.
Comment #13
damiankloip commentedThat's not fragile at all...no ;)
Comment #14
tstoecklerThis is certainly a better approach than the one I had in #2208285: Make ConfigEntityType::getKey() enforce the UUID key. However, this should also revert the relevant hunks that were introduced in #2198377: Enforce UUID key name in configuration entities, namely:
Comment #15
tstoecklerComment #16
damiankloip commentedYes, that indeed makes a lot of sense!
Comment #17
damiankloip commentedSorry, x-post.
Comment #18
tstoecklerAwesome, looks great!
Comment #19
alexpottLess code++
Committed 0f35ae9 and pushed to 8.x. Thanks!