You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3295957
Browse filesBrowse the repository at this point in the historyBrowse files
Report leaving out a parameter whose default PHP does not know
php-src stubs declare parameters like mt_rand()'s $min or array_keys()'s
$filter_value with the default UNKNOWN. PHP throws "must be passed
explicitly, because the default value is not known" when a later named
argument skips such a parameter, or when ... of a partial application
leaves it out. The default is now an ErrorType that every variant keeps,
so calls, closure calls and partial applications report it, and such a
partial application infers Closure. Calls like mt_rand(max: 5) crashed
ArgumentsNormalizer before.
A named argument now only selects the variants that have its parameter,
so session_set_save_handler($open, read: $read) is checked against the
signature with $close instead of the one with SessionHandlerInterface.
Amp-Thread-ID: https://ampcode.com/threads/T-01a1c541-317f-7386-a2ed-9cbd66178685
$errors[] = RuleErrorBuilder::message(sprintf('Argument #%d ($%s) must be passed explicitly, because the default value is not known.', $i + 1, $parameter->getName()))
1037
+
->identifier('argument.unknownDefaultValue')
1038
+
->line($line)
1039
+
->build();
1040
+
}
1041
+
1018
1042
if ($hasNamedArguments && $checkMissingParameters) {
0 commit comments