The Handler phpstan-type on ElementReference uses a bare \Closure. Implementing RegistryInterface with checkMissingCallableSignature enabled is then impossible: bare Closure fails the signature rule, and adding one breaks contravariance against the interface. \Closure(mixed...): mixed on the alias fixes both. Happy to send the one-liner.
The
Handlerphpstan-type onElementReferenceuses a bare\Closure. ImplementingRegistryInterfacewithcheckMissingCallableSignatureenabled is then impossible: bareClosurefails the signature rule, and adding one breaks contravariance against the interface.\Closure(mixed...): mixedon the alias fixes both. Happy to send the one-liner.