Register ImportCompilerPass in AppKernel

This commit is contained in:
Yassine Guedidi 2024-02-19 00:53:59 +01:00
parent 24da70e338
commit 6879bb2435
2 changed files with 6 additions and 8 deletions

View file

@ -3,6 +3,7 @@
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel;
use Wallabag\CoreBundle\Import\ImportCompilerPass;
class AppKernel extends Kernel
{
@ -98,6 +99,11 @@ class AppKernel extends Kernel
});
}
protected function build(ContainerBuilder $container)
{
$container->addCompilerPass(new ImportCompilerPass());
}
private function processDatabaseParameters(ContainerBuilder $container)
{
switch ($container->getParameter('database_driver')) {

View file

@ -2,16 +2,8 @@
namespace Wallabag\CoreBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Wallabag\CoreBundle\Import\ImportCompilerPass;
class WallabagCoreBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new ImportCompilerPass());
}
}