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 857a5f4
Browse filesBrowse the repository at this point in the historyBrowse files
ParametersAcceptorSelector: keep the acceptor-level variadic flag separate from the per-parameter one
* `combineAcceptors()` used a single `$isVariadic` variable both for the variadic flag of the combined variant and for the variadic flag of the parameter currently being merged. Merging a non-variadic acceptor reset the accumulated flag, so the combined variant was returned as non-variadic even though its parameter list still ended in a variadic parameter. The per-parameter flag now lives in its own `$isParameterVariadic` variable.
* `combineAcceptors()` also dropped the types of the parameters behind the merged variadic parameter when truncating the parameter list. Their types (plus native and PHPDoc types) are now merged into the variadic parameter, which makes the combined signature independent of the order of the union members.
* `IntersectionTypeMethodReflection::getMethodWithMostParameters()` ranked variants by parameter count only, so `IA&IB` and `IB&IA` produced different signatures when one of the methods was variadic. A variadic variant now always wins over a non-variadic one.
* Probed and found already correct: named arguments and argument unpacking on union method calls, `Closure::fromCallable()` on unions, `array_map()` with a union first-class callable, and intersections of `callable` PHPDoc types (those collapse in `TypeCombinator`).
0 commit comments