Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions bundle/rmccue/requests/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
Changelog
=========

2.0.20
------

### Overview of changes
- Update bundled certificates as of 2026-08-13. [#1076]
- General housekeeping.

[#1076]: https://github.com/WordPress/Requests/pull/1076

2.0.19
------

### Overview of changes
- Update bundled certificates as of 2026-07-16. [#1050], [#1061]
- General housekeeping.

[#1050]: https://github.com/WordPress/Requests/pull/1050
[#1061]: https://github.com/WordPress/Requests/pull/1061

2.0.18
------

Expand Down
771 changes: 96 additions & 675 deletions bundle/rmccue/requests/certificates/cacert.pem

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/rmccue/requests/certificates/cacert.pem.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b6e66569cc3d438dd5abe514d0df50005d570bfc96c14dca8f768d020cb96171 cacert.pem
f66dff1bdf8f96060b8177976f8b7d9254bc89bc4db933d769f7384d28480bc9 cacert.pem
6 changes: 2 additions & 4 deletions bundle/rmccue/requests/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@
},
"require-dev": {
"requests/test-server": "dev-main",
"squizlabs/php_codesniffer": "^3.6",
"phpcompatibility/php-compatibility": "^10.0.0@dev",
"wp-coding-standards/wpcs": "^2.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0",
"php-parallel-lint/php-parallel-lint": "^1.3.1",
"wp-coding-standards/wpcs": "^3.1",
"php-parallel-lint/php-parallel-lint": "^1.4.0",
"php-parallel-lint/php-console-highlighter": "^0.5.0",
"yoast/phpunit-polyfills": "^1.1.5"
},
Expand Down
2 changes: 2 additions & 0 deletions bundle/rmccue/requests/library/Requests.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class Requests extends WpOrg\Requests\Requests {
*
* @codeCoverageIgnore
*
* @phpcs:disable Universal.NamingConventions.NoReservedKeywordParameterNames.classFound -- Deprecated, so not relevant to change.
*
* @param string $class Class name to load
*/
public static function autoloader($class) {
Expand Down
1 change: 0 additions & 1 deletion bundle/rmccue/requests/src/Exception/Transport/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,4 @@ public function __construct($message, $type, $data = null, $code = 0) {
public function getReason() {
return $this->reason;
}

}
12 changes: 6 additions & 6 deletions bundle/rmccue/requests/src/IdnaEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ protected static function utf8_to_codepoints($input) {
$character |= ($value & 0x3F) << ($remaining * 6);
}

$position--;
--$position;
}

if (// Non-shortest form sequences are invalid
Expand Down Expand Up @@ -270,7 +270,7 @@ public static function punycode_encode($input) {
// Character is valid ASCII
// TODO: this should also check if it's valid for a URL
$output .= chr($char);
$h++;
++$h;

// Check if the character is non-ASCII, but below initial n
// This never occurs for Punycode, so ignore in coverage
Expand Down Expand Up @@ -307,7 +307,7 @@ public static function punycode_encode($input) {
$c = $codepoints[$num];
// if c < n then increment delta, fail on overflow
if ($c < $n) {
$delta++;
++$delta;
} elseif ($c === $n) { // if c == n then begin
// let q = delta
$q = $delta;
Expand Down Expand Up @@ -341,12 +341,12 @@ public static function punycode_encode($input) {
// let delta = 0
$delta = 0;
// increment h
$h++;
++$h;
} // end
} // end
// increment delta and n
$delta++;
$n++;
++$delta;
++$n;
} // end

return $output;
Expand Down
2 changes: 1 addition & 1 deletion bundle/rmccue/requests/src/Ipv6.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static function uncompress($ip) {
$c2 = ($ip2 === '') ? -1 : substr_count($ip2, ':');

if (strpos($ip2, '.') !== false) {
$c2++;
++$c2;
}

if ($c1 === -1 && $c2 === -1) {
Expand Down
4 changes: 2 additions & 2 deletions bundle/rmccue/requests/src/Requests.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Requests {
*
* @var string
*/
const VERSION = '2.0.18';
const VERSION = '2.0.20';

/**
* POST method
Expand Down Expand Up @@ -790,7 +790,7 @@ protected static function parse_response($headers, $url, $req_headers, $req_data
$options['type'] = self::GET;
}

$options['redirected']++;
++$options['redirected'];
$location = $return->headers['location'];
if (strpos($location, 'http://') !== 0 && strpos($location, 'https://') !== 0) {
// relative redirect, for compatibility make it absolute
Expand Down
2 changes: 1 addition & 1 deletion bundle/rmccue/requests/src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function __construct() {
*/
public function is_redirect() {
$code = $this->status_code;
return in_array($code, [300, 301, 302, 303, 307], true) || $code > 307 && $code < 400;
return in_array($code, [300, 301, 302, 303, 307], true) || ($code > 307 && $code < 400);
}

/**
Expand Down
8 changes: 7 additions & 1 deletion bundle/rmccue/requests/src/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,13 @@ public function patch($url, $headers, $data = [], $options = []) {
* @throws \WpOrg\Requests\Exception On invalid URLs (`nonhttp`)
*/
public function request($url, $headers = [], $data = [], $type = Requests::GET, $options = []) {
$request = $this->merge_request(compact('url', 'headers', 'data', 'options'));
$request = [
'url' => $url,
'headers' => $headers,
'data' => $data,
'options' => $options,
];
$request = $this->merge_request($request);

return Requests::request($request['url'], $request['headers'], $request['data'], $type, $request['options']);
}
Expand Down
2 changes: 1 addition & 1 deletion bundle/rmccue/requests/src/Transport/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public function request_multiple($requests, $options) {
$options['hooks']->dispatch('multiple.request.complete', [&$responses[$key], $key]);
}

$completed++;
++$completed;
}
} while ($active || $completed < $subrequestcount);

Expand Down
2 changes: 1 addition & 1 deletion utils/install-requests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

REQUESTS_TAG="v2.0.18"
REQUESTS_TAG="v2.0.20"

DOWNLOAD_LINK="https://github.com/WordPress/Requests/archive/refs/tags/${REQUESTS_TAG}.tar.gz"

Expand Down