Skip to content

Implicit inheritance of PHPDoc does not work for PHP built in classes #1802

@emodric

Description

@emodric

Summary of a problem or a feature request

As far as I understood, PHPStan 0.11 brought support for implicit inheritance of PHPDoc annotations. However, it seems that this does not work with PHP built in classes like ArrayAccess, Countable, IteratorAggregate and so on. Issue shows up only when strict rules are enabled.

Code snippet that reproduces the problem

https://phpstan.org/r/3c398bbb-cd0d-45ab-be14-a493722ac07f

Expected output

I expect no errors to occur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions