Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix model factory method arguments for Laravel >= 9 #1361

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

wimski
Copy link
Contributor

@wimski wimski commented Jul 6, 2022

Summary

The arguments for HasFactory::factory have changed since Laravel 9, so the docblocks have to be changed accordingly.

laravel/framework@0f0f883

In order to test this change, you will need Laravel 9, which will not install because of conflicting/limiting dependencies. I tested it by changing the following dependencies:

  • friendsofphp/php-cs-fixer from ^2 to ^2 || ^3
  • vimeo/psalm from ^3.12 to ^3.12 || ^4

Updating these packages will open such a can of worms, that I didn't include these updates in this PR.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Existing tests have been adapted and/or new tests have been added
  • Add a CHANGELOG.md entry
  • Code style has been fixed via composer fix-style

Code style fixing cannot be done with PHP 8.1. Another reason friendsofphp/php-cs-fixer should be updated to ^3.

PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 8.0.*.

@wimski wimski force-pushed the fix/model-factory-method-9.x branch from e29e7e1 to 66f487f Compare July 6, 2022 12:58
@barryvdh barryvdh merged commit 5eadd2c into barryvdh:master Aug 11, 2022
ppmathis pushed a commit to ppmathis/laravel-ide-helper that referenced this pull request Nov 12, 2022
d3v2a pushed a commit to d3v2a/laravel-ide-helper that referenced this pull request Feb 16, 2024
@wimski wimski deleted the fix/model-factory-method-9.x branch February 19, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants