Skip to content

Commit 0124ddb

Browse files
committed
Minor reword
1 parent 2ff5b99 commit 0124ddb

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

components/dependency_injection/compilation.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,13 @@ file but also load a secondary one only if a certain parameter is set::
254254
}
255255
}
256256

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::
264264

265265
public function load(array $configs, ContainerBuilder $containerBuilder)
266266
{
@@ -277,13 +277,13 @@ parameter in our extension that will be declared as deprecated::
277277
);
278278
}
279279

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.
283283

284284
.. versionadded:: 6.3
285285

286-
The ``ContainerBuilder::deprecateParameter`` method was introduced in Symfony 6.3.
286+
The ``ContainerBuilder::deprecateParameter()`` method was introduced in Symfony 6.3.
287287

288288
.. note::
289289

0 commit comments

Comments
 (0)