8000 [Validator] Fix TraceableValidator is reset on data collector instant… · symfony/symfony@f5855fb · GitHub
[go: up one dir, main page]

Skip to content

Commit f5855fb

Browse files
committed
[Validator] Fix TraceableValidator is reset on data collector instantiation
1 parent 5c46e39 commit f5855fb

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/validator_debug.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<service id="debug.validator" decorates="validator" decoration-priority="255" class="Symfony\Component\Validator\Validator\TraceableValidator">
1111
<argument type="service" id="debug.validator.inner" />
12+
<tag name="kernel.reset" method="reset" />
1213
</service>
1314

1415
<!-- DataCollector -->

src/Symfony/Component/Validator/DataCollector/ValidatorDataCollector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public function collect(Request $request, Response $response, \Exception $except
4545

4646
public function reset()
4747
{
48-
$this->validator->reset();
4948
$this->data = array(
5049
'calls' => $this->cloneVar(array()),
5150
'violations_count' => 0,

src/Symfony/Component/Validator/Tests/DataCollector/ValidatorDataCollectorTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ public function testReset()
7070

7171
$this->assertCount(0, $collector->getCalls());
7272
$this->assertSame(0, $collector->getViolationsCount());
73-
74-
$collector->lateCollect();
75-
76-
$this->assertCount(0, $collector->getCalls());
77-
$this->assertSame(0, $collector->getViolationsCount());
7873
}
7974

8075
protected function createMock($classname)

0 commit comments

Comments
 (0)
0