Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[Form] Reorganized code into "form extensions"

The extension classes are now the only constructor argument of the FormFactory class. They replace the existing "type loader" classes.

    new FormFactory(array(
        new CoreExtension($validator, $storage),
        new CsrfExtension($csrfProvider),
        new DoctrineOrmExtension($em),
    ));

Together with a few upcoming commits this mechanism will make

 * extension of the form framework in bundles and
 * usage of the forms outside of Symfony2

much easier.
  • Loading branch information...
commit fc5c541bc5d60a0808dc15d8bbc69f5c02aa494a 1 parent 3e321fa
Bernhard Schussek authored April 22, 2011

Showing 89 changed files with 578 additions and 357 deletions. Show diff stats Hide diff stats

  1. 107  AbstractExtension.php
  2. 7  {Type → }/AbstractType.php
  3. 2  {DataTransformer → }/CallbackTransformer.php
  4. 4  {Validator → }/CallbackValidator.php
  5. 4  {DataMapper → }/DataMapperInterface.php
  6. 2  {DataTransformer → }/DataTransformerInterface.php
  7. 2  {DataTransformer → Exception}/TransformationFailedException.php
  8. 4  { → Extension/Core}/ChoiceList/ArrayChoiceList.php
  9. 2  { → Extension/Core}/ChoiceList/ChoiceListInterface.php
  10. 2  { → Extension/Core}/ChoiceList/MonthChoiceList.php
  11. 2  { → Extension/Core}/ChoiceList/PaddedChoiceList.php
  12. 2  { → Extension/Core}/ChoiceList/TimezoneChoiceList.php
  13. 43  Type/Loader/DefaultTypeLoader.php → Extension/Core/CoreExtension.php
  14. 25  Type/Guesser/ValidatorTypeGuesser.php → Extension/Core/CoreTypeGuesser.php
  15. 3  { → Extension/Core}/DataMapper/PropertyPathMapper.php
  16. 6  { → Extension/Core}/DataTransformer/ArrayToBooleanChoicesTransformer.php
  17. 4  { → Extension/Core}/DataTransformer/ArrayToChoicesTransformer.php
  18. 4  { → Extension/Core}/DataTransformer/ArrayToPartsTransformer.php
  19. 4  { → Extension/Core}/DataTransformer/BaseDateTimeTransformer.php
  20. 4  { → Extension/Core}/DataTransformer/BooleanToStringTransformer.php
  21. 4  { → Extension/Core}/DataTransformer/DataTransformerChain.php
  22. 3  { → Extension/Core}/DataTransformer/DateTimeToArrayTransformer.php
  23. 3  { → Extension/Core}/DataTransformer/DateTimeToLocalizedStringTransformer.php
  24. 3  { → Extension/Core}/DataTransformer/DateTimeToStringTransformer.php
  25. 3  { → Extension/Core}/DataTransformer/DateTimeToTimestampTransformer.php
  26. 5  { → Extension/Core}/DataTransformer/FileToArrayTransformer.php
  27. 5  { → Extension/Core}/DataTransformer/FileToStringTransformer.php
  28. 4  { → Extension/Core}/DataTransformer/IntegerToLocalizedStringTransformer.php
  29. 2  { → Extension/Core}/DataTransformer/MoneyToLocalizedStringTransformer.php
  30. 4  { → Extension/Core}/DataTransformer/NumberToLocalizedStringTransformer.php
  31. 4  { → Extension/Core}/DataTransformer/PercentToLocalizedStringTransformer.php
  32. 6  { → Extension/Core}/DataTransformer/ScalarToBooleanChoicesTransformer.php
  33. 3  { → Extension/Core}/DataTransformer/ScalarToChoiceTransformer.php
  34. 4  { → Extension/Core}/DataTransformer/ValueToDuplicatesTransformer.php
  35. 2  { → Extension/Core}/EventListener/FixFileUploadListener.php
  36. 2  { → Extension/Core}/EventListener/FixRadioInputListener.php
  37. 2  { → Extension/Core}/EventListener/FixUrlProtocolListener.php
  38. 2  { → Extension/Core}/EventListener/ResizeFormListener.php
  39. 2  { → Extension/Core}/EventListener/TrimListener.php
  40. 3  { → Extension/Core}/Type/BirthdayType.php
  41. 5  { → Extension/Core}/Type/CheckboxType.php
  42. 19  { → Extension/Core}/Type/ChoiceType.php
  43. 5  { → Extension/Core}/Type/CollectionType.php
  44. 3  { → Extension/Core}/Type/CountryType.php
  45. 15  { → Extension/Core}/Type/DateTimeType.php
  46. 17  { → Extension/Core}/Type/DateType.php
  47. 3  { → Extension/Core}/Type/EmailType.php
  48. 9  { → Extension/Core}/Type/FieldType.php
  49. 13  { → Extension/Core}/Type/FileType.php
  50. 7  { → Extension/Core}/Type/FormType.php
  51. 3  { → Extension/Core}/Type/HiddenType.php
  52. 5  { → Extension/Core}/Type/IntegerType.php
  53. 3  { → Extension/Core}/Type/LanguageType.php
  54. 3  { → Extension/Core}/Type/LocaleType.php
  55. 5  { → Extension/Core}/Type/MoneyType.php
  56. 5  { → Extension/Core}/Type/NumberType.php
  57. 3  { → Extension/Core}/Type/PasswordType.php
  58. 5  { → Extension/Core}/Type/PercentType.php
  59. 5  { → Extension/Core}/Type/RadioType.php
  60. 5  { → Extension/Core}/Type/RepeatedType.php
  61. 3  { → Extension/Core}/Type/TextType.php
  62. 3  { → Extension/Core}/Type/TextareaType.php
  63. 13  { → Extension/Core}/Type/TimeType.php
  64. 5  { → Extension/Core}/Type/TimezoneType.php
  65. 5  { → Extension/Core}/Type/UrlType.php
  66. 3  { → Extension/Core}/Validator/DefaultValidator.php
  67. 3  { → Extension/Core}/Validator/DelegatingValidator.php
  68. 37  Extension/Csrf/CsrfExtension.php
  69. 2  { → Extension/Csrf}/CsrfProvider/CsrfProviderInterface.php
  70. 2  { → Extension/Csrf}/CsrfProvider/DefaultCsrfProvider.php
  71. 2  { → Extension/Csrf}/CsrfProvider/SessionCsrfProvider.php
  72. 27  { → Extension/Csrf}/Type/CsrfType.php
  73. 69  Extension/DependencyInjection/DependencyInjectionExtension.php
  74. 17  Form.php
  75. 6  FormBuilder.php
  76. 10  Type/Loader/TypeLoaderInterface.php → FormExtensionInterface.php
  77. 95  FormFactory.php
  78. 76  FormTypeGuesserChain.php
  79. 13  Type/Guesser/TypeGuesserInterface.php → FormTypeGuesserInterface.php
  80. 7  {Type → }/FormTypeInterface.php
  81. 4  {Validator → }/FormValidatorInterface.php
  82. 1  FormView.php
  83. 2  {Type/Guesser → Guess}/Guess.php
  84. 2  {Type/Guesser → Guess}/TypeGuess.php
  85. 2  {Type/Guesser → Guess}/ValueGuess.php
  86. 2  Resources/config/validation.xml
  87. 2  {DataTransformer → }/ReversedTransformer.php
  88. 41  Type/Loader/ArrayTypeLoader.php
  89. 44  Type/Loader/TypeLoaderChain.php
107  AbstractExtension.php
... ...
@@ -0,0 +1,107 @@
  1
+<?php
  2
+
  3
+/*
  4
+ * This file is part of the Symfony package.
  5
+ *
  6
+ * (c) Fabien Potencier <fabien@symfony.com>
  7
+ *
  8
+ * For the full copyright and license information, please view the LICENSE
  9
+ * file that was distributed with this source code.
  10
+ */
  11
+
  12
+namespace Symfony\Component\Form;
  13
+
  14
+use Symfony\Component\Form\Exception\FormException;
  15
+use Symfony\Component\Form\Exception\UnexpectedTypeException;
  16
+
  17
+/**
  18
+ * @author Bernhard Schussek <bernhard.schussek@symfony.com>
  19
+ */
  20
+abstract class AbstractExtension implements FormExtensionInterface
  21
+{
  22
+    /**
  23
+     * @var array
  24
+     */
  25
+    private $types;
  26
+
  27
+    /**
  28
+     * @var Boolean
  29
+     */
  30
+    private $typesLoaded = false;
  31
+
  32
+    /**
  33
+     * @var FormTypeGuesserInterface
  34
+     */
  35
+    private $typeGuesser;
  36
+
  37
+    /**
  38
+     * @var Boolean
  39
+     */
  40
+    private $typeGuesserLoaded = false;
  41
+
  42
+    abstract protected function loadTypes();
  43
+
  44
+    abstract protected function loadTypeGuesser();
  45
+
  46
+    private function initTypes()
  47
+    {
  48
+        $this->typesLoaded = true;
  49
+
  50
+        $types = $this->loadTypes();
  51
+        $typesByName = array();
  52
+
  53
+        foreach ($types as $type) {
  54
+            if (!$type instanceof FormTypeInterface) {
  55
+                throw new UnexpectedTypeException($type, 'Symfony\Component\Form\FormTypeInterface');
  56
+            }
  57
+
  58
+            $typesByName[$type->getName()] = $type;
  59
+        }
  60
+
  61
+        $this->types = $typesByName;
  62
+    }
  63
+
  64
+    private function initTypeGuesser()
  65
+    {
  66
+        $this->typeGuesserLoaded = true;
  67
+
  68
+        $guesser = $this->loadTypeGuesser();
  69
+
  70
+        if (!$guesser instanceof FormTypeGuesserInterface) {
  71
+            throw new UnexpectedTypeException($type, 'Symfony\Component\Form\FormTypeGuesserInterface');
  72
+        }
  73
+
  74
+        $this->guesser = $guesser;
  75
+    }
  76
+
  77
+    public function getType($name)
  78
+    {
  79
+        if (!$this->typesLoaded) {
  80
+            $this->initTypes();
  81
+        }
  82
+
  83
+        if (!isset($this->types[$name])) {
  84
+            throw new FormException(sprintf('The type "%s" can not be typesLoaded by this extension', $name));
  85
+        }
  86
+
  87
+        return $this->types[$name];
  88
+    }
  89
+
  90
+    public function hasType($name)
  91
+    {
  92
+        if (!$this->typesLoaded) {
  93
+            $this->initTypes();
  94
+        }
  95
+
  96
+        return isset($this->types[$name]);
  97
+    }
  98
+
  99
+    public function getTypeGuesser()
  100
+    {
  101
+        if (!$this->typeGuesserLoaded) {
  102
+            $this->initTypeGuesser();
  103
+        }
  104
+
  105
+        return $this->typeGuesser;
  106
+    }
  107
+}
7  Type/AbstractType.php → AbstractType.php
@@ -9,12 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
13  
-
14  
-use Symfony\Component\Form\FormBuilder;
15  
-use Symfony\Component\Form\FormInterface;
16  
-use Symfony\Component\Form\FormFactoryInterface;
17  
-use Symfony\Component\Form\FormView;
  12
+namespace Symfony\Component\Form;
18 13
 
19 14
 abstract class AbstractType implements FormTypeInterface
20 15
 {
2  DataTransformer/CallbackTransformer.php → CallbackTransformer.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form;
13 13
 
14 14
 class CallbackTransformer implements DataTransformerInterface
15 15
 {
4  Validator/CallbackValidator.php → CallbackValidator.php
@@ -9,9 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Validator;
13  
-
14  
-use Symfony\Component\Form\FormInterface;
  12
+namespace Symfony\Component\Form;
15 13
 
16 14
 class CallbackValidator implements FormValidatorInterface
17 15
 {
4  DataMapper/DataMapperInterface.php → DataMapperInterface.php
@@ -9,9 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataMapper;
13  
-
14  
-use Symfony\Component\Form\FormInterface;
  12
+namespace Symfony\Component\Form;
15 13
 
16 14
 interface DataMapperInterface
17 15
 {
2  DataTransformer/DataTransformerInterface.php → DataTransformerInterface.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form;
13 13
 
14 14
 /**
15 15
  * Transforms a value between different representations.
2  DataTransformer/TransformationFailedException.php → Exception/TransformationFailedException.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Exception;
13 13
 
14 14
 /**
15 15
  * Indicates a value transformation error.
4  ChoiceList/ArrayChoiceList.php → Extension/Core/ChoiceList/ArrayChoiceList.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\ChoiceList;
  12
+namespace Symfony\Component\Form\Extension\Core\ChoiceList;
13 13
 
14 14
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 15
 
@@ -38,7 +38,7 @@ public function getChoices()
38 38
     }
39 39
 
40 40
     /**
41  
-     * @see Symfony\Component\Form\ChoiceList\ChoiceListInterface::getChoices
  41
+     * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface::getChoices
42 42
      */
43 43
     protected function load()
44 44
     {
2  ChoiceList/ChoiceListInterface.php → Extension/Core/ChoiceList/ChoiceListInterface.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\ChoiceList;
  12
+namespace Symfony\Component\Form\Extension\Core\ChoiceList;
13 13
 
14 14
 interface ChoiceListInterface
15 15
 {
2  ChoiceList/MonthChoiceList.php → Extension/Core/ChoiceList/MonthChoiceList.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\ChoiceList;
  12
+namespace Symfony\Component\Form\Extension\Core\ChoiceList;
13 13
 
14 14
 class MonthChoiceList extends PaddedChoiceList
15 15
 {
2  ChoiceList/PaddedChoiceList.php → Extension/Core/ChoiceList/PaddedChoiceList.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\ChoiceList;
  12
+namespace Symfony\Component\Form\Extension\Core\ChoiceList;
13 13
 
14 14
 class PaddedChoiceList extends ArrayChoiceList
15 15
 {
2  ChoiceList/TimezoneChoiceList.php → Extension/Core/ChoiceList/TimezoneChoiceList.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\ChoiceList;
  12
+namespace Symfony\Component\Form\Extension\Core\ChoiceList;
13 13
 
14 14
 /**
15 15
  * Represents a choice list where each timezone is broken down by continent.
43  Type/Loader/DefaultTypeLoader.php → Extension/Core/CoreExtension.php
@@ -9,21 +9,31 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type\Loader;
  12
+namespace Symfony\Component\Form\Extension\Core;
13 13
 
14  
-use Symfony\Component\Form\Type;
15  
-use Symfony\Component\Form\CsrfProvider\CsrfProviderInterface;
  14
+use Symfony\Component\Form\Extension\Core\Type;
  15
+use Symfony\Component\Form\AbstractExtension;
16 16
 use Symfony\Component\Validator\ValidatorInterface;
17 17
 use Symfony\Component\HttpFoundation\File\TemporaryStorage;
18 18
 
19  
-class DefaultTypeLoader extends ArrayTypeLoader
  19
+class CoreExtension extends AbstractExtension
20 20
 {
21  
-    public function __construct(
22  
-            ValidatorInterface $validator = null,
23  
-            CsrfProviderInterface $csrfProvider = null, TemporaryStorage $storage = null)
  21
+    private $validator;
  22
+
  23
+    private $storage;
  24
+
  25
+    private $typeGuesser;
  26
+
  27
+    public function __construct(ValidatorInterface $validator, TemporaryStorage $storage)
  28
+    {
  29
+        $this->validator = $validator;
  30
+        $this->storage = $storage;
  31
+    }
  32
+
  33
+    protected function loadTypes()
24 34
     {
25  
-        $types = array(
26  
-            new Type\FieldType($validator),
  35
+        return array(
  36
+            new Type\FieldType($this->validator),
27 37
             new Type\FormType(),
28 38
             new Type\BirthdayType(),
29 39
             new Type\CheckboxType(),
@@ -48,17 +58,12 @@ public function __construct(
48 58
             new Type\TimeType(),
49 59
             new Type\TimezoneType(),
50 60
             new Type\UrlType(),
  61
+            new Type\FileType($this->storage),
51 62
         );
  63
+    }
52 64
 
53  
-        if ($csrfProvider) {
54  
-            // TODO Move to a Symfony\Bridge\FormSecurity
55  
-            $types[] = new Type\CsrfType($csrfProvider);
56  
-        }
57  
-
58  
-        if ($storage) {
59  
-            $types[] = new Type\FileType($storage);
60  
-        }
61  
-
62  
-        parent::__construct($types);
  65
+    public function loadTypeGuesser()
  66
+    {
  67
+        return new CoreTypeGuesser($this->validator->getMetadataFactory());
63 68
     }
64 69
 }
25  Type/Guesser/ValidatorTypeGuesser.php → Extension/Core/CoreTypeGuesser.php
@@ -3,29 +3,24 @@
3 3
 /*
4 4
  * This file is part of the Symfony package.
5 5
  *
6  
- * (c) Fabien Potencier <fabien@symfony.com>
  6
+ * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
7 7
  *
8 8
  * For the full copyright and license information, please view the LICENSE
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type\Guesser;
  12
+namespace Symfony\Component\Form\Extension\Core;
13 13
 
14  
-use Symfony\Component\Validator\Constraint;
  14
+use Symfony\Component\Form\FormTypeGuesserInterface;
  15
+use Symfony\Component\Form\Guess\Guess;
  16
+use Symfony\Component\Form\Guess\TypeGuess;
  17
+use Symfony\Component\Form\Guess\ValueGuess;
15 18
 use Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface;
16 19
 
17  
-/**
18  
- * Guesses form fields from the metadata of the a Validator class
19  
- *
20  
- * @author Bernhard Schussek <bernhard.schussek@symfony.com>
21  
- */
22  
-class ValidatorTypeGuesser implements TypeGuesserInterface
  20
+class CoreTypeGuesser implements FormTypeGuesserInterface
23 21
 {
24  
-    /**
25  
-     * Constructor
26  
-     *
27  
-     * @param ClassMetadataFactoryInterface $metadataFactory
28  
-     */
  22
+    private $metadataFactory;
  23
+
29 24
     public function __construct(ClassMetadataFactoryInterface $metadataFactory)
30 25
     {
31 26
         $this->metadataFactory = $metadataFactory;
@@ -301,4 +296,4 @@ public function guessMaxLengthForConstraint(Constraint $constraint)
301 296
                 );
302 297
         }
303 298
     }
304  
-}
  299
+}
3  DataMapper/PropertyPathMapper.php → Extension/Core/DataMapper/PropertyPathMapper.php
@@ -9,9 +9,10 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataMapper;
  12
+namespace Symfony\Component\Form\Extension\Core\DataMapper;
13 13
 
14 14
 use Symfony\Component\Form\FormInterface;
  15
+use Symfony\Component\Form\DataMapperInterface;
15 16
 use Symfony\Component\Form\Util\VirtualFormAwareIterator;
16 17
 use Symfony\Component\Form\Exception\FormException;
17 18
 
6  DataTransformer/ArrayToBooleanChoicesTransformer.php → ...aTransformer/ArrayToBooleanChoicesTransformer.php
@@ -9,9 +9,11 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
14  
-use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
  14
+use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface;
  15
+use Symfony\Component\Form\DataTransformerInterface;
  16
+use Symfony\Component\Form\Exception\TransformationFailedException;
15 17
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
16 18
 
17 19
 class ArrayToBooleanChoicesTransformer implements DataTransformerInterface
4  DataTransformer/ArrayToChoicesTransformer.php → ...ore/DataTransformer/ArrayToChoicesTransformer.php
@@ -9,9 +9,11 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
14 14
 use Symfony\Component\Form\Util\FormUtil;
  15
+use Symfony\Component\Form\DataTransformerInterface;
  16
+use Symfony\Component\Form\Exception\TransformationFailedException;
15 17
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
16 18
 
17 19
 class ArrayToChoicesTransformer implements DataTransformerInterface
4  DataTransformer/ArrayToPartsTransformer.php → .../Core/DataTransformer/ArrayToPartsTransformer.php
@@ -9,8 +9,10 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
  14
+use Symfony\Component\Form\DataTransformerInterface;
  15
+use Symfony\Component\Form\Exception\TransformationFailedException;
14 16
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 17
 
16 18
 /**
4  DataTransformer/BaseDateTimeTransformer.php → .../Core/DataTransformer/BaseDateTimeTransformer.php
@@ -9,7 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
  13
+
  14
+use Symfony\Component\Form\DataTransformerInterface;
13 15
 
14 16
 abstract class BaseDateTimeTransformer implements DataTransformerInterface
15 17
 {
4  DataTransformer/BooleanToStringTransformer.php → ...re/DataTransformer/BooleanToStringTransformer.php
@@ -9,8 +9,10 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
  14
+use Symfony\Component\Form\DataTransformerInterface;
  15
+use Symfony\Component\Form\Exception\TransformationFailedException;
14 16
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 17
 
16 18
 /**
4  DataTransformer/DataTransformerChain.php → ...ion/Core/DataTransformer/DataTransformerChain.php
@@ -9,7 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
  13
+
  14
+use Symfony\Component\Form\DataTransformerInterface;
13 15
 
14 16
 /**
15 17
  * Passes a value through multiple value transformers
3  DataTransformer/DateTimeToArrayTransformer.php → ...re/DataTransformer/DateTimeToArrayTransformer.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
  14
+use Symfony\Component\Form\Exception\TransformationFailedException;
14 15
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 16
 
16 17
 /**
3  ...nsformer/DateTimeToLocalizedStringTransformer.php → ...nsformer/DateTimeToLocalizedStringTransformer.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
  14
+use Symfony\Component\Form\Exception\TransformationFailedException;
14 15
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 16
 
16 17
 /**
3  DataTransformer/DateTimeToStringTransformer.php → ...e/DataTransformer/DateTimeToStringTransformer.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
  14
+use Symfony\Component\Form\Exception\TransformationFailedException;
14 15
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 16
 
16 17
 /**
3  DataTransformer/DateTimeToTimestampTransformer.php → ...ataTransformer/DateTimeToTimestampTransformer.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
  14
+use Symfony\Component\Form\Exception\TransformationFailedException;
14 15
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 16
 
16 17
 /**
5  DataTransformer/FileToArrayTransformer.php → ...n/Core/DataTransformer/FileToArrayTransformer.php
@@ -9,9 +9,10 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
14  
-use Symfony\Component\Form\DataTransformer\TransformationFailedException;
  14
+use Symfony\Component\Form\DataTransformerInterface;
  15
+use Symfony\Component\Form\Exception\TransformationFailedException;
15 16
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
16 17
 use Symfony\Component\HttpFoundation\File\File;
17 18
 
5  DataTransformer/FileToStringTransformer.php → .../Core/DataTransformer/FileToStringTransformer.php
@@ -9,9 +9,10 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
14  
-use Symfony\Component\Form\DataTransformer\TransformationFailedException;
  14
+use Symfony\Component\Form\DataTransformerInterface;
  15
+use Symfony\Component\Form\Exception\TransformationFailedException;
15 16
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
16 17
 use Symfony\Component\HttpFoundation\File\File;
17 18
 
4  ...ansformer/IntegerToLocalizedStringTransformer.php → ...ansformer/IntegerToLocalizedStringTransformer.php
@@ -9,9 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
13  
-
14  
-use Symfony\Component\Form\Exception\UnexpectedTypeException;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
15 13
 
16 14
 /**
17 15
  * Transforms between an integer and a localized number with grouping
2  ...Transformer/MoneyToLocalizedStringTransformer.php → ...Transformer/MoneyToLocalizedStringTransformer.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
14 14
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 15
 
4  ...ransformer/NumberToLocalizedStringTransformer.php → ...ransformer/NumberToLocalizedStringTransformer.php
@@ -9,8 +9,10 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
  14
+use Symfony\Component\Form\DataTransformerInterface;
  15
+use Symfony\Component\Form\Exception\TransformationFailedException;
14 16
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 17
 
16 18
 /**
4  ...ansformer/PercentToLocalizedStringTransformer.php → ...ansformer/PercentToLocalizedStringTransformer.php
@@ -9,8 +9,10 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
  14
+use Symfony\Component\Form\DataTransformerInterface;
  15
+use Symfony\Component\Form\Exception\TransformationFailedException;
14 16
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 17
 
16 18
 /**
6  ...Transformer/ScalarToBooleanChoicesTransformer.php → ...Transformer/ScalarToBooleanChoicesTransformer.php
@@ -9,9 +9,11 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
14  
-use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
  14
+use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface;
  15
+use Symfony\Component\Form\DataTransformerInterface;
  16
+use Symfony\Component\Form\Exception\TransformationFailedException;
15 17
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
16 18
 
17 19
 class ScalarToBooleanChoicesTransformer implements DataTransformerInterface
3  DataTransformer/ScalarToChoiceTransformer.php → ...ore/DataTransformer/ScalarToChoiceTransformer.php
@@ -9,9 +9,10 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
14 14
 use Symfony\Component\Form\Util\FormUtil;
  15
+use Symfony\Component\Form\DataTransformerInterface;
15 16
 
16 17
 class ScalarToChoiceTransformer implements DataTransformerInterface
17 18
 {
4  DataTransformer/ValueToDuplicatesTransformer.php → .../DataTransformer/ValueToDuplicatesTransformer.php
@@ -9,8 +9,10 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\DataTransformer;
  12
+namespace Symfony\Component\Form\Extension\Core\DataTransformer;
13 13
 
  14
+use Symfony\Component\Form\DataTransformerInterface;
  15
+use Symfony\Component\Form\Exception\TransformationFailedException;
14 16
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
15 17
 
16 18
 /**
2  EventListener/FixFileUploadListener.php → ...sion/Core/EventListener/FixFileUploadListener.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\EventListener;
  12
+namespace Symfony\Component\Form\Extension\Core\EventListener;
13 13
 
14 14
 use Symfony\Component\Form\FormInterface;
15 15
 use Symfony\Component\Form\Events;
2  EventListener/FixRadioInputListener.php → ...sion/Core/EventListener/FixRadioInputListener.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\EventListener;
  12
+namespace Symfony\Component\Form\Extension\Core\EventListener;
13 13
 
14 14
 use Symfony\Component\Form\FormInterface;
15 15
 use Symfony\Component\Form\Events;
2  EventListener/FixUrlProtocolListener.php → ...ion/Core/EventListener/FixUrlProtocolListener.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\EventListener;
  12
+namespace Symfony\Component\Form\Extension\Core\EventListener;
13 13
 
14 14
 use Symfony\Component\Form\FormInterface;
15 15
 use Symfony\Component\Form\Events;
2  EventListener/ResizeFormListener.php → Extension/Core/EventListener/ResizeFormListener.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\EventListener;
  12
+namespace Symfony\Component\Form\Extension\Core\EventListener;
13 13
 
14 14
 use Symfony\Component\Form\Events;
15 15
 use Symfony\Component\Form\Event\DataEvent;
2  EventListener/TrimListener.php → Extension/Core/EventListener/TrimListener.php
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\EventListener;
  12
+namespace Symfony\Component\Form\Extension\Core\EventListener;
13 13
 
14 14
 use Symfony\Component\Form\Events;
15 15
 use Symfony\Component\Form\Event\FilterDataEvent;
3  Type/BirthdayType.php → Extension/Core/Type/BirthdayType.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15 16
 
16 17
 class BirthdayType extends AbstractType
5  Type/CheckboxType.php → Extension/Core/Type/CheckboxType.php
@@ -9,11 +9,12 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15 16
 use Symfony\Component\Form\FormInterface;
16  
-use Symfony\Component\Form\DataTransformer\BooleanToStringTransformer;
  17
+use Symfony\Component\Form\Extension\Core\DataTransformer\BooleanToStringTransformer;
17 18
 use Symfony\Component\Form\FormView;
18 19
 
19 20
 class CheckboxType extends AbstractType
19  Type/ChoiceType.php → Extension/Core/Type/ChoiceType.php
@@ -9,19 +9,20 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15 16
 use Symfony\Component\Form\FormInterface;
16 17
 use Symfony\Component\Form\Exception\FormException;
17  
-use Symfony\Component\Form\ChoiceList\ArrayChoiceList;
18  
-use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
19  
-use Symfony\Component\Form\EventListener\FixRadioInputListener;
  18
+use Symfony\Component\Form\Extension\Core\ChoiceList\ArrayChoiceList;
  19
+use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface;
  20
+use Symfony\Component\Form\Extension\Core\EventListener\FixRadioInputListener;
20 21
 use Symfony\Component\Form\FormView;
21  
-use Symfony\Component\Form\DataTransformer\ScalarToChoiceTransformer;
22  
-use Symfony\Component\Form\DataTransformer\ScalarToBooleanChoicesTransformer;
23  
-use Symfony\Component\Form\DataTransformer\ArrayToChoicesTransformer;
24  
-use Symfony\Component\Form\DataTransformer\ArrayToBooleanChoicesTransformer;
  22
+use Symfony\Component\Form\Extension\Core\DataTransformer\ScalarToChoiceTransformer;
  23
+use Symfony\Component\Form\Extension\Core\DataTransformer\ScalarToBooleanChoicesTransformer;
  24
+use Symfony\Component\Form\Extension\Core\DataTransformer\ArrayToChoicesTransformer;
  25
+use Symfony\Component\Form\Extension\Core\DataTransformer\ArrayToBooleanChoicesTransformer;
25 26
 
26 27
 class ChoiceType extends AbstractType
27 28
 {
@@ -32,7 +33,7 @@ public function buildForm(FormBuilder $builder, array $options)
32 33
         }
33 34
 
34 35
         if ($options['choice_list'] && !$options['choice_list'] instanceof ChoiceListInterface) {
35  
-            throw new FormException('The "choice_list" must be an instance of "Symfony\Component\Form\ChoiceList\ChoiceListInterface".');
  36
+            throw new FormException('The "choice_list" must be an instance of "Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface".');
36 37
         }
37 38
 
38 39
         if (!$options['choice_list']) {
5  Type/CollectionType.php → Extension/Core/Type/CollectionType.php
@@ -9,10 +9,11 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15  
-use Symfony\Component\Form\EventListener\ResizeFormListener;
  16
+use Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener;
16 17
 
17 18
 class CollectionType extends AbstractType
18 19
 {
3  Type/CountryType.php → Extension/Core/Type/CountryType.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15 16
 use Symfony\Component\Locale\Locale;
16 17
 
15  Type/DateTimeType.php → Extension/Core/Type/DateTimeType.php
@@ -9,15 +9,16 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15  
-use Symfony\Component\Form\DataTransformer\ReversedTransformer;
16  
-use Symfony\Component\Form\DataTransformer\DataTransformerChain;
17  
-use Symfony\Component\Form\DataTransformer\DateTimeToArrayTransformer;
18  
-use Symfony\Component\Form\DataTransformer\DateTimeToStringTransformer;
19  
-use Symfony\Component\Form\DataTransformer\DateTimeToTimestampTransformer;
20  
-use Symfony\Component\Form\DataTransformer\ArrayToPartsTransformer;
  16
+use Symfony\Component\Form\ReversedTransformer;
  17
+use Symfony\Component\Form\Extension\Core\DataTransformer\DataTransformerChain;
  18
+use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer;
  19
+use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer;
  20
+use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer;
  21
+use Symfony\Component\Form\Extension\Core\DataTransformer\ArrayToPartsTransformer;
21 22
 
22 23
 class DateTimeType extends AbstractType
23 24
 {
17  Type/DateType.php → Extension/Core/Type/DateType.php
@@ -9,18 +9,19 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormInterface;
15 16
 use Symfony\Component\Form\FormBuilder;
16  
-use Symfony\Component\Form\ChoiceList\PaddedChoiceList;
17  
-use Symfony\Component\Form\ChoiceList\MonthChoiceList;
  17
+use Symfony\Component\Form\Extension\Core\ChoiceList\PaddedChoiceList;
  18
+use Symfony\Component\Form\Extension\Core\ChoiceList\MonthChoiceList;
18 19
 use Symfony\Component\Form\FormView;
19  
-use Symfony\Component\Form\DataTransformer\DateTimeToLocalizedStringTransformer;
20  
-use Symfony\Component\Form\DataTransformer\DateTimeToArrayTransformer;
21  
-use Symfony\Component\Form\DataTransformer\DateTimeToStringTransformer;
22  
-use Symfony\Component\Form\DataTransformer\DateTimeToTimestampTransformer;
23  
-use Symfony\Component\Form\DataTransformer\ReversedTransformer;
  20
+use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer;
  21
+use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer;
  22
+use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer;
  23
+use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer;
  24
+use Symfony\Component\Form\ReversedTransformer;
24 25
 
25 26
 class DateType extends AbstractType
26 27
 {
3  Type/EmailType.php → Extension/Core/Type/EmailType.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15 16
 use Symfony\Component\Form\FormInterface;
16 17
 
9  Type/FieldType.php → Extension/Core/Type/FieldType.php
@@ -9,16 +9,17 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\Util\PropertyPath;
15 16
 use Symfony\Component\Form\FormBuilder;
16 17
 use Symfony\Component\Form\FormInterface;
17 18
 use Symfony\Component\Form\FormFactoryInterface;
18 19
 use Symfony\Component\Form\FormView;
19  
-use Symfony\Component\Form\EventListener\TrimListener;
20  
-use Symfony\Component\Form\Validator\DefaultValidator;
21  
-use Symfony\Component\Form\Validator\DelegatingValidator;
  20
+use Symfony\Component\Form\Extension\Core\EventListener\TrimListener;
  21
+use Symfony\Component\Form\Extension\Core\Validator\DefaultValidator;
  22
+use Symfony\Component\Form\Extension\Core\Validator\DelegatingValidator;
22 23
 use Symfony\Component\EventDispatcher\EventDispatcher;
23 24
 use Symfony\Component\Validator\ValidatorInterface;
24 25
 
13  Type/FileType.php → Extension/Core/Type/FileType.php
@@ -9,16 +9,17 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormInterface;
15 16
 use Symfony\Component\Form\FormBuilder;
16 17
 use Symfony\Component\Form\FormFactoryInterface;
17  
-use Symfony\Component\Form\EventListener\FixFileUploadListener;
18  
-use Symfony\Component\Form\DataTransformer\DataTransformerChain;
19  
-use Symfony\Component\Form\DataTransformer\ReversedTransformer;
20  
-use Symfony\Component\Form\DataTransformer\FileToStringTransformer;
21  
-use Symfony\Component\Form\DataTransformer\FileToArrayTransformer;
  18
+use Symfony\Component\Form\Extension\Core\EventListener\FixFileUploadListener;
  19
+use Symfony\Component\Form\Extension\Core\DataTransformer\DataTransformerChain;
  20
+use Symfony\Component\Form\ReversedTransformer;
  21
+use Symfony\Component\Form\Extension\Core\DataTransformer\FileToStringTransformer;
  22
+use Symfony\Component\Form\Extension\Core\DataTransformer\FileToArrayTransformer;
22 23
 use Symfony\Component\Form\FormView;
23 24
 use Symfony\Component\HttpFoundation\File\TemporaryStorage;
24 25
 
7  Type/FormType.php → Extension/Core/Type/FormType.php
@@ -9,13 +9,14 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15 16
 use Symfony\Component\Form\FormInterface;
16 17
 use Symfony\Component\Form\FormView;
17  
-use Symfony\Component\Form\CsrfProvider\CsrfProviderInterface;
18  
-use Symfony\Component\Form\DataMapper\PropertyPathMapper;
  18
+use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface;
  19
+use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper;
19 20
 use Symfony\Component\EventDispatcher\EventDispatcher;
20 21
 
21 22
 class FormType extends AbstractType
3  Type/HiddenType.php → Extension/Core/Type/HiddenType.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15 16
 
16 17
 class HiddenType extends AbstractType
5  Type/IntegerType.php → Extension/Core/Type/IntegerType.php
@@ -9,10 +9,11 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15  
-use Symfony\Component\Form\DataTransformer\IntegerToLocalizedStringTransformer;
  16
+use Symfony\Component\Form\Extension\Core\DataTransformer\IntegerToLocalizedStringTransformer;
16 17
 
17 18
 class IntegerType extends AbstractType
18 19
 {
3  Type/LanguageType.php → Extension/Core/Type/LanguageType.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Locale\Locale;
15 16
 
16 17
 class LanguageType extends AbstractType
3  Type/LocaleType.php → Extension/Core/Type/LocaleType.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Locale\Locale;
15 16
 
16 17
 class LocaleType extends AbstractType
5  Type/MoneyType.php → Extension/Core/Type/MoneyType.php
@@ -9,11 +9,12 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormInterface;
15 16
 use Symfony\Component\Form\FormBuilder;
16  
-use Symfony\Component\Form\DataTransformer\MoneyToLocalizedStringTransformer;
  17
+use Symfony\Component\Form\Extension\Core\DataTransformer\MoneyToLocalizedStringTransformer;
17 18
 use Symfony\Component\Form\FormView;
18 19
 
19 20
 class MoneyType extends AbstractType
5  Type/NumberType.php → Extension/Core/Type/NumberType.php
@@ -9,10 +9,11 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15  
-use Symfony\Component\Form\DataTransformer\NumberToLocalizedStringTransformer;
  16
+use Symfony\Component\Form\Extension\Core\DataTransformer\NumberToLocalizedStringTransformer;
16 17
 
17 18
 class NumberType extends AbstractType
18 19
 {
3  Type/PasswordType.php → Extension/Core/Type/PasswordType.php
@@ -9,8 +9,9 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormInterface;
15 16
 use Symfony\Component\Form\FormBuilder;
16 17
 use Symfony\Component\Form\FormView;
5  Type/PercentType.php → Extension/Core/Type/PercentType.php
@@ -9,10 +9,11 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12  
-namespace Symfony\Component\Form\Type;
  12
+namespace Symfony\Component\Form\Extension\Core\Type;
13 13
 
  14
+use Symfony\Component\Form\AbstractType;
14 15
 use Symfony\Component\Form\FormBuilder;
15  
-use Symfony\Component\Form\DataTransformer\PercentToLocalizedStringTransformer;
  16
+use Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer;
16 17
 
17 18
 class PercentType extends AbstractType
18 19
 {
5  Type/RadioType.php → Extension/Core/Type/RadioType.php
@@ -9,11 +9,12 @@
9 9
  * file that was distributed with this source code.
10 10
  */