Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3f25734

Browse files
author
Bernhard Schussek
committed
Added new option "input" to NumberType
1 parent fb2b37a commit 3f25734

File tree

11 files changed

+243
-365
lines changed

11 files changed

+243
-365
lines changed

src/Symfony/Bridge/Doctrine/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
4.3.0
5+
-----
6+
7+
* changed guessing of DECIMAL to set the `input` option of `NumberType` to string
8+
49
4.2.0
510
-----
611

src/Symfony/Bridge/Doctrine/Form/DataTransformer/NumberToStringTransformer.php

Lines changed: 0 additions & 91 deletions
This file was deleted.

src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Doctrine\DBAL\Types\Type;
1818
use Doctrine\ORM\Mapping\ClassMetadataInfo;
1919
use Doctrine\ORM\Mapping\MappingException as LegacyMappingException;
20-
use Symfony\Bridge\Doctrine\Form\Type\DecimalType;
2120
use Symfony\Component\Form\FormTypeGuesserInterface;
2221
use Symfony\Component\Form\Guess\Guess;
2322
use Symfony\Component\Form\Guess\TypeGuess;
@@ -76,7 +75,7 @@ public function guessType($class, $property)
7675
case 'time_immutable':
7776
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TimeType', ['input' => 'datetime_immutable'], Guess::HIGH_CONFIDENCE);
7877
case Type::DECIMAL:
79-
return new TypeGuess(DecimalType::class, array(), Guess::HIGH_CONFIDENCE);
78+
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', ['input' => 'string'], Guess::MEDIUM_CONFIDENCE);
8079
case Type::FLOAT:
8180
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', [], Guess::MEDIUM_CONFIDENCE);
8281
case Type::INTEGER:

src/Symfony/Bridge/Doctrine/Form/Type/DecimalType.php

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/Symfony/Bridge/Doctrine/Tests/Fixtures/Price.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/Symfony/Bridge/Doctrine/Tests/Form/Type/DecimalTypeTest.php

Lines changed: 0 additions & 177 deletions
This file was deleted.

src/Symfony/Component/Form/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ CHANGELOG
4747
* dispatch `PostSubmitEvent` on `form.post_submit`
4848
* dispatch `PreSetDataEvent` on `form.pre_set_data`
4949
* dispatch `PostSetDataEvent` on `form.post_set_data`
50+
* added an `input` option to `NumberType`
5051

5152
4.2.0
5253
-----

0 commit comments

Comments
 (0)