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

Created on 26 August 2023, over 1 year ago
Updated 29 August 2023, over 1 year ago

Problem/Motivation

πŸ“Œ Bump mglaman/phpstan-drupal to latest to make daily "updated deps" QA run pass again Fixed introduced (a lot of) deprecation warnings like:

Call to deprecated method loadRevision() of class Drupal\Core\Entity\EntityStorageInterface:
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use
         \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead.

Currently they are suppressed in core/phpstan-baseline.neon.

This issue is here to remove all of them from the baseline by type-hinting.

Steps to reproduce

Proposed resolution

Use type-hinting on the likes of \Drupal::entityTypeManager()->getStorage($entity_type_id) to clarify (to PHPStan) we intend to use the more specific RevisionableStorageInterface instead of EntityStorageInterface.

This issue should leave none of the above mentioned deprecation suppressions in the baseline.

In the process of doing so we also remove two of these suppressions:

Call to deprecated method deleteRevision () of class Drupal\Core\Entity\EntityStorageInterface:
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use
         \Drupal\Core\Entity\RevisionableStorageInterface::deleteRevision instead.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡³πŸ‡±Netherlands spokje

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024