[5.4] CMSPlugin: deprecation for registerListeners#43395
[5.4] CMSPlugin: deprecation for registerListeners#43395HLeithner merged 23 commits intojoomla:5.4-devfrom
Conversation
|
make sense for me |
|
I guess it was not marked as deprecated before becaus we changed the plugins way later. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Ah, wait, I wanted to write different, not in 5.4 but in 6.0.
|
|
Introducing a new Interface makes no sense to me, just remove the Only call the |
That is not possible, we already discussed that. It will be b/k break. |
|
yes I know, but not if you check if the function is overridden or? |
|
Maybe, but checking whether function is overridden would require use of reflection for every plugin. Use of interface is much cleaner. |
|
Yeah the interface might be cleaner, but it also means a 3rd party dev needs to touch the plugin for this reason 2 times... An alternativ could be to override the methods in with dummy/empty methods in core this would not initialise the object and wouldn't need to be removed (even if it should) later to be b/c. especially if you like that your plugin works between 4.0 and 7.4 it's hard (not really possible with out defining your own poly-fill) to use a new interface, |
|
Agree here with @HLeithner, as removing the interface will be problematic. I keep my extensions at least the two major version compatible, when not even three. So having a required interface in 6 which get removed in 8 and is still used in 7 would be problematic. |
I'm fine with this. In the provider.php the plugin knows if the setDispatcher function exists or not to inject the dispatcher. |
|
I removed the extra interface from the PR. |
|
I have tested this item ✅ successfully on bff97f4 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43395. |
|
The PR for the manual joomla/Manual#422 is made for the |
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
|
I've restored @laoneo 's test result in the issue tracker as the commit which invalidated the test count was just a grammar change in a comment. |
|
I have tested this item ✅ successfully on bb9a233 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43395. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43395. |
|
thanks all for participation |
Pull Request for Issue # .
Summary of Changes
The PR deprecate
CMSPlugin::registerListeners()as no longer needed when plugin will implementSubscriberInterface(I wonder why it was not marked as deprecated before).
Testing Instructions
Apply PR, and navigate around the site, all should work as before.
The PR requires review from maintainers.
Link to documentations
Please select:
Ping @HLeithner @wilsonge