laravel-ide-helper
laravel-ide-helper copied to clipboard
Make model factory method annotation optional in phpDoc
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