File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -637,8 +637,11 @@ let you find out which options are defined::
637
637
Deprecating the Option
638
638
~~~~~~~~~~~~~~~~~~~~~~
639
639
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 `
642
645
method::
643
646
644
647
$resolver
@@ -653,8 +656,8 @@ method::
653
656
654
657
Instead of passing the message, you may also pass a closure which returns
655
658
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::
658
661
659
662
$resolver
660
663
->setDefault('port', null)
@@ -669,7 +672,7 @@ defined option::
669
672
;
670
673
671
674
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.
673
676
674
677
Performance Tweaks
675
678
~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments