Going through a thread... how do you make #PHPStan work acceptably in a project with AR that heavily uses magic methods ? #Yii2 dinosaur project needed some good exception for a rule explicitly for the models... I guess class property phpdoc should help but if I ask for it, the guys will murder me ...
@djumaka If there's a source of truth, such as a database table, then you can generate the phpdocs. That works okay for PhpStorm, and a start for PHPStan, but if there's array shapes that need to be defined then it's probably not for enough. Next week I'll be creating a JSON cache of the DB then using that in a custom type-specifying extension. (This for a non-Yii project)
A phpstan yii extension might do all that already: https://packagist.org/packages/erickskrauch/phpstan-yii2?query=phpstan%20yii