[Form] Fix error message in circular reference dependencies check
This commit is contained in:
parent
d3bc436cd2
commit
48eb43daed
@ -111,7 +111,7 @@ class FormRegistry implements FormRegistryInterface
|
||||
|
||||
if (isset($this->checkedTypes[$fqcn])) {
|
||||
$types = implode(' > ', array_merge(array_keys($this->checkedTypes), array($fqcn)));
|
||||
throw new LogicException(sprintf('Circular reference detected for form "%s" (%s).', $fqcn, $types));
|
||||
throw new LogicException(sprintf('Circular reference detected for form type "%s" (%s).', $fqcn, $types));
|
||||
}
|
||||
|
||||
$this->checkedTypes[$fqcn] = true;
|
||||
|
@ -162,7 +162,7 @@ class FormRegistryTest extends TestCase
|
||||
|
||||
/**
|
||||
* @expectedException \Symfony\Component\Form\Exception\LogicException
|
||||
* @expectedExceptionMessage Circular reference detected for form "Symfony\Component\Form\Tests\Fixtures\FormWithSameParentType" (Symfony\Component\Form\Tests\Fixtures\FormWithSameParentType > Symfony\Component\Form\Tests\Fixtures\FormWithSameParentType).
|
||||
* @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).
|
||||
*/
|
||||
public function testFormCannotHaveItselfAsAParent()
|
||||
{
|
||||
@ -175,7 +175,7 @@ class FormRegistryTest extends TestCase
|
||||
|
||||
/**
|
||||
* @expectedException \Symfony\Component\Form\Exception\LogicException
|
||||
* @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).
|
||||
* @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).
|
||||
*/
|
||||
public function testRecursiveFormDependencies()
|
||||
{
|
||||
|
Reference in New Issue
Block a user