8000 Add "input" option to NumberType by webmozart · Pull Request #30893 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Add "input" option to NumberType #30893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 6, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added new option "input" to NumberType
  • Loading branch information
Bernhard Schussek committed Apr 6, 2019
commit 3f257346472a815f850fb65cbc81dd82e0b9f55a
5 changes: 5 additions & 0 deletions src/Symfony/Bridge/Doctrine/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

4.3.0
-----

* changed guessing of DECIMAL to set the `input` option of `NumberType` to string

4.2.0
-----

Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\ORM\Mapping\MappingException as LegacyMappingException;
use Symfony\Bridge\Doctrine\Form\Type\DecimalType;
use Symfony\Component\Form\FormTypeGuesserInterface;
use Symfony\Component\Form\Guess\Guess;
use Symfony\Component\Form\Guess\TypeGuess;
Expand Down Expand Up @@ -76,7 +75,7 @@ public function guessType($class, $property)
case 'time_immutable':
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TimeType', ['input' => 'datetime_immutable'], Guess::HIGH_CONFIDENCE);
case Type::DECIMAL:
return new TypeGuess(DecimalType::class, array(), Guess::HIGH_CONFIDENCE);
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', ['input' => 'string'], Guess::MEDIUM_CONFIDENCE);
case Type::FLOAT:
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', [], Guess::MEDIUM_CONFIDENCE);
case Type::INTEGER:
Expand Down
50 changes: 0 additions & 50 deletions src/Symfony/Bridge/Doctrine/Form/Type/DecimalType.php

This file was deleted.

40 changes: 0 additions & 40 deletions src/Symfony/Bridge/Doctrine/Tests/Fixtures/Price.php

This file was deleted.

177 changes: 0 additions & 177 deletions src/Symfony/Bridge/Doctrine/Tests/Form/Type/DecimalTypeTest.php

This file was deleted.

1 change: 1 addition & 0 deletions src/Symfony/Component/Form/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ CHANGELOG
* dispatch `PostSubmitEvent` on `form.post_submit`
* dispatch `PreSetDataEvent` on `form.pre_set_data`
* dispatch `PostSetDataEvent` on `form.post_set_data`
* added an `input` option to `NumberType`

4.2.0
-----
Expand Down
Loading
0