Skip to content

Commit d6f4c9b

Browse files
pierredupstof
authored andcommitted
[Form] Fix error message in circular reference dependencies check
1 parent 3dc3fd3 commit d6f4c9b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

FormRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private function resolveType(FormTypeInterface $type)
111111

112112
if (isset($this->checkedTypes[$fqcn])) {
113113
$types = implode(' > ', array_merge(array_keys($this->checkedTypes), array($fqcn)));
114-
throw new LogicException(sprintf('Circular reference detected for form "%s" (%s).', $fqcn, $types));
114+
throw new LogicException(sprintf('Circular reference detected for form type "%s" (%s).', $fqcn, $types));
115115
}
116116

117117
$this->checkedTypes[$fqcn] = true;

Tests/FormRegistryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function testGetTypeConnectsParent()
162162

163163
/**
164164
* @expectedException \Symfony\Component\Form\Exception\LogicException
165-
* @expectedExceptionMessage Circular reference detected for form "Symfony\Component\Form\Tests\Fixtures\FormWithSameParentType" (Symfony\Component\Form\Tests\Fixtures\FormWithSameParentType > Symfony\Component\Form\Tests\Fixtures\FormWithSameParentType).
165+
* @expectedExceptionMessage Circular reference detected for form type "Symfony\Component\Form\Tests\Fixtures\FormWithSameParentType" (Symfony\Component\Form\Tests\Fixtures\FormWithSameParentType > Symfony\Component\Form\Tests\Fixtures\FormWithSameParentType).
166166
*/
167167
public function testFormCannotHaveItselfAsAParent()
168168
{
@@ -175,7 +175,7 @@ public function testFormCannotHaveItselfAsAParent()
175175

176176
/**
177177
* @expectedException \Symfony\Component\Form\Exception\LogicException
178-
* @expectedExceptionMessage Circular reference detected for form "Symfony\Component\Form\Tests\Fixtures\RecursiveFormTypeFoo" (Symfony\Component\Form\Tests\Fixtures\RecursiveFormTypeFoo > Symfony\Component\Form\Tests\Fixtures\RecursiveFormTypeBar > Symfony\Component\Form\Tests\Fixtures\RecursiveFormTypeBaz > Symfony\Component\Form\Tests\Fixtures\RecursiveFormTypeFoo).
178+
* @expectedExceptionMessage Circular reference detected for form type "Symfony\Component\Form\Tests\Fixtures\RecursiveFormTypeFoo" (Symfony\Component\Form\Tests\Fixtures\RecursiveFormTypeFoo > Symfony\Component\Form\Tests\Fixtures\RecursiveFormTypeBar > Symfony\Component\Form\Tests\Fixtures\RecursiveFormTypeBaz > Symfony\Component\Form\Tests\Fixtures\RecursiveFormTypeFoo).
179179
*/
180180
public function testRecursiveFormDependencies()
181181
{

0 commit comments

Comments
 (0)