Skip to content

Issue #103: Fix deprecated variable#105

Merged
gthomas2 merged 3 commits intomainfrom
issue-103_fix_http_response_header_deprecated
Feb 18, 2026
Merged

Issue #103: Fix deprecated variable#105
gthomas2 merged 3 commits intomainfrom
issue-103_fix_http_response_header_deprecated

Conversation

@gthomas2
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 using http_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.

@gthomas2 gthomas2 force-pushed the issue-103_fix_http_response_header_deprecated branch 2 times, most recently from 6d9d1ad to 814c3e2 Compare February 18, 2026 18:26
@gthomas2 gthomas2 requested a review from Copilot February 18, 2026 18:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gthomas2 gthomas2 force-pushed the issue-103_fix_http_response_header_deprecated branch from 814c3e2 to 023e1cb Compare February 18, 2026 18:34
@gthomas2 gthomas2 force-pushed the issue-103_fix_http_response_header_deprecated branch from 023e1cb to ace50cf Compare February 18, 2026 18:36
@gthomas2 gthomas2 requested a review from Copilot February 18, 2026 18:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

gthomas2 and others added 2 commits February 18, 2026 18:41
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gthomas2 gthomas2 merged commit 4d8afc5 into main Feb 18, 2026
3 checks passed
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.

2 participants