Skip to content

Commit

Permalink
Merge branch '3.0' into 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed May 21, 2016
2 parents 8be3e3b + f199923 commit bce6255
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
7 changes: 7 additions & 0 deletions book/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,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
Expand Down Expand Up @@ -1396,5 +1402,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
15 changes: 11 additions & 4 deletions reference/forms/types/entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,21 @@ 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 or a Closure.
When using a Closure, you will be passed the ``EntityRepository`` of the entity
as the only argument and should return a ``QueryBuilder``.
The value of this option can either be a ``QueryBuilder`` object, a Closure or
``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.

Overridden Options
------------------
Expand Down

0 comments on commit bce6255

Please sign in to comment.