[5.0] CMSApplication: Switching to triggerEvent#39752
[5.0] CMSApplication: Switching to triggerEvent#39752Hackwar wants to merge 5 commits intojoomla:5.0-devfrom
Conversation
|
Since I don't see this being merged into 4.2-dev, I've changed the base branch to 4.3-dev. Lets hope it will be merged in there. |
|
I tested the changes with different kind of listeners: public function onBeforeRespond()
{
}public function onBeforeRespond(\Joomla\Event\Event $event)
{
}public function onBeforeRespond(\Joomla\Application\Event\ApplicationEvent $event)
{
}The first two are for the old way to trigger event (using Another question is if this change is OK, should we do the same for |
|
Since this change will most likely not go into 4.3, I've rebased it to 4.4. |
|
That looks and works good to me. What about Site, Admin and other applications? |
|
Please rebase to 5.0, safer to use the new way in the next major. Thanks for understanding. |
|
This was fixed as part of #40522 Implementing application event classes. |
Summary of Changes
This syncs the event triggers in
CMSApplication::execute()to usetriggerEvent()overall. I know thattriggerEvent()is deprecated and that in the end we want to switch to event classes instead. However right now this is not implemented everywhere and the task for someone else. But: The way the event is triggered right now throws a deprecation warning and we are usingtriggerEvent()in the rest of the method, so I'd rather keep it consistent for now.Testing Instructions
Basically a codreview... Make sure that the events are still triggered, I guess?
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed