Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses Issue #103 by replacing the usage of the deprecated $http_response_header variable with the new http_get_last_response_headers() function introduced in PHP 8.4. The solution removes a polyfill-based approach and introduces version-specific helper files that are conditionally loaded based on PHP version.
Changes:
- Removed the polyfill file that attempted to provide
http_get_last_response_headers()for older PHP versions - Created two version-specific helper files: one for PHP < 8.4 using
$http_response_header, and one for PHP >= 8.4 usinghttp_get_last_response_headers() - Modified
Http::getWithStream()to use a new private method that conditionally loads the appropriate helper file
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
| src/Polyfills/http_get_last_response_headers.php | Removed polyfill that defined http_get_last_response_headers() for PHP < 8.4 |
| src/Helpers/lib/LTPHP85http.php | New helper for PHP < 8.4 that uses deprecated $http_response_header variable |
| src/Helpers/lib/GTPHP85http.php | New helper for PHP >= 8.4 that uses http_get_last_response_headers() function |
| src/Helpers/Http.php | Added private file_get_contents() method with conditional helper loading; simplified getWithStream() to use new method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6d9d1ad to
814c3e2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
814c3e2 to
023e1cb
Compare
023e1cb to
ace50cf
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.