[wp-trac] [WordPress Trac] #54504: Update Requests library to version 2.0.0
WordPress Trac
noreply at wordpress.org
Sat Feb 4 20:09:48 UTC 2023
#54504: Update Requests library to version 2.0.0
-------------------------------------------------+-------------------------
Reporter: jrf | Owner:
| hellofromTonya
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 6.2
Component: External Libraries | Version:
Severity: normal | Resolution:
Keywords: php80 php81 has-patch has-unit- | Focuses:
tests early early-like-actually-early commit |
-------------------------------------------------+-------------------------
Changes (by costdev):
* status: closed => reopened
* resolution: fixed =>
Comment:
Upgrading to [https://wordpress.org/nightly-builds/wordpress-latest.zip
the nightly package] produces the deprecation notice in Requests:
PHP Deprecated: The PSR-0 `Requests_...` class names in the Request
library are deprecated. Switch to the PSR-4 `WpOrg\Requests\...` class
names at your earliest convenience.
This deprecation notice is expected for extenders. However, as the
preloading is intended to run in Core upgrades for the foreseeable future,
it doesn't make sense to have this deprecation notice during the Core
upgrade. It would also lead to numerous unnecessary support tickets/posts.
I ran a test with a modified upgrade package, and added this to the top of
`_preload_old_requests_classes_and_interfaces()`. The test was successful:
The deprecation notice was silenced during the upgrade.
{{{#!php
if ( ! defined( 'REQUESTS_SILENCE_PSR0_DEPRECATIONS' ) ) {
define( 'REQUESTS_SILENCE_PSR0_DEPRECATIONS', true );
}
}}}
Could I get a confidence check?
-----
- Props to @afragen for discovering this while testing other 6.2 features.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54504#comment:123>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list