Problem/Motivation
In #2405165: Entity::setOriginalId() does enforceIsNew(FALSE), that is wrong for ConfigEntities @xjm spent some time delving into the differences between config and content entity life cycles. We should try to document this better somewhere so that methods like setOriginalId() are seen to be working as expected. New config entities can have an ID and content entities do not. The base entity code really should not make any assumptions about the specific life cycle of an super entity type (config, content - hopefully nothing else) and where it does - such as in setOriginalId() the assumptions should be well documented.
Steps to reproduce
Proposed resolution
Improve comments based on this 'problem' section and #2405165-16: Entity::setOriginalId() does enforceIsNew(FALSE), that is wrong for ConfigEntities and #2405165-17: Entity::setOriginalId() does enforceIsNew(FALSE), that is wrong for ConfigEntities
Remaining tasks
Review
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-2478811
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
ifrikIs this an issue for documentation on in the developers guide on d.o. and/or for the glossary on d.o.?
Comment #2
jhodgdonProbably the API documenation in Drupal Core I am guessing. Needs elaboration in the issue summary.
Comment #9
avpadernoComment #21
quietone commentedThis is a doc only change and linting has passed, so I stopped the pipeline.
Is the added documentation sufficient?
Comment #22
quietone commented