@nyamsprod as other have said, definitely a BC for A due to class removal. And due to the inverse relation, you don't even have an easy migration path (like with a plain class_alias or an extension)... 😔
@alessandrolai I have an easy way out I can bump package A to the next major and keep B in it's current version and move the class there effectively embracing the BC break BUT it makes my monorepo ugly to work with until I bump package B to the same version as package A and I need in the meantime fin a good git-split tool able to handle 2 majors release ... that's the complex part
I know that ship has already sailed but it would have been nice if the spread operator on iterable did follow the semantic of iterator_to_array with the preserve keys argument being true #php#controversialthoughtoftheweek
@nyamsprod It has the same behavior as array_merge, which makes it very consistent 1-to-1 behavior.
I've seen the default iterator to array key behavior bite people more often, especially when doing iterator to array on multiple yield/from generators.
@zimzat I get the reasoning behind but would have been "cool" nice to have the iterator_to_array behaviour when working with iterator it seems more appropriate
@Crell opt to remove any method on the enum and used good old classes. The implementation feels a bit more natural IMHO and is usable outside League\CSV enum are still present but the usage is a bit "hidden"
Everything is defined under League\Csv\Constraint
@derflocki there are a couple reasons why I do not use SQLite. First the package needs no dependencies, two, the feature was already present in the package like 7 years ago I only updated the UX around it and last but not least I seldom encounter CSV that adheres fully to the draft/informal RDC. Hence using the SQLite extension would not solve CSV parsing in real world IMHO.
Last night I published league/csv version 9.15.0 https://github.com/thephpleague/csv/releases/tag/9.15.0 I hope it will be the first and last release this year (aside any security and bug releases).. I think it will take time for people to adapt to all the new shiny things that landed in the package the past year.
#questionfotheday#php When getting an Iterator as returned by a function/method do you expect the Iterator to already be rewinded or not ? Asking because in #php this assumption is never guaranteed by any contract 🤔
@nyamsprod@ocramius How are you starting off in an unrewound state? From the user's perspective (based on the example in the issue) the csv hasn't been interacted with yet, so it should be in position 0 still.
If that's an internal implementation detail then perhaps switching out Iterator for IteratorAggregate would be a future change.
@zimzat@ocramius
For context, the class already exposes the IteratorAggregate interface but the getRecords method is needed for cases where using the interface is not possible (ie if more options are needed to calculate the records)
I wish #PHP had two things and none of them involve generics... I wish it had type aliases and a native base32 encoding/decoding mechanism (in a class or a pair of functions I do not care)
@derickr@Girgias If we stick with functions a la base64 we then need to add extra variables - the alphabet and maybe the padding character. so that user land can switch the alphabet and/or the padding character as they want PHP would only provide the Hex and Us-Ascii alphabet (those from the RFC)
So for encoding you would have at most 3 parameters and 4 on decode.
Tomorrow will mark the 10th anniversary of the first commit of what will become league/csv 🥳 If you have something nice to say about the package please RT or reply to this post.