[5.0][Events] Fix backward compatibility for onAfterRenderModules#41497
[5.0][Events] Fix backward compatibility for onAfterRenderModules#41497HLeithner merged 1 commit intojoomla:5.0-devfrom
Conversation
|
Merging this as with code review and based on the other similar PRs, before beta1 to get enough feedback for final release. Additional ArrayProxy is nothing we plan to have for ever right? because it only hides the & reference, Also I think we should convert the array back after we triggered the event with them? |
Yeah, it for replacement of array with reference.
The changes applied to original array, converting it back is unnecessary. |
|
Sure but the thing is we don't want that the Plugin manipulate the array directly? |
|
Yes, that the idea. because it hard to debug where the data gets modified by reference. Unfortunately, there also events where we mix object/array for $data, |
|
we should make this consistent... maybe not in 5 but later |
|
TBH, I have no idea how it can be done, for now and in future. |
|
Maybe in one of next beta, I will add Similar what we made for strings Need to think. |
|
We have |
It is part of argument validation, it cannot be public, or you get a loop. (Do not ask why) joomla-cms/libraries/src/Event/AbstractEvent.php Lines 202 to 208 in a78c8f5 |
Summary of Changes
Fix backward compatibility for onAfterRenderModules
Testing Instructions
Add following listener to Sef system plugin:
Open the site, and check rendered modules
Actual result BEFORE applying this Pull Request
Nothing changed
Expected result AFTER applying this Pull Request
Every module position now have 'aaaa' appended
Link to documentations
Please select:
Reference: