<p dir="auto">What use are options like <code class="notranslate">precision</code>, <code class="notranslate">rounding_mode</code> for an integer type?</p>
<p dir="auto">Why is this form called "integer" when it clearly deals with floats?</p>
<p dir="auto">I'd expect integer type to allow only values like <code class="notranslate">-2, -1, 0, 1, 2, 3, ...</code> etc, and to have options like <code class="notranslate">allow_negative</code> and <code class="notranslate">allow_zero</code>.</p>
<blockquote>
<p dir="auto">This field has different options on how to handle input values that aren't integers. By default, all non-integer values (e.g. 6.78) will round down (e.g. 6).</p>
</blockquote>
<p dir="auto">I'd expect <code class="notranslate">number</code> field to behave like this (based on configuration options), and <code class="notranslate">integer</code> type should only allow.. well.. integer values. The name of this form is misleading.</p>
<p dir="auto">PS. Am I the only one who finds <code class="notranslate">precision</code> weird option for an "integer" type?</p>
<p dir="auto">The <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php"><code class="notranslate">IntegerType</code></a> supports floats, but as the name suggests it should only accept integers, i.e. whole numbers.</p>
<p dir="auto">The <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php"><code class="notranslate">NumberType</code></a> supports floats, locale specific numeric strings (e.g. "40,000") etc.</p>
<p dir="auto">I propose a change to these 2 types:</p>
<ul dir="auto">
<li><code class="notranslate">IntegerType</code>: should be used for whole integers as the name suggests</li>
<li><code class="notranslate">NumberType</code>: should be used for floats (rendering as an <code class="notranslate">input[type="number"]</code>), and have a new option (<code class="notranslate">support_locale_strings</code> or something similar) so that it renders as <code class="notranslate">input[type="text"]</code> and has the relevant attached <code class="notranslate">NumberToLocalizedStringTransformer</code>.</li>
</ul>
<p dir="auto">This is obviously a BC break so marked it for 3.0.</p>