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 Options::fromArray argument order #2231

Merged
merged 1 commit into from
May 15, 2023
Merged

Fix Options::fromArray argument order #2231

merged 1 commit into from
May 15, 2023

Conversation

bonroyage
Copy link
Contributor

Fixes an issue where you could never provide an Option instance or array to the fromArray method. The second argument for Laravel collections is the array key, and that can only be a scalar value. Also added tests to verify the workings of the method.

The ->values() addition ensures that the array is always turned into a list, in case a key-value pair is provided.

@CLAassistant
Copy link

CLAassistant commented Apr 15, 2023

CLA assistant check
All committers have signed the CLA.

@ifox ifox merged commit 8331d82 into area17:3.x May 15, 2023
@bonroyage bonroyage deleted the form-options branch May 15, 2023 14:09
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