Skip to content

Php74 set renames non-deprecated apache_request_headers() function #8666

@rhuijts

Description

@rhuijts

Bug Report

Subject Details
Rector version v1.1.0

The php74 rule set renames the apache_request_headers() function to getallheaders(), based on PHP RFC: Deprecations for PHP 7.4. However, that deprecation has been reverted, as stated in the changelog of the RFC:

apache_request_headers() because the problem here is much bigger and just removing a single function does not really help. In particular there is also apache_response_headers() defined by non-Apache SAPIs, which does not have a SAPI-agnostic alias. There are also more SAPI-specific functions like litespeed_request_headers() and litespeed_response_headers(). These should all be dealt with together.

Renaming apache_request_headers is not harmful, but it is also not helpful. I see no way to skip it, because the change is hardcoded in the set and not in a separate rule.

Minimal PHP Code Causing Issue

https://getrector.com/demo/4eb7fc65-077c-48a6-b4bb-ffc43150817e

Expected Behaviour

No change

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions