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
It's not clear if the omission of null from the type specification before 8.4 was deliberate. The docs for PHP do not mention this. They also include an example whereby a null is provided as the value for the $callback argument, which appears to work fine with 8.0 <= PHP < 8.4.
So this appears to be a bug in the stub. It is causing PHPStan to report incorrect errors against valid code, including against the example provided in the PHP docs: