Call to deprecated method invalidateAll() of interface Drupal\Core\Cache\CacheBackendInterface

Created on 11 August 2025, about 1 month ago

Problem/Motivation

PHPStan is reporting a new deprecation...

ddev phpstan
Note: Using configuration file /var/www/html/web/modules/custom/sitemap/phpstan.neon.

 ------ -------------------------------------------------------------------------------------------------
  Line   sitemap.install
 ------ -------------------------------------------------------------------------------------------------
  214    Call to deprecated method invalidateAll() of interface Drupal\Core\Cache\CacheBackendInterface:
         in drupal:11.2.0 and is removed from drupal:12.0.0. Use
           CacheBackendInterface::deleteAll() or cache tag invalidation instead.
         🪪  method.deprecated
 ------ -------------------------------------------------------------------------------------------------

Proposed resolution

Either change CacheBackendInterface::invalidateAll() call to CacheBackendInterface::deleteAll(), or use \Drupal\Component\Utility\DeprecationHelper::backwardsCompatibleCall() to call the correct method based on the version of Drupal.

Remaining tasks

  1. Write a patch
  2. Review and feedback
  3. RTBC and feedback
  4. Commit
  5. Release

User interface changes

To be determined, likely none.

API changes

To be determined, likely none.

Data model changes

To be determined, likely none.

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada mparker17 UTC-4

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024