Skip to content

Deprecation warnings in functions taking $http_response_header as argument #19610

@Seldaek

Description

@Seldaek

There seems to be an issue here @Girgias if you have a function taking $http_response_header as argument it warns about every usage..

See https://github.com/composer/composer/actions/runs/17278161064/job/49040109053 for the failures:

Error: PHP Deprecated:  The predefined locally scoped $http_response_header variable is deprecated, call http_get_last_response_headers() instead in src/Composer/Util/RemoteFilesystem.php on line 659
Error: PHP Deprecated:  The predefined locally scoped $http_response_header variable is deprecated, call http_get_last_response_headers() instead in src/Composer/Util/RemoteFilesystem.php on line 691
Error: PHP Deprecated:  The predefined locally scoped $http_response_header variable is deprecated, call http_get_last_response_headers() instead in src/Composer/Util/RemoteFilesystem.php on line 692
Error: PHP Deprecated:  The predefined locally scoped $http_response_header variable is deprecated, call http_get_last_response_headers() instead in src/Composer/Util/RemoteFilesystem.php on line 693
Error: PHP Deprecated:  The predefined locally scoped $http_response_header variable is deprecated, call http_get_last_response_headers() instead in src/Composer/Util/RemoteFilesystem.php on line 709

and composer/composer#12513 seems to fix it. Easy fix but I'd argue if you can make it not complain in those cases it would be nicer.

Originally posted by @Seldaek in #19464 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions