You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
case 'array':
case 'json':
$realType = 'array<array-key, mixed>';
Alternatively it would be nice to be able to implement this using the Barryvdh\LaravelIdeHelper\Contracts\ModelHookInterface, but I think a public getter to properties in \Barryvdh\LaravelIdeHelper\Console\ModelsCommand is needed.
The text was updated successfully, but these errors were encountered:
Our use case is running ide-helper:models as part of CI to enforce migrations matching what PHPstan is checking. For this purpose we use the reset option. This is a very nice setup as it our properties on our models always match the migrations and casts, and static analysis is able to detect more errors.
How would you feel of an option to enforce the types like reset does, but keep some changes like generics? I am happy to contribute any changes needed, but before investing the hours I would love to get some feedback for the proposals.
Summary
Hi.
Since the higher PHPStan levels wants generics on array types, I was wondering how you would feel about changing array properties on models from
to
This looks like it could be a small change to the ModelsCommand https://github.com/barryvdh/laravel-ide-helper/blob/master/src/Console/ModelsCommand.php#L392 to
Alternatively it would be nice to be able to implement this using the
Barryvdh\LaravelIdeHelper\Contracts\ModelHookInterface
, but I think a public getter to properties in\Barryvdh\LaravelIdeHelper\Console\ModelsCommand
is needed.The text was updated successfully, but these errors were encountered: