On Wednesday, 13 November 2024 at 00:46, Levi Morrison <levi.morri...@datadoghq.com> wrote:
> There are some weird cases with `callable` which is why they aren't > allowed as a property type. I don't remember all the edges, but if we > are sure that we cannot hit those with simple co-/contra-variance, > then I don't think this needs an RFC and we can just merge the PR. The reason that callable is not allowed as a property type is due to scope/method visibility issues. See the discussion section of Nikita's Deprecate partially supported callables RFC: https://wiki.php.net/rfc/deprecate_partially_supported_callables#discussion The callable type is allowed as a parameter and return type, and Closure is "better" defined than just callable. Best regards, Gina P. Banyard