-
Notifications
You must be signed in to change notification settings - Fork 179
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
[Core: Utility] Remove asArray function #4133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
php lorisform_parser.php |
Upon further review, these functions actually have quite different behaviour.
We can take two approaches here:
Thanks to @xlecours and @kongtiaowang for doing testing on this. @xlecours @driusan Do you have a preference as to what approach to use here? |
I prefer simplifying if possible (so approach #2), personally.. but you can always start by improving the docs |
Closing this PR in favour of #4151 |
Following #4133 toArray() is being deprecated in favour of the more precise function associativeToNumericArray(). This function does the same thing as toArray() but only accepts and returns arrays. This change reduces confusion between toArray and asArray as well as allows us to be more precise with the way we're using types. The calling code has been updated to use the new function and issue a deprecation warning.
Brief summary of changes
asArray()
had a cleanup tag about deleting it and replacing its calling code with toArray instead since the functions are basically equivalent.