{"action":"created","issue":{"url":"https://api.github.com/repos/portphp/portphp/issues/14","labels_url":"https://api.github.com/repos/portphp/portphp/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/portphp/portphp/issues/14/comments","events_url":"https://api.github.com/repos/portphp/portphp/issues/14/events","html_url":"https://github.com/portphp/portphp/issues/14","id":84473744,"number":14,"title":"Support non-array data","user":{"login":"ddeboer","id":89267,"avatar_url":"https://avatars.githubusercontent.com/u/89267?v=3","gravatar_id":"","url":"https://api.github.com/users/ddeboer","html_url":"https://github.com/ddeboer","followers_url":"https://api.github.com/users/ddeboer/followers","following_url":"https://api.github.com/users/ddeboer/following{/other_user}","gists_url":"https://api.github.com/users/ddeboer/gists{/gist_id}","starred_url":"https://api.github.com/users/ddeboer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddeboer/subscriptions","organizations_url":"https://api.github.com/users/ddeboer/orgs","repos_url":"https://api.github.com/users/ddeboer/repos","events_url":"https://api.github.com/users/ddeboer/events{/privacy}","received_events_url":"https://api.github.com/users/ddeboer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/portphp/portphp/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-03T10:00:26Z","updated_at":"2015-06-03T14:10:44Z","closed_at":null,"body":"Previously, the data-import relied heavily on arrays as data items. I think arrays are usually a good choice, as they are lightweight. However, I think this library should not make assumptions about the data structure that users are working with. \r\n\r\nThe data is still limited to arrays in two places:\r\n1. [Writers](https://github.com/portphp/portphp/blob/master/src/Writer.php#L22) typehint on arrays.\r\n2. The [filters](https://github.com/portphp/portphp/tree/master/src/Filter) that ship with this library still expect arrays. \r\n\r\n(Previously we had ItemConverters that only supported arrays, but we replaced with the much more flexible [steps](https://github.com/portphp/steps) that don’t depend on arrays.)\r\n\r\nWhat about just removing the array typehint everywhere? In writers that only support arrays, such as `ExcelWriter`, we will just throw an exception if the input is no array.\r\n\r\nThis continues the discussion from https://github.com/ddeboer/data-import/issues/208. I closed that issue, but I think it needs more careful consideration.\r\n\r\n/cc @florianeckerstorfer "},"comment":{"url":"https://api.github.com/repos/portphp/portphp/issues/comments/108443000","html_url":"https://github.com/portphp/portphp/issues/14#issuecomment-108443000","issue_url":"https://api.github.com/repos/portphp/portphp/issues/14","id":108443000,"user":{"login":"sagikazarmark","id":1226384,"avatar_url":"https://avatars.githubusercontent.com/u/1226384?v=3","gravatar_id":"","url":"https://api.github.com/users/sagikazarmark","html_url":"https://github.com/sagikazarmark","followers_url":"https://api.github.com/users/sagikazarmark/followers","following_url":"https://api.github.com/users/sagikazarmark/following{/other_user}","gists_url":"https://api.github.com/users/sagikazarmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sagikazarmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sagikazarmark/subscriptions","organizations_url":"https://api.github.com/users/sagikazarmark/orgs","repos_url":"https://api.github.com/users/sagikazarmark/repos","events_url":"https://api.github.com/users/sagikazarmark/events{/privacy}","received_events_url":"https://api.github.com/users/sagikazarmark/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T14:10:44Z","updated_at":"2015-06-03T14:10:44Z","body":"I am pretty sure you can't assume this in every cases. Only if you look at converters, that can result in any number of data structures."}}