Skip to content

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.

@github-actions
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.

3 participants