add menuitem aliases
This commit is contained in:
parent
70b39515ec
commit
9781bd561f
13 changed files with 713 additions and 212 deletions
|
@ -1,10 +1,12 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
|
||||
use Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle;
|
||||
use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle;
|
||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||
use Symfony\Bundle\MakerBundle\MakerBundle;
|
||||
use Symfony\Bundle\TwigBundle\TwigBundle;
|
||||
use Symfony\Bundle\WebProfilerBundle\WebProfilerBundle;
|
||||
|
||||
return [
|
||||
FrameworkBundle::class => [
|
||||
|
@ -22,4 +24,12 @@ return [
|
|||
TwigBundle::class => [
|
||||
'all' => true,
|
||||
],
|
||||
DoctrineFixturesBundle::class => [
|
||||
'dev' => true,
|
||||
'test' => true,
|
||||
],
|
||||
WebProfilerBundle::class => [
|
||||
'dev' => true,
|
||||
'test' => true,
|
||||
],
|
||||
];
|
||||
|
|
29
config/packages/web_profiler.php
Normal file
29
config/packages/web_profiler.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
if ($containerConfigurator->env() === 'dev') {
|
||||
$containerConfigurator->extension('web_profiler', [
|
||||
'toolbar' => true,
|
||||
'intercept_redirects' => false,
|
||||
]);
|
||||
$containerConfigurator->extension('framework', [
|
||||
'profiler' => [
|
||||
'only_exceptions' => false,
|
||||
'collect_serializer_data' => true,
|
||||
],
|
||||
]);
|
||||
}
|
||||
if ($containerConfigurator->env() === 'test') {
|
||||
$containerConfigurator->extension('web_profiler', [
|
||||
'toolbar' => false,
|
||||
'intercept_redirects' => false,
|
||||
]);
|
||||
$containerConfigurator->extension('framework', [
|
||||
'profiler' => [
|
||||
'collect' => false,
|
||||
],
|
||||
]);
|
||||
}
|
||||
};
|
12
config/routes/web_profiler.php
Normal file
12
config/routes/web_profiler.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||
|
||||
return static function (RoutingConfigurator $routingConfigurator): void {
|
||||
if ($routingConfigurator->env() === 'dev') {
|
||||
$routingConfigurator->import('@WebProfilerBundle/Resources/config/routing/wdt.xml')
|
||||
->prefix('/_wdt');
|
||||
$routingConfigurator->import('@WebProfilerBundle/Resources/config/routing/profiler.xml')
|
||||
->prefix('/_profiler');
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue