- π¦πΊAustralia acbramley
Came up in slack and the advice from @berdir was to deprecate instead. I agree as it's minimal code to get a list of revision IDs using an entity query.
In #2957425: Allow the inline creation of non-reusable Custom Blocks in the layout builder β we are having to get all the revision IDs for entity that we just know is revisionable.
We have generic code
$entity_type = $this->entityTypeManager->getDefinition($entity->getEntityTypeId());
if ($revision_table = $entity_type->getRevisionTable()) {
$query = $this->database->select($revision_table);
$query->condition($entity_type->getKey('id'), $entity->id());
$query->fields($revision_table, [$entity_type->getKey('revision')]);
$query->orderBy($entity_type->getKey('revision'), 'DESC');
return $query->execute()->fetchCol();
}
return [];
That should work for any revisionable entity. Can we move NodeStorageInterface::revisionIds on up to RevisionableStorageInterface and then implement this generic logic in \Drupal\Core\Entity\Sql\SqlContentEntityStorage?
Is this ok with BC policy.
Write patch
Tests
None
RevisionableStorageInterface would have ::revisionIds()
NOne
Needs work
11.0 π₯
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Came up in slack and the advice from @berdir was to deprecate instead. I agree as it's minimal code to get a list of revision IDs using an entity query.