for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the Zikula package.
*
* Copyright Zikula - https://ziku.la/
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Zikula\ExtensionsModule\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Zikula\ExtensionsModule\Collector\InstallerCollector;
class InstallerPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
if (!$container->hasDefinition(InstallerCollector::class)) {
return;
}
$definition = $container->findDefinition(InstallerCollector::class);
$taggedServices = $container->findTaggedServiceIds('zikula.extension_installer');
foreach ($taggedServices as $id => $tags) {
$definition->addMethodCall('add', [new Reference($id)]);