Skip to content

Commit ab58080

Browse files
authored
Changing type definition Closure by callable
To avoid confusion I suggest be consistent according to its own definition https://github.com/symfony/symfony/blob/f1468c48a5afc745899de48621465d29494ba086/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php#L43
1 parent c347444 commit ab58080

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

reference/forms/types/entity.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ instead of the ``default`` entity manager.
181181
query_builder
182182
~~~~~~~~~~~~~
183183

184-
**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure **default**: ``null``
184+
**type**: ``Doctrine\ORM\QueryBuilder`` or a ``callable`` **default**: ``null``
185185

186186
Allows you to create a custom query for your choices. See
187187
:ref:`ref-form-entity-query-builder` for an example.
188188

189-
The value of this option can either be a ``QueryBuilder`` object, a Closure or
190-
``null`` (which will load all entities). When using a Closure, you will be
189+
The value of this option can either be a ``QueryBuilder`` object, a ``callable`` or
190+
``null`` (which will load all entities). When using a ``callable``, you will be
191191
passed the ``EntityRepository`` of the entity as the only argument and should
192192
return a ``QueryBuilder``.
193193

0 commit comments

Comments
 (0)