CoreFiles by mySites.guru
provider.php43 lines, 1,350 bytes, from Joomla_6.1.4-Stable-Full_Package.zip
Raw History Compare with 6.1.3
md5
2048f73e12b089ceffcfb33cf87faddd
sha1
bff6cf2f78ce76f7858e08421a41b2993b052f21
sha256
c3ab30c7a4084e2ef7c04f2fb60d0c1fe88a5b97dacb936f93c2d256e38b9a26
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Behaviour.compat6
 *
 * @copyright   (C) 2025 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\Behaviour\Compat6\Extension\Compat6;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     * @since   5.4.0
     */
    public function register(Container $container)
    {
        // The compatibility plugin is a special case which does not use the lazy loading because it
        // uses the constructor to load b/c code, the constructor might not be initialized when lazy loading is used.
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $plugin = new Compat6((array) PluginHelper::getPlugin('behaviour', 'compat6'));
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 28 releases, Joomla 6.1.0-beta1 to 6.2.1-rc1. See them all, or every version of this file.