8000 feature #6973 Callback doesn't have to be static (patrick-mcdougle) · symfony/symfony-docs@649ee61 · GitHub
[go: up one dir, main page]

Skip to content

Commit 649ee61

Browse files
8000
committed
feature #6973 Callback doesn't have to be static (patrick-mcdougle)
This PR was squashed before being merged into the master branch (closes #6973). Discussion ---------- Callback doesn't have to be static Adding documentation for symfony/symfony#19745 Commits ------- 79bc283 Callback doesn't have to be static
2 parents 8126206 + 79bc283 commit 649ee61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

reference/constraints/Choice.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ form element.
143143
}
144144
}
145145
146+
.. versionadded:: 3.2
147+
As of Symfony 3.2 the callback no longer needs to be static.
148+
146149
You can pass the name of this method to the `callback`_ option of the ``Choice``
147150
constraint.
148151

@@ -208,7 +211,7 @@ constraint.
208211
}
209212
}
210213
211-
If the static callback is stored in a different class, for example ``Util``,
214+
If the callback is stored in a different class and is static, for example ``Util``,
212215
you can pass the class name and the method as an array.
213216

214217
.. configuration-block::

0 commit comments

Comments
 (0)
0