Problem/Motivation
Config (entities) can depend on modules, themes as well as entities. For some time, it could not depend on content entities, only config entities, so they $type 'entity' was used. Since content entities was also supported, 'entity' was changed to 'content' and 'config' to distinguish the cases. But still, the method documentation of DependencyTrait::addDependency() mentions only 'entity'.
Proposed resolution
Change 'entity' to 'config' and 'content' there.
Remaining tasks
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | dependencytrait-documentation-2485403-15.patch | 840 bytes | mmatsoo |
| #12 | dependencytrait-documentation-2485403-12.patch | 883 bytes | mmatsoo |
| #8 | dependencytrait-documentation-2485403-8.patch | 887 bytes | mmatsoo |
| #6 | dependencytrait-documentation-2485403-5.patch | 838 bytes | mmatsoo |
| #4 | dependencytrait-documentation-2485403-4.patch | 862 bytes | mmatsoo |
Comments
Comment #1
gaurav_varshney commentedComment #2
eojthebraveThanks for the patch.
This line should wrap at 80 characters per the code standards.
I also find the wording a little off, maybe just ... "theme, config, or content" and remove the "and"?
I think this should be "config or content" not "config and content". And, should this be something like "the full content object" or similar if this is of the type 'content'?
Comment #3
mmatsoo commentedComment #4
mmatsoo commentedChanged and shortened text.
Comment #6
mmatsoo commentedTrying again. Not sure why last patch failed testing.
Comment #8
mmatsoo commentedOne more time. After this I can't imagine why the patch keeps failing.
Comment #9
imiksuDocs and patch looking good.
Comment #10
alexpottShould be the result of getConfigDependencyName(). For configuration entities this is the configuration object name - but for content entities this is entity_type:bundle:UUID. Also this line should wrap with the previous line.
Comment #11
mmatsoo commentedComment #12
mmatsoo commentedUpdated text and got rid of unnecessary line feed.
Comment #13
alexpottI think we should just say that this is the result of EntityInterface::getConfigDependencyName() since what that actually returns is an implementation detail.
Comment #14
mmatsoo commentedComment #15
mmatsoo commentedSwitched text to be closer to original where config and content types are documented in the same sentence, now as the result of EntityInterface::getConfigDependencyName().
Comment #16
eojthebraveLooks good to me. Current patch addresses all the concerns so far and the comments are correctly formatted. So I think this is RTBC.
FWIW. I haven't actually applied this locally, but it's just a documentation change, and the test bot says that it is able to apply the patch so I think this is safe.
Comment #18
alexpottCommitted 34a5bd1 and pushed to 8.0.x. Thanks!