Skip to content

Take into account Property Hooks in __construct() #13473

@aneterial

Description

@aneterial

Bug report

Looks like phpstan doesn't know - Property Hook is called in __construct

Code snippet that reproduces the problem

https://phpstan.org/r/5a5cc42b-9bbe-4b17-9c49-f25bd8c3d87e

Expected output

At the stage of calling __construct() - the property $bar is not yet set, in the set hook the check is performed correctly

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions