Make WordPress Core


Ignore:
Timestamp:
12/06/2021 09:29:00 PM (5 years ago)
Author:
SergeyBiryukov
Message:

HTTP API: Revert changeset [52244].

Reverting Requests 2.0.0 changes and moving to WordPress 6.0 cycle. Why? The namespace and file case renaming revealed 2 issues in Core's upgrader process.

See https://core.trac.wordpress.org/ticket/54504#comment:22 for more information.

Follow-up to [52327].

See #54562, #54504.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/Requests/Transport.php

    r52244 r52328  
    33 * Base HTTP transport
    44 *
    5  * @package Requests\Transport
     5 * @package Requests
     6 * @subpackage Transport
    67 */
    7 
    8 namespace WpOrg\Requests;
    98
    109/**
    1110 * Base HTTP transport
    1211 *
    13  * @package Requests\Transport
     12 * @package Requests
     13 * @subpackage Transport
    1414 */
    15 interface Transport {
     15interface Requests_Transport {
    1616        /**
    1717         * Perform a request
     
    2020         * @param array $headers Associative array of request headers
    2121         * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
    22          * @param array $options Request options, see {@see \WpOrg\Requests\Requests::response()} for documentation
     22         * @param array $options Request options, see {@see Requests::response()} for documentation
    2323         * @return string Raw HTTP result
    2424         */
    25         public function request($url, $headers = [], $data = [], $options = []);
     25        public function request($url, $headers = array(), $data = array(), $options = array());
    2626
    2727        /**
    2828         * Send multiple requests simultaneously
    2929         *
    30          * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see \WpOrg\Requests\Transport::request()}
    31          * @param array $options Global options, see {@see \WpOrg\Requests\Requests::response()} for documentation
    32          * @return array Array of \WpOrg\Requests\Response objects (may contain \WpOrg\Requests\Exception or string responses as well)
     30         * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request}
     31         * @param array $options Global options, see {@see Requests::response()} for documentation
     32         * @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well)
    3333         */
    3434        public function request_multiple($requests, $options);
    3535
    3636        /**
    37          * Self-test whether the transport can be used.
    38          *
    39          * The available capabilities to test for can be found in {@see \WpOrg\Requests\Capability}.
    40          *
    41          * @param array<string, bool> $capabilities Optional. Associative array of capabilities to test against, i.e. `['<capability>' => true]`.
    42          * @return bool Whether the transport can be used.
     37         * Self-test whether the transport can be used
     38         * @return bool
    4339         */
    44         public static function test($capabilities = []);
     40        public static function test();
    4541}
Note: See TracChangeset for help on using the changeset viewer.