@@ -254,13 +254,13 @@ file but also load a secondary one only if a certain parameter is set::
254
254
}
255
255
}
256
256
257
- You are also able to deprecate container parameters in your extension to warn
258
- to not use a specific parameter anymore. This is particularly useful to help
259
- developers with the migration process across major versions of an extension.
260
- The deprecation can be done thanks to the `` ContainerBuilder::deprecateParameter ``
261
- method. This can only be achieved when configuring an extension with PHP, as this is
262
- not possible to do it with other configuration formats (YAML, XML). Let's define a
263
- parameter in our extension that will be declared as deprecated ::
257
+ You can also deprecate container parameters in your extension to warn users
258
+ about not using them anymore. This helps with the migration across major versions
259
+ of an extension.
260
+
261
+ Deprecation is only possible when using PHP to configure the extension, not when
262
+ using XML or YAML. Use the `` ContainerBuilder::deprecateParameter() `` method to
263
+ provide the deprecation details ::
264
264
265
265
public function load(array $configs, ContainerBuilder $containerBuilder)
266
266
{
@@ -277,13 +277,13 @@ parameter in our extension that will be declared as deprecated::
277
277
);
278
278
}
279
279
280
- The parameter being deprecated must be set before being declared as deprecated. Otherwise
281
- a :class: `Symfony\\ Component\\ DependencyInjection\\ Exception\\ ParameterNotFoundException ` exception
282
- will be thrown.
280
+ The parameter being deprecated must be set before being declared as deprecated.
281
+ Otherwise a :class: `Symfony\\ Component\\ DependencyInjection\\ Exception\\ ParameterNotFoundException `
282
+ exception will be thrown.
283
283
284
284
.. versionadded :: 6.3
285
285
286
- The ``ContainerBuilder::deprecateParameter `` method was introduced in Symfony 6.3.
286
+ The ``ContainerBuilder::deprecateParameter() `` method was introduced in Symfony 6.3.
287
287
288
288
.. note ::
289
289
0 commit comments