File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -801,11 +801,14 @@ method::
801
801
->setDeprecated('hostname', 'acme/package', '1.2')
802
802
803
803
// you can also pass a custom deprecation message (%name% placeholder is available)
804
+ // %name% placeholder will be replaced by the deprecated option.
805
+ // This outputs the following deprecation message:
806
+ // Since acme/package 1.2: The option "hostname" is deprecated, use "host" instead.
804
807
->setDeprecated(
805
808
'hostname',
806
809
'acme/package',
807
810
'1.2',
808
- 'The option "hostname " is deprecated, use "host" instead.'
811
+ 'The option "%name% " is deprecated, use "host" instead.'
809
812
)
810
813
;
811
814
@@ -822,6 +825,10 @@ method::
822
825
:method: `Symfony\\ Component\\ OptionsResolver\\ Options::offsetGet ` method
823
826
to not trigger the deprecation warning.
824
827
828
+ .. note ::
829
+
830
+ All deprecation messages are displayed in the profiler logs into Deprecations tab.
831
+
825
832
Instead of passing the message, you may also pass a closure which returns
826
833
a string (the deprecation message) or an empty string to ignore the deprecation.
827
834
This closure is useful to only deprecate some of the allowed types or values of
You can’t perform that action at this time.
0 commit comments