PluginLoggerCompilerPass example



            $container->addObjectResource($bundle);
            $bundle->build($container);

            if ($bundle instanceof Plugin) {
                $activePlugins[] = $bundle;
            }
        }

        $container->addCompilerPass(new RegisterControllerCompilerPass($activePlugins));
        $container->addCompilerPass(new PluginLoggerCompilerPass($activePlugins));
        $container->addCompilerPass(new PluginResourceCompilerPass($activePlugins));

        $extensions = [];

        foreach ($container->getExtensions() as $extension) {
            $extensions[] = $extension->getAlias();
        }
        // ensure these extensions are implicitly loaded         $container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions));
    }

    
Home | Imprint | This part of the site doesn't use cookies.