Only call curl_close() in PHP < 8#583
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Any update on this? |
|
@williamdes I have just spotted that the PHP requirement for this package is |
Perfect, drop the lines please |
609e24b to
35330fa
Compare
|
@williamdes Done |
rowan-m
left a comment
There was a problem hiding this comment.
No need to leave the function there, you can remove it and the call to it.
| * @param resource $ch | ||
| * @deprecated This is not needed since PHP 8 and does nothing now | ||
| */ | ||
| public function close($ch) |
There was a problem hiding this comment.
Since it's deprecated, please remove the entire function and the call to it in CurlPost.php.
There was a problem hiding this comment.
New major version for the next release then?
There was a problem hiding this comment.
Changes made.
a194940 to
32a6523
Compare
|
Nice. I resolved the conflicts, but it's going to need `composer run
lint-fix` and possibly pulling things in from `master`. I'm on my phone,
but can look at this tomorrow. Feel free to jump in sooner if you like
though.
.
…On Wed, 18 Mar 2026, 13:45 Jamie Burchell, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/ReCaptcha/RequestMethod/Curl.php
<#583 (comment)>:
> @@ -73,9 +73,9 @@ public function exec($ch)
/**
* @see http://php.net/curl_close
* @param resource $ch
+ * @deprecated This is not needed since PHP 8 and does nothing now
*/
public function close($ch)
Changes made.
—
Reply to this email directly, view it on GitHub
<#583 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA2MFAEP73QKDUYUWP5OKD4RKR55AVCNFSM6AAAAACJ7RL2M2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTSNRXHE2TGMZUGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I don't know what's going on with the whitespace/linting. I just removed the lines and my IDE doesn't show whitespace changes. Either way, I can't dedicate any more time to this issue. |
| ->method('exec') | ||
| ->willReturn('RESPONSEBODY'); |
There was a problem hiding this comment.
| ->method('exec') | |
| ->willReturn('RESPONSEBODY'); | |
| ->method('exec') | |
| ->willReturn('RESPONSEBODY'); |
| ->method('exec') | ||
| ->willReturn('RESPONSEBODY'); |
There was a problem hiding this comment.
| ->method('exec') | |
| ->willReturn('RESPONSEBODY'); | |
| ->method('exec') | |
| ->willReturn('RESPONSEBODY'); |
| ->method('exec') | ||
| ->willReturn(false); |
There was a problem hiding this comment.
| ->method('exec') | |
| ->willReturn(false); | |
| ->method('exec') | |
| ->willReturn(false); |
|
I posted my guesses about what could be wrong for the linting. |
curl_close()has had no effect since PHP 8 and is deprecated in PHP 8.5. This fix ensures that it is only called in PHP < 8.