8000 Merge branch '3.0' into 3.1 · symfony/symfony-docs@bce6255 · GitHub
[go: up one dir, main page]

Skip to content

Commit bce6255

Browse files
committed
Merge branch '3.0' into 3.1
2 parents 8be3e3b + f199923 commit bce6255

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

book/security.rst

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

1194+
.. note::
1195+
1196+
For historical reasons, Symfony uses the term *"password encoding"* when it
1197+
should really refer to *"password hashing"*. The "encoders" are in fact
1198+
`cryptographic hash functions`_.
1199+
11941200
If, for example, you're storing users in the database, you'll need to encode
11951201
the users' passwords before inserting them. No matter what algorithm you
11961202
configure for your user object, the hashed password can always be determined
@@ -1396,5 +1402,6 @@ Learn More from the Cookbook
13961402

13971403
.. _`frameworkextrabundle documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html
13981404
.. _`security advisories database`: https://github.com/FriendsOfPHP/security-advisories
1405+
.. _`cryptographic hash functions`: https://en.wikipedia.org/wiki/Cryptographic_hash_function
13991406
.. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle
14001407
.. _`SensioDistributionBundle`: https://packagist.org/packages/sensio/distribution-bundle

reference/forms/types/entity.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,21 @@ instead of the ``default`` entity manager.
192192
query_builder
193193
~~~~~~~~~~~~~
194194

195-
**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure
195+
**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure **default**: ``null``
196196

197197
Allows you to create a custom query for your choices. See
198198
:ref:`ref-form-entity-query-builder` for an example.
199199

200-
The value of this option can either be a ``QueryBuilder`` object or a Closure.
201-
When using a Closure, you will be passed the ``EntityRepository`` of the entity
202-
as the only argument and should return a ``QueryBuilder``.
200+
The value of this option can either be a ``QueryBuilder`` object, a Closure or
201+
``null`` (which will load all entities). When using a Closure, you will be
202+
passed the ``EntityRepository`` of the entity as the only argument and should
203+
return a ``QueryBuilder``.
204+
205+
If you'd like to display an empty list of entries, you can return ``null`` in
206+
the Closure.
207+
208+
.. versionadded:: 2.8
209+
Returning ``null`` in the Closure was introduced in Symfony 2.8.
203210

204211
Overridden Options
205212
------------------

0 commit comments

Comments
 (0)
0