Closed (fixed)
Project:
Resource Conflict
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Dec 2025 at 18:13 UTC
Updated:
15 Dec 2025 at 18:29 UTC
Jump to comment: Most recent
The resource_conflict module currently passes full node entities through ConflictsEvent. This means conflict nodes are loaded before the resource_conflict.conflicts_filter event is dispatched, even when subscribers only need node IDs or might filter out all conflicts. This adds unnecessary entity loading overhead and makes it harder for subscribers to control when, or if, entities are loaded.
ConflictsEvent to carry a list of conflicting node IDs instead of an array of node entities:
int[] $conflictIds.getConflicts() / setConflicts() are replaced with getConflictIds() / setConflictIds().int[] of node IDs.ResourceConflictManager::getConflicts() to:
getConflictingNodeIds().ConflictsEvent with IDs only.loadMultiple() after the event has finished and the final list of IDs is known.resource_conflict.examples.inc to work with IDs:
getConflictIds() to inspect conflicts.setConflictIds().entity_type.manager.getConflictIds() inside onConflictsFilter().setConflictIds().Drupal\resource_conflict\Event\ConflictsEvent:
int[] $conflictIds instead of an array of NodeInterface objects.getConflicts() and setConflicts() are replaced bygetConflictIds() and setConflictIds().ResourceConflictManager::getConflicts() now dispatches theCONFLICTS_FILTER event with IDs and loads node entities onlyresource_conflict_test_validation test subscriber now requiresentity_type.manager to load nodes in order to filter conflicts.
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 #2
joelpittetComment #5
joelpittet