Files
haushalt/backend/vendor/doctrine/doctrine-bundle/src/DependencyInjection/Compiler/RemoveProfilerControllerPass.php
2026-03-24 00:04:55 +01:00

23 lines
642 B
PHP

<?php
declare(strict_types=1);
namespace Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler;
use Doctrine\Bundle\DoctrineBundle\Controller\ProfilerController;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/** @internal */
final class RemoveProfilerControllerPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container): void
{
if ($container->has('twig') && $container->has('profiler')) {
return;
}
$container->removeDefinition(ProfilerController::class);
}
}