[5.2][Events] Use event classes for Extension plugins#43617
[5.2][Events] Use event classes for Extension plugins#43617Hackwar merged 8 commits intojoomla:5.2-devfrom
Conversation
PR Review 🔍
|
PR Code Suggestions ✨
|
|
I have tested this item ✅ successfully on 2461713 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43617. |
|
I have tested this item ✅ successfully on 2461713 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43617. |
|
🙈 no. Can I do that on a PBF server site? |
@crommie I think yes. They can later revert it to the initial state, as far as I know. |
|
I have not tested this item. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43617. |
|
I have tested this item ✅ successfully on 2461713 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43617. |
Just checking: does "reinstall core files" use the same process or is that entirely different? |
@crommie Reinstall core is ok, that also uses the Joomla Update component as if it was an update. P.S.: But you should be on the custom update URL created by Drone for this PR so the PR is still applied after the update. |
|
Hi @richard67, Based on your comment, I tested the Joomla Update process for this PR and it worked :) Thanks. |
|
Sure @richard67 , I will submit it again. Olivier just told me he didn't have rights to restore the human tests. ;( |
|
I have tested this item ✅ successfully on dcf15b1 Installed multiple extensions (and updated 1 of them and uninstalled them - just in case) successfully.. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43617. |
|
I have tested this item ✅ successfully on dcf15b1 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43617. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43617. |
|
Thank you for this contribution @Fedik. |
User description
Summary of Changes
Update
extensionandinstallerplugins to useSubscriberInterfaceevent classes.Testing Instructions
Test that extension installation works as before.
Joomla update also works as before.
Actual result BEFORE applying this Pull Request
Works
Expected result AFTER applying this Pull Request
Works
Link to documentations
Please select:
PR Type
Enhancement
Description
extensionandinstallerplugins to useSubscriberInterfaceevent classes.AbstractJoomlaUpdateEventclass and its concrete implementationsBeforeJoomlaUpdateEventandAfterJoomlaUpdateEvent.SubscriberInterfacefor various extension plugins and updated their methods to use event classes.Changes walkthrough 📝
9 files
UpdateModel.php
Use event classes for Joomla update processadministrator/components/com_joomlaupdate/src/Model/UpdateModel.php
BeforeJoomlaUpdateEventandAfterJoomlaUpdateEventinstead of triggering events directly.CoreEventAware.php
Map Joomla update events to core eventslibraries/src/Event/CoreEventAware.php
onJoomlaBeforeUpdateandonJoomlaAfterUpdateto the core eventmapping.
AbstractJoomlaUpdateEvent.php
Introduce abstract class for Joomla update eventslibraries/src/Event/Extension/AbstractJoomlaUpdateEvent.php
AbstractJoomlaUpdateEventfor Joomla updateevents.
AfterJoomlaUpdateEvent.php
Add AfterJoomlaUpdateEvent classlibraries/src/Event/Extension/AfterJoomlaUpdateEvent.php
AfterJoomlaUpdateEventclass extendingAbstractJoomlaUpdateEvent.BeforeJoomlaUpdateEvent.php
Add BeforeJoomlaUpdateEvent classlibraries/src/Event/Extension/BeforeJoomlaUpdateEvent.php
BeforeJoomlaUpdateEventclass extendingAbstractJoomlaUpdateEvent.Finder.php
Implement SubscriberInterface for Finder pluginplugins/extension/finder/src/Extension/Finder.php
SubscriberInterfacefor the Finder extension plugin.Joomla.php
Implement SubscriberInterface for Joomla pluginplugins/extension/joomla/src/Extension/Joomla.php
SubscriberInterfacefor the Joomla extension plugin.NamespaceMap.php
Implement SubscriberInterface for NamespaceMap pluginplugins/extension/namespacemap/src/Extension/NamespaceMap.php
SubscriberInterfacefor the NamespaceMap extension plugin.Override.php
Implement SubscriberInterface for Override pluginplugins/installer/override/src/Extension/Override.php
SubscriberInterfacefor the Override extension plugin.