Skip to content

Commit f236027

Browse files
committed
Доработки
1 parent 20ecf07 commit f236027

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Resources/config/extensions.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Symfony\Bridge\Twig\Extension\CodeExtension;
77
use Symfony\Bridge\Twig\Extension\ProfilerExtension;
88
use Symfony\Bridge\Twig\Extension\StopwatchExtension;
9+
use Twig\Profiler\Profile;
910

1011
return static function (ContainerConfigurator $container) {
1112
$container->services()
@@ -19,6 +20,11 @@
1920
->set('twig.extension.debug.stopwatch', StopwatchExtension::class)
2021
->args([service('debug.stopwatch')->ignoreOnInvalid(), param('kernel.debug')])
2122

23+
->set('twig.extension.profiler', ProfilerExtension::class)
24+
->args([service('twig.profile'), service('debug.stopwatch')->ignoreOnInvalid()])
25+
26+
->set('twig.profile', Profile::class)
27+
2228
->set('data_collector.twig', TwigDataCollector::class)
2329
->args([service('twig.profile'), service('twig')])
2430
->tag('data_collector', ['template' => '@WebProfiler/Collector/twig.html.twig', 'id' => 'twig', 'priority' => 257])

0 commit comments

Comments
 (0)