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 @@ -790,11 +790,14 @@ method::
790
790
->setDeprecated('hostname', 'acme/package', '1.2')
791
791
792
792
// you can also pass a custom deprecation message (%name% placeholder is available)
793
+ // %name% placeholder will be replaced by the deprecated option.
794
+ // This outputs the following deprecation message:
795
+ // Since acme/package 1.2: The option "hostname" is deprecated, use "host" instead.
793
796
->setDeprecated(
794
797
'hostname',
795
798
'acme/package',
796
799
'1.2',
797
- 'The option "hostname " is deprecated, use "host" instead.'
800
+ 'The option "%name% " is deprecated, use "host" instead.'
798
801
)
799
802
;
800
803
@@ -811,6 +814,10 @@ method::
811
814
:method: `Symfony\\ Component\\ OptionsResolver\\ Options::offsetGet ` method
812
815
to not trigger the deprecation warning.
813
816
817
+ .. note ::
818
+
819
+ All deprecation messages are displayed in the profiler logs in the "Deprecations" tab.
820
+
814
821
Instead of passing the message, you may also pass a closure which returns
815
822
a string (the deprecation message) or an empty string to ignore the deprecation.
816
823
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