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

[11.x] Use PHP 8.4 array helpers #53426

Draft
wants to merge 2 commits into
base: 11.x
Choose a base branch
from

Conversation

jnoordsij
Copy link
Contributor

PHP 8.4 introduces new array search functions for finding items matching criteria or determining if any/all of them pass. See also https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all.

This PR introduces these helpers in the Arr and Collection classes to use 'modern' logic for the case where these functions are available. If in the future the minimal PHP version is 8.4, this will allow for further simplification by removing the old logic altogether.

@crynobone
Copy link
Member

crynobone commented Nov 7, 2024

Hi there, can you rebase this PR to php84? We're working on proper support for PHP 8.4 on that branch.

Adding this wouldn't include PHP 8.4 on our CI build is highly dangerous.

@crynobone crynobone marked this pull request as draft November 7, 2024 00:24
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