8000
File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -660,13 +660,19 @@ This closure is useful to only deprecate some of the allowed types or values of
660
660
the option::
661
661
662
662
$resolver
663
+ ->setDefault('encryption', null)
663
664
->setDefault('port', null)
664
665
->setAllowedTypes('port', array('null', 'int'))
665
- ->setDeprecated('port', function ($value) {
666
+ ->setDeprecated('port', function (Options $options, $value) {
666
667
if (null === $value) {
667
668
return 'Passing "null" to option "port" is deprecated, pass an integer instead.';
668
669
}
669
670
671
+ // deprecation may also depend on another option
672
+ if ('ssl' === $options['encryption'] && 456 !== $value) {
673
+ return 'Passing a different port than "456" when the "encryption" option is set to "ssl" is deprecated.';
674
+ }
675
+
670
676
return '';
671
677
})
672
678
;
You can’t perform that action at this time.
0 commit comments