Skip to content

Commit 3a7d782

Browse files
committed
Merge branch '2.7' into 2.8
Conflicts: reference/forms/types/entity.rst
2 parents 991a135 + 44e170b commit 3a7d782

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

book/security.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,12 @@ is defined by the ``target`` parameter above (e.g. the ``homepage``).
12051205
Dynamically Encoding a Password
12061206
-------------------------------
12071207

1208+
.. note::
1209+
1210+
For historical reasons, Symfony uses the term *"password encoding"* when it
1211+
should really refer to *"password hashing"*. The "encoders" are in fact
1212+
`cryptographic hash functions`_.
1213+
12081214
If, for example, you're storing users in the database, you'll need to encode
12091215
the users' passwords before inserting them. No matter what algorithm you
12101216
configure for your user object, the hashed password can always be determined
@@ -1410,5 +1416,6 @@ Learn More from the Cookbook
14101416

14111417
.. _`frameworkextrabundle documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html
14121418
.. _`security advisories database`: https://github.com/FriendsOfPHP/security-advisories
1419+
.. _`cryptographic hash functions`: https://en.wikipedia.org/wiki/Cryptographic_hash_function
14131420
.. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle
14141421
.. _`SensioDistributionBundle`: https://packagist.org/packages/sensio/distribution-bundle

reference/forms/types/entity.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,18 @@ instead of the ``default`` entity manager.
197197
query_builder
198198
~~~~~~~~~~~~~
199199

200-
**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure
200+
**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure **default**: ``null``
201201

202202
Allows you to create a custom query for your choices. See
203203
:ref:`ref-form-entity-query-builder` for an example.
204204

205205
The value of this option can either be a ``QueryBuilder`` object, a Closure or
206-
``null``. When using a Closure, you will be passed the ``EntityRepository`` of
207-
the entity as the only argument and should return a ``QueryBuilder``. If you'd
208-
like to display an empty list of entries, you can return ``null`` in the
209-
Closure.
206+
``null`` (which will load all entities). When using a Closure, you will be
207+
passed the ``EntityRepository`` of the entity as the only argument and should
208+
return a ``QueryBuilder``.
209+
210+
If you'd like to display an empty list of entries, you can return ``null`` in
211+
the Closure.
210212

211213
.. versionadded:: 2.8
212214
Returning ``null`` in the Closure was introduced in Symfony 2.8.

0 commit comments

Comments
 (0)