plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Bug]: Factory magic relationship methods require `$attributes` while its optional

Open devmoath opened this issue 3 years ago • 1 comments

Bug description

Based on the docs here the $attributes of the factory magic relationship methods is optional.

Plugin version

5.7.3.221

Operating system

MacOS

Steps to reproduce

  1. create new project with laravel new projec-name
  2. create additional model e.g. Post
  3. setup the relationship between User and Post as HasMany relationship
  4. generate helper code
  5. anywhere in the project write User::factory()->hasPosts(5)->create();
  6. PHPStorm will ask you to pass $attributes to hasPosts function

Relevant log output

N/A

devmoath avatar Aug 08 '22 08:08 devmoath

Fixed. Thanks.

adelf avatar Aug 08 '22 10:08 adelf

Fixed in the 6.1 release. Thanks.

adelf avatar Nov 16 '22 15:11 adelf