Install

Works with Drupal: ^10.2 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 90.42 KB
MD5: 846942921612c8537152721769e43c1b
SHA-1: f9f8f201940aea098c67bc9c85107b9a25d67ab6
SHA-256: f9dd4830536aa550d6d9306a1b5a8a0aba9fc32970be36c1ac2d484ad72c7ea7
Download zip 152.19 KB
MD5: ed9f0c78a7d04d9e4303e8f2c813a713
SHA-1: 61c0540d1a2731f085ade5fc8a4b3d5f57cecb1e
SHA-256: 7e6358cfa24d5b889f55d5f4e9f7d180620259ea30213806f84659622ef7f4bf

Release notes

This is just a quick tag on top of 8.x-2.0-beta18, but also including the fix for #3506961: Constructor signature change needs BC check. For clarity, I'm copying the full -beta18 release notes below, so people coming here directly from -beta17 know what to expect.

Release notes for -beta18 and -beta19

This release contains significant performance improvements and code modernization.

Many thanks to @alexpott for working on the performance fixes that were pending, as well as finding and fixing new opportunities for making things faster and more efficient. 👏🙏

Worth noting

1) The --use-queue flag in the drush entity-usage:recreate command is no longer supported. The queue behavior is incompatible with the new and more performant approach.

2) A few methods are being marked as deprecated and will be removed in a future version. Check #3341932: Entity Usage when a URL Redirect Exists for more details.

3) Many plugins were refactored to stop loading entities during the tracking operation in order to improve performance. By issuing direct queries to the DB instead of loading entities, performance is improved significantly. If you have tracking plugins in custom code, check the documentation on \Drupal\entity_usage\EntityUsageTrackInterface for tips on how to make your plugin as performant as the other ones that are shipped with the module.

Contributors (8)

alexpott, dahousecat, dhruv.mittal, donquixote, marcoscano, osman, plopesc, silvi.addweb

Changelog

Issues: 21 issues resolved.

Changes since 8.x-2.0-beta17:

Bug

  • #3506961 by marcoscano, pastamp, alexpott: Constructor signature change needs BC check
  • #3503961 by alexpott, dahousecat, marcoscano: Entity tracking can cause exceptions and prevent entities being saved
  • #3260251 by dhruv.mittal, osman, alexpott, donquixote, marcoscano: Error: Call to private method in entity_usage_form_alter()

Feature

  • #3475721 by marcoscano, plopesc: Improve redirect logic for usage links in warning messages

Task

  • #3499648 by alexpott, marcoscano: Fix PHPStan and make code quality checks fail
  • #3499590 by alexpott, marcoscano: Add the ability to bulk insert to EntityUsage service
  • #3501421: Improve performance of EntityReference entity usage tracking plugin
  • #3501466 by alexpott, marcoscano: Improve performance of \Drupal\entity_usage\Plugin\EntityUsage\Track\TextFieldEmbedBase::getTargetEntities()
  • #3501750 by marcoscano: Fix cspell and eslint checks
  • #3502706 by alexpott, marcoscano: Tidy up spelling and fail if we break it
  • #3502733 by alexpott, marcoscano: Delete records using \Drupal\entity_usage\EntityUsageInterface::bulkDeleteSources() is slow
  • #3503070 by alexpott, marcoscano: Massively improve batch performance by reducing the number of queries
  • #3501655 by alexpott: Bulk insert into a different table
  • #3502795: Stop loading entities when we do not need to
  • #3503687 by alexpott, marcoscano: Entity reference tracking is still loading the entity
  • #3503296 by alexpott, marcoscano: Remove the queue option from the rebuild entity usage command
  • #3503696: Remove entity loading from \Drupal\entity_usage\Plugin\EntityUsage\Track\BlockField and use entity queries instead
  • #3503697 by alexpott, marcoscano: Remove entity loading from \Drupal\entity_usage\Plugin\EntityUsage\Track\LayoutBuilder and use entity queries instead
  • #3503805 by alexpott: Add documentation to \Drupal\entity_usage\EntityUsageTrackInterface about performance
  • #3505180 by alexpott: Increase PHPStan level to improve code quality and testing on changes
  • #3341932: Entity Usage when a URL Redirect Exists
  • #3505658: Increase PHPStan level even more
Created by: marcoscano
Created on: 18 Feb 2025 at 09:22 UTC
Last updated: 18 Feb 2025 at 09:22 UTC
Bug fixes
New features

Other releases