Skip to content

Fix PHP 8.5 curl_close() deprecation#30

Closed
lohanidamodar wants to merge 1 commit intomainfrom
fix/clo-4294-curl-close-php85
Closed

Fix PHP 8.5 curl_close() deprecation#30
lohanidamodar wants to merge 1 commit intomainfrom
fix/clo-4294-curl-close-php85

Conversation

@lohanidamodar
Copy link
Copy Markdown
Contributor

@lohanidamodar lohanidamodar commented May 3, 2026

Summary

  • Remove the no-op curl_close($ch) call in Pay\Adapter that triggers a Deprecated notice on PHP 8.5.

Why

curl_close() has been a no-op since PHP 8.0 and is now formally deprecated in 8.5. The curl handle is freed when the variable goes out of scope.

Test plan

  • composer lint (Pint) — pass
  • composer check (PHPStan) — pre-existing failure on main unrelated to this change (pinned phpstan/phpstan: 1.9.x-dev is incompatible with PHP 8.4's stricter ReflectionClassConstant::IS_PUBLIC type signature). Repo CI does not run PHPStan.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 3, 2026

Greptile Summary

Removes the curl_close($ch) call in Adapter::call() that has been a no-op since PHP 8.0 and is formally deprecated in PHP 8.5. The curl handle is already freed automatically when $ch goes out of scope at function return, so this change is correct and has no behavioral impact.

Confidence Score: 5/5

Safe to merge — single-line removal of a known no-op; no behavioral change.

The change is a well-understood, correct removal of a deprecated no-op API call with no side effects. No logic is altered.

No files require special attention.

Important Files Changed

Filename Overview
src/Pay/Adapter.php Removes the no-op curl_close($ch) call that is deprecated in PHP 8.5; curl handle is freed automatically on scope exit.

Reviews (1): Last reviewed commit: "Remove deprecated curl_close() call (PHP..." | Re-trigger Greptile

@lohanidamodar
Copy link
Copy Markdown
Contributor Author

Superseded by full migration to utopia-php/fetch (raw curl removed entirely, including this curl_close line). Closing in favor of the migration PR opening on a fresh branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant