Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita30b60d

Browse files
committed
Documenting Options argument for closure deprecation func
1 parentd2907db commita30b60d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎components/options_resolver.rst‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,13 +660,19 @@ This closure is useful to only deprecate some of the allowed types or values of
660660
the option::
661661

662662
$resolver
663+
->setDefault('encryption', null)
663664
->setDefault('port', null)
664665
->setAllowedTypes('port', array('null', 'int'))
665-
->setDeprecated('port', function ($value) {
666+
->setDeprecated('port', function (Options $options,$value) {
666667
if (null === $value) {
667668
return 'Passing "null" to option "port" is deprecated, pass an integer instead.';
668669
}
669670

671+
// deprecation may also depend on another option
672+
if ('ssl' === $options['encryption'] && 456 !== $value) {
673+
return 'Passing a port different than "456" when the "encryption" option is set to "ssl" is deprecated.';
674+
}
675+
670676
return '';
671677
})
672678
;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp