From ced31b7c58080530a20118bee3ab6ebd2a568e8c Mon Sep 17 00:00:00 2001 From: desrosj Date: Thu, 21 Sep 2023 18:29:12 +0000 Subject: [PATCH] HTTP API: Deprecate `WP_Http_Curl` and `WP_Http_Streams` classes. These classes have not been used in WordPress Core since the Requests library was introduced in [37428]. These classes are now deprecated in favor of `WP_Http`. There are two remaining spots in Core that reference these classes: - The `WP_Http::_dispatch_request()` method, which was marked as deprecated in favor of `WP_Http::request()` in [42766]/[44346]. - The `WP_Http::_get_first_available_transport()`. That latter is now also marked as deprecated in favor of `\WpOrg\Requests\Requests::get_transport_class()`. Props SergeyBiryukov, rajinsharwar, hellofromTonya. Fixes #58705. Built from https://develop.svn.wordpress.org/trunk@56655 git-svn-id: http://core.svn.wordpress.org/trunk@56167 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-http-curl.php | 2 ++ wp-includes/class-wp-http-streams.php | 2 ++ wp-includes/class-wp-http.php | 2 ++ wp-includes/version.php | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-http-curl.php b/wp-includes/class-wp-http-curl.php index 39b38110da..997bb3c768 100644 --- a/wp-includes/class-wp-http-curl.php +++ b/wp-includes/class-wp-http-curl.php @@ -15,6 +15,8 @@ * Requires the Curl extension to be installed. * * @since 2.7.0 + * @deprecated 6.4.0 Use WP_Http + * @see WP_Http */ #[AllowDynamicProperties] class WP_Http_Curl { diff --git a/wp-includes/class-wp-http-streams.php b/wp-includes/class-wp-http-streams.php index f3879535f7..4ab23b813b 100644 --- a/wp-includes/class-wp-http-streams.php +++ b/wp-includes/class-wp-http-streams.php @@ -12,6 +12,8 @@ * * @since 2.7.0 * @since 3.7.0 Combined with the fsockopen transport and switched to `stream_socket_client()`. + * @deprecated 6.4.0 Use WP_Http + * @see WP_Http */ #[AllowDynamicProperties] class WP_Http_Streams { diff --git a/wp-includes/class-wp-http.php b/wp-includes/class-wp-http.php index 056680ba40..287848456c 100644 --- a/wp-includes/class-wp-http.php +++ b/wp-includes/class-wp-http.php @@ -516,6 +516,8 @@ class WP_Http { * Tests which transports are capable of supporting the request. * * @since 3.2.0 + * @deprecated 6.4.0 Use WpOrg\Requests\Requests::get_transport_class() + * @see WpOrg\Requests\Requests::get_transport_class() * * @param array $args Request arguments. * @param string $url URL to request. diff --git a/wp-includes/version.php b/wp-includes/version.php index f1489bab3d..6707e420de 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56654'; +$wp_version = '6.4-alpha-56655'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.