mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-05 09:04:19 +01:00
N°7059 - Symfony 6.4 - Application skeleton (#587)
Mise en place d'un squelette temporaire fonctionnel d'application Symfony. - Ajout bundles debug & runtime pour une implémentation standard - Configuration minimale - .env file in specific directory - Frontal application app.php
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Bundle\DebugBundle\DependencyInjection\Compiler;
|
||||
|
||||
use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
/**
|
||||
* Registers the file link format for the {@link \Symfony\Component\HttpKernel\DataCollector\DumpDataCollector}.
|
||||
*
|
||||
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
|
||||
*/
|
||||
class DumpDataCollectorPass implements CompilerPassInterface
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->hasDefinition('data_collector.dump')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$definition = $container->getDefinition('data_collector.dump');
|
||||
|
||||
if (!$container->has('.virtual_request_stack')) {
|
||||
$definition->replaceArgument(3, new Reference('request_stack'));
|
||||
}
|
||||
|
||||
if (!$container->hasParameter('web_profiler.debug_toolbar.mode') || WebDebugToolbarListener::DISABLED === $container->getParameter('web_profiler.debug_toolbar.mode')) {
|
||||
$definition->replaceArgument(3, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user