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::
790790 ->setDeprecated('hostname', 'acme/package', '1.2')
791791
792792 // 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.
793796 ->setDeprecated(
794797 'hostname',
795798 'acme/package',
796799 '1.2',
797- 'The option "hostname " is deprecated, use "host" instead.'
800+ 'The option "%name% " is deprecated, use "host" instead.'
798801 )
799802 ;
800803
@@ -811,6 +814,10 @@ method::
811814 :method: `Symfony\\ Component\\ OptionsResolver\\ Options::offsetGet ` method
812815 to not trigger the deprecation warning.
813816
817+ .. note ::
818+
819+ All deprecation messages are displayed in the profiler logs in the "Deprecations" tab.
820+
814821Instead of passing the message, you may also pass a closure which returns
815822a string (the deprecation message) or an empty string to ignore the deprecation.
816823This 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