Fixed: Joomla 5 event ArrayAccess pattern for service plugin collection #86
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed in commit
8dd6fddSeverity: High — service plugin map was always empty
What was wrong:
The
new Event('name', [&$array])pattern doesn't preserve PHP references in Joomla 5's Event class. Service plugins using SubscriberInterface receive the Event object (not raw args) and append via ArrayAccess. The original code expected by-reference modification of the array, which never worked.Fix applied:
After dispatching the event, read service plugins from Event ArrayAccess indices (1, 2, 3...) instead of expecting the original array to be modified.
Files:
CrossPostDispatcher.php,QueueProcessor.php,DispatchController.phpLabel:
priority: high,status: pending-testingBranch created:
feature/86-fixed-joomla-5-event-arrayaccess-pattern