Closed heelc29 closed 2 years ago
While technically true, I am not going to give that advice at this moment.
For now, I’d rather developers start refactoring their plugins by setting this property to false and changing their plugin methods to use Event.
Once they’ve got that right they can very easily upgrade to SubscriberInterface.
Essentially, I expect that people will try to skip over a critical part of the documentation and I want them to not suffer too much for it :)
Does that make sense to you as to why there’s a white lie in that part of the documentation?
Does that make sense to you as to why there’s a white lie in that part of the documentation?
Thats is ok for me :)
Summary of Changes
Adjustment in Plugins with SubscriberInterface
Reasoning
I think
set the protected property $allowLegacyListeners to false
is not required when the plugins implements the SubscriberInterface because of the early return in line 200 while the listeners are being registered.https://github.com/joomla/joomla-cms/blob/dc83b7001ff81d64cefd3f34efac56d47a90695a/libraries/src/Plugin/CMSPlugin.php#L194-L217