Skip to content

Commit

Permalink
Merge branch '2.7' into 2.8
Browse files Browse the repository at this point in the history
Conflicts:
	reference/forms/types/entity.rst
  • Loading branch information
wouterj committed May 21, 2016
2 parents 991a135 + 44e170b commit 3a7d782
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 7 additions & 0 deletions book/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
12 changes: 7 additions & 5 deletions reference/forms/types/entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3a7d782

Please sign in to comment.