Make WordPress Core

Changeset 55007

Timestamp:
12/19/2022 03:10:20 PM (21 months ago)
Author:
hellofromTonya
Message:

HTTP API: Adds BC-layer /library/Requests.php file.

When the Requests 2.0.0 autoloader detects the older (deprecated) `Requests` class, it attempts to load its `/library/Requests.php` file. Prior to this commit, this file did not exist in Core. Thus, a fatal error happened.

Why not change Requests Autoloader?
Requests is an external dependency that Core consumes. It is also used by other projects outside of Core. Thus, Core needs a fix to guard itself to prevent a fatal error.

The fix:

  • Adds the missing wp-includes/Requests/library/Requests.php file, which then loads the wp-includes/class-requests.php (which will throw a deprecation notice to alert developers to upgrade).
  • Adds a test.

Follow-up to [54997].

Props bjorsch, costdev, jrf, mukesh27, peterwilsoncc, ironprogrammer, hellofromTonya.
Fixes #57341.

Location:
trunk
Files:
3 added

Note: See TracChangeset for help on using the changeset viewer.