Skip to content

Commit 70f5e85

Browse files
committed
tweaks thanks to comments
1 parent 0ad7b18 commit 70f5e85

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

reference/forms/types/choice.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,19 +189,21 @@ to the user.
189189
$builder->add('gender', 'choice', array(
190190
// Shows "Male" to the user, returns "m" when selected
191191
'choices' => array('m' => 'Male', 'f' => 'Female'),
192+
// before 2.7, this options didn't actually exist, but the
193+
// behavior was equivalent to setting this to false in 2.7.
192194
'choices_as_values' => false,
193195
));
194196

195-
* Optional since 2.7::
197+
* Since 2.7::
196198

197199
$builder->add('gender', 'choice', array(
198200
// Shows "Male" to the user, returns "m" when selected
199201
'choices' => array('Male' => 'm', 'Female' => 'f'),
200202
'choices_as_values' => true,
201203
));
202204

203-
In Symfony 3.0, ``choices_as_values`` option will go away, but it's behavior will
204-
always be used:
205+
In Symfony 3.0, the ``choices_as_values`` option doesn't exist, but the ``choice``
206+
type behaves as if it were set to true:
205207

206208
* Default for 3.0::
207209

reference/forms/types/entity.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ em
171171

172172
**type**: ``string`` | ``Doctrine\Common\Persistence\ObjectManager`` **default**: the default entity manager
173173

174-
If specified, the specified entity manager will be used to load the choices
175-
instead of the default entity manager.
174+
If specified, this entity manager will be used to load the choices
175+
instead of the ``default`` entity manager.
176176

177177

178178
Overridden Options

reference/forms/types/options/choice_value.rst.inc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ configure the value that will be sent in the API request).
1313
1414
This can be a callable or a property path. See `choice_label`_ for similar usage.
1515
If ``null`` is used, an incrementing integer is used as the name.
16+
17+
.. caution::
18+
19+
In Symfony 2.7, there was a small backwards-compatibility break with how the
20+
`value` attribute of options is generated. This is not a problem unless you
21+
rely on the option values in JavaScript. See `issue #14825`_ for details.
22+
23+
.. _`issue #14285`: https://github.com/symfony/symfony/pull/14825

reference/forms/types/options/group_by.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Take the following example::
3232
},
3333
));
3434

35-
This groups the dates that are within 3 days into "Soon" and everyting else into
35+
This groups the dates that are within 3 days into "Soon" and everything else into
3636
a "Later" group:
3737

3838
.. image:: /images/reference/form/choice-example5.png

0 commit comments

Comments
 (0)