* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ declare(strict_types=1); namespace Symfony\Component\DependencyInjection\Loader\Configurator; use PrestaShop\Module\Mbo\Addons\Subscriber\ModuleManagementEventSubscriber; if (!defined('_PS_VERSION_')) { exit; } return static function (ContainerConfigurator $container) { $services = $container->services(); // Only load event subscriber when module is enabled to avoid logging events if disabled if (\ps_mbo::checkModuleStatus()) { $services->set(ModuleManagementEventSubscriber::class) ->autowire() ->public() ->tag('kernel.event_subscriber'); } };