Skip to content

Fix PHP 8.5 curl_close() deprecation#48

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

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

Conversation

@lohanidamodar
Copy link
Copy Markdown
Contributor

@lohanidamodar lohanidamodar commented May 3, 2026

Summary

  • Remove the no-op \curl_close($ch) calls in all four logger adapters (Sentry, AppSignal, LogOwl, Raygun) that trigger Deprecated notices 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 max) — pass on PHP 8.3

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 3, 2026

Greptile Summary

Removes the no-op \curl_close($ch) calls from all four logger adapters (AppSignal, LogOwl, Raygun, Sentry) to eliminate Deprecated notices introduced in PHP 8.5. The change is correct — curl_close() has been a no-op since PHP 8.0 and curl handles are freed automatically when they go out of scope.

Confidence Score: 5/5

Safe to merge — minimal, correct removal of deprecated no-op calls with no behavioral impact.

The change is a straightforward removal of a function that has been a documented no-op since PHP 8.0. No logic is altered, no resource handling changes, and the fix is applied consistently across all four affected adapters.

No files require special attention.

Important Files Changed

Filename Overview
src/Logger/Adapter/AppSignal.php Removes deprecated no-op \curl_close($ch) call to fix PHP 8.5 deprecation notice.
src/Logger/Adapter/LogOwl.php Removes deprecated no-op \curl_close($ch) call to fix PHP 8.5 deprecation notice.
src/Logger/Adapter/Raygun.php Removes deprecated no-op \curl_close($ch) call to fix PHP 8.5 deprecation notice.
src/Logger/Adapter/Sentry.php Removes deprecated no-op \curl_close($ch) call to fix PHP 8.5 deprecation notice.

Reviews (1): Last reviewed commit: "Remove deprecated curl_close() calls (PH..." | 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