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

[11.x] Fix regression bug with global Factory::guessModelNamesUsing() #54665

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

crynobone
Copy link
Member

bug introduced via #54644

bug introduced via #54644

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@crynobone crynobone marked this pull request as ready for review February 17, 2025 22:55
@@ -838,12 +839,15 @@ public function test_factory_model_names_correct()

public function test_factory_global_model_resolver()
{
\Illuminate\Database\Eloquent\Factories\Factory::guessModelNamesUsing(function ($model) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$model here is an instance of Illuminate\Database\Eloquent\Factories\Factory and not a string as indicated in the test (return). If the code was executed this would have thrown an error instead of passing the test.

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@taylorotwell taylorotwell merged commit 013d708 into 11.x Feb 18, 2025
45 checks passed
@taylorotwell taylorotwell deleted the 11/guess-model-from-factory branch February 18, 2025 15:24
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