Skip to content
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
22cd621
Remove use of deprecated dispatcher: actionlog, api-auth
Fedik Jun 19, 2025
9849067
Remove use of deprecated dispatcher: auth
Fedik Jun 19, 2025
68774df
Remove use of deprecated dispatcher: behavior
Fedik Jun 19, 2025
4526f73
Remove use of deprecated dispatcher: content
Fedik Jun 19, 2025
43d91ef
Remove use of deprecated dispatcher: editors
Fedik Jun 19, 2025
16a1712
Remove use of deprecated dispatcher: editors btn
Fedik Jun 19, 2025
1061a8b
Remove use of deprecated dispatcher: extensions
Fedik Jun 19, 2025
3b2f1ba
Remove use of deprecated dispatcher: fields
Fedik Jun 19, 2025
7450906
Remove use of deprecated dispatcher: fs
Fedik Jun 19, 2025
9b7a429
Remove use of deprecated dispatcher: innstaller
Fedik Jun 19, 2025
56dd710
Remove use of deprecated dispatcher: media action
Fedik Jun 19, 2025
d35bed8
Remove use of deprecated dispatcher: multifactor
Fedik Jun 19, 2025
a8eea23
Remove use of deprecated dispatcher: privacy
Fedik Jun 19, 2025
160ab84
Remove use of deprecated dispatcher: icons
Fedik Jun 19, 2025
dd54c7e
Remove use of deprecated dispatcher: sampledata
Fedik Jun 19, 2025
d9cf997
Remove use of deprecated dispatcher: schemaorg
Fedik Jun 19, 2025
933c825
Remove use of deprecated dispatcher: system
Fedik Jun 19, 2025
eb98fc7
Remove use of deprecated dispatcher: task
Fedik Jun 19, 2025
acae339
Remove use of deprecated dispatcher: user
Fedik Jun 19, 2025
aa23b6d
Remove use of deprecated dispatcher: webservice
Fedik Jun 19, 2025
9810643
Remove use of deprecated dispatcher: workflow
Fedik Jun 19, 2025
b21b24e
Remove use of deprecated dispatcher: finder
Fedik Jun 23, 2025
7d7e4c8
Merge branch '5.4-dev' into plugin-remove-deprecated-dispatcher
Fedik Jun 23, 2025
1ca187f
cs
Fedik Jun 23, 2025
5d37d89
test fix
Fedik Jun 23, 2025
deb82de
test fix
Fedik Jun 23, 2025
bacdfe0
test fix
Fedik Jun 23, 2025
f31ba45
Merge branch '5.4-dev' into plugin-remove-deprecated-dispatcher
richard67 Jul 1, 2025
99a1e95
Merge branch '5.4-dev' into plugin-remove-deprecated-dispatcher
muhme Jul 9, 2025
d2b3978
Merge branch '5.4-dev' into plugin-remove-deprecated-dispatcher
Fedik Jul 14, 2025
ba07fd2
Merge branch '5.4-dev' into plugin-remove-deprecated-dispatcher
muhme Aug 1, 2025
593267a
Merge branch '5.4-dev' into plugin-remove-deprecated-dispatcher
muhme Aug 3, 2025
dccea2b
phpstan
Fedik Aug 4, 2025
5d4db12
phpstan
Fedik Aug 4, 2025
7ba87f3
Merge branch '5.4-dev' into plugin-remove-deprecated-dispatcher
richard67 Aug 15, 2025
3312abf
Merge branch '5.4-dev' into plugin-remove-deprecated-dispatcher
richard67 Aug 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions administrator/components/com_finder/src/Indexer/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,21 @@ abstract class Adapter extends CMSPlugin
/**
* Method to instantiate the indexer adapter.
*
* @param DispatcherInterface $dispatcher The object to observe.
* @param array $config An array that holds the plugin configuration.
*
* @since 2.5
*/
public function __construct(DispatcherInterface $dispatcher, array $config)
public function __construct($config)
{
// Call the parent constructor.
parent::__construct($dispatcher, $config);
if ($config instanceof DispatcherInterface) {
$dispatcher = $config;
$config = \func_num_args() > 1 ? func_get_arg(1) : [];

parent::__construct($dispatcher, $config);
} else {
parent::__construct($config);
}

// Get the type id.
$this->type_id = $this->getTypeId();
Expand Down
70 changes: 70 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -17382,6 +17382,16 @@ parameters:
count: 2
path: plugins/content/confirmconsent/src/Field/ConsentBoxField.php

-
message: '''
#^Call to deprecated method setDispatcher\(\) of class Joomla\\Plugin\\Content\\Finder\\Extension\\Finder\:
5\.2 will be removed in 7\.0
Plugin should implement DispatcherAwareInterface on its own, when it is needed\.$#
'''
identifier: method.deprecated
count: 1
path: plugins/content/finder/services/provider.php

-
message: '''
#^Call to deprecated method getDispatcher\(\) of class Joomla\\Plugin\\Content\\Finder\\Extension\\Finder\:
Expand Down Expand Up @@ -17485,6 +17495,16 @@ parameters:
count: 2
path: plugins/editors/codemirror/layouts/editors/codemirror/codemirror.php

-
message: '''
#^Call to deprecated method setDispatcher\(\) of class Joomla\\Plugin\\Editors\\CodeMirror\\Extension\\Codemirror\:
5\.2 will be removed in 7\.0
Plugin should implement DispatcherAwareInterface on its own, when it is needed\.$#
'''
identifier: method.deprecated
count: 1
path: plugins/editors/codemirror/services/provider.php

-
message: '''
#^Call to deprecated method getDispatcher\(\) of class Joomla\\Plugin\\Editors\\CodeMirror\\Extension\\Codemirror\:
Expand All @@ -17495,6 +17515,16 @@ parameters:
count: 1
path: plugins/editors/codemirror/src/Extension/Codemirror.php

-
message: '''
#^Call to deprecated method setDispatcher\(\) of class Joomla\\Plugin\\Editors\\None\\Extension\\None\:
5\.2 will be removed in 7\.0
Plugin should implement DispatcherAwareInterface on its own, when it is needed\.$#
'''
identifier: method.deprecated
count: 1
path: plugins/editors/none/services/provider.php

-
message: '''
#^Call to deprecated method getDispatcher\(\) of class Joomla\\Plugin\\Editors\\None\\Extension\\None\:
Expand All @@ -17505,6 +17535,16 @@ parameters:
count: 1
path: plugins/editors/none/src/Extension/None.php

-
message: '''
#^Call to deprecated method setDispatcher\(\) of class Joomla\\Plugin\\Editors\\TinyMCE\\Extension\\TinyMCE\:
5\.2 will be removed in 7\.0
Plugin should implement DispatcherAwareInterface on its own, when it is needed\.$#
'''
identifier: method.deprecated
count: 1
path: plugins/editors/tinymce/services/provider.php

-
message: '''
#^Call to deprecated method getDispatcher\(\) of class Joomla\\Plugin\\Editors\\TinyMCE\\Extension\\TinyMCE\:
Expand Down Expand Up @@ -17718,6 +17758,16 @@ parameters:
count: 2
path: plugins/system/actionlogs/src/Extension/ActionLogs.php

-
message: '''
#^Call to deprecated method setDispatcher\(\) of class Joomla\\Plugin\\System\\Cache\\Extension\\Cache\:
5\.2 will be removed in 7\.0
Plugin should implement DispatcherAwareInterface on its own, when it is needed\.$#
'''
identifier: method.deprecated
count: 1
path: plugins/system/cache/services/provider.php

-
message: '''
#^Call to deprecated method getDispatcher\(\) of class Joomla\\Plugin\\System\\Cache\\Extension\\Cache\:
Expand Down Expand Up @@ -17921,6 +17971,16 @@ parameters:
count: 1
path: plugins/system/languagefilter/src/Extension/LanguageFilter.php

-
message: '''
#^Call to deprecated method setDispatcher\(\) of class Joomla\\Plugin\\System\\Schemaorg\\Extension\\Schemaorg\:
5\.2 will be removed in 7\.0
Plugin should implement DispatcherAwareInterface on its own, when it is needed\.$#
'''
identifier: method.deprecated
count: 1
path: plugins/system/schemaorg/services/provider.php

-
message: '''
#^Call to deprecated method getDispatcher\(\) of class Joomla\\Plugin\\System\\Schemaorg\\Extension\\Schemaorg\:
Expand All @@ -17931,6 +17991,16 @@ parameters:
count: 4
path: plugins/system/schemaorg/src/Extension/Schemaorg.php

-
message: '''
#^Call to deprecated method setDispatcher\(\) of class Joomla\\Plugin\\System\\Shortcut\\Extension\\Shortcut\:
5\.2 will be removed in 7\.0
Plugin should implement DispatcherAwareInterface on its own, when it is needed\.$#
'''
identifier: method.deprecated
count: 1
path: plugins/system/shortcut/services/provider.php

-
message: '''
#^Call to deprecated method getDispatcher\(\) of class Joomla\\Plugin\\System\\Shortcut\\Extension\\Shortcut\:
Expand Down
2 changes: 0 additions & 2 deletions plugins/actionlog/joomla/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Joomla\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Actionlog\Joomla\Extension\Joomla;

return new class () implements ServiceProviderInterface {
Expand All @@ -36,7 +35,6 @@ public function register(Container $container)
PluginInterface::class,
function (Container $container) {
$plugin = new Joomla(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('actionlog', 'joomla')
);
$plugin->setApplication(Factory::getApplication());
Expand Down
6 changes: 2 additions & 4 deletions plugins/actionlog/joomla/src/Extension/Joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use Joomla\Component\Actionlogs\Administrator\Plugin\ActionLogPlugin;
use Joomla\Database\DatabaseAwareTrait;
use Joomla\Database\Exception\ExecutionFailureException;
use Joomla\Event\DispatcherInterface;
use Joomla\Event\Event;
use Joomla\Event\SubscriberInterface;
use Joomla\Utilities\ArrayHelper;
Expand Down Expand Up @@ -78,14 +77,13 @@ final class Joomla extends ActionLogPlugin implements SubscriberInterface
/**
* Constructor.
*
* @param DispatcherInterface $dispatcher The dispatcher
* @param array $config An optional associative array of configuration settings
*
* @since 3.9.0
*/
public function __construct(DispatcherInterface $dispatcher, array $config)
public function __construct(array $config)
{
parent::__construct($dispatcher, $config);
parent::__construct($config);

$params = ComponentHelper::getComponent('com_actionlogs')->getParams();

Expand Down
2 changes: 0 additions & 2 deletions plugins/api-authentication/basic/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Joomla\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\ApiAuthentication\Basic\Extension\Basic;

return new class () implements ServiceProviderInterface {
Expand All @@ -36,7 +35,6 @@ public function register(Container $container)
PluginInterface::class,
function (Container $container) {
$plugin = new Basic(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('api-authentication', 'basic'),
);
$plugin->setApplication(Factory::getApplication());
Expand Down
2 changes: 0 additions & 2 deletions plugins/api-authentication/token/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Joomla\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Filter\InputFilter;
use Joomla\Plugin\ApiAuthentication\Token\Extension\Token;

Expand All @@ -37,7 +36,6 @@ public function register(Container $container)
PluginInterface::class,
function (Container $container) {
$plugin = new Token(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('api-authentication', 'token'),
new InputFilter()
);
Expand Down
6 changes: 2 additions & 4 deletions plugins/api-authentication/token/src/Extension/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\Database\DatabaseAwareTrait;
use Joomla\Database\ParameterType;
use Joomla\Event\DispatcherInterface;
use Joomla\Event\SubscriberInterface;
use Joomla\Filter\InputFilter;

Expand Down Expand Up @@ -74,15 +73,14 @@ public static function getSubscribedEvents(): array
/**
* Constructor.
*
* @param DispatcherInterface $dispatcher The dispatcher
* @param array $config An optional associative array of configuration settings
* @param InputFilter $filter The input filter
*
* @since 4.2.0
*/
public function __construct(DispatcherInterface $dispatcher, array $config, InputFilter $filter)
public function __construct(array $config, InputFilter $filter)
{
parent::__construct($dispatcher, $config);
parent::__construct($config);

$this->filter = $filter;
}
Expand Down
2 changes: 0 additions & 2 deletions plugins/authentication/cookie/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Joomla\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Authentication\Cookie\Extension\Cookie;

return new class () implements ServiceProviderInterface {
Expand All @@ -36,7 +35,6 @@ public function register(Container $container)
PluginInterface::class,
function (Container $container) {
$plugin = new Cookie(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('authentication', 'cookie')
);
$plugin->setApplication(Factory::getApplication());
Expand Down
2 changes: 0 additions & 2 deletions plugins/authentication/joomla/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Joomla\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Authentication\Joomla\Extension\Joomla;

return new class () implements ServiceProviderInterface {
Expand All @@ -36,7 +35,6 @@ public function register(Container $container)
PluginInterface::class,
function (Container $container) {
$plugin = new Joomla(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('authentication', 'joomla')
);
$plugin->setApplication(Factory::getApplication());
Expand Down
2 changes: 0 additions & 2 deletions plugins/authentication/ldap/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Authentication\Ldap\Extension\Ldap;
use Joomla\Plugin\Authentication\Ldap\Factory\LdapFactory;

Expand All @@ -36,7 +35,6 @@ public function register(Container $container)
function (Container $container) {
$plugin = new Ldap(
new LdapFactory(),
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('authentication', 'ldap')
);
$plugin->setApplication(Factory::getApplication());
Expand Down
6 changes: 2 additions & 4 deletions plugins/authentication/ldap/src/Extension/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Joomla\CMS\Event\User\AuthenticationEvent;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Event\DispatcherInterface;
use Joomla\Event\SubscriberInterface;
use Joomla\Plugin\Authentication\Ldap\Factory\LdapFactoryInterface;
use Symfony\Component\Ldap\Entry;
Expand Down Expand Up @@ -45,16 +44,15 @@ final class Ldap extends CMSPlugin implements SubscriberInterface
* Constructor
*
* @param LdapFactoryInterface $factory The Ldap factory
* @param DispatcherInterface $dispatcher The object to observe
* @param array $config An optional associative array of configuration settings.
* Recognized key values include 'name', 'group', 'params', 'language'
* (this list is not meant to be comprehensive).
*
* @since 4.3.0
*/
public function __construct(LdapFactoryInterface $factory, DispatcherInterface $dispatcher, array $config = [])
public function __construct(LdapFactoryInterface $factory, array $config = [])
{
parent::__construct($dispatcher, $config);
parent::__construct($config);

$this->factory = $factory;
}
Expand Down
6 changes: 1 addition & 5 deletions plugins/behaviour/compat/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Behaviour\Compat\Extension\Compat;

return new class () implements ServiceProviderInterface {
Expand All @@ -32,10 +31,7 @@ public function register(Container $container)
$container->set(
PluginInterface::class,
function (Container $container) {
$plugin = PluginHelper::getPlugin('behaviour', 'compat');
$dispatcher = $container->get(DispatcherInterface::class);

$plugin = new Compat($dispatcher, (array) $plugin);
$plugin = new Compat((array) PluginHelper::getPlugin('behaviour', 'compat'));
$plugin->setApplication(Factory::getApplication());

return $plugin;
Expand Down
6 changes: 2 additions & 4 deletions plugins/behaviour/compat/src/Extension/Compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

use Joomla\CMS\Event\Application\AfterInitialiseDocumentEvent;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Event\DispatcherInterface;
use Joomla\Event\Priority;
use Joomla\Event\SubscriberInterface;

Expand Down Expand Up @@ -49,16 +48,15 @@ public static function getSubscribedEvents(): array
/**
* Constructor
*
* @param DispatcherInterface $dispatcher The event dispatcher
* @param array $config An optional associative array of configuration settings.
* Recognized key values include 'name', 'group', 'params', 'language'
* (this list is not meant to be comprehensive).
*
* @since 1.5
*/
public function __construct(DispatcherInterface $dispatcher, array $config = [])
public function __construct(array $config = [])
{
parent::__construct($dispatcher, $config);
parent::__construct($config);

/**
* Normally we should never use the constructor to execute any logic which would
Expand Down
6 changes: 1 addition & 5 deletions plugins/behaviour/compat6/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Behaviour\Compat6\Extension\Compat6;

return new class () implements ServiceProviderInterface {
Expand All @@ -32,10 +31,7 @@ public function register(Container $container)
$container->set(
PluginInterface::class,
function (Container $container) {
$plugin = PluginHelper::getPlugin('behaviour', 'compat6');
$dispatcher = $container->get(DispatcherInterface::class);

$plugin = new Compat6($dispatcher, (array) $plugin);
$plugin = new Compat6((array) PluginHelper::getPlugin('behaviour', 'compat6'));
$plugin->setApplication(Factory::getApplication());

return $plugin;
Expand Down
Loading
Loading