Install

Works with Drupal: ^10.3 || ^11 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 62.13 KB
MD5: 8b60d3303a559018b3b56f712c0bcdb0
SHA-1: 4118efefd007ad0bf9758c6e5a38672f1e2b9c42
SHA-256: e152c2b5bc450409d43923b667968691ed26e3e64304f3016b260935b3382832
Download zip 149.55 KB
MD5: 7229997158093e330b19d913202856c5
SHA-1: 21a53bc974eff04802e65d986e7021ddc033cdf6
SHA-256: 0edfccaf919d5e67e47e6665cd99fc0bab53b07f0aa9c11bcd0d07258bf2f721

Release notes

Dependency Calculation 8.x-1.24 adds Drupal 12 support and fixes several crashes and an out-of-memory error during dependency calculation. Drupal 10.3 is now the minimum supported core version; Drupal 9 and Drupal 10.0 to 10.2 are no longer supported.

Highlights:

  • Drupal 12 support. Hook implementations are now object-oriented hook classes, with procedural wrappers kept for Drupal 10.3 to 11.0.
  • Saving an entity that many cached dependency trees depend on, such as a user who authored a lot of content, no longer runs out of memory. The dependent cache items are invalidated in batches of 50.
  • Dependency calculation no longer crashes on entities that can no longer be loaded, on menu links whose parent is not an entity (static links such as system.admin_structure, Views links, taxonomy_menu items), on references to entity types without a UUID, or on embedded media that cannot be loaded. The skipped items are logged to the depcalc log channel.
  • The depcalc cache can be cleared with vendor/bin/dr depcalc:clear-cache, the core command line tool in Drupal 11.4 and later, which Drush 15 uses. drush depcalc:clear-cache keeps working with Drush 12 and 13.
  • The module has a README that explains how to calculate dependencies, how to read the result and how to add a dependency collector.

Upgrade notes

  • Core requirement: core_version_requirement is now ^10.3 || ^11 || ^12 (it was ^9.4.15 || ^10 || ^11), for both depcalc and Dependency Calculation UI. composer.json no longer declares drupal/core or php; drupal.org derives the core requirement from the info file, and Drupal 10.3 itself requires PHP 8.1.
  • INVALIDATE_DEPENDENCIES can now be dispatched several times for one save: once per batch of up to DepcalcCacheBackend::INVALIDATE_CHUNK_SIZE (50) invalidated entities, instead of once per cache tag. Subscribers that assume a single event per save need to handle this.
  • DepcalcCacheBackend::invalidateAll() deletes the depcalc cache on Drupal 11.2 and later, because core deprecated CacheBackendInterface::invalidateAll() in 11.2 and removed it in 12.0.
  • InvalidateDepcalcCache::$depcalcCahe, the misspelled property, is deprecated in depcalc:8.x-1.24 and removed from depcalc:2.0.0. Subclasses should use $depcalcCache. See #3597137.
  • Hooks: hook_entity_presave() and hook_entity_delete() are implemented in Drupal\depcalc\Hook\EntityHooks, and the status report check in Drupal\depcalc\Hook\RuntimeRequirementsHook. The procedural depcalc_entity_presave(), depcalc_entity_delete() and depcalc_requirements() functions remain as wrappers. No update hooks, and no database or configuration changes.

Contributors (6)

alexander.levitsky, cgoffin, japerry, kaynenh, narendradesai, vimal_nadar

Changelog

Issues: 7 issues resolved.

Changes since 8.x-1.23 (compare):

Bug

  • #3362315 Invalidate depcalc cache tags in chunks to avoid running out of memory
  • #3222807 Ignore menu link parents that are not entities

Feature

  • #3188563 Skip dependency calculation for entities that can no longer be loaded
  • #3207446 Skip referenced entities whose entity type has no UUID

Misc

  • CHS-8809: Fixed TypeError: Drupal\depcalc\DependentEntityWrapper::__construct(): Argument #1 () must be of type Drupal\Core\Entity\EntityInterface, bool given.
  • CHS-9196: Drupal 12 compatibility.

Task

  • #3597137 Follow-up Drupal 12 compatibility tasks
  • #3597137 Build the hook classes through the class resolver
  • #3372293 Add a README file
Created by: japerry
Created on: 19 Nov 2026 at 23:07 UTC
Last updated: 19 Nov 2026 at 23:08 UTC
Bug fixes
New features

Other releases