Upgrade/Install: Silence Requests deprecations before preloading.

Intentional preloading of Requests 2.x classes and interfaces using their old (Requests 1.x) names should not produce deprecation notices.

This commit defines `REQUESTS_SILENCE_PSR0_DEPRECATIONS` as `true` in `_preload_old_requests_classes_and_interfaces()`.

Follow-up to [54997], [55007], [55046].

Props costdev, afragen, jrf.
Fixes #54504.
Built from https://develop.svn.wordpress.org/trunk@55225


git-svn-id: http://core.svn.wordpress.org/trunk@54758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-02-05 00:20:15 +00:00
parent 981111ee90
commit cd0d67c8b2
2 changed files with 5 additions and 1 deletions

View File

@ -1599,6 +1599,10 @@ function update_core( $from, $to ) {
function _preload_old_requests_classes_and_interfaces( $to ) {
global $_old_requests_files, $wp_filesystem;
if ( ! defined( 'REQUESTS_SILENCE_PSR0_DEPRECATIONS' ) ) {
define( 'REQUESTS_SILENCE_PSR0_DEPRECATIONS', true );
}
foreach ( $_old_requests_files as $name => $file ) {
// Skip files that aren't interfaces or classes.
if ( is_int( $name ) ) {

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-55224';
$wp_version = '6.2-alpha-55225';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.