diff --git a/book/security.rst b/book/security.rst index 49ce1f9f4c2..35df497804a 100644 --- a/book/security.rst +++ b/book/security.rst @@ -1205,6 +1205,12 @@ is defined by the ``target`` parameter above (e.g. the ``homepage``). Dynamically Encoding a Password ------------------------------- +.. note:: + + For historical reasons, Symfony uses the term *"password encoding"* when it + should really refer to *"password hashing"*. The "encoders" are in fact + `cryptographic hash functions`_. + If, for example, you're storing users in the database, you'll need to encode the users' passwords before inserting them. No matter what algorithm you configure for your user object, the hashed password can always be determined @@ -1410,5 +1416,6 @@ Learn More from the Cookbook .. _`frameworkextrabundle documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html .. _`security advisories database`: https://github.com/FriendsOfPHP/security-advisories +.. _`cryptographic hash functions`: https://en.wikipedia.org/wiki/Cryptographic_hash_function .. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle .. _`SensioDistributionBundle`: https://packagist.org/packages/sensio/distribution-bundle diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index e1da003e949..20715297cb2 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -197,16 +197,18 @@ instead of the ``default`` entity manager. query_builder ~~~~~~~~~~~~~ -**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure +**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure **default**: ``null`` Allows you to create a custom query for your choices. See :ref:`ref-form-entity-query-builder` for an example. The value of this option can either be a ``QueryBuilder`` object, a Closure or -``null``. When using a Closure, you will be passed the ``EntityRepository`` of -the entity as the only argument and should return a ``QueryBuilder``. If you'd -like to display an empty list of entries, you can return ``null`` in the -Closure. +``null`` (which will load all entities). When using a Closure, you will be +passed the ``EntityRepository`` of the entity as the only argument and should +return a ``QueryBuilder``. + +If you'd like to display an empty list of entries, you can return ``null`` in +the Closure. .. versionadded:: 2.8 Returning ``null`` in the Closure was introduced in Symfony 2.8.