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 408ee2e

Browse filesBrowse files
committed
minor #10496 [OptionsResolver] Add some notes about trigger deprecation (yceruto)
This PR was merged into the master branch. Discussion ---------- [OptionsResolver] Add some notes about trigger deprecation Updates according to symfony/symfony#28878 Commits ------- bb4861b Add some notes about trigger deprecation
2 parents ec7b390 + bb4861b commit 408ee2e
Copy full SHA for 408ee2e

File tree

1 file changed

+11
-0
lines changed
Filter options

1 file changed

+11
-0
lines changed

‎components/options_resolver.rst

Copy file name to clipboardExpand all lines: components/options_resolver.rst
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,12 @@ method::
654654
->setDeprecated('hostname', 'The option "hostname" is deprecated, use "host" instead.')
655655
;
656656

657+
.. note::
658+
659+
The deprecation message will be triggered only if the option is being used
660+
somewhere, either its value is provided by the user or the option is evaluated
661+
within closures of lazy options and normalizers.
662+
657663
Instead of passing the message, you may also pass a closure which returns
658664
a string (the deprecation message) or an empty string to ignore the deprecation.
659665
This closure is useful to only deprecate some of the allowed types or values of
@@ -677,6 +683,11 @@ the option::
677683
})
678684
;
679685

686+
.. note::
687+
688+
Deprecation based on the value is triggered only when the option is provided
689+
by the user.
690+
680691
This closure receives as argument the value of the option after validating it
681692
and before normalizing it when the option is being resolved.
682693

0 commit comments

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