Skip to content

Check for unsafe direct __construct() calls #7022

@zonuexe

Description

@zonuexe

Feature request

refs php/php-src#8351, vimeo/psalm#7857, Nyholm/psr7#198

It can be pointed out in these issues that calling __construct() from outside the object not only breaks immutability, but can also cause many unexpected behaviors.

Currently @muno92 is developing a PR for this feature.

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

Over the last few days we have exchanged some opinions about PHP and PHPStan at PHPerKaigi in Japan. (You may have seen the picture too)

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