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

Add array_to_row helper function #1149

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

stloyd
Copy link
Member

@stloyd stloyd commented Jul 28, 2024

Change Log

Added

  • Add `array_to_row` helper function

Fixed

Changed

Removed

Deprecated

Security


Description

[
['id' => 1234, 'deleted' => false, 'phase' => null],
['id' => 4321, 'deleted' => true, 'phase' => 'launch'],
]
Copy link
Member

Choose a reason for hiding this comment

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

hmm I'm honestly not sure how this edge case should be handled, because technically speaking this is a use case for array_to_rows() and the output that returns only one row when input defines two of them is a bit hard to predict.

I'm tempted to say that in this case array_to_row should throw an exception.

The validation could simply check if all array keys are strings (since only strings can become a entry names)

@norberttech norberttech merged commit b8752ac into flow-php:1.x Jul 28, 2024
26 checks passed
@stloyd stloyd deleted the feature/array-to-row branch July 28, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants