Skip to content

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

@stloyd stloyd requested a review from norberttech July 28, 2024 15:10
[
['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)

@stloyd stloyd force-pushed the feature/array-to-row branch from 81bd0d3 to 59967e5 Compare July 28, 2024 17:58
@stloyd stloyd force-pushed the feature/array-to-row branch from 59967e5 to e1f1589 Compare July 28, 2024 18:08
@norberttech norberttech merged commit b8752ac into flow-php:1.x Jul 28, 2024
@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