Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planned features and changes for 11.0.0 #62

Open
DusanKasan opened this issue Mar 3, 2020 · 4 comments · May be fixed by #63
Open

Planned features and changes for 11.0.0 #62

DusanKasan opened this issue Mar 3, 2020 · 4 comments · May be fixed by #63
Assignees
Milestone

Comments

@DusanKasan
Copy link
Owner

So since this came up in multiple PRs/issues, I guess I will summarize what will be done in near future.

The biggest problem is the limitation of the CollectionTrait that causes the collection methods on every class that uses it to return instance of Collection where you would prefer it to return an instance of the original class. To solve this, every collection method/function will return CollectionInterface (which the class will implement because it uses the CollectionTrait) instead of the included Collection and a mechanism will be provided by the implementor to build a new instance of the original class -- probably a factory method of sorts, where the input will be an iterable. The exact implementation is till open to discussion.

This will have to go hand in hand with introduction of Generic documentation on the collection methods to describe the return types (suggested in #61). We will still have to deal with losing type information during some operations (like filter) but it should help anyway.

Also most of the reported issues should have their fixes merged before the release of 11.0.0.

@DusanKasan DusanKasan added this to the 11.0.0 milestone Mar 3, 2020
@DusanKasan DusanKasan self-assigned this Mar 3, 2020
@DusanKasan
Copy link
Owner Author

Oh and if nothing unexpected happens, don't expect PHP version bump. The only reasons to bump the PHP version I see would be to introduce type annotation (which would slow the lib down) or introduce short closures (neat but not needed, you can still use them in userland).

@DusanKasan
Copy link
Owner Author

The development for this milestone will be done in #63

@DusanKasan DusanKasan linked a pull request Mar 9, 2020 that will close this issue
@DusanKasan
Copy link
Owner Author

So, most of the fixes are already in, the version will be bumped in the end to >=7.2, psalm annotation will be added to both functions and Collection Class/Interface/Trait and the use of the bundled Trait should now be more straightforward.

Don't expect big BCs, but there will probably be some. I will try to summarize after release but everything will be tested and as such you can use the test diff as BC guidelines :)

@Radiergummi
Copy link

Radiergummi commented Sep 28, 2021

Hi @DusanKasan, have you got around implementing the outstanding issues? Do you need help with anything? I'm eagerly waiting for the problems you mentioned in this issue to be solved, and the psalm annotations as well - particularly around generics, which PHPStorm finally supports 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants