From cd0d67c8b2944d0ec846ca29f4f251efa139ef4d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 5 Feb 2023 00:20:15 +0000 Subject: [PATCH] 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 --- wp-admin/includes/update-core.php | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index a17c03359a..005d70cbf6 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -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 ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 16a6d6c92a..ee89257d07 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.