diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index e191cc9669..a2383948e7 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -126,8 +126,8 @@ class Form implements \IteratorAggregate, FormInterface */ public function __construct(FormConfigInterface $config) { - if (!$config instanceof UnmodifiableFormConfig) { - $config = new UnmodifiableFormConfig($config); + if (!$config instanceof ImmutableFormConfig) { + $config = new ImmutableFormConfig($config); } // Compound forms always need a data mapper, otherwise calls to @@ -152,7 +152,7 @@ class Form implements \IteratorAggregate, FormInterface /** * Returns the configuration of the form. * - * @return UnmodifiableFormConfig The form's immutable configuration. + * @return ImmutableFormConfig The form's immutable configuration. */ public function getConfig() { @@ -562,7 +562,7 @@ class Form implements \IteratorAggregate, FormInterface // Synchronize representations - must not change the content! $modelData = $this->normToModel($normData); $viewData = $this->normToView($normData); - + $synchronized = true; } catch (TransformationFailedException $e) { } diff --git a/src/Symfony/Component/Form/UnmodifiableFormConfig.php b/src/Symfony/Component/Form/ImmutableFormConfig.php similarity index 96% rename from src/Symfony/Component/Form/UnmodifiableFormConfig.php rename to src/Symfony/Component/Form/ImmutableFormConfig.php index cb586a8ca0..36bd867469 100644 --- a/src/Symfony/Component/Form/UnmodifiableFormConfig.php +++ b/src/Symfony/Component/Form/ImmutableFormConfig.php @@ -12,14 +12,14 @@ namespace Symfony\Component\Form; use Symfony\Component\Form\Util\PropertyPath; -use Symfony\Component\EventDispatcher\UnmodifiableEventDispatcher; +use Symfony\Component\EventDispatcher\ImmutableEventDispatcher; /** * A read-only form configuration. * * @author Bernhard Schussek */ -class UnmodifiableFormConfig implements FormConfigInterface +class ImmutableFormConfig implements FormConfigInterface { /** * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface @@ -134,8 +134,8 @@ class UnmodifiableFormConfig implements FormConfigInterface public function __construct(FormConfigInterface $config) { $dispatcher = $config->getEventDispatcher(); - if (!$dispatcher instanceof UnmodifiableEventDispatcher) { - $dispatcher = new UnmodifiableEventDispatcher($dispatcher); + if (!$dispatcher instanceof ImmutableEventDispatcher) { + $dispatcher = new ImmutableEventDispatcher($dispatcher); } $this->dispatcher = $dispatcher;