Skip to content

ArrayAccess deprecations are reported on direct method calls but not on array access #13938

@mabar

Description

@mabar

Bug report

When methods implementing ArrayAccess are deprecated, I'd expect both array access and method call syntaxes to report usage of deprecated method. Currently only method call is reported.

Code snippet that reproduces the problem

https://phpstan.org/r/c04b9321-f6c7-4508-b0b0-d0bcac34ffd0

Expected output

e.g. $object['key'] and $object->offsetGet('key') get both reported when offsetGet is deprecated.

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions