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

[9.x] Fix bug in Fluent Class with named arguments in migrations #44251

Merged
merged 1 commit into from
Sep 22, 2022
Merged

[9.x] Fix bug in Fluent Class with named arguments in migrations #44251

merged 1 commit into from
Sep 22, 2022

Conversation

sneycampos
Copy link
Contributor

@sneycampos sneycampos commented Sep 22, 2022

When used named arguments on migration methods, e.g: $table->boolean('isActive')->default(value: true); the Fluent Class throws a Exception with "Undefined array key"

image

This fixes the way to get the first value on $parameter from array index to reset()

@driesvints
Copy link
Member

Why would you use a named argument there?

@sneycampos
Copy link
Contributor Author

why not?

@driesvints
Copy link
Member

It's a one argument method. There is no point?

@sneycampos
Copy link
Contributor Author

if PHP by default makes it possible to use named arguments even with only 1 parameter, why shouldn't Fluent too?

@taylorotwell taylorotwell merged commit 84d3cc9 into laravel:9.x Sep 22, 2022
@sneycampos sneycampos deleted the fluent-bug-with-migrations branch September 23, 2022 09: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.

3 participants