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
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:
<?phpdeclare(strict_types=1);
return [
/* |-------------------------------------------------------------------------- | Models hooks |-------------------------------------------------------------------------- | | Define which hook classes you want to run for models to add custom information | | Hooks should implement Barryvdh\LaravelIdeHelper\Contracts\ModelHookInterface. | */'model_hooks' => [
App\Support\IdeHelper\RemoveFactoryAnnotation::class,
],
];
Summary
Laravel v11.15.0 added generic support for the model factories (laravel/framework#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:
laravel-ide-helper/src/Console/ModelsCommand.php
Lines 1333 to 1339 in 591e7d6
The text was updated successfully, but these errors were encountered: