[Form] fixed FormConfigBuilder to use PropertyPathInterface

This commit is contained in:
Tobias Schultze 2012-08-26 08:29:26 +02:00
parent a52382344d
commit 596bbb1327

View File

@ -14,6 +14,7 @@ namespace Symfony\Component\Form;
use Symfony\Component\Form\Exception\FormException; use Symfony\Component\Form\Exception\FormException;
use Symfony\Component\Form\Exception\UnexpectedTypeException; use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\Util\PropertyPath; use Symfony\Component\Form\Util\PropertyPath;
use Symfony\Component\Form\Util\PropertyPathInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\EventDispatcher\ImmutableEventDispatcher; use Symfony\Component\EventDispatcher\ImmutableEventDispatcher;
@ -41,7 +42,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
private $name; private $name;
/** /**
* @var PropertyPath * @var PropertyPathInterface
*/ */
private $propertyPath; private $propertyPath;
@ -709,7 +710,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
throw new FormException('The config builder cannot be modified anymore.'); throw new FormException('The config builder cannot be modified anymore.');
} }
if (null !== $propertyPath && !$propertyPath instanceof PropertyPath) { if (null !== $propertyPath && !$propertyPath instanceof PropertyPathInterface) {
$propertyPath = new PropertyPath($propertyPath); $propertyPath = new PropertyPath($propertyPath);
} }