laravel-ide-helper icon indicating copy to clipboard operation
laravel-ide-helper copied to clipboard

Make model factory method annotation optional in phpDoc

Open sanfair opened this issue 1 year ago • 2 comments

Summary

Laravel v11.15.0 added generic support for the model factories (https://github.com/laravel/framework/pull/52005)

If you use the \Illuminate\Database\Eloquent\Factories\HasFactory trait with generic annotation, factory annotation in the class's phpDoc becomes redundant.

Proposal

Make factory generation optional (ideally in the config).

Probably add additional condition between the next lines: https://github.com/barryvdh/laravel-ide-helper/blob/591e7d665fbab8a3b682e451641706341573eb80/src/Console/ModelsCommand.php#L1333-L1339

sanfair avatar Jul 16 '24 13:07 sanfair