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

Appearance settings

Commit 06e0faa

Browse filesBrowse files
committed
minor #11704 [OptionsResolver] Add note about deprecated options (yceruto)
This PR was squashed before being merged into the 4.2 branch (closes #11704). Discussion ---------- [OptionsResolver] Add note about deprecated options Missing piece related to symfony/symfony#28878 Commits ------- aaac426 [OptionsResolver] Add note about deprecated options
2 parents 5c11d98 + aaac426 commit 06e0faa
Copy full SHA for 06e0faa

File tree

1 file changed

+6
-0
lines changed
Filter options

1 file changed

+6
-0
lines changed

‎components/options_resolver.rst

Copy file name to clipboardExpand all lines: components/options_resolver.rst
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,12 @@ method::
733733
somewhere, either its value is provided by the user or the option is evaluated
734734
within closures of lazy options and normalizers.
735735

736+
.. note::
737+
738+
If you use your own deprecated option within your own library and need to fix it,
739+
pass ``false`` as second argument of the :method:`Symfony\\Component\\OptionsResolver\\Options::offsetGet()` method
740+
so as not to trigger the deprecation warning.
741+
736742
Instead of passing the message, you may also pass a closure which returns
737743
a string (the deprecation message) or an empty string to ignore the deprecation.
738744
This closure is useful to only deprecate some of the allowed types or values of

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.