Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x][RFC] CMSPlugin: Lazy subscriber interface and decorator #43658

Open
wants to merge 16 commits into
base: 5.2-dev
Choose a base branch
from
Prev Previous commit
Next Next commit
LazyServiceEventSubscriber
  • Loading branch information
Fedik committed Jun 14, 2024
commit 07f3548a44d9f8add9889b9cb5c3c26d0b33db72
4 changes: 2 additions & 2 deletions libraries/src/Plugin/PluginHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Joomla\CMS\Plugin;

use Joomla\CMS\Cache\Exception\CacheExceptionInterface;
use Joomla\CMS\Event\LazyServiceEventSubscriber;
use Joomla\CMS\Event\LazyEventSubscriberInterface;
use Joomla\CMS\Factory;
use Joomla\Event\DispatcherAwareInterface;
use Joomla\Event\DispatcherInterface;
Expand Down Expand Up @@ -241,7 +241,7 @@ protected static function import($plugin, $autocreate = true, DispatcherInterfac
return;
}

if ($plugin instanceof LazyServiceEventSubscriber) {
if ($plugin instanceof LazyEventSubscriberInterface) {
foreach ($plugin->getEventsAndListeners() as $eventName => $params) {
if (\is_array($params) && !\is_callable($params)) {
$callback = !\is_string($params[0]) && \is_callable($params[0]) ? $params[0] : [$plugin, $params[0]];
Expand Down