In their slides, I had the feeling that parsing a CSV file was too complicated, so I had the idea to implement the feature in loophp/collection. But to do that, I had to update loophp/iterators first, see the relevant commit.
This PR:
[x] Update Collection::fromFile constructor in a non-breaking backward compatibility
[x] It breaks backward compatibility (Minor BC - the signature of Collection::fromFile() has been updated, the length parameter has been replaced with the consumer parameter.)
Gauthier told me you created this PR, that's a big yes to me! This will definitely improve the DX when dealing with files. We'll definitely use this feature in production as soon as it is available 🚀
I saw a presentation made by a French company: https://speakerdeck.com/goathier/collection
In their slides, I had the feeling that parsing a CSV file was too complicated, so I had the idea to implement the feature in
loophp/collection
. But to do that, I had to updateloophp/iterators
first, see the relevant commit.This PR:
Collection::fromFile
constructor in a non-breaking backward compatibilityCollection::fromFile()
has been updated, thelength
parameter has been replaced with theconsumer
parameter.)