Skip to content

Commit 7f185ee

Browse files
javiereguiluzLiinkiing
authored andcommitted
Added the versionadded directive
1 parent 33ed10e commit 7f185ee

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

components/options_resolver.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,11 @@ let you find out which options are defined::
637637
Deprecating the Option
638638
~~~~~~~~~~~~~~~~~~~~~~
639639

640-
Once an option is outdated or you decided not to maintain it anymore, you can deprecate it
641-
using the :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setDeprecated`
640+
.. versionadded:: 4.2
641+
The ``setDeprecated()`` method was introduced in Symfony 4.2.
642+
643+
Once an option is outdated or you decided not to maintain it anymore, you can
644+
deprecate it using the :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::setDeprecated`
642645
method::
643646

644647
$resolver
@@ -653,8 +656,8 @@ method::
653656

654657
Instead of passing the message, you may also pass a closure which returns
655658
a string (the deprecation message) or an empty string to ignore the deprecation.
656-
This closure is specially useful to deprecate allowed types or values of the
657-
defined option::
659+
This closure is useful to only deprecate some of the allowed types or values of
660+
the option::
658661

659662
$resolver
660663
->setDefault('port', null)
@@ -669,7 +672,7 @@ defined option::
669672
;
670673

671674
This closure receives as argument the value of the option after validating it
672-
and before normalize it when the option is being resolved.
675+
and before normalizing it when the option is being resolved.
673676

674677
Performance Tweaks
675678
~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)