Problem/Motivation
entity_mesh maintains its own tracking and indexation system (entity_mesh_tracker table, Tracker/TrackerManager classes, lifecycle hooks, and cron handler) for managing entity processing. This duplicates
functionality already provided by the entity_registry module's consumer plugin system, resulting in two parallel tracking implementations that must be maintained independently.
Proposed resolution
Create an EntityMeshConsumer plugin that implements EntityRegistryConsumerInterface, delegating all entity tracking, lifecycle detection, and cron processing to entity_registry.
The consumer wraps entity_mesh's existing rendering and link-extraction pipeline (EntityRender, Repository) while preserving sync/async processing modes and source/target type configuration.
- Add a new
EntityMeshConsumerplugin class - Remove entity_mesh's built-in lifecycle hooks, cron handler, and tracker classes
- Decouple
Entity,EntityRender, andMenuclasses fromTrackerManager - Add
entity_registryas a module dependency - Deprecate batch routes that relied on the removed tracker (to be replaced in a follow-up)
Remaining tasks
- Replace deprecated batch forms and routes with entity_registry equivalents
- Update Drush commands to use entity_registry's processor
- Remove the
entity_mesh_trackertable via update hook once transition is verified - Add unit tests for the consumer plugin
User interface changes
Entity Mesh appears as a registered consumer in the entity_registry admin UI at /admin/config/system/entity-registry, providing status counts, populate, reindex, clear, and rebuild
actions.
API changes
- Removed services:
entity_mesh.tracker,entity_mesh.tracker_manager - Removed classes:
Tracker,TrackerInterface,TrackerManager,TrackerManagerInterface - Changed constructor signatures:
Entity,EntityRender,Menuno longer acceptTrackerManagerInterface - Removed hooks:
hook_entity_insert,hook_entity_update,hook_entity_delete,hook_cron
Data model changes
No changes to the entity_mesh data table. The entity_mesh_tracker table is retained in schema but no longer actively used. Removal is planned for a future update hook.
Issue fork entity_mesh-3581615
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
eduardo morales albertiReady to review
Comment #5
lpeidro commentedI woks as expected, I merge the branch.