Skip to content

Nullsafe with optional object shape report undefined property #11424

@momala454

Description

@momala454

Bug report

I think an error shouldn't be shown when accessing an optional property of an object shape if I access it using nullsafe operator or isset

Code snippet that reproduces the problem

https://phpstan.org/r/df4996ad-d5c6-4bd9-82de-b754a5516805

Expected output

Only an error on the line without the nullsafe operator

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

Thanks for the wonderful tool

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions