Closed github-actions[bot] closed 1 year ago
Seeing this pop up in our project when testing the 10.1 update, so it kinda works bout phpstan is understandably pretty confused about it as it's deprecated on one interface but kept another, even when adding /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
, it thinks it knows better and gives me:
Call to deprecated method loadRevision() of class Drupal\Core\Entity\RevisionableStorageInterface:
in drupal:10.1.0 and is removed from drupal:11.0.0. Use
\Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead.
And:
Call to deprecated method loadRevision() of class Drupal\Core\Entity\ContentEntityStorageBase:
in drupal:10.1.0 and is removed from drupal:11.0.0. Use
\Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead.
@Berdir thanks for commenting. This needs a phpstan-drupal issue. Probably to add stubs and provide @not-deprecated
tags on something. Probably RevisionableStorageInterface
This will be messy.
https://www.drupal.org/node/3294237
Introduced in branch/version: 10.1.x / 10.1.0
The following methods are deprecated:
\Drupal\Core\Entity\EntityStorageInterface::loadRevision()
\Drupal\Core\Entity\EntityStorageInterface::deleteRevision()
\Drupal\Core\Config\Entity\ConfigEntityStorage::loadRevision()
\Drupal\Core\Config\Entity\ConfigEntityStorage::deleteRevision()
\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::loadRevision()
\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::deleteRevision()
Use
\Drupal\Core\Entity\RevisionableStorageInterface
instead.