Skip to content

Commit d48acf1

Browse files
committed
Build updated dependencies for PHP 8.4
1 parent e4f55ea commit d48acf1

1,905 files changed

Lines changed: 23159 additions & 6757 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
- Filesystem Adapter for integrating with Backblaze B2 service
8+
- Support for PHP 8.4
89

910
### Fixed
1011

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env python3
2+
import argparse
3+
import os
4+
from pathlib import Path
5+
import re
6+
from subprocess import list2cmdline, run
7+
from tempfile import NamedTemporaryFile
8+
9+
CLANG_FORMAT_VERSION = '18.1.6'
10+
11+
INCLUDE_REGEX = re.compile(r'^ext/.*\.(c|h|inl)$')
12+
EXCLUDE_REGEX = re.compile(r'^$')
13+
14+
arg_parser = argparse.ArgumentParser(description="Check with clang-format")
15+
arg_parser.add_argument('-i', '--inplace-edit', action='store_true',
16+
help="Edit files inplace")
17+
args = arg_parser.parse_args()
18+
19+
os.chdir(Path(__file__).parent)
20+
21+
# create file containing list of all files to format
22+
filepaths_file = NamedTemporaryFile(delete=False)
23+
for dirpath, dirnames, filenames in os.walk('.'):
24+
for filename in filenames:
25+
# our regexes expect filepath to use forward slash
26+
filepath = Path(dirpath, filename).as_posix()
27+
if not INCLUDE_REGEX.match(filepath):
28+
continue
29+
if EXCLUDE_REGEX.match(filepath):
30+
continue
31+
32+
filepaths_file.write(f"{filepath}\n".encode())
33+
filepaths_file.close()
34+
35+
# use pipx to run clang-format from PyPI
36+
# this is a simple way to run the same clang-format version regardless of OS
37+
cmd = ['pipx', 'run', f'clang-format=={CLANG_FORMAT_VERSION}',
38+
f'--files={filepaths_file.name}']
39+
if args.inplace_edit:
40+
cmd += ['-i']
41+
else:
42+
cmd += ['--Werror', '--dry-run']
43+
44+
print(f"{Path.cwd()}$ {list2cmdline(cmd)}")
45+
if run(cmd).returncode:
46+
exit(1)

vendor-build/aws/aws-crt-php/src/AWS/CRT/Auth/AwsCredentials.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ function __construct(array $options = [])
3939
$this->secret_access_key = $options->secret_access_key->asString();
4040
$this->session_token = $options->session_token ? $options->session_token->asString() : null;
4141
$this->expiration_timepoint_seconds = $options->expiration_timepoint_seconds->asInt();
42-
if (\strlen($this->access_key_id) == 0) {
42+
if (strlen($this->access_key_id) == 0) {
4343
throw new \InvalidArgumentException("access_key_id must be provided");
4444
}
45-
if (\strlen($this->secret_access_key) == 0) {
45+
if (strlen($this->secret_access_key) == 0) {
4646
throw new \InvalidArgumentException("secret_access_key must be provided");
4747
}
4848
$creds_options = self::$crt->aws_credentials_options_new();

vendor-build/aws/aws-crt-php/src/AWS/CRT/Auth/Signable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Signable extends NativeResource
1212
{
1313
public static function fromHttpRequest($http_message)
1414
{
15-
return new Signable(function () use($http_message) {
15+
return new Signable(function () use ($http_message) {
1616
return self::$crt->signable_new_from_http_request($http_message->native);
1717
});
1818
}
@@ -21,13 +21,13 @@ public static function fromChunk($chunk_stream, $previous_signature = "")
2121
if (!$chunk_stream instanceof InputStream) {
2222
$chunk_stream = new InputStream($chunk_stream);
2323
}
24-
return new Signable(function () use($chunk_stream, $previous_signature) {
24+
return new Signable(function () use ($chunk_stream, $previous_signature) {
2525
return self::$crt->signable_new_from_chunk($chunk_stream->native, $previous_signature);
2626
});
2727
}
2828
public static function fromCanonicalRequest($canonical_request)
2929
{
30-
return new Signable(function () use($canonical_request) {
30+
return new Signable(function () use ($canonical_request) {
3131
return self::$crt->signable_new_from_canonical_request($canonical_request);
3232
});
3333
}

vendor-build/aws/aws-crt-php/src/AWS/CRT/Auth/Signing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ abstract class Signing extends NativeResource
1111
{
1212
static function signRequestAws($signable, $signing_config, $on_complete)
1313
{
14-
return self::$crt->sign_request_aws($signable->native, $signing_config->native, function ($result, $error_code) use($on_complete) {
14+
return self::$crt->sign_request_aws($signable->native, $signing_config->native, function ($result, $error_code) use ($on_complete) {
1515
$signing_result = SigningResult::fromNative($result);
1616
$on_complete($signing_result, $error_code);
1717
}, null);

vendor-build/aws/aws-crt-php/src/AWS/CRT/Auth/SigningConfigAWS.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class SigningConfigAWS extends NativeResource
1212
{
1313
public static function defaults()
1414
{
15-
return ['algorithm' => SigningAlgorithm::SIGv4, 'signature_type' => SignatureType::HTTP_REQUEST_HEADERS, 'credentials_provider' => null, 'region' => null, 'service' => null, 'use_double_uri_encode' => \false, 'should_normalize_uri_path' => \false, 'omit_session_token' => \false, 'signed_body_value' => null, 'signed_body_header_type' => SignedBodyHeaderType::NONE, 'expiration_in_seconds' => 0, 'date' => \time(), 'should_sign_header' => null];
15+
return ['algorithm' => SigningAlgorithm::SIGv4, 'signature_type' => SignatureType::HTTP_REQUEST_HEADERS, 'credentials_provider' => null, 'region' => null, 'service' => null, 'use_double_uri_encode' => \false, 'should_normalize_uri_path' => \false, 'omit_session_token' => \false, 'signed_body_value' => null, 'signed_body_header_type' => SignedBodyHeaderType::NONE, 'expiration_in_seconds' => 0, 'date' => time(), 'should_sign_header' => null];
1616
}
1717
private $options;
1818
public function __construct(array $options = [])

vendor-build/aws/aws-crt-php/src/AWS/CRT/CRT.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class CRT
2020
private static $refcount = 0;
2121
function __construct()
2222
{
23-
if (\is_null(self::$impl)) {
23+
if (is_null(self::$impl)) {
2424
try {
2525
self::$impl = new Extension();
2626
} catch (RuntimeException $rex) {
@@ -40,7 +40,7 @@ function __destruct()
4040
*/
4141
public static function isLoaded()
4242
{
43-
return !\is_null(self::$impl);
43+
return !is_null(self::$impl);
4444
}
4545
/**
4646
* @return bool whether or not the CRT is available via one of the possible backends

vendor-build/aws/aws-crt-php/src/AWS/CRT/HTTP/Headers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ public static function unmarshall($buf)
2727
{
2828
$strings = Encoding::readStrings($buf);
2929
$headers = [];
30-
for ($idx = 0; $idx < \count($strings);) {
30+
for ($idx = 0; $idx < count($strings);) {
3131
$headers[$strings[$idx++]] = $strings[$idx++];
3232
}
3333
return new Headers($headers);
3434
}
3535
public function count()
3636
{
37-
return \count($this->headers);
37+
return count($this->headers);
3838
}
3939
public function get($header)
4040
{

vendor-build/aws/aws-crt-php/src/AWS/CRT/HTTP/Message.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ protected static function _unmarshall($buf, $class = Message::class)
4444
{
4545
$method = Encoding::readString($buf);
4646
$path_and_query = Encoding::readString($buf);
47-
$parts = \explode("?", $path_and_query, 2);
47+
$parts = explode("?", $path_and_query, 2);
4848
$path = isset($parts[0]) ? $parts[0] : "";
4949
$query = isset($parts[1]) ? $parts[1] : "";
5050
$headers = Headers::unmarshall($buf);
5151
// Turn query params back into a dictionary
52-
if (\strlen($query)) {
53-
$query = \rawurldecode($query);
54-
$query = \explode("&", $query);
55-
$query = \array_reduce($query, function ($params, $pair) {
56-
list($param, $value) = \explode("=", $pair, 2);
52+
if (strlen($query)) {
53+
$query = rawurldecode($query);
54+
$query = explode("&", $query);
55+
$query = array_reduce($query, function ($params, $pair) {
56+
list($param, $value) = explode("=", $pair, 2);
5757
$params[$param] = $value;
5858
return $params;
5959
}, []);
@@ -67,11 +67,11 @@ public function pathAndQuery()
6767
$path = $this->path;
6868
$queries = [];
6969
foreach ($this->query as $param => $value) {
70-
$queries[] = \urlencode($param) . "=" . \urlencode($value);
70+
$queries[] = urlencode($param) . "=" . urlencode($value);
7171
}
72-
$query = \implode("&", $queries);
73-
if (\strlen($query)) {
74-
$path = \implode("?", [$path, $query]);
72+
$query = implode("&", $queries);
73+
if (strlen($query)) {
74+
$path = implode("?", [$path, $query]);
7575
}
7676
return $path;
7777
}

vendor-build/aws/aws-crt-php/src/AWS/CRT/HTTP/Request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class Request extends Message
1313
public function __construct($method, $path, $query = [], $headers = [], $body_stream = null)
1414
{
1515
parent::__construct($method, $path, $query, $headers);
16-
if (!\is_null($body_stream) && !$body_stream instanceof InputStream) {
17-
throw InvalidArgumentException('body_stream must be an instance of ' . InputStream::class);
16+
if (!is_null($body_stream) && !$body_stream instanceof InputStream) {
17+
throw new \InvalidArgumentException('body_stream must be an instance of ' . InputStream::class);
1818
}
1919
$this->body_stream = $body_stream;
2020
}

0 commit comments

Comments
 (0)