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
Broken parameter type evaluation inside a closure for a by-ref variable #13614
Parameter #1 $callback of function array_map expects (callable('bar'|FooEnum::BAR): mixed)|null, Closure(FooEnum): 'bar' given.
Type #1 from the union: Type FooEnum of parameter #1 $item of passed callable needs to be same or wider than parameter type FooEnum::BAR|string of accepting callable.
argument.type
At the same time, if I remove the closuer, this code doesn't trigger anything:
Activity
ondrejmirtes commentedon Feb 5, 2026
This is expected. If you call the closure twice, it fails: https://3v4l.org/MtVgo
github-actions commentedon Mar 9, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.