Skip to content

[12.x] Modify PHPDoc for Collection::chunkWhile functions to support preserving keys #55324

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

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

jsvdvis
Copy link
Contributor

@jsvdvis jsvdvis commented Apr 8, 2025

Modifies the PHPDoc of the Collection::chunkWhile and LazyCollection::chunkWhile functions to support preserving the keys of the original Collection.

Support for preserving keys in the chunks was added in #33999, while #39506 added the original type definitions. However, these type definitions only partially include support for the key types.

I have also included a test to show that string keys are also preserved in the Collections.

Copy link

github-actions bot commented Apr 8, 2025

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@jsvdvis jsvdvis changed the title [12.x] Modify PHPDoc for chunkWhile functions to support keyed Collections [12.x] Modify PHPDoc for chunkWhile functions to support preserving keys Apr 8, 2025
@jsvdvis jsvdvis changed the title [12.x] Modify PHPDoc for chunkWhile functions to support preserving keys [12.x] Modify PHPDoc for Collection::chunkWhile functions to support preserving keys Apr 8, 2025
@jsvdvis jsvdvis marked this pull request as ready for review April 8, 2025 18:28
@taylorotwell taylorotwell merged commit d07ba17 into laravel:12.x Apr 8, 2025
58 of 60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants