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
Pass int
to &$still_running
of curl_multi_exec
#2991
Conversation
Fixes guzzle#2990 Passing `null` is not allowed as the type is `int`. See https://www.php.net/manual/en/function.curl-multi-exec.php
int
to &$still_running
of curl_multi_exec
int
to &$still_running
of curl_multi_exec
Deployed this branch to production and it solved the deprecation warning. |
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.
This one is interesting. The change looks good to me, but I wanted to propose a test / enabling converting deprecations to exceptions in PHPUnit to catch this. However it appears I'm unable to reproduce this locally:
php > $a = null; http_build_query([], $a, '&');
Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in php shell code on line 1
php > $a = null; curl_multi_exec(curl_multi_init(), $a);
Even CI does not appear to catch this: #2992. |
Probably because deprecation errors are suppressed by default on PHP 8.1. Telling PHPUnit to convert them, when they happen, to errors, won't unsuppress them. |
As shown in my first comment: It worked for the |
So can this be merged? :) |
int
to &$still_running
of curl_multi_exec
int
to &$still_running
of curl_multi_exec
Thanks. 🍻 |
@GrahamCampbell Thanks, could you also create a new tag? 🙏 |
Not right now. I'd recommend turning off deprecation errors in production. @Nyholm and I need to get together at some point, and go through more PRs that need merging, before we're ready for our next release. |
Can confirm seeing the same behavior. Somehow |
Fixes #2990
Passing
null
is not allowed as the type isint
.See https://www.php.net/manual/en/function.curl-multi-exec.php