File tree 2 files changed +17
-1
lines changed
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ Configuration Formats
58
58
~~~~~~~~~~~~~~~~~~~~~
59
59
60
60
Unlike other frameworks, Symfony doesn't impose a specific format on you to
61
- configure your applications, but lets you choose between YAML, XML and PHP.
61
+ configure your applications, but lets you choose between YAML, XML and PHP.
62
62
Throughout the Symfony documentation, all configuration examples will be
63
63
shown in these three formats.
64
64
Original file line number Diff line number Diff line change @@ -607,6 +607,22 @@ accessor methods for parameters::
607
607
To learn more about compiling the container see
608
608
:doc: `/components/dependency_injection/compilation `.
609
609
610
+ It is also possible to deprecate a container parameter. This is particularly useful
611
+ if you're writing your own package and want to warn developers to not use a parameter anymore
612
+ because it will be removed in one of the next version of your package.
613
+ Deprecating a container parameter can be done as follow::
614
+
615
+ $container->deprecateParameter(
616
+ 'vendor.foo',
617
+ 'vendor-name/package-name', '1.3',
618
+ // optionally you can set a custom deprecation message
619
+ '"vendor.foo" is deprecated, you should use "vendor.foo_replacement" instead.'
620
+ );
621
+
622
+ .. versionadded :: 6.3
623
+
624
+ The ``ContainerBuilder::deprecateParameter `` method was introduced in Symfony 6.3.
625
+
610
626
.. _services-wire-specific-service :
611
627
612
628
Choose a Specific Service
You can’t perform that action at this time.
0 commit comments