Problem/Motivation
Entities can have string or int entity IDs. String IDs may not necessarily be numeric or >=0.
Proposed resolution
Update param doc to accept string|int
Remaining tasks
Update docs.
User interface changes
Nil
API changes
Nil
Data model changes
Nil
Release notes snippet
Trivial, not required.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3390366-3.patch | 617 bytes | soham sengupta |
Comments
Comment #2
dpiIt would be easy to copy the param doc from
\Drupal\Core\Entity\EntityStorageInterface::loadRevisionfrom the Drupal 10 branches (it is deprecated for D11)Comment #3
soham sengupta commentedHi, I have updated the param doc. Please review.
Comment #4
smustgrave commentedParam doc was copied from \Drupal\Core\Entity\EntityStorageInterface::loadRevision
Comment #5
dpiLGTM
Comment #6
alexpottI think this issue should go a bit further and make consistent.
\Drupal\Core\Entity\EntityRepository::loadRevision()
\Drupal\Core\Entity\RevisionableInterface::getLoadedRevisionId()
\Drupal\Core\Entity\RevisionableStorageInterface::deleteRevision()
I also think it is worth asking is it really true that revision IDs can be non numeric strings. Yes entity IDs can be strings but that is not the same as a revision ID. I think a revision ID should always be an integer - I'd be amazed if there is any true string revision IDs in contrib or custom. So maybe the fix here is to change them to int and add some casting.