-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Converting warnings to exceptions in array related functions. #4566
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
Conversation
Which shows that these changes need to be prominently documented (it seems that even https://wiki.php.net/rfc/consistent_type_errors is not mentioned in UPGRADING yet). |
What would be the best way? A list of functions affected or just a broad statement? I suppose for TypeError it's not necessary needed but for warnings promoted to Error a list could be convenient. |
If we manage to convert all these warnings to errors accross the codebase (what we should), I think a general statement is sufficient. |
But not all warnings are converted to Error (c.f. Out of bounds offsets in string functions in #4554 ) So I suppose if I'm not mistaken the general statement should specify that Warnings have been promoted to Errors in case of Empty parameters and invalid mode/flag values (which is the current way I'm processing on how to promote to Error) |
I will probably need to make changes to #4543 once this is merged. |
Yes for more return types o/ |
Split into smaller PRs |
Converted various warnings from array functions to Error/TypeError exceptions.
The big one here is
count()
/sizeof()
which even affected the run-test.php file.