the error is reported both for the first-class callable and \Closure::fromCallable() approaches (which it seems is under-the-hood for Psalm's handling of the first-class callables). Something breaks here about the input type inference.
But there is no error, as expected, when wiring the input argument manually.
https://psalm.dev/r/6bd1876d5a
the error is reported both for the first-class callable and
\Closure::fromCallable()
approaches (which it seems is under-the-hood for Psalm's handling of the first-class callables). Something breaks here about the input type inference.But there is no error, as expected, when wiring the input argument manually.