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

Use array_is_list() instead of ArrayUtil::isAssoc() where possible #7259

Merged
merged 6 commits into from
Jun 6, 2024

Conversation

aschempp
Copy link
Member

@aschempp aschempp commented Jun 3, 2024

I think this can be removed since we have array_is_list now.

TODO after merge:

  • Add a corresponding rule to contao/contao-rector

@aschempp aschempp added this to the 5.4 milestone Jun 3, 2024
@aschempp aschempp requested a review from a team June 3, 2024 08:39
@aschempp aschempp self-assigned this Jun 3, 2024
@aschempp
Copy link
Member Author

aschempp commented Jun 4, 2024

I updated the PR to only remove unnecessary use of the helper method if the variable type is already safe (and remove a case of is_array check before calling the method that checks the same.

@aschempp aschempp requested review from leofeyer and fritzmg June 4, 2024 06:46
@leofeyer leofeyer changed the title Deprecate the ArrayUtil::isAssoc method Use array_is_list() instead of ArrayUtil::isAssoc() where possible Jun 6, 2024
@leofeyer leofeyer added CI and removed feature labels Jun 6, 2024
@leofeyer leofeyer merged commit ee8fa9a into contao:5.x Jun 6, 2024
15 of 16 checks passed
@leofeyer
Copy link
Member

leofeyer commented Jun 6, 2024

Thank you @aschempp.

@aschempp aschempp deleted the fix/array-assoc branch June 17, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants