bug PR-5.0-dev ? Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
30 Jan 2023

Summary of Changes

This syncs the event triggers in CMSApplication::execute() to use triggerEvent() overall. I know that triggerEvent() 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 using triggerEvent() 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

avatar joomla-cms-bot joomla-cms-bot - change - 30 Jan 2023
Category Libraries
avatar Hackwar Hackwar - open - 30 Jan 2023
avatar Hackwar Hackwar - change - 30 Jan 2023
Status New Pending
avatar Hackwar
Hackwar - comment - 5 Mar 2023

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.

avatar Hackwar Hackwar - change - 5 Mar 2023
Labels Added: ? ?
avatar Hackwar Hackwar - change - 19 Mar 2023
Title
[4.2] CMSApplication: Switching to triggerEvent
[4.3] CMSApplication: Switching to triggerEvent
avatar Hackwar Hackwar - edited - 19 Mar 2023
avatar Hackwar Hackwar - change - 23 Mar 2023
Labels Added: PR-4.3-dev
Removed: ?
avatar joomdonation
joomdonation - comment - 24 Mar 2023

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 triggerEvent method), the last one is for new way of event trigger (using dispatchEvent method). All works good, so this change look fine to me. Could anyone else take a look at this PR, too ? Maybe @Fedik ?

Another question is if this change is OK, should we do the same for SiteApplication and AdministratorApplication ?

avatar Hackwar
Hackwar - comment - 3 Apr 2023

Since this change will most likely not go into 4.3, I've rebased it to 4.4.

avatar Hackwar Hackwar - change - 3 Apr 2023
Title
[4.3] CMSApplication: Switching to triggerEvent
[4.4] CMSApplication: Switching to triggerEvent
avatar Hackwar Hackwar - edited - 3 Apr 2023
avatar Fedik
Fedik - comment - 3 Apr 2023

That looks and works good to me. What about Site, Admin and other applications?

avatar laoneo
laoneo - comment - 3 Apr 2023

Please rebase to 5.0, safer to use the new way in the next major. Thanks for understanding.

avatar laoneo laoneo - change - 11 Apr 2023
Title
[4.4] CMSApplication: Switching to triggerEvent
[5.0] CMSApplication: Switching to triggerEvent
avatar laoneo laoneo - edited - 11 Apr 2023
avatar laoneo laoneo - change - 11 Apr 2023
Labels Added: bug
Removed: PR-4.3-dev
avatar Hackwar Hackwar - change - 18 Apr 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-04-18 12:06:36
Closed_By Hackwar
Labels Added: PR-5.0-dev
avatar Hackwar Hackwar - close - 18 Apr 2023
avatar Hackwar Hackwar - change - 18 Apr 2023
Status Closed New
Closed_Date 2023-04-18 12:06:36
Closed_By Hackwar
avatar Hackwar Hackwar - change - 18 Apr 2023
Status New Pending
avatar Hackwar Hackwar - reopen - 18 Apr 2023
avatar Fedik Fedik - change - 22 Jul 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-07-22 08:38:27
Closed_By Fedik
avatar Fedik
Fedik - comment - 22 Jul 2023

This was fixed as part of #40522 Implementing application event classes.
I close this PR. Thanks for your work ?

avatar Fedik Fedik - close - 22 Jul 2023

Add a Comment

Login with GitHub to post a comment