Skip to content

[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStan #468

Description

@shahinataei-ts

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ServerIssues & PRs related to the Server component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions