8000 feature #24193 [FrameworkBundle] Reset stopwatch between requests (de… · symfony/symfony@816ad88 · GitHub
[go: up one dir, main page]

Skip to content

Commit 816ad88

Browse files
feature #24193 [FrameworkBundle] Reset stopwatch between requests (derrabus)
This PR was merged into the 3.4 branch. Discussion ---------- [FrameworkBundle] Reset stopwatch between requests | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23984 | License | MIT | Doc PR | N/A Follow-up to #24155. This PR ensures that the stopwatch is reset between requests. Commits ------- 7c3bdd9 Reset stopwatch.
2 parents 20be9fe + 7c3bdd9 commit 816ad88

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,10 @@ private function registerDebugConfiguration(array $config, ContainerBuilder $con
753753
$container->getDefinition('debug.debug_handlers_listener')->setPrivate(true);
754754

755755
if (class_exists(Stopwatch::class)) {
756-
$container->register('debug.stopwatch', Stopwatch::class)->addArgument(true)->setPrivate(true);
756+
$container->register('debug.stopwatch', Stopwatch::class)
757+
->addArgument(true)
758+
->setPrivate(true)
759+
->addTag('kernel.reset', array('method' => 'reset'));
757760
$container->setAlias(Stopwatch::class, new Alias('debug.stopwatch', false));
758761
}
759762

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"symfony/security-core": "~3.2|~4.0",
4747
"symfony/security-csrf": "~2.8|~3.0|~4.0",
4848
"symfony/serializer": "~3.3|~4.0",
49-
"symfony/stopwatch": "~2.8|~3.0|~4.0",
49+
"symfony/stopwatch": "~3.4|~4.0",
5050
"symfony/translation": "~3.4|~4.0",
5151
"symfony/templating": "~2.8|~3.0|~4.0",
5252
"symfony/validator": "~3.4|~4.0",
@@ -68,6 +68,7 @@
6868
"symfony/form": "<3.4",
6969
"symfony/property-info": "<3.3",
7070
"symfony/serializer": "<3.3",
71+
"symfony/stopwatch": "<3.4",
7172
"symfony/translation": "<3.4",
7273
"symfony/validator": "<3.4",
7374
"symfony/workflow": "<3.3"

0 commit comments

Comments
 (0)
0