Skip to content
Snippets Groups Projects

Issue #3383513: Use type-hinting on deprecation warnings for loadRevision() introduced by mglaman/phpstan-drupal:1.2.0

Closed Issue #3383513: Use type-hinting on deprecation warnings for loadRevision() introduced by mglaman/phpstan-drupal:1.2.0
Closed spokje requested to merge issue/drupal-3383513:3383513-ue-type-hinting-on into 11.x
Files
39
@@ -100,9 +100,10 @@ protected function hasUntranslatableFieldsChanges(ContentEntityInterface $entity
$original = $entity->original;
}
else {
$original = $this->entityTypeManager
->getStorage($entity->getEntityTypeId())
->loadRevision($entity->getLoadedRevisionId());
/** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
$storage = $this->entityTypeManager
->getStorage($entity->getEntityTypeId());
$original = $storage->loadRevision($entity->getLoadedRevisionId());
}
foreach ($entity->getFieldDefinitions() as $field_name => $definition) {
Loading