-
Notifications
You must be signed in to change notification settings - Fork 193
ArrayDataSet: invalid initialization for mixed rows #179
Comments
Also met this limitation. At least this behavior should be documented. With "IMPORTANT" label. It was hard to realize why columns were not populated. |
This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions. |
It's worse than that, row with index |
This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions. |
@sebastianbergmann I am still happy to implement a fix for this, just need a conformation that my proposed changes would be considered correct. |
This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity since it was marked as stale. Thank you for your contributions. |
I have found out that the same list of columns should be used for all the rows even if this is not strictly needed.
The problem comes from the constructor of
ArrayDataSet
. The first row is used to decide which columns are available:https://github.com/sebastianbergmann/dbunit/blob/master/src/Extensions/Database/DataSet/ArrayDataSet.php#L44
It would be more user-friendly to calculate the union of all the rows keys. And if this is not possible, at least yell during the construction instead of setting silently to null all the remaining columns.
The text was updated successfully, but these errors were encountered: