Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc09eacc

Browse files
committed
minor#15172 [Validator] Add warning about closure not being cachable (Nyholm)
This PR was squashed before being merged into the 4.4 branch.Discussion----------[Validator] Add warning about closure not being cachableFollow up fromsymfony/symfony#40645The annotation cache will not work with `Closure`.If I understand correctly, it is not possible to have external dependencies in your custom validator AND get your annotation cached. You have to chose one or the other.Commits-------ebddb78 [Validator] Add warning about closure not being cachable
2 parentsd5c349e +ebddb78 commitc09eacc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎reference/constraints/Callback.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,13 @@ constructor of the Callback constraint::
251251
}
252252
}
253253

254+
..warning::
255+
256+
Using a ``Closure`` together with annotation configuration will disable the
257+
annotation cache for that class/property/methods because ``Closure``s cannot
258+
be cached. For best performance, it is recommended to use a static callback
259+
method.
260+
254261
Options
255262
-------
256263

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp