diff --git a/changelog.txt b/changelog.txt
index b2dfc1eab..61e1c9566 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,4 +1,8 @@
== Changelog ==
+= 4.3.0 =
+* ENHANCEMENT - update dependencies for Google APIs Client Library.
+* COMPATIBILITY - Simple Local Avatars Compatibility replaced with [WP-Stateless - Simple Local Avatars Addon](https://wordpress.org/plugins/wp-stateless-simple-local-avatars-addon/).
+
= 4.2.1 =
* ENHANCEMENT - updated `wpmetabox/meta-box` library from 5.10.11 to 5.10.15.
* FIX - correctly loads text domain to prevent PHP notices.
diff --git a/changes.md b/changes.md
index 18eff97d6..4860233af 100644
--- a/changes.md
+++ b/changes.md
@@ -1,3 +1,7 @@
+#### 4.3.0
+* ENHANCEMENT - update dependencies for Google APIs Client Library.
+* COMPATIBILITY - Simple Local Avatars Compatibility replaced with [WP-Stateless - Simple Local Avatars Addon](https://wordpress.org/plugins/wp-stateless-simple-local-avatars-addon/).
+
#### 4.2.1
* ENHANCEMENT - updated `wpmetabox/meta-box` library from 5.10.11 to 5.10.15.
* FIX - correctly loads text domain to prevent PHP notices.
diff --git a/lib/Google/composer.lock b/lib/Google/composer.lock
index 4d755c492..09b329a8d 100644
--- a/lib/Google/composer.lock
+++ b/lib/Google/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "ec2e2b541c95b7d592511c65e81a0226",
+ "content-hash": "f0f061a411d8b9b8125adb30e23805b4",
"packages": [
{
"name": "brick/math",
@@ -126,16 +126,16 @@
},
{
"name": "google/apiclient-services",
- "version": "v0.396.0",
+ "version": "v0.411.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git",
- "reference": "ceb2e432e4326c6775d24f62d554395a1a9ad3dd"
+ "reference": "3d616fcefdb8e6c598b2d007d4155fe516b91abd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/ceb2e432e4326c6775d24f62d554395a1a9ad3dd",
- "reference": "ceb2e432e4326c6775d24f62d554395a1a9ad3dd",
+ "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/3d616fcefdb8e6c598b2d007d4155fe516b91abd",
+ "reference": "3d616fcefdb8e6c598b2d007d4155fe516b91abd",
"shasum": ""
},
"require": {
@@ -164,22 +164,22 @@
],
"support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
- "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.396.0"
+ "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.411.0"
},
- "time": "2025-02-24T01:10:27+00:00"
+ "time": "2025-09-05T20:24:02+00:00"
},
{
"name": "google/auth",
- "version": "v1.42.0",
+ "version": "v1.47.1",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-auth-library-php.git",
- "reference": "0c25599a91530b5847f129b271c536f75a7563f5"
+ "reference": "d7a0a215ec42ca0c8cb40e9ae0c5960aa9a024b7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/0c25599a91530b5847f129b271c536f75a7563f5",
- "reference": "0c25599a91530b5847f129b271c536f75a7563f5",
+ "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/d7a0a215ec42ca0c8cb40e9ae0c5960aa9a024b7",
+ "reference": "d7a0a215ec42ca0c8cb40e9ae0c5960aa9a024b7",
"shasum": ""
},
"require": {
@@ -188,7 +188,8 @@
"guzzlehttp/psr7": "^2.4.5",
"php": "^8.0",
"psr/cache": "^2.0||^3.0",
- "psr/http-message": "^1.1||^2.0"
+ "psr/http-message": "^1.1||^2.0",
+ "psr/log": "^3.0"
},
"require-dev": {
"guzzlehttp/promises": "^2.0",
@@ -215,49 +216,49 @@
"Apache-2.0"
],
"description": "Google Auth Library for PHP",
- "homepage": "http://github.com/google/google-auth-library-php",
+ "homepage": "https://github.com/google/google-auth-library-php",
"keywords": [
"Authentication",
"google",
"oauth2"
],
"support": {
- "docs": "https://googleapis.github.io/google-auth-library-php/main/",
+ "docs": "https://cloud.google.com/php/docs/reference/auth/latest",
"issues": "https://github.com/googleapis/google-auth-library-php/issues",
- "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.42.0"
+ "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.47.1"
},
- "time": "2024-08-26T18:33:48+00:00"
+ "time": "2025-07-09T15:26:02+00:00"
},
{
"name": "google/cloud-core",
- "version": "v1.60.0",
+ "version": "v1.64.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-cloud-php-core.git",
- "reference": "7d63ba4295b799dc63227b6c9daf9dc207650eb4"
+ "reference": "f0cc1e5d7626b1b3d9407b2af2368acc7ccf0d85"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/7d63ba4295b799dc63227b6c9daf9dc207650eb4",
- "reference": "7d63ba4295b799dc63227b6c9daf9dc207650eb4",
+ "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/f0cc1e5d7626b1b3d9407b2af2368acc7ccf0d85",
+ "reference": "f0cc1e5d7626b1b3d9407b2af2368acc7ccf0d85",
"shasum": ""
},
"require": {
"google/auth": "^1.34",
- "google/gax": "^1.34.0",
- "guzzlehttp/guzzle": "^6.5.8|^7.4.4",
+ "google/gax": "^1.36.0",
+ "guzzlehttp/guzzle": "^6.5.8||^7.4.4",
"guzzlehttp/promises": "^1.4||^2.0",
"guzzlehttp/psr7": "^2.6",
- "monolog/monolog": "^2.9|^3.0",
+ "monolog/monolog": "^2.9||^3.0",
"php": "^8.0",
- "psr/http-message": "^1.0|^2.0",
- "rize/uri-template": "~0.3"
+ "psr/http-message": "^1.0||^2.0",
+ "rize/uri-template": "~0.3||~0.4"
},
"require-dev": {
"erusev/parsedown": "^1.6",
"google/cloud-common-protos": "~0.5",
"opis/closure": "^3",
- "phpdocumentor/reflection": "^5.3.3",
+ "phpdocumentor/reflection": "^5.3.3||^6.0",
"phpdocumentor/reflection-docblock": "^5.3",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.0",
@@ -290,9 +291,9 @@
],
"description": "Google Cloud PHP shared dependency, providing functionality useful to all components.",
"support": {
- "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.60.0"
+ "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.64.0"
},
- "time": "2024-09-28T04:24:22+00:00"
+ "time": "2025-07-16T21:36:08+00:00"
},
{
"name": "google/cloud-storage",
@@ -412,20 +413,20 @@
},
{
"name": "google/gax",
- "version": "v1.35.1",
+ "version": "v1.36.1",
"source": {
"type": "git",
"url": "https://github.com/googleapis/gax-php.git",
- "reference": "336005867c0ca3e2ad95183cf9dd74fa67915dd9"
+ "reference": "afdac3bc38a3b17d70668115d7b1a97289ac4d72"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/gax-php/zipball/336005867c0ca3e2ad95183cf9dd74fa67915dd9",
- "reference": "336005867c0ca3e2ad95183cf9dd74fa67915dd9",
+ "url": "https://api.github.com/repos/googleapis/gax-php/zipball/afdac3bc38a3b17d70668115d7b1a97289ac4d72",
+ "reference": "afdac3bc38a3b17d70668115d7b1a97289ac4d72",
"shasum": ""
},
"require": {
- "google/auth": "^1.34.0",
+ "google/auth": "^1.45",
"google/common-protos": "^4.4",
"google/grpc-gcp": "^0.4",
"google/longrunning": "~0.4",
@@ -441,7 +442,7 @@
},
"require-dev": {
"phpspec/prophecy-phpunit": "^2.1",
- "phpstan/phpstan": "^1.10",
+ "phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "3.*"
},
@@ -463,9 +464,9 @@
],
"support": {
"issues": "https://github.com/googleapis/gax-php/issues",
- "source": "https://github.com/googleapis/gax-php/tree/v1.35.1"
+ "source": "https://github.com/googleapis/gax-php/tree/v1.36.1"
},
- "time": "2024-12-04T15:32:12+00:00"
+ "time": "2025-05-20T19:50:43+00:00"
},
{
"name": "google/grpc-gcp",
@@ -514,20 +515,20 @@
},
{
"name": "google/longrunning",
- "version": "0.4.7",
+ "version": "0.6.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/php-longrunning.git",
- "reference": "624cabb874c10e5ddc9034c999f724894b70a3d3"
+ "reference": "226d3b5166eaa13754cc5e452b37872478e23375"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/php-longrunning/zipball/624cabb874c10e5ddc9034c999f724894b70a3d3",
- "reference": "624cabb874c10e5ddc9034c999f724894b70a3d3",
+ "url": "https://api.github.com/repos/googleapis/php-longrunning/zipball/226d3b5166eaa13754cc5e452b37872478e23375",
+ "reference": "226d3b5166eaa13754cc5e452b37872478e23375",
"shasum": ""
},
"require-dev": {
- "google/gax": "^1.36.0",
+ "google/gax": "^1.38.0",
"phpunit/phpunit": "^9.0"
},
"type": "library",
@@ -552,9 +553,9 @@
],
"description": "Google LongRunning Client for PHP",
"support": {
- "source": "https://github.com/googleapis/php-longrunning/tree/v0.4.7"
+ "source": "https://github.com/googleapis/php-longrunning/tree/v0.6.0"
},
- "time": "2025-01-24T21:24:06+00:00"
+ "time": "2025-10-07T18:41:09+00:00"
},
{
"name": "google/protobuf",
@@ -602,16 +603,16 @@
},
{
"name": "grpc/grpc",
- "version": "1.57.0",
+ "version": "1.74.0",
"source": {
"type": "git",
"url": "https://github.com/grpc/grpc-php.git",
- "reference": "b610c42022ed3a22f831439cb93802f2a4502fdf"
+ "reference": "32bf4dba256d60d395582fb6e4e8d3936bcdb713"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/grpc/grpc-php/zipball/b610c42022ed3a22f831439cb93802f2a4502fdf",
- "reference": "b610c42022ed3a22f831439cb93802f2a4502fdf",
+ "url": "https://api.github.com/repos/grpc/grpc-php/zipball/32bf4dba256d60d395582fb6e4e8d3936bcdb713",
+ "reference": "32bf4dba256d60d395582fb6e4e8d3936bcdb713",
"shasum": ""
},
"require": {
@@ -640,28 +641,28 @@
"rpc"
],
"support": {
- "source": "https://github.com/grpc/grpc-php/tree/v1.57.0"
+ "source": "https://github.com/grpc/grpc-php/tree/v1.74.0"
},
- "time": "2023-08-14T23:57:54+00:00"
+ "time": "2025-07-24T20:02:16+00:00"
},
{
"name": "guzzlehttp/guzzle",
- "version": "7.9.3",
+ "version": "7.10.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77"
+ "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
- "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
+ "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
"shasum": ""
},
"require": {
"ext-json": "*",
- "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
- "guzzlehttp/psr7": "^2.7.0",
+ "guzzlehttp/promises": "^2.3",
+ "guzzlehttp/psr7": "^2.8",
"php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0"
@@ -752,7 +753,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
- "source": "https://github.com/guzzle/guzzle/tree/7.9.3"
+ "source": "https://github.com/guzzle/guzzle/tree/7.10.0"
},
"funding": [
{
@@ -768,20 +769,20 @@
"type": "tidelift"
}
],
- "time": "2025-03-27T13:37:11+00:00"
+ "time": "2025-08-23T22:36:01+00:00"
},
{
"name": "guzzlehttp/promises",
- "version": "2.2.0",
+ "version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c"
+ "reference": "481557b130ef3790cf82b713667b43030dc9c957"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c",
- "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957",
+ "reference": "481557b130ef3790cf82b713667b43030dc9c957",
"shasum": ""
},
"require": {
@@ -789,7 +790,7 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
- "phpunit/phpunit": "^8.5.39 || ^9.6.20"
+ "phpunit/phpunit": "^8.5.44 || ^9.6.25"
},
"type": "library",
"extra": {
@@ -835,7 +836,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
- "source": "https://github.com/guzzle/promises/tree/2.2.0"
+ "source": "https://github.com/guzzle/promises/tree/2.3.0"
},
"funding": [
{
@@ -851,20 +852,20 @@
"type": "tidelift"
}
],
- "time": "2025-03-27T13:27:01+00:00"
+ "time": "2025-08-22T14:34:08+00:00"
},
{
"name": "guzzlehttp/psr7",
- "version": "2.7.1",
+ "version": "2.8.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16"
+ "reference": "21dc724a0583619cd1652f673303492272778051"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16",
- "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051",
+ "reference": "21dc724a0583619cd1652f673303492272778051",
"shasum": ""
},
"require": {
@@ -880,7 +881,7 @@
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "0.9.0",
- "phpunit/phpunit": "^8.5.39 || ^9.6.20"
+ "phpunit/phpunit": "^8.5.44 || ^9.6.25"
},
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
@@ -951,7 +952,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.7.1"
+ "source": "https://github.com/guzzle/psr7/tree/2.8.0"
},
"funding": [
{
@@ -967,7 +968,7 @@
"type": "tidelift"
}
],
- "time": "2025-03-27T12:30:47+00:00"
+ "time": "2025-08-23T21:21:41+00:00"
},
{
"name": "monolog/monolog",
@@ -1073,24 +1074,26 @@
},
{
"name": "paragonie/constant_time_encoding",
- "version": "v3.0.0",
+ "version": "v3.1.3",
"source": {
"type": "git",
"url": "https://github.com/paragonie/constant_time_encoding.git",
- "reference": "df1e7fde177501eee2037dd159cf04f5f301a512"
+ "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512",
- "reference": "df1e7fde177501eee2037dd159cf04f5f301a512",
+ "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77",
+ "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77",
"shasum": ""
},
"require": {
"php": "^8"
},
"require-dev": {
- "phpunit/phpunit": "^9",
- "vimeo/psalm": "^4|^5"
+ "infection/infection": "^0",
+ "nikic/php-fuzzer": "^0",
+ "phpunit/phpunit": "^9|^10|^11",
+ "vimeo/psalm": "^4|^5|^6"
},
"type": "library",
"autoload": {
@@ -1136,7 +1139,7 @@
"issues": "https://github.com/paragonie/constant_time_encoding/issues",
"source": "https://github.com/paragonie/constant_time_encoding"
},
- "time": "2024-05-08T12:36:18+00:00"
+ "time": "2025-09-24T15:06:41+00:00"
},
{
"name": "paragonie/random_compat",
@@ -1190,16 +1193,16 @@
},
{
"name": "phpseclib/phpseclib",
- "version": "3.0.43",
+ "version": "3.0.47",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
- "reference": "709ec107af3cb2f385b9617be72af8cf62441d02"
+ "reference": "9d6ca36a6c2dd434765b1071b2644a1c683b385d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02",
- "reference": "709ec107af3cb2f385b9617be72af8cf62441d02",
+ "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/9d6ca36a6c2dd434765b1071b2644a1c683b385d",
+ "reference": "9d6ca36a6c2dd434765b1071b2644a1c683b385d",
"shasum": ""
},
"require": {
@@ -1280,7 +1283,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
- "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43"
+ "source": "https://github.com/phpseclib/phpseclib/tree/3.0.47"
},
"funding": [
{
@@ -1296,7 +1299,7 @@
"type": "tidelift"
}
],
- "time": "2024-12-14T21:12:59+00:00"
+ "time": "2025-10-06T01:07:24+00:00"
},
{
"name": "psr/cache",
@@ -1509,30 +1512,30 @@
},
{
"name": "psr/log",
- "version": "1.1.4",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+ "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
+ "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
- "Psr\\Log\\": "Psr/Log/"
+ "Psr\\Log\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1553,9 +1556,9 @@
"psr-3"
],
"support": {
- "source": "https://github.com/php-fig/log/tree/1.1.4"
+ "source": "https://github.com/php-fig/log/tree/3.0.2"
},
- "time": "2021-05-03T11:20:27+00:00"
+ "time": "2024-09-11T13:17:53+00:00"
},
{
"name": "ralouphie/getallheaders",
@@ -1693,20 +1696,20 @@
},
{
"name": "ramsey/uuid",
- "version": "4.9.0",
+ "version": "4.9.1",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
- "reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0"
+ "reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ramsey/uuid/zipball/4e0e23cc785f0724a0e838279a9eb03f28b092a0",
- "reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0",
+ "url": "https://api.github.com/repos/ramsey/uuid/zipball/81f941f6f729b1e3ceea61d9d014f8b6c6800440",
+ "reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440",
"shasum": ""
},
"require": {
- "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13",
+ "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14",
"php": "^8.0",
"ramsey/collection": "^1.2 || ^2.0"
},
@@ -1765,9 +1768,9 @@
],
"support": {
"issues": "https://github.com/ramsey/uuid/issues",
- "source": "https://github.com/ramsey/uuid/tree/4.9.0"
+ "source": "https://github.com/ramsey/uuid/tree/4.9.1"
},
- "time": "2025-06-25T14:20:11+00:00"
+ "time": "2025-09-04T20:59:21+00:00"
},
{
"name": "rize/uri-template",
@@ -1900,7 +1903,7 @@
},
{
"name": "symfony/polyfill-php81",
- "version": "v1.32.0",
+ "version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
@@ -1956,7 +1959,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php81/tree/v1.32.0"
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.33.0"
},
"funding": [
{
@@ -1967,6 +1970,10 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
@@ -1978,16 +1985,16 @@
"packages-dev": [
{
"name": "composer/ca-bundle",
- "version": "1.5.6",
+ "version": "1.5.9",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
- "reference": "f65c239c970e7f072f067ab78646e9f0b2935175"
+ "reference": "1905981ee626e6f852448b7aaa978f8666c5bc54"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/f65c239c970e7f072f067ab78646e9f0b2935175",
- "reference": "f65c239c970e7f072f067ab78646e9f0b2935175",
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/1905981ee626e6f852448b7aaa978f8666c5bc54",
+ "reference": "1905981ee626e6f852448b7aaa978f8666c5bc54",
"shasum": ""
},
"require": {
@@ -2034,7 +2041,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/ca-bundle/issues",
- "source": "https://github.com/composer/ca-bundle/tree/1.5.6"
+ "source": "https://github.com/composer/ca-bundle/tree/1.5.9"
},
"funding": [
{
@@ -2044,49 +2051,123 @@
{
"url": "https://github.com/composer",
"type": "github"
+ }
+ ],
+ "time": "2025-11-06T11:46:17+00:00"
+ },
+ {
+ "name": "composer/class-map-generator",
+ "version": "1.6.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/class-map-generator.git",
+ "reference": "ba9f089655d4cdd64e762a6044f411ccdaec0076"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/class-map-generator/zipball/ba9f089655d4cdd64e762a6044f411ccdaec0076",
+ "reference": "ba9f089655d4cdd64e762a6044f411ccdaec0076",
+ "shasum": ""
+ },
+ "require": {
+ "composer/pcre": "^2.1 || ^3.1",
+ "php": "^7.2 || ^8.0",
+ "symfony/finder": "^4.4 || ^5.3 || ^6 || ^7"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.12 || ^2",
+ "phpstan/phpstan-deprecation-rules": "^1 || ^2",
+ "phpstan/phpstan-phpunit": "^1 || ^2",
+ "phpstan/phpstan-strict-rules": "^1.1 || ^2",
+ "phpunit/phpunit": "^8",
+ "symfony/filesystem": "^5.4 || ^6"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\ClassMapGenerator\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "https://seld.be"
+ }
+ ],
+ "description": "Utilities to scan PHP code and generate class maps.",
+ "keywords": [
+ "classmap"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/class-map-generator/issues",
+ "source": "https://github.com/composer/class-map-generator/tree/1.6.2"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
},
{
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
- "type": "tidelift"
+ "url": "https://github.com/composer",
+ "type": "github"
}
],
- "time": "2025-03-06T14:30:56+00:00"
+ "time": "2025-08-20T18:52:43+00:00"
},
{
"name": "composer/composer",
- "version": "1.10.27",
+ "version": "2.7.7",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
- "reference": "f8f49191eec76f039b466aa1f161406fe43aff50"
+ "reference": "291942978f39435cf904d33739f98d7d4eca7b23"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/composer/zipball/f8f49191eec76f039b466aa1f161406fe43aff50",
- "reference": "f8f49191eec76f039b466aa1f161406fe43aff50",
+ "url": "https://api.github.com/repos/composer/composer/zipball/291942978f39435cf904d33739f98d7d4eca7b23",
+ "reference": "291942978f39435cf904d33739f98d7d4eca7b23",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0",
- "composer/semver": "^1.0",
- "composer/spdx-licenses": "^1.2",
- "composer/xdebug-handler": "^1.1",
- "justinrainbow/json-schema": "^5.2.10",
- "php": "^5.3.2 || ^7.0 || ^8.0",
- "psr/log": "^1.0",
+ "composer/class-map-generator": "^1.3.3",
+ "composer/metadata-minifier": "^1.0",
+ "composer/pcre": "^2.1 || ^3.1",
+ "composer/semver": "^3.3",
+ "composer/spdx-licenses": "^1.5.7",
+ "composer/xdebug-handler": "^2.0.2 || ^3.0.3",
+ "justinrainbow/json-schema": "^5.2.11",
+ "php": "^7.2.5 || ^8.0",
+ "psr/log": "^1.0 || ^2.0 || ^3.0",
+ "react/promise": "^2.8 || ^3",
"seld/jsonlint": "^1.4",
- "seld/phar-utils": "^1.0",
- "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0",
- "symfony/filesystem": "^2.7 || ^3.0 || ^4.0 || ^5.0",
- "symfony/finder": "^2.7 || ^3.0 || ^4.0 || ^5.0",
- "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0"
- },
- "conflict": {
- "symfony/console": "2.8.38"
+ "seld/phar-utils": "^1.2",
+ "seld/signal-handler": "^2.0",
+ "symfony/console": "^5.4.11 || ^6.0.11 || ^7",
+ "symfony/filesystem": "^5.4 || ^6.0 || ^7",
+ "symfony/finder": "^5.4 || ^6.0 || ^7",
+ "symfony/polyfill-php73": "^1.24",
+ "symfony/polyfill-php80": "^1.24",
+ "symfony/polyfill-php81": "^1.24",
+ "symfony/process": "^5.4 || ^6.0 || ^7"
},
"require-dev": {
- "phpspec/prophecy": "^1.10",
- "symfony/phpunit-bridge": "^4.2"
+ "phpstan/phpstan": "^1.11.0",
+ "phpstan/phpstan-deprecation-rules": "^1.2.0",
+ "phpstan/phpstan-phpunit": "^1.4.0",
+ "phpstan/phpstan-strict-rules": "^1.6.0",
+ "phpstan/phpstan-symfony": "^1.4.0",
+ "symfony/phpunit-bridge": "^6.4.1 || ^7.0.1"
},
"suggest": {
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@@ -2098,13 +2179,18 @@
],
"type": "library",
"extra": {
+ "phpstan": {
+ "includes": [
+ "phpstan/rules.neon"
+ ]
+ },
"branch-alias": {
- "dev-master": "1.10-dev"
+ "dev-main": "2.7-dev"
}
},
"autoload": {
"psr-4": {
- "Composer\\": "src/Composer"
+ "Composer\\": "src/Composer/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -2115,12 +2201,12 @@
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
- "homepage": "http://www.naderman.de"
+ "homepage": "https://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
- "homepage": "http://seld.be"
+ "homepage": "https://seld.be"
}
],
"description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.",
@@ -2131,9 +2217,79 @@
"package"
],
"support": {
- "irc": "irc://irc.freenode.org/composer",
+ "irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/composer/issues",
- "source": "https://github.com/composer/composer/tree/1.10.27"
+ "security": "https://github.com/composer/composer/security/policy",
+ "source": "https://github.com/composer/composer/tree/2.7.7"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-06-10T20:11:12+00:00"
+ },
+ {
+ "name": "composer/metadata-minifier",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/metadata-minifier.git",
+ "reference": "c549d23829536f0d0e984aaabbf02af91f443207"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207",
+ "reference": "c549d23829536f0d0e984aaabbf02af91f443207",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "composer/composer": "^2",
+ "phpstan/phpstan": "^0.12.55",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\MetadataMinifier\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "Small utility library that handles metadata minification and expansion.",
+ "keywords": [
+ "composer",
+ "compression"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/metadata-minifier/issues",
+ "source": "https://github.com/composer/metadata-minifier/tree/1.0.0"
},
"funding": [
{
@@ -2149,32 +2305,112 @@
"type": "tidelift"
}
],
- "time": "2023-09-29T08:50:23+00:00"
+ "time": "2021-04-07T13:37:33+00:00"
+ },
+ {
+ "name": "composer/pcre",
+ "version": "3.3.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/pcre.git",
+ "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
+ "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "conflict": {
+ "phpstan/phpstan": "<1.11.10"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.12 || ^2",
+ "phpstan/phpstan-strict-rules": "^1 || ^2",
+ "phpunit/phpunit": "^8 || ^9"
+ },
+ "type": "library",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "extension.neon"
+ ]
+ },
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Pcre\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "PCRE wrapping library that offers type-safe preg_* replacements.",
+ "keywords": [
+ "PCRE",
+ "preg",
+ "regex",
+ "regular expression"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/pcre/issues",
+ "source": "https://github.com/composer/pcre/tree/3.3.2"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-11-12T16:29:46+00:00"
},
{
"name": "composer/semver",
- "version": "1.7.2",
+ "version": "3.4.4",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
- "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a"
+ "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a",
- "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a",
+ "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95",
+ "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.5 || ^5.0.5"
+ "phpstan/phpstan": "^1.11",
+ "symfony/phpunit-bridge": "^3 || ^7"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.x-dev"
+ "dev-main": "3.x-dev"
}
},
"autoload": {
@@ -2211,9 +2447,9 @@
"versioning"
],
"support": {
- "irc": "irc://irc.freenode.org/composer",
+ "irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/semver/issues",
- "source": "https://github.com/composer/semver/tree/1.7.2"
+ "source": "https://github.com/composer/semver/tree/3.4.4"
},
"funding": [
{
@@ -2223,34 +2459,30 @@
{
"url": "https://github.com/composer",
"type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
- "type": "tidelift"
}
],
- "time": "2020-12-03T15:47:16+00:00"
+ "time": "2025-08-20T19:15:30+00:00"
},
{
"name": "composer/spdx-licenses",
- "version": "1.5.8",
+ "version": "1.5.9",
"source": {
"type": "git",
"url": "https://github.com/composer/spdx-licenses.git",
- "reference": "560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a"
+ "reference": "edf364cefe8c43501e21e88110aac10b284c3c9f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a",
- "reference": "560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a",
+ "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/edf364cefe8c43501e21e88110aac10b284c3c9f",
+ "reference": "edf364cefe8c43501e21e88110aac10b284c3c9f",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpstan/phpstan": "^0.12.55",
- "symfony/phpunit-bridge": "^4.2 || ^5"
+ "phpstan/phpstan": "^1.11",
+ "symfony/phpunit-bridge": "^3 || ^7"
},
"type": "library",
"extra": {
@@ -2293,7 +2525,7 @@
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/spdx-licenses/issues",
- "source": "https://github.com/composer/spdx-licenses/tree/1.5.8"
+ "source": "https://github.com/composer/spdx-licenses/tree/1.5.9"
},
"funding": [
{
@@ -2309,29 +2541,31 @@
"type": "tidelift"
}
],
- "time": "2023-11-20T07:44:33+00:00"
+ "time": "2025-05-12T21:07:07+00:00"
},
{
"name": "composer/xdebug-handler",
- "version": "1.4.6",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
- "reference": "f27e06cd9675801df441b3656569b328e04aa37c"
+ "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c",
- "reference": "f27e06cd9675801df441b3656569b328e04aa37c",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef",
+ "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef",
"shasum": ""
},
"require": {
- "php": "^5.3.2 || ^7.0 || ^8.0",
- "psr/log": "^1.0"
+ "composer/pcre": "^1 || ^2 || ^3",
+ "php": "^7.2.5 || ^8.0",
+ "psr/log": "^1 || ^2 || ^3"
},
"require-dev": {
- "phpstan/phpstan": "^0.12.55",
- "symfony/phpunit-bridge": "^4.2 || ^5"
+ "phpstan/phpstan": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5"
},
"type": "library",
"autoload": {
@@ -2355,9 +2589,9 @@
"performance"
],
"support": {
- "irc": "irc://irc.freenode.org/composer",
+ "irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
- "source": "https://github.com/composer/xdebug-handler/tree/1.4.6"
+ "source": "https://github.com/composer/xdebug-handler/tree/3.0.5"
},
"funding": [
{
@@ -2373,7 +2607,7 @@
"type": "tidelift"
}
],
- "time": "2021-03-25T17:01:18+00:00"
+ "time": "2024-05-06T16:37:16+00:00"
},
{
"name": "doctrine/deprecations",
@@ -2560,16 +2794,16 @@
},
{
"name": "myclabs/deep-copy",
- "version": "1.13.1",
+ "version": "1.13.4",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c"
+ "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c",
- "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a",
+ "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a",
"shasum": ""
},
"require": {
@@ -2608,7 +2842,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
- "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1"
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4"
},
"funding": [
{
@@ -2616,20 +2850,20 @@
"type": "tidelift"
}
],
- "time": "2025-04-29T12:36:36+00:00"
+ "time": "2025-08-01T08:46:24+00:00"
},
{
"name": "nikic/php-parser",
- "version": "v5.4.0",
+ "version": "v5.6.2",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "447a020a1f875a434d62f2a401f53b82a396e494"
+ "reference": "3a454ca033b9e06b63282ce19562e892747449bb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494",
- "reference": "447a020a1f875a434d62f2a401f53b82a396e494",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb",
+ "reference": "3a454ca033b9e06b63282ce19562e892747449bb",
"shasum": ""
},
"require": {
@@ -2648,7 +2882,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.x-dev"
}
},
"autoload": {
@@ -2672,9 +2906,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2"
},
- "time": "2024-12-30T11:07:19+00:00"
+ "time": "2025-10-21T19:32:17+00:00"
},
{
"name": "phar-io/manifest",
@@ -2911,16 +3145,16 @@
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "5.6.2",
+ "version": "5.6.3",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "92dde6a5919e34835c506ac8c523ef095a95ed62"
+ "reference": "94f8051919d1b0369a6bcc7931d679a511c03fe9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/92dde6a5919e34835c506ac8c523ef095a95ed62",
- "reference": "92dde6a5919e34835c506ac8c523ef095a95ed62",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94f8051919d1b0369a6bcc7931d679a511c03fe9",
+ "reference": "94f8051919d1b0369a6bcc7931d679a511c03fe9",
"shasum": ""
},
"require": {
@@ -2969,9 +3203,9 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
- "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.2"
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.3"
},
- "time": "2025-04-13T19:20:35+00:00"
+ "time": "2025-08-01T19:43:32+00:00"
},
{
"name": "phpdocumentor/type-resolver",
@@ -3103,22 +3337,22 @@
},
{
"name": "phpspec/prophecy-phpunit",
- "version": "v2.3.0",
+ "version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy-phpunit.git",
- "reference": "8819516c1b489ecee4c60db5f5432fac1ea8ac6f"
+ "reference": "d3c28041d9390c9bca325a08c5b2993ac855bded"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/8819516c1b489ecee4c60db5f5432fac1ea8ac6f",
- "reference": "8819516c1b489ecee4c60db5f5432fac1ea8ac6f",
+ "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/d3c28041d9390c9bca325a08c5b2993ac855bded",
+ "reference": "d3c28041d9390c9bca325a08c5b2993ac855bded",
"shasum": ""
},
"require": {
"php": "^7.3 || ^8",
"phpspec/prophecy": "^1.18",
- "phpunit/phpunit": "^9.1 || ^10.1 || ^11.0"
+ "phpunit/phpunit": "^9.1 || ^10.1 || ^11.0 || ^12.0"
},
"require-dev": {
"phpstan/phpstan": "^1.10"
@@ -3152,22 +3386,22 @@
],
"support": {
"issues": "https://github.com/phpspec/prophecy-phpunit/issues",
- "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.3.0"
+ "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.4.0"
},
- "time": "2024-11-19T13:24:17+00:00"
+ "time": "2025-05-13T13:52:32+00:00"
},
{
"name": "phpstan/phpdoc-parser",
- "version": "2.1.0",
+ "version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
- "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68"
+ "reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9b30d6fd026b2c132b3985ce6b23bec09ab3aa68",
- "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/1e0cd5370df5dd2e556a36b9c62f62e555870495",
+ "reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495",
"shasum": ""
},
"require": {
@@ -3199,9 +3433,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
- "source": "https://github.com/phpstan/phpdoc-parser/tree/2.1.0"
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.0"
},
- "time": "2025-02-19T13:28:12+00:00"
+ "time": "2025-08-30T15:50:23+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -3524,16 +3758,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.6.23",
+ "version": "9.6.29",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "43d2cb18d0675c38bd44982a5d1d88f6d53d8d95"
+ "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/43d2cb18d0675c38bd44982a5d1d88f6d53d8d95",
- "reference": "43d2cb18d0675c38bd44982a5d1d88f6d53d8d95",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ecfec57835a5581bc888ea7e13b51eb55ab9dd3",
+ "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3",
"shasum": ""
},
"require": {
@@ -3544,7 +3778,7 @@
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
- "myclabs/deep-copy": "^1.13.1",
+ "myclabs/deep-copy": "^1.13.4",
"phar-io/manifest": "^2.0.4",
"phar-io/version": "^3.2.1",
"php": ">=7.3",
@@ -3555,11 +3789,11 @@
"phpunit/php-timer": "^5.0.3",
"sebastian/cli-parser": "^1.0.2",
"sebastian/code-unit": "^1.0.8",
- "sebastian/comparator": "^4.0.8",
+ "sebastian/comparator": "^4.0.9",
"sebastian/diff": "^4.0.6",
"sebastian/environment": "^5.1.5",
- "sebastian/exporter": "^4.0.6",
- "sebastian/global-state": "^5.0.7",
+ "sebastian/exporter": "^4.0.8",
+ "sebastian/global-state": "^5.0.8",
"sebastian/object-enumerator": "^4.0.4",
"sebastian/resource-operations": "^3.0.4",
"sebastian/type": "^3.2.1",
@@ -3607,7 +3841,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.23"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.29"
},
"funding": [
{
@@ -3631,7 +3865,7 @@
"type": "tidelift"
}
],
- "time": "2025-05-02T06:40:34+00:00"
+ "time": "2025-09-24T06:29:11+00:00"
},
{
"name": "psr/container",
@@ -3686,6 +3920,79 @@
},
"time": "2021-11-05T16:47:00+00:00"
},
+ {
+ "name": "react/promise",
+ "version": "v3.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/reactphp/promise.git",
+ "reference": "23444f53a813a3296c1368bb104793ce8d88f04a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/reactphp/promise/zipball/23444f53a813a3296c1368bb104793ce8d88f04a",
+ "reference": "23444f53a813a3296c1368bb104793ce8d88f04a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "1.12.28 || 1.4.10",
+ "phpunit/phpunit": "^9.6 || ^7.5"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "src/functions_include.php"
+ ],
+ "psr-4": {
+ "React\\Promise\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jan Sorgalla",
+ "email": "jsorgalla@gmail.com",
+ "homepage": "https://sorgalla.com/"
+ },
+ {
+ "name": "Christian Lück",
+ "email": "christian@clue.engineering",
+ "homepage": "https://clue.engineering/"
+ },
+ {
+ "name": "Cees-Jan Kiewiet",
+ "email": "reactphp@ceesjankiewiet.nl",
+ "homepage": "https://wyrihaximus.net/"
+ },
+ {
+ "name": "Chris Boden",
+ "email": "cboden@gmail.com",
+ "homepage": "https://cboden.dev/"
+ }
+ ],
+ "description": "A lightweight implementation of CommonJS Promises/A for PHP",
+ "keywords": [
+ "promise",
+ "promises"
+ ],
+ "support": {
+ "issues": "https://github.com/reactphp/promise/issues",
+ "source": "https://github.com/reactphp/promise/tree/v3.3.0"
+ },
+ "funding": [
+ {
+ "url": "https://opencollective.com/reactphp",
+ "type": "open_collective"
+ }
+ ],
+ "time": "2025-08-19T18:57:03+00:00"
+ },
{
"name": "sebastian/cli-parser",
"version": "1.0.2",
@@ -3855,16 +4162,16 @@
},
{
"name": "sebastian/comparator",
- "version": "4.0.8",
+ "version": "4.0.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "fa0f136dd2334583309d32b62544682ee972b51a"
+ "reference": "67a2df3a62639eab2cc5906065e9805d4fd5dfc5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
- "reference": "fa0f136dd2334583309d32b62544682ee972b51a",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/67a2df3a62639eab2cc5906065e9805d4fd5dfc5",
+ "reference": "67a2df3a62639eab2cc5906065e9805d4fd5dfc5",
"shasum": ""
},
"require": {
@@ -3917,15 +4224,27 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
+ "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.9"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
+ },
+ {
+ "url": "https://liberapay.com/sebastianbergmann",
+ "type": "liberapay"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/sebastianbergmann",
+ "type": "thanks_dev"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator",
+ "type": "tidelift"
}
],
- "time": "2022-09-14T12:41:17+00:00"
+ "time": "2025-08-10T06:51:50+00:00"
},
{
"name": "sebastian/complexity",
@@ -4115,16 +4434,16 @@
},
{
"name": "sebastian/exporter",
- "version": "4.0.6",
+ "version": "4.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72"
+ "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72",
- "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c",
+ "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c",
"shasum": ""
},
"require": {
@@ -4180,28 +4499,40 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6"
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.8"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
+ },
+ {
+ "url": "https://liberapay.com/sebastianbergmann",
+ "type": "liberapay"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/sebastianbergmann",
+ "type": "thanks_dev"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter",
+ "type": "tidelift"
}
],
- "time": "2024-03-02T06:33:00+00:00"
+ "time": "2025-09-24T06:03:27+00:00"
},
{
"name": "sebastian/global-state",
- "version": "5.0.7",
+ "version": "5.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9"
+ "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
- "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6",
+ "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6",
"shasum": ""
},
"require": {
@@ -4244,15 +4575,27 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7"
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.8"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
+ },
+ {
+ "url": "https://liberapay.com/sebastianbergmann",
+ "type": "liberapay"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/sebastianbergmann",
+ "type": "thanks_dev"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state",
+ "type": "tidelift"
}
],
- "time": "2024-03-02T06:35:11+00:00"
+ "time": "2025-08-10T07:10:35+00:00"
},
{
"name": "sebastian/lines-of-code",
@@ -4425,16 +4768,16 @@
},
{
"name": "sebastian/recursion-context",
- "version": "4.0.5",
+ "version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
+ "reference": "539c6691e0623af6dc6f9c20384c120f963465a0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0",
+ "reference": "539c6691e0623af6dc6f9c20384c120f963465a0",
"shasum": ""
},
"require": {
@@ -4476,15 +4819,27 @@
"homepage": "https://github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5"
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.6"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
+ },
+ {
+ "url": "https://liberapay.com/sebastianbergmann",
+ "type": "liberapay"
+ },
+ {
+ "url": "https://thanks.dev/u/gh/sebastianbergmann",
+ "type": "thanks_dev"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context",
+ "type": "tidelift"
}
],
- "time": "2023-02-03T06:07:39+00:00"
+ "time": "2025-08-10T06:57:39+00:00"
},
{
"name": "sebastian/resource-operations",
@@ -4761,18 +5116,79 @@
},
"time": "2022-08-31T10:31:18+00:00"
},
+ {
+ "name": "seld/signal-handler",
+ "version": "2.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Seldaek/signal-handler.git",
+ "reference": "04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98",
+ "reference": "04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1",
+ "phpstan/phpstan-deprecation-rules": "^1.0",
+ "phpstan/phpstan-phpunit": "^1",
+ "phpstan/phpstan-strict-rules": "^1.3",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.23",
+ "psr/log": "^1 || ^2 || ^3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Seld\\Signal\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development",
+ "keywords": [
+ "posix",
+ "sigint",
+ "signal",
+ "sigterm",
+ "unix"
+ ],
+ "support": {
+ "issues": "https://github.com/Seldaek/signal-handler/issues",
+ "source": "https://github.com/Seldaek/signal-handler/tree/2.0.2"
+ },
+ "time": "2023-09-03T09:24:00+00:00"
+ },
{
"name": "squizlabs/php_codesniffer",
- "version": "3.12.2",
+ "version": "3.13.5",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
- "reference": "6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa"
+ "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa",
- "reference": "6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4",
+ "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4",
"shasum": ""
},
"require": {
@@ -4789,11 +5205,6 @@
"bin/phpcs"
],
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.x-dev"
- }
- },
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
@@ -4843,50 +5254,46 @@
"type": "thanks_dev"
}
],
- "time": "2025-04-13T04:10:18+00:00"
+ "time": "2025-11-04T16:30:35+00:00"
},
{
"name": "symfony/console",
- "version": "v5.4.47",
+ "version": "v6.0.19",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed"
+ "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed",
- "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed",
+ "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed",
+ "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
+ "php": ">=8.0.2",
"symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php73": "^1.9",
- "symfony/polyfill-php80": "^1.16",
"symfony/service-contracts": "^1.1|^2|^3",
- "symfony/string": "^5.1|^6.0"
+ "symfony/string": "^5.4|^6.0"
},
"conflict": {
- "psr/log": ">=3",
- "symfony/dependency-injection": "<4.4",
- "symfony/dotenv": "<5.1",
- "symfony/event-dispatcher": "<4.4",
- "symfony/lock": "<4.4",
- "symfony/process": "<4.4"
+ "symfony/dependency-injection": "<5.4",
+ "symfony/dotenv": "<5.4",
+ "symfony/event-dispatcher": "<5.4",
+ "symfony/lock": "<5.4",
+ "symfony/process": "<5.4"
},
"provide": {
- "psr/log-implementation": "1.0|2.0"
+ "psr/log-implementation": "1.0|2.0|3.0"
},
"require-dev": {
- "psr/log": "^1|^2",
- "symfony/config": "^4.4|^5.0|^6.0",
- "symfony/dependency-injection": "^4.4|^5.0|^6.0",
- "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
- "symfony/lock": "^4.4|^5.0|^6.0",
- "symfony/process": "^4.4|^5.0|^6.0",
- "symfony/var-dumper": "^4.4|^5.0|^6.0"
+ "psr/log": "^1|^2|^3",
+ "symfony/config": "^5.4|^6.0",
+ "symfony/dependency-injection": "^5.4|^6.0",
+ "symfony/event-dispatcher": "^5.4|^6.0",
+ "symfony/lock": "^5.4|^6.0",
+ "symfony/process": "^5.4|^6.0",
+ "symfony/var-dumper": "^5.4|^6.0"
},
"suggest": {
"psr/log": "For using the console logger",
@@ -4921,12 +5328,12 @@
"homepage": "https://symfony.com",
"keywords": [
"cli",
- "command-line",
+ "command line",
"console",
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v5.4.47"
+ "source": "https://github.com/symfony/console/tree/v6.0.19"
},
"funding": [
{
@@ -4942,7 +5349,7 @@
"type": "tidelift"
}
],
- "time": "2024-11-06T11:30:55+00:00"
+ "time": "2023-01-01T08:36:10+00:00"
},
{
"name": "symfony/css-selector",
@@ -5062,26 +5469,22 @@
},
{
"name": "symfony/filesystem",
- "version": "v5.4.45",
+ "version": "v6.0.19",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "57c8294ed37d4a055b77057827c67f9558c95c54"
+ "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/57c8294ed37d4a055b77057827c67f9558c95c54",
- "reference": "57c8294ed37d4a055b77057827c67f9558c95c54",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214",
+ "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
+ "php": ">=8.0.2",
"symfony/polyfill-ctype": "~1.8",
- "symfony/polyfill-mbstring": "~1.8",
- "symfony/polyfill-php80": "^1.16"
- },
- "require-dev": {
- "symfony/process": "^5.4|^6.4"
+ "symfony/polyfill-mbstring": "~1.8"
},
"type": "library",
"autoload": {
@@ -5109,7 +5512,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v5.4.45"
+ "source": "https://github.com/symfony/filesystem/tree/v6.0.19"
},
"funding": [
{
@@ -5125,26 +5528,24 @@
"type": "tidelift"
}
],
- "time": "2024-10-22T13:05:35+00:00"
+ "time": "2023-01-20T17:44:14+00:00"
},
{
"name": "symfony/finder",
- "version": "v5.4.45",
+ "version": "v6.0.19",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "63741784cd7b9967975eec610b256eed3ede022b"
+ "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/63741784cd7b9967975eec610b256eed3ede022b",
- "reference": "63741784cd7b9967975eec610b256eed3ede022b",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/5cc9cac6586fc0c28cd173780ca696e419fefa11",
+ "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/polyfill-php80": "^1.16"
+ "php": ">=8.0.2"
},
"type": "library",
"autoload": {
@@ -5172,7 +5573,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/finder/tree/v5.4.45"
+ "source": "https://github.com/symfony/finder/tree/v6.0.19"
},
"funding": [
{
@@ -5188,11 +5589,11 @@
"type": "tidelift"
}
],
- "time": "2024-09-28T13:32:08+00:00"
+ "time": "2023-01-20T17:44:14+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.32.0",
+ "version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
@@ -5251,7 +5652,7 @@
"portable"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0"
},
"funding": [
{
@@ -5262,6 +5663,10 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
@@ -5271,16 +5676,16 @@
},
{
"name": "symfony/polyfill-intl-grapheme",
- "version": "v1.32.0",
+ "version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe"
+ "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe",
- "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70",
+ "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70",
"shasum": ""
},
"require": {
@@ -5329,7 +5734,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0"
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0"
},
"funding": [
{
@@ -5340,16 +5745,20 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
- "time": "2024-09-09T11:45:10+00:00"
+ "time": "2025-06-27T09:58:17+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
- "version": "v1.32.0",
+ "version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
@@ -5410,7 +5819,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0"
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0"
},
"funding": [
{
@@ -5421,6 +5830,10 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
@@ -5430,7 +5843,7 @@
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.32.0",
+ "version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
@@ -5491,7 +5904,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0"
},
"funding": [
{
@@ -5502,6 +5915,10 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
@@ -5511,7 +5928,7 @@
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.32.0",
+ "version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
@@ -5567,7 +5984,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php73/tree/v1.32.0"
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.33.0"
},
"funding": [
{
@@ -5578,6 +5995,10 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
@@ -5587,7 +6008,7 @@
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.32.0",
+ "version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
@@ -5647,7 +6068,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0"
},
"funding": [
{
@@ -5658,6 +6079,10 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
@@ -5667,21 +6092,20 @@
},
{
"name": "symfony/process",
- "version": "v5.4.47",
+ "version": "v6.0.19",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d"
+ "reference": "2114fd60f26a296cc403a7939ab91478475a33d4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/5d1662fb32ebc94f17ddb8d635454a776066733d",
- "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d",
+ "url": "https://api.github.com/repos/symfony/process/zipball/2114fd60f26a296cc403a7939ab91478475a33d4",
+ "reference": "2114fd60f26a296cc403a7939ab91478475a33d4",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
- "symfony/polyfill-php80": "^1.16"
+ "php": ">=8.0.2"
},
"type": "library",
"autoload": {
@@ -5709,7 +6133,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v5.4.47"
+ "source": "https://github.com/symfony/process/tree/v6.0.19"
},
"funding": [
{
@@ -5725,7 +6149,7 @@
"type": "tidelift"
}
],
- "time": "2024-11-06T11:36:42+00:00"
+ "time": "2023-01-01T08:36:10+00:00"
},
{
"name": "symfony/service-contracts",
@@ -5946,28 +6370,28 @@
},
{
"name": "webmozart/assert",
- "version": "1.11.0",
+ "version": "1.12.1",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
- "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
+ "reference": "9be6926d8b485f55b9229203f962b51ed377ba68"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
- "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
+ "url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68",
+ "reference": "9be6926d8b485f55b9229203f962b51ed377ba68",
"shasum": ""
},
"require": {
"ext-ctype": "*",
+ "ext-date": "*",
+ "ext-filter": "*",
"php": "^7.2 || ^8.0"
},
- "conflict": {
- "phpstan/phpstan": "<0.12.20",
- "vimeo/psalm": "<4.6.1 || 4.6.2"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.5.13"
+ "suggest": {
+ "ext-intl": "",
+ "ext-simplexml": "",
+ "ext-spl": ""
},
"type": "library",
"extra": {
@@ -5998,9 +6422,9 @@
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
- "source": "https://github.com/webmozarts/assert/tree/1.11.0"
+ "source": "https://github.com/webmozarts/assert/tree/1.12.1"
},
- "time": "2022-06-03T18:03:27+00:00"
+ "time": "2025-10-29T15:56:20+00:00"
}
],
"aliases": [],
diff --git a/lib/Google/vendor/composer/autoload_psr4.php b/lib/Google/vendor/composer/autoload_psr4.php
index a6b60b0d6..941b62a92 100644
--- a/lib/Google/vendor/composer/autoload_psr4.php
+++ b/lib/Google/vendor/composer/autoload_psr4.php
@@ -11,7 +11,7 @@
'Rize\\' => array($vendorDir . '/rize/uri-template/src/Rize'),
'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'),
'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'),
- 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
+ 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
diff --git a/lib/Google/vendor/composer/autoload_static.php b/lib/Google/vendor/composer/autoload_static.php
index 2cad9318a..a87ff2e68 100644
--- a/lib/Google/vendor/composer/autoload_static.php
+++ b/lib/Google/vendor/composer/autoload_static.php
@@ -108,7 +108,7 @@ class ComposerStaticInitbd131085cfdbf47b26d7ae00fe412ae4
),
'Psr\\Log\\' =>
array (
- 0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
+ 0 => __DIR__ . '/..' . '/psr/log/src',
),
'Psr\\Http\\Message\\' =>
array (
diff --git a/lib/Google/vendor/composer/installed.json b/lib/Google/vendor/composer/installed.json
index c21cb26d5..0e245f20e 100644
--- a/lib/Google/vendor/composer/installed.json
+++ b/lib/Google/vendor/composer/installed.json
@@ -126,17 +126,17 @@
},
{
"name": "google/apiclient-services",
- "version": "v0.396.0",
- "version_normalized": "0.396.0.0",
+ "version": "v0.411.0",
+ "version_normalized": "0.411.0.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git",
- "reference": "ceb2e432e4326c6775d24f62d554395a1a9ad3dd"
+ "reference": "3d616fcefdb8e6c598b2d007d4155fe516b91abd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/ceb2e432e4326c6775d24f62d554395a1a9ad3dd",
- "reference": "ceb2e432e4326c6775d24f62d554395a1a9ad3dd",
+ "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/3d616fcefdb8e6c598b2d007d4155fe516b91abd",
+ "reference": "3d616fcefdb8e6c598b2d007d4155fe516b91abd",
"shasum": ""
},
"require": {
@@ -145,7 +145,7 @@
"require-dev": {
"phpunit/phpunit": "^9.6"
},
- "time": "2025-02-24T01:10:27+00:00",
+ "time": "2025-09-05T20:24:02+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -167,23 +167,23 @@
],
"support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
- "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.396.0"
+ "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.411.0"
},
"install-path": "../google/apiclient-services"
},
{
"name": "google/auth",
- "version": "v1.42.0",
- "version_normalized": "1.42.0.0",
+ "version": "v1.47.1",
+ "version_normalized": "1.47.1.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-auth-library-php.git",
- "reference": "0c25599a91530b5847f129b271c536f75a7563f5"
+ "reference": "d7a0a215ec42ca0c8cb40e9ae0c5960aa9a024b7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/0c25599a91530b5847f129b271c536f75a7563f5",
- "reference": "0c25599a91530b5847f129b271c536f75a7563f5",
+ "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/d7a0a215ec42ca0c8cb40e9ae0c5960aa9a024b7",
+ "reference": "d7a0a215ec42ca0c8cb40e9ae0c5960aa9a024b7",
"shasum": ""
},
"require": {
@@ -192,7 +192,8 @@
"guzzlehttp/psr7": "^2.4.5",
"php": "^8.0",
"psr/cache": "^2.0||^3.0",
- "psr/http-message": "^1.1||^2.0"
+ "psr/http-message": "^1.1||^2.0",
+ "psr/log": "^3.0"
},
"require-dev": {
"guzzlehttp/promises": "^2.0",
@@ -208,7 +209,7 @@
"suggest": {
"phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2."
},
- "time": "2024-08-26T18:33:48+00:00",
+ "time": "2025-07-09T15:26:02+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -221,50 +222,50 @@
"Apache-2.0"
],
"description": "Google Auth Library for PHP",
- "homepage": "http://github.com/google/google-auth-library-php",
+ "homepage": "https://github.com/google/google-auth-library-php",
"keywords": [
"Authentication",
"google",
"oauth2"
],
"support": {
- "docs": "https://googleapis.github.io/google-auth-library-php/main/",
+ "docs": "https://cloud.google.com/php/docs/reference/auth/latest",
"issues": "https://github.com/googleapis/google-auth-library-php/issues",
- "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.42.0"
+ "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.47.1"
},
"install-path": "../google/auth"
},
{
"name": "google/cloud-core",
- "version": "v1.60.0",
- "version_normalized": "1.60.0.0",
+ "version": "v1.64.0",
+ "version_normalized": "1.64.0.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-cloud-php-core.git",
- "reference": "7d63ba4295b799dc63227b6c9daf9dc207650eb4"
+ "reference": "f0cc1e5d7626b1b3d9407b2af2368acc7ccf0d85"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/7d63ba4295b799dc63227b6c9daf9dc207650eb4",
- "reference": "7d63ba4295b799dc63227b6c9daf9dc207650eb4",
+ "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/f0cc1e5d7626b1b3d9407b2af2368acc7ccf0d85",
+ "reference": "f0cc1e5d7626b1b3d9407b2af2368acc7ccf0d85",
"shasum": ""
},
"require": {
"google/auth": "^1.34",
- "google/gax": "^1.34.0",
- "guzzlehttp/guzzle": "^6.5.8|^7.4.4",
+ "google/gax": "^1.36.0",
+ "guzzlehttp/guzzle": "^6.5.8||^7.4.4",
"guzzlehttp/promises": "^1.4||^2.0",
"guzzlehttp/psr7": "^2.6",
- "monolog/monolog": "^2.9|^3.0",
+ "monolog/monolog": "^2.9||^3.0",
"php": "^8.0",
- "psr/http-message": "^1.0|^2.0",
- "rize/uri-template": "~0.3"
+ "psr/http-message": "^1.0||^2.0",
+ "rize/uri-template": "~0.3||~0.4"
},
"require-dev": {
"erusev/parsedown": "^1.6",
"google/cloud-common-protos": "~0.5",
"opis/closure": "^3",
- "phpdocumentor/reflection": "^5.3.3",
+ "phpdocumentor/reflection": "^5.3.3||^6.0",
"phpdocumentor/reflection-docblock": "^5.3",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.0",
@@ -274,7 +275,7 @@
"opis/closure": "May be used to serialize closures to process jobs in the batch daemon. Please require version ^3.",
"symfony/lock": "Required for the Spanner cached based session pool. Please require the following commit: 3.3.x-dev#1ba6ac9"
},
- "time": "2024-09-28T04:24:22+00:00",
+ "time": "2025-07-16T21:36:08+00:00",
"bin": [
"bin/google-cloud-batch"
],
@@ -299,7 +300,7 @@
],
"description": "Google Cloud PHP shared dependency, providing functionality useful to all components.",
"support": {
- "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.60.0"
+ "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.64.0"
},
"install-path": "../google/cloud-core"
},
@@ -427,21 +428,21 @@
},
{
"name": "google/gax",
- "version": "v1.35.1",
- "version_normalized": "1.35.1.0",
+ "version": "v1.36.1",
+ "version_normalized": "1.36.1.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/gax-php.git",
- "reference": "336005867c0ca3e2ad95183cf9dd74fa67915dd9"
+ "reference": "afdac3bc38a3b17d70668115d7b1a97289ac4d72"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/gax-php/zipball/336005867c0ca3e2ad95183cf9dd74fa67915dd9",
- "reference": "336005867c0ca3e2ad95183cf9dd74fa67915dd9",
+ "url": "https://api.github.com/repos/googleapis/gax-php/zipball/afdac3bc38a3b17d70668115d7b1a97289ac4d72",
+ "reference": "afdac3bc38a3b17d70668115d7b1a97289ac4d72",
"shasum": ""
},
"require": {
- "google/auth": "^1.34.0",
+ "google/auth": "^1.45",
"google/common-protos": "^4.4",
"google/grpc-gcp": "^0.4",
"google/longrunning": "~0.4",
@@ -457,11 +458,11 @@
},
"require-dev": {
"phpspec/prophecy-phpunit": "^2.1",
- "phpstan/phpstan": "^1.10",
+ "phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "3.*"
},
- "time": "2024-12-04T15:32:12+00:00",
+ "time": "2025-05-20T19:50:43+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -481,7 +482,7 @@
],
"support": {
"issues": "https://github.com/googleapis/gax-php/issues",
- "source": "https://github.com/googleapis/gax-php/tree/v1.35.1"
+ "source": "https://github.com/googleapis/gax-php/tree/v1.36.1"
},
"install-path": "../google/gax"
},
@@ -535,24 +536,24 @@
},
{
"name": "google/longrunning",
- "version": "0.4.7",
- "version_normalized": "0.4.7.0",
+ "version": "0.6.0",
+ "version_normalized": "0.6.0.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/php-longrunning.git",
- "reference": "624cabb874c10e5ddc9034c999f724894b70a3d3"
+ "reference": "226d3b5166eaa13754cc5e452b37872478e23375"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/php-longrunning/zipball/624cabb874c10e5ddc9034c999f724894b70a3d3",
- "reference": "624cabb874c10e5ddc9034c999f724894b70a3d3",
+ "url": "https://api.github.com/repos/googleapis/php-longrunning/zipball/226d3b5166eaa13754cc5e452b37872478e23375",
+ "reference": "226d3b5166eaa13754cc5e452b37872478e23375",
"shasum": ""
},
"require-dev": {
- "google/gax": "^1.36.0",
+ "google/gax": "^1.38.0",
"phpunit/phpunit": "^9.0"
},
- "time": "2025-01-24T21:24:06+00:00",
+ "time": "2025-10-07T18:41:09+00:00",
"type": "library",
"extra": {
"component": {
@@ -576,7 +577,7 @@
],
"description": "Google LongRunning Client for PHP",
"support": {
- "source": "https://github.com/googleapis/php-longrunning/tree/v0.4.7"
+ "source": "https://github.com/googleapis/php-longrunning/tree/v0.6.0"
},
"install-path": "../google/longrunning"
},
@@ -629,17 +630,17 @@
},
{
"name": "grpc/grpc",
- "version": "1.57.0",
- "version_normalized": "1.57.0.0",
+ "version": "1.74.0",
+ "version_normalized": "1.74.0.0",
"source": {
"type": "git",
"url": "https://github.com/grpc/grpc-php.git",
- "reference": "b610c42022ed3a22f831439cb93802f2a4502fdf"
+ "reference": "32bf4dba256d60d395582fb6e4e8d3936bcdb713"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/grpc/grpc-php/zipball/b610c42022ed3a22f831439cb93802f2a4502fdf",
- "reference": "b610c42022ed3a22f831439cb93802f2a4502fdf",
+ "url": "https://api.github.com/repos/grpc/grpc-php/zipball/32bf4dba256d60d395582fb6e4e8d3936bcdb713",
+ "reference": "32bf4dba256d60d395582fb6e4e8d3936bcdb713",
"shasum": ""
},
"require": {
@@ -652,7 +653,7 @@
"ext-protobuf": "For better performance, install the protobuf C extension.",
"google/protobuf": "To get started using grpc quickly, install the native protobuf library."
},
- "time": "2023-08-14T23:57:54+00:00",
+ "time": "2025-07-24T20:02:16+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -670,29 +671,29 @@
"rpc"
],
"support": {
- "source": "https://github.com/grpc/grpc-php/tree/v1.57.0"
+ "source": "https://github.com/grpc/grpc-php/tree/v1.74.0"
},
"install-path": "../grpc/grpc"
},
{
"name": "guzzlehttp/guzzle",
- "version": "7.9.3",
- "version_normalized": "7.9.3.0",
+ "version": "7.10.0",
+ "version_normalized": "7.10.0.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77"
+ "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
- "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
+ "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
"shasum": ""
},
"require": {
"ext-json": "*",
- "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
- "guzzlehttp/psr7": "^2.7.0",
+ "guzzlehttp/promises": "^2.3",
+ "guzzlehttp/psr7": "^2.8",
"php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0"
@@ -713,7 +714,7 @@
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
"psr/log": "Required for using the Log middleware"
},
- "time": "2025-03-27T13:37:11+00:00",
+ "time": "2025-08-23T22:36:01+00:00",
"type": "library",
"extra": {
"bamarni-bin": {
@@ -785,7 +786,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
- "source": "https://github.com/guzzle/guzzle/tree/7.9.3"
+ "source": "https://github.com/guzzle/guzzle/tree/7.10.0"
},
"funding": [
{
@@ -805,17 +806,17 @@
},
{
"name": "guzzlehttp/promises",
- "version": "2.2.0",
- "version_normalized": "2.2.0.0",
+ "version": "2.3.0",
+ "version_normalized": "2.3.0.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c"
+ "reference": "481557b130ef3790cf82b713667b43030dc9c957"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c",
- "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957",
+ "reference": "481557b130ef3790cf82b713667b43030dc9c957",
"shasum": ""
},
"require": {
@@ -823,9 +824,9 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
- "phpunit/phpunit": "^8.5.39 || ^9.6.20"
+ "phpunit/phpunit": "^8.5.44 || ^9.6.25"
},
- "time": "2025-03-27T13:27:01+00:00",
+ "time": "2025-08-22T14:34:08+00:00",
"type": "library",
"extra": {
"bamarni-bin": {
@@ -871,7 +872,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
- "source": "https://github.com/guzzle/promises/tree/2.2.0"
+ "source": "https://github.com/guzzle/promises/tree/2.3.0"
},
"funding": [
{
@@ -891,17 +892,17 @@
},
{
"name": "guzzlehttp/psr7",
- "version": "2.7.1",
- "version_normalized": "2.7.1.0",
+ "version": "2.8.0",
+ "version_normalized": "2.8.0.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16"
+ "reference": "21dc724a0583619cd1652f673303492272778051"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16",
- "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051",
+ "reference": "21dc724a0583619cd1652f673303492272778051",
"shasum": ""
},
"require": {
@@ -917,12 +918,12 @@
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "0.9.0",
- "phpunit/phpunit": "^8.5.39 || ^9.6.20"
+ "phpunit/phpunit": "^8.5.44 || ^9.6.25"
},
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
- "time": "2025-03-27T12:30:47+00:00",
+ "time": "2025-08-23T21:21:41+00:00",
"type": "library",
"extra": {
"bamarni-bin": {
@@ -990,7 +991,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.7.1"
+ "source": "https://github.com/guzzle/psr7/tree/2.8.0"
},
"funding": [
{
@@ -1115,27 +1116,29 @@
},
{
"name": "paragonie/constant_time_encoding",
- "version": "v3.0.0",
- "version_normalized": "3.0.0.0",
+ "version": "v3.1.3",
+ "version_normalized": "3.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/paragonie/constant_time_encoding.git",
- "reference": "df1e7fde177501eee2037dd159cf04f5f301a512"
+ "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512",
- "reference": "df1e7fde177501eee2037dd159cf04f5f301a512",
+ "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77",
+ "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77",
"shasum": ""
},
"require": {
"php": "^8"
},
"require-dev": {
- "phpunit/phpunit": "^9",
- "vimeo/psalm": "^4|^5"
+ "infection/infection": "^0",
+ "nikic/php-fuzzer": "^0",
+ "phpunit/phpunit": "^9|^10|^11",
+ "vimeo/psalm": "^4|^5|^6"
},
- "time": "2024-05-08T12:36:18+00:00",
+ "time": "2025-09-24T15:06:41+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -1238,17 +1241,17 @@
},
{
"name": "phpseclib/phpseclib",
- "version": "3.0.43",
- "version_normalized": "3.0.43.0",
+ "version": "3.0.47",
+ "version_normalized": "3.0.47.0",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
- "reference": "709ec107af3cb2f385b9617be72af8cf62441d02"
+ "reference": "9d6ca36a6c2dd434765b1071b2644a1c683b385d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02",
- "reference": "709ec107af3cb2f385b9617be72af8cf62441d02",
+ "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/9d6ca36a6c2dd434765b1071b2644a1c683b385d",
+ "reference": "9d6ca36a6c2dd434765b1071b2644a1c683b385d",
"shasum": ""
},
"require": {
@@ -1266,7 +1269,7 @@
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
},
- "time": "2024-12-14T21:12:59+00:00",
+ "time": "2025-10-06T01:07:24+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -1331,7 +1334,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
- "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43"
+ "source": "https://github.com/phpseclib/phpseclib/tree/3.0.47"
},
"funding": [
{
@@ -1572,33 +1575,33 @@
},
{
"name": "psr/log",
- "version": "1.1.4",
- "version_normalized": "1.1.4.0",
+ "version": "3.0.2",
+ "version_normalized": "3.0.2.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+ "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
+ "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": ">=8.0.0"
},
- "time": "2021-05-03T11:20:27+00:00",
+ "time": "2024-09-11T13:17:53+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "3.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
- "Psr\\Log\\": "Psr/Log/"
+ "Psr\\Log\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1619,7 +1622,7 @@
"psr-3"
],
"support": {
- "source": "https://github.com/php-fig/log/tree/1.1.4"
+ "source": "https://github.com/php-fig/log/tree/3.0.2"
},
"install-path": "../psr/log"
},
@@ -1765,21 +1768,21 @@
},
{
"name": "ramsey/uuid",
- "version": "4.9.0",
- "version_normalized": "4.9.0.0",
+ "version": "4.9.1",
+ "version_normalized": "4.9.1.0",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
- "reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0"
+ "reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ramsey/uuid/zipball/4e0e23cc785f0724a0e838279a9eb03f28b092a0",
- "reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0",
+ "url": "https://api.github.com/repos/ramsey/uuid/zipball/81f941f6f729b1e3ceea61d9d014f8b6c6800440",
+ "reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440",
"shasum": ""
},
"require": {
- "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13",
+ "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14",
"php": "^8.0",
"ramsey/collection": "^1.2 || ^2.0"
},
@@ -1812,7 +1815,7 @@
"paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
"ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
},
- "time": "2025-06-25T14:20:11+00:00",
+ "time": "2025-09-04T20:59:21+00:00",
"type": "library",
"extra": {
"captainhook": {
@@ -1840,7 +1843,7 @@
],
"support": {
"issues": "https://github.com/ramsey/uuid/issues",
- "source": "https://github.com/ramsey/uuid/tree/4.9.0"
+ "source": "https://github.com/ramsey/uuid/tree/4.9.1"
},
"install-path": "../ramsey/uuid"
},
@@ -1981,8 +1984,8 @@
},
{
"name": "symfony/polyfill-php81",
- "version": "v1.32.0",
- "version_normalized": "1.32.0.0",
+ "version": "v1.33.0",
+ "version_normalized": "1.33.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
@@ -2040,7 +2043,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php81/tree/v1.32.0"
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.33.0"
},
"funding": [
{
@@ -2051,6 +2054,10 @@
"url": "https://github.com/fabpot",
"type": "github"
},
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
diff --git a/lib/Google/vendor/composer/installed.php b/lib/Google/vendor/composer/installed.php
index 751d577c6..f369de233 100644
--- a/lib/Google/vendor/composer/installed.php
+++ b/lib/Google/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'google/apiclient',
'pretty_version' => 'dev-latest',
'version' => 'dev-latest',
- 'reference' => 'e9bccc39abc840b90f13f5054b669f3d2d2fe0df',
+ 'reference' => '5531500eab1459100600be9f30c5795acddde4c6',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -31,34 +31,34 @@
'google/apiclient' => array(
'pretty_version' => 'dev-latest',
'version' => 'dev-latest',
- 'reference' => 'e9bccc39abc840b90f13f5054b669f3d2d2fe0df',
+ 'reference' => '5531500eab1459100600be9f30c5795acddde4c6',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'google/apiclient-services' => array(
- 'pretty_version' => 'v0.396.0',
- 'version' => '0.396.0.0',
- 'reference' => 'ceb2e432e4326c6775d24f62d554395a1a9ad3dd',
+ 'pretty_version' => 'v0.411.0',
+ 'version' => '0.411.0.0',
+ 'reference' => '3d616fcefdb8e6c598b2d007d4155fe516b91abd',
'type' => 'library',
'install_path' => __DIR__ . '/../google/apiclient-services',
'aliases' => array(),
'dev_requirement' => false,
),
'google/auth' => array(
- 'pretty_version' => 'v1.42.0',
- 'version' => '1.42.0.0',
- 'reference' => '0c25599a91530b5847f129b271c536f75a7563f5',
+ 'pretty_version' => 'v1.47.1',
+ 'version' => '1.47.1.0',
+ 'reference' => 'd7a0a215ec42ca0c8cb40e9ae0c5960aa9a024b7',
'type' => 'library',
'install_path' => __DIR__ . '/../google/auth',
'aliases' => array(),
'dev_requirement' => false,
),
'google/cloud-core' => array(
- 'pretty_version' => 'v1.60.0',
- 'version' => '1.60.0.0',
- 'reference' => '7d63ba4295b799dc63227b6c9daf9dc207650eb4',
+ 'pretty_version' => 'v1.64.0',
+ 'version' => '1.64.0.0',
+ 'reference' => 'f0cc1e5d7626b1b3d9407b2af2368acc7ccf0d85',
'type' => 'library',
'install_path' => __DIR__ . '/../google/cloud-core',
'aliases' => array(),
@@ -83,9 +83,9 @@
'dev_requirement' => false,
),
'google/gax' => array(
- 'pretty_version' => 'v1.35.1',
- 'version' => '1.35.1.0',
- 'reference' => '336005867c0ca3e2ad95183cf9dd74fa67915dd9',
+ 'pretty_version' => 'v1.36.1',
+ 'version' => '1.36.1.0',
+ 'reference' => 'afdac3bc38a3b17d70668115d7b1a97289ac4d72',
'type' => 'library',
'install_path' => __DIR__ . '/../google/gax',
'aliases' => array(),
@@ -101,9 +101,9 @@
'dev_requirement' => false,
),
'google/longrunning' => array(
- 'pretty_version' => '0.4.7',
- 'version' => '0.4.7.0',
- 'reference' => '624cabb874c10e5ddc9034c999f724894b70a3d3',
+ 'pretty_version' => '0.6.0',
+ 'version' => '0.6.0.0',
+ 'reference' => '226d3b5166eaa13754cc5e452b37872478e23375',
'type' => 'library',
'install_path' => __DIR__ . '/../google/longrunning',
'aliases' => array(),
@@ -119,36 +119,36 @@
'dev_requirement' => false,
),
'grpc/grpc' => array(
- 'pretty_version' => '1.57.0',
- 'version' => '1.57.0.0',
- 'reference' => 'b610c42022ed3a22f831439cb93802f2a4502fdf',
+ 'pretty_version' => '1.74.0',
+ 'version' => '1.74.0.0',
+ 'reference' => '32bf4dba256d60d395582fb6e4e8d3936bcdb713',
'type' => 'library',
'install_path' => __DIR__ . '/../grpc/grpc',
'aliases' => array(),
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(
- 'pretty_version' => '7.9.3',
- 'version' => '7.9.3.0',
- 'reference' => '7b2f29fe81dc4da0ca0ea7d42107a0845946ea77',
+ 'pretty_version' => '7.10.0',
+ 'version' => '7.10.0.0',
+ 'reference' => 'b51ac707cfa420b7bfd4e4d5e510ba8008e822b4',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(),
'dev_requirement' => false,
),
'guzzlehttp/promises' => array(
- 'pretty_version' => '2.2.0',
- 'version' => '2.2.0.0',
- 'reference' => '7c69f28996b0a6920945dd20b3857e499d9ca96c',
+ 'pretty_version' => '2.3.0',
+ 'version' => '2.3.0.0',
+ 'reference' => '481557b130ef3790cf82b713667b43030dc9c957',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(),
'dev_requirement' => false,
),
'guzzlehttp/psr7' => array(
- 'pretty_version' => '2.7.1',
- 'version' => '2.7.1.0',
- 'reference' => 'c2270caaabe631b3b44c85f99e5a04bbb8060d16',
+ 'pretty_version' => '2.8.0',
+ 'version' => '2.8.0.0',
+ 'reference' => '21dc724a0583619cd1652f673303492272778051',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(),
@@ -164,9 +164,9 @@
'dev_requirement' => false,
),
'paragonie/constant_time_encoding' => array(
- 'pretty_version' => 'v3.0.0',
- 'version' => '3.0.0.0',
- 'reference' => 'df1e7fde177501eee2037dd159cf04f5f301a512',
+ 'pretty_version' => 'v3.1.3',
+ 'version' => '3.1.3.0',
+ 'reference' => 'd5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77',
'type' => 'library',
'install_path' => __DIR__ . '/../paragonie/constant_time_encoding',
'aliases' => array(),
@@ -182,9 +182,9 @@
'dev_requirement' => false,
),
'phpseclib/phpseclib' => array(
- 'pretty_version' => '3.0.43',
- 'version' => '3.0.43.0',
- 'reference' => '709ec107af3cb2f385b9617be72af8cf62441d02',
+ 'pretty_version' => '3.0.47',
+ 'version' => '3.0.47.0',
+ 'reference' => '9d6ca36a6c2dd434765b1071b2644a1c683b385d',
'type' => 'library',
'install_path' => __DIR__ . '/../phpseclib/phpseclib',
'aliases' => array(),
@@ -245,9 +245,9 @@
),
),
'psr/log' => array(
- 'pretty_version' => '1.1.4',
- 'version' => '1.1.4.0',
- 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
+ 'pretty_version' => '3.0.2',
+ 'version' => '3.0.2.0',
+ 'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
@@ -278,9 +278,9 @@
'dev_requirement' => false,
),
'ramsey/uuid' => array(
- 'pretty_version' => '4.9.0',
- 'version' => '4.9.0.0',
- 'reference' => '4e0e23cc785f0724a0e838279a9eb03f28b092a0',
+ 'pretty_version' => '4.9.1',
+ 'version' => '4.9.1.0',
+ 'reference' => '81f941f6f729b1e3ceea61d9d014f8b6c6800440',
'type' => 'library',
'install_path' => __DIR__ . '/../ramsey/uuid',
'aliases' => array(),
@@ -289,7 +289,7 @@
'rhumsaa/uuid' => array(
'dev_requirement' => false,
'replaced' => array(
- 0 => '4.9.0',
+ 0 => '4.9.1',
),
),
'rize/uri-template' => array(
@@ -311,8 +311,8 @@
'dev_requirement' => false,
),
'symfony/polyfill-php81' => array(
- 'pretty_version' => 'v1.32.0',
- 'version' => '1.32.0.0',
+ 'pretty_version' => 'v1.33.0',
+ 'version' => '1.33.0.0',
'reference' => '4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php81',
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage.php b/lib/Google/vendor/google/apiclient-services/src/Storage.php
index 38cedc75e..c76eab34c 100644
--- a/lib/Google/vendor/google/apiclient-services/src/Storage.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage.php
@@ -1700,6 +1700,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'location' => 'query',
'type' => 'string',
],
+ 'projection' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
'userProject' => [
'location' => 'query',
'type' => 'string',
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/BucketIpFilter.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketIpFilter.php
index 8528a0550..a38d42393 100644
--- a/lib/Google/vendor/google/apiclient-services/src/Storage/BucketIpFilter.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketIpFilter.php
@@ -20,6 +20,10 @@
class BucketIpFilter extends \Google\Collection
{
protected $collection_key = 'vpcNetworkSources';
+ /**
+ * @var bool
+ */
+ public $allowCrossOrgVpcs;
/**
* @var string
*/
@@ -29,6 +33,20 @@ class BucketIpFilter extends \Google\Collection
protected $vpcNetworkSourcesType = BucketIpFilterVpcNetworkSources::class;
protected $vpcNetworkSourcesDataType = 'array';
+ /**
+ * @param bool
+ */
+ public function setAllowCrossOrgVpcs($allowCrossOrgVpcs)
+ {
+ $this->allowCrossOrgVpcs = $allowCrossOrgVpcs;
+ }
+ /**
+ * @return bool
+ */
+ public function getAllowCrossOrgVpcs()
+ {
+ return $this->allowCrossOrgVpcs;
+ }
/**
* @param string
*/
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Folders.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Folders.php
index 6b9347da0..2e2395f11 100644
--- a/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Folders.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Folders.php
@@ -82,7 +82,7 @@ public function get($bucket, $folder, $optParams = [])
* @param Folder $postBody
* @param array $optParams Optional parameters.
*
- * @opt_param bool recursive If true, any parent folder which doesn’t exist will
+ * @opt_param bool recursive If true, any parent folder which doesn't exist will
* be created automatically.
* @return Folder
* @throws \Google\Service\Exception
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Objects.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Objects.php
index 725c488ad..056135e53 100644
--- a/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Objects.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Objects.php
@@ -407,6 +407,7 @@ public function listObjects($bucket, $optParams = [])
* match the given value. `ifSourceMetagenerationMatch` and
* `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an
* error for both of them to be set in the request.
+ * @opt_param string projection Set of properties to return. Defaults to noAcl.
* @opt_param string userProject The project to be billed for this request.
* Required for Requester Pays buckets.
* @return StorageObject
diff --git a/lib/Google/vendor/google/auth/.repo-metadata.json b/lib/Google/vendor/google/auth/.repo-metadata.json
new file mode 100644
index 000000000..5ab504499
--- /dev/null
+++ b/lib/Google/vendor/google/auth/.repo-metadata.json
@@ -0,0 +1,7 @@
+{
+ "language": "php",
+ "distribution_name": "google/auth",
+ "release_level": "stable",
+ "client_documentation": "https://cloud.google.com/php/docs/reference/auth/latest",
+ "library_type": "CORE"
+}
diff --git a/lib/Google/vendor/google/auth/README.md b/lib/Google/vendor/google/auth/README.md
index ce23622af..3331aebf5 100644
--- a/lib/Google/vendor/google/auth/README.md
+++ b/lib/Google/vendor/google/auth/README.md
@@ -1,15 +1,6 @@
# Google Auth Library for PHP
-
- - Homepage
- http://www.github.com/google/google-auth-library-php
- - Reference Docs
- https://googleapis.github.io/google-auth-library-php/main/
- - Authors
- - Tim Emiola
- - Stanley Cheung
- - Brent Shaffer
- - Copyright
- Copyright © 2015 Google, Inc.
- - License
- Apache 2.0
-
+Reference Docs
## Description
@@ -41,6 +32,14 @@ Application Default Credentials provides a simple way to get authorization
credentials for use in calling Google APIs, and is
the recommended approach to authorize calls to Cloud APIs.
+**Important**: If you accept a credential configuration (credential JSON/File/Stream) from an
+external source for authentication to Google Cloud Platform, you must validate it before providing
+it to any Google API or library. Providing an unvalidated credential configuration to Google APIs
+can compromise the security of your systems and data. For more information, refer to
+[Validate credential configurations from external sources][externally-sourced-credentials].
+
+[externally-sourced-credentials]: https://cloud.google.com/docs/authentication/external/externally-sourced-credentials
+
### Set up ADC
To use ADC, you must set it up by providing credentials.
@@ -302,7 +301,7 @@ $middleware = ApplicationDefaultCredentials::getCredentials($scope, cache: $memo
### FileSystemCacheItemPool Cache
The `FileSystemCacheItemPool` class is a `PSR-6` compliant cache that stores its
-serialized objects on disk, caching data between processes and making it possible
+serialized objects on disk, caching data between processes and making it possible
to use data between different requests.
```php
diff --git a/lib/Google/vendor/google/auth/VERSION b/lib/Google/vendor/google/auth/VERSION
index a50908ca3..f805cd6ed 100644
--- a/lib/Google/vendor/google/auth/VERSION
+++ b/lib/Google/vendor/google/auth/VERSION
@@ -1 +1 @@
-1.42.0
+1.47.1
diff --git a/lib/Google/vendor/google/auth/composer.json b/lib/Google/vendor/google/auth/composer.json
index 41a1d0532..6dddd9a29 100644
--- a/lib/Google/vendor/google/auth/composer.json
+++ b/lib/Google/vendor/google/auth/composer.json
@@ -3,10 +3,10 @@
"type": "library",
"description": "Google Auth Library for PHP",
"keywords": ["google", "oauth2", "authentication"],
- "homepage": "http://github.com/google/google-auth-library-php",
+ "homepage": "https://github.com/google/google-auth-library-php",
"license": "Apache-2.0",
"support": {
- "docs": "https://googleapis.github.io/google-auth-library-php/main/"
+ "docs": "https://cloud.google.com/php/docs/reference/auth/latest"
},
"require": {
"php": "^8.0",
@@ -14,7 +14,8 @@
"guzzlehttp/guzzle": "^7.4.5",
"guzzlehttp/psr7": "^2.4.5",
"psr/http-message": "^1.1||^2.0",
- "psr/cache": "^2.0||^3.0"
+ "psr/cache": "^2.0||^3.0",
+ "psr/log": "^3.0"
},
"require-dev": {
"guzzlehttp/promises": "^2.0",
diff --git a/lib/Google/vendor/google/auth/src/AccessToken.php b/lib/Google/vendor/google/auth/src/AccessToken.php
index 630b27961..9e27b692e 100644
--- a/lib/Google/vendor/google/auth/src/AccessToken.php
+++ b/lib/Google/vendor/google/auth/src/AccessToken.php
@@ -65,12 +65,12 @@ class AccessToken
private $cache;
/**
- * @param callable $httpHandler [optional] An HTTP Handler to deliver PSR-7 requests.
- * @param CacheItemPoolInterface $cache [optional] A PSR-6 compatible cache implementation.
+ * @param callable|null $httpHandler [optional] An HTTP Handler to deliver PSR-7 requests.
+ * @param CacheItemPoolInterface|null $cache [optional] A PSR-6 compatible cache implementation.
*/
public function __construct(
- callable $httpHandler = null,
- CacheItemPoolInterface $cache = null
+ ?callable $httpHandler = null,
+ ?CacheItemPoolInterface $cache = null
) {
$this->httpHandler = $httpHandler
?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
diff --git a/lib/Google/vendor/google/auth/src/ApplicationDefaultCredentials.php b/lib/Google/vendor/google/auth/src/ApplicationDefaultCredentials.php
index 80437c8c9..a64af46a9 100644
--- a/lib/Google/vendor/google/auth/src/ApplicationDefaultCredentials.php
+++ b/lib/Google/vendor/google/auth/src/ApplicationDefaultCredentials.php
@@ -20,15 +20,19 @@
use DomainException;
use Google\Auth\Credentials\AppIdentityCredentials;
use Google\Auth\Credentials\GCECredentials;
+use Google\Auth\Credentials\ImpersonatedServiceAccountCredentials;
use Google\Auth\Credentials\ServiceAccountCredentials;
+use Google\Auth\Credentials\UserRefreshCredentials;
use Google\Auth\HttpHandler\HttpClientCache;
use Google\Auth\HttpHandler\HttpHandlerFactory;
+use Google\Auth\Logging\StdOutLogger;
use Google\Auth\Middleware\AuthTokenMiddleware;
use Google\Auth\Middleware\ProxyAuthTokenMiddleware;
use Google\Auth\Subscriber\AuthTokenSubscriber;
use GuzzleHttp\Client;
use InvalidArgumentException;
use Psr\Cache\CacheItemPoolInterface;
+use Psr\Log\LoggerInterface;
/**
* ApplicationDefaultCredentials obtains the default credentials for
@@ -69,6 +73,8 @@
*/
class ApplicationDefaultCredentials
{
+ private const SDK_DEBUG_ENV_VAR = 'GOOGLE_SDK_PHP_LOGGING';
+
/**
* @deprecated
*
@@ -80,18 +86,18 @@ class ApplicationDefaultCredentials
*
* @param string|string[] $scope the scope of the access request, expressed
* either as an Array or as a space-delimited String.
- * @param callable $httpHandler callback which delivers psr7 request
- * @param array $cacheConfig configuration for the cache when it's present
- * @param CacheItemPoolInterface $cache A cache implementation, may be
+ * @param callable|null $httpHandler callback which delivers psr7 request
+ * @param array|null $cacheConfig configuration for the cache when it's present
+ * @param CacheItemPoolInterface|null $cache A cache implementation, may be
* provided if you have one already available for use.
* @return AuthTokenSubscriber
* @throws DomainException if no implementation can be obtained.
*/
public static function getSubscriber(// @phpstan-ignore-line
$scope = null,
- callable $httpHandler = null,
- array $cacheConfig = null,
- CacheItemPoolInterface $cache = null
+ ?callable $httpHandler = null,
+ ?array $cacheConfig = null,
+ ?CacheItemPoolInterface $cache = null
) {
$creds = self::getCredentials($scope, $httpHandler, $cacheConfig, $cache);
@@ -108,9 +114,9 @@ public static function getSubscriber(// @phpstan-ignore-line
*
* @param string|string[] $scope the scope of the access request, expressed
* either as an Array or as a space-delimited String.
- * @param callable $httpHandler callback which delivers psr7 request
- * @param array $cacheConfig configuration for the cache when it's present
- * @param CacheItemPoolInterface $cache A cache implementation, may be
+ * @param callable|null $httpHandler callback which delivers psr7 request
+ * @param array|null $cacheConfig configuration for the cache when it's present
+ * @param CacheItemPoolInterface|null $cache A cache implementation, may be
* provided if you have one already available for use.
* @param string $quotaProject specifies a project to bill for access
* charges associated with the request.
@@ -119,9 +125,9 @@ public static function getSubscriber(// @phpstan-ignore-line
*/
public static function getMiddleware(
$scope = null,
- callable $httpHandler = null,
- array $cacheConfig = null,
- CacheItemPoolInterface $cache = null,
+ ?callable $httpHandler = null,
+ ?array $cacheConfig = null,
+ ?CacheItemPoolInterface $cache = null,
$quotaProject = null
) {
$creds = self::getCredentials($scope, $httpHandler, $cacheConfig, $cache, $quotaProject);
@@ -135,29 +141,31 @@ public static function getMiddleware(
*
* @param string|string[] $scope the scope of the access request, expressed
* either as an Array or as a space-delimited String.
- * @param callable $httpHandler callback which delivers psr7 request
- * @param array $cacheConfig configuration for the cache when it's present
- * @param CacheItemPoolInterface $cache A cache implementation, may be
+ * @param callable|null $httpHandler callback which delivers psr7 request
+ * @param array|null $cacheConfig configuration for the cache when it's present
+ * @param CacheItemPoolInterface|null $cache A cache implementation, may be
* provided if you have one already available for use.
- * @param string $quotaProject specifies a project to bill for access
+ * @param string|null $quotaProject specifies a project to bill for access
* charges associated with the request.
- * @param string|string[] $defaultScope The default scope to use if no
+ * @param string|string[]|null $defaultScope The default scope to use if no
* user-defined scopes exist, expressed either as an Array or as a
* space-delimited string.
- * @param string $universeDomain Specifies a universe domain to use for the
- * calling client library
+ * @param string|null $universeDomain Specifies a universe domain to use for the
+ * calling client library.
+ * @param null|false|LoggerInterface $logger A PSR3 compliant LoggerInterface.
*
* @return FetchAuthTokenInterface
* @throws DomainException if no implementation can be obtained.
*/
public static function getCredentials(
$scope = null,
- callable $httpHandler = null,
- array $cacheConfig = null,
- CacheItemPoolInterface $cache = null,
+ ?callable $httpHandler = null,
+ ?array $cacheConfig = null,
+ ?CacheItemPoolInterface $cache = null,
$quotaProject = null,
$defaultScope = null,
- string $universeDomain = null
+ ?string $universeDomain = null,
+ null|false|LoggerInterface $logger = null,
) {
$creds = null;
$jsonKey = CredentialsLoader::fromEnv()
@@ -170,7 +178,7 @@ public static function getCredentials(
HttpClientCache::setHttpClient($client);
}
- $httpHandler = HttpHandlerFactory::build($client);
+ $httpHandler = HttpHandlerFactory::build($client, $logger);
}
if (is_null($quotaProject)) {
@@ -215,18 +223,18 @@ public static function getCredentials(
* ID token.
*
* @param string $targetAudience The audience for the ID token.
- * @param callable $httpHandler callback which delivers psr7 request
- * @param array $cacheConfig configuration for the cache when it's present
- * @param CacheItemPoolInterface $cache A cache implementation, may be
+ * @param callable|null $httpHandler callback which delivers psr7 request
+ * @param array|null $cacheConfig configuration for the cache when it's present
+ * @param CacheItemPoolInterface|null $cache A cache implementation, may be
* provided if you have one already available for use.
* @return AuthTokenMiddleware
* @throws DomainException if no implementation can be obtained.
*/
public static function getIdTokenMiddleware(
$targetAudience,
- callable $httpHandler = null,
- array $cacheConfig = null,
- CacheItemPoolInterface $cache = null
+ ?callable $httpHandler = null,
+ ?array $cacheConfig = null,
+ ?CacheItemPoolInterface $cache = null
) {
$creds = self::getIdTokenCredentials($targetAudience, $httpHandler, $cacheConfig, $cache);
@@ -242,18 +250,18 @@ public static function getIdTokenMiddleware(
* ID token.
*
* @param string $targetAudience The audience for the ID token.
- * @param callable $httpHandler callback which delivers psr7 request
- * @param array $cacheConfig configuration for the cache when it's present
- * @param CacheItemPoolInterface $cache A cache implementation, may be
+ * @param callable|null $httpHandler callback which delivers psr7 request
+ * @param array|null $cacheConfig configuration for the cache when it's present
+ * @param CacheItemPoolInterface|null $cache A cache implementation, may be
* provided if you have one already available for use.
* @return ProxyAuthTokenMiddleware
* @throws DomainException if no implementation can be obtained.
*/
public static function getProxyIdTokenMiddleware(
$targetAudience,
- callable $httpHandler = null,
- array $cacheConfig = null,
- CacheItemPoolInterface $cache = null
+ ?callable $httpHandler = null,
+ ?array $cacheConfig = null,
+ ?CacheItemPoolInterface $cache = null
) {
$creds = self::getIdTokenCredentials($targetAudience, $httpHandler, $cacheConfig, $cache);
@@ -266,9 +274,9 @@ public static function getProxyIdTokenMiddleware(
* token.
*
* @param string $targetAudience The audience for the ID token.
- * @param callable $httpHandler callback which delivers psr7 request
- * @param array $cacheConfig configuration for the cache when it's present
- * @param CacheItemPoolInterface $cache A cache implementation, may be
+ * @param callable|null $httpHandler callback which delivers psr7 request
+ * @param array|null $cacheConfig configuration for the cache when it's present
+ * @param CacheItemPoolInterface|null $cache A cache implementation, may be
* provided if you have one already available for use.
* @return FetchAuthTokenInterface
* @throws DomainException if no implementation can be obtained.
@@ -276,9 +284,9 @@ public static function getProxyIdTokenMiddleware(
*/
public static function getIdTokenCredentials(
$targetAudience,
- callable $httpHandler = null,
- array $cacheConfig = null,
- CacheItemPoolInterface $cache = null
+ ?callable $httpHandler = null,
+ ?array $cacheConfig = null,
+ ?CacheItemPoolInterface $cache = null
) {
$creds = null;
$jsonKey = CredentialsLoader::fromEnv()
@@ -298,15 +306,12 @@ public static function getIdTokenCredentials(
throw new \InvalidArgumentException('json key is missing the type field');
}
- if ($jsonKey['type'] == 'authorized_user') {
- throw new InvalidArgumentException('ID tokens are not supported for end user credentials');
- }
-
- if ($jsonKey['type'] != 'service_account') {
- throw new InvalidArgumentException('invalid value in the type field');
- }
-
- $creds = new ServiceAccountCredentials(null, $jsonKey, null, $targetAudience);
+ $creds = match ($jsonKey['type']) {
+ 'authorized_user' => new UserRefreshCredentials(null, $jsonKey, $targetAudience),
+ 'impersonated_service_account' => new ImpersonatedServiceAccountCredentials(null, $jsonKey, $targetAudience),
+ 'service_account' => new ServiceAccountCredentials(null, $jsonKey, null, $targetAudience),
+ default => throw new InvalidArgumentException('invalid value in the type field')
+ };
} elseif (self::onGce($httpHandler, $cacheConfig, $cache)) {
$creds = new GCECredentials(null, null, $targetAudience);
$creds->setIsOnGce(true); // save the credentials a trip to the metadata server
@@ -321,6 +326,36 @@ public static function getIdTokenCredentials(
return $creds;
}
+ /**
+ * Returns a StdOutLogger instance
+ *
+ * @internal
+ *
+ * @return null|LoggerInterface
+ */
+ public static function getDefaultLogger(): null|LoggerInterface
+ {
+ $loggingFlag = getenv(self::SDK_DEBUG_ENV_VAR);
+
+ // Env var is not set
+ if (empty($loggingFlag)) {
+ return null;
+ }
+
+ $loggingFlag = strtolower($loggingFlag);
+
+ // Env Var is not true
+ if ($loggingFlag !== 'true') {
+ if ($loggingFlag !== 'false') {
+ trigger_error('The ' . self::SDK_DEBUG_ENV_VAR . ' is set, but it is set to another value than false or true. Logging is disabled');
+ }
+
+ return null;
+ }
+
+ return new StdOutLogger();
+ }
+
/**
* @return string
*/
@@ -334,15 +369,15 @@ private static function notFound()
}
/**
- * @param callable $httpHandler
- * @param array $cacheConfig
- * @param CacheItemPoolInterface $cache
+ * @param callable|null $httpHandler
+ * @param array|null $cacheConfig
+ * @param CacheItemPoolInterface|null $cache
* @return bool
*/
private static function onGce(
- callable $httpHandler = null,
- array $cacheConfig = null,
- CacheItemPoolInterface $cache = null
+ ?callable $httpHandler = null,
+ ?array $cacheConfig = null,
+ ?CacheItemPoolInterface $cache = null
) {
$gceCacheConfig = [];
foreach (['lifetime', 'prefix'] as $key) {
diff --git a/lib/Google/vendor/google/auth/src/CacheTrait.php b/lib/Google/vendor/google/auth/src/CacheTrait.php
index 2ef829095..49aa34649 100644
--- a/lib/Google/vendor/google/auth/src/CacheTrait.php
+++ b/lib/Google/vendor/google/auth/src/CacheTrait.php
@@ -95,7 +95,7 @@ private function getFullCacheKey($key)
return null;
}
- $key = $this->cacheConfig['prefix'] . $key;
+ $key = ($this->cacheConfig['prefix'] ?? '') . $key;
// ensure we do not have illegal characters
$key = preg_replace('|[^a-zA-Z0-9_\.!]|', '', $key);
diff --git a/lib/Google/vendor/google/auth/src/CredentialSource/AwsNativeSource.php b/lib/Google/vendor/google/auth/src/CredentialSource/AwsNativeSource.php
index 6d9244ba2..c4113f709 100644
--- a/lib/Google/vendor/google/auth/src/CredentialSource/AwsNativeSource.php
+++ b/lib/Google/vendor/google/auth/src/CredentialSource/AwsNativeSource.php
@@ -50,9 +50,9 @@ class AwsNativeSource implements ExternalAccountCredentialSourceInterface
public function __construct(
string $audience,
string $regionalCredVerificationUrl,
- string $regionUrl = null,
- string $securityCredentialsUrl = null,
- string $imdsv2SessionTokenUrl = null
+ ?string $regionUrl = null,
+ ?string $securityCredentialsUrl = null,
+ ?string $imdsv2SessionTokenUrl = null
) {
$this->audience = $audience;
$this->regionalCredVerificationUrl = $regionalCredVerificationUrl;
@@ -61,7 +61,7 @@ public function __construct(
$this->imdsv2SessionTokenUrl = $imdsv2SessionTokenUrl;
}
- public function fetchSubjectToken(callable $httpHandler = null): string
+ public function fetchSubjectToken(?callable $httpHandler = null): string
{
if (is_null($httpHandler)) {
$httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
@@ -103,7 +103,7 @@ public function fetchSubjectToken(callable $httpHandler = null): string
$headers['x-goog-cloud-target-resource'] = $this->audience;
// Format headers as they're expected in the subject token
- $formattedHeaders= array_map(
+ $formattedHeaders = array_map(
fn ($k, $v) => ['key' => $k, 'value' => $v],
array_keys($headers),
$headers,
@@ -356,7 +356,7 @@ private static function hmacSign(string $key, string $msg): string
*/
private static function utf8Encode(string $string): string
{
- return mb_convert_encoding($string, 'UTF-8', 'ISO-8859-1');
+ return (string) mb_convert_encoding($string, 'UTF-8', 'ISO-8859-1');
}
private static function getSignatureKey(
diff --git a/lib/Google/vendor/google/auth/src/CredentialSource/ExecutableSource.php b/lib/Google/vendor/google/auth/src/CredentialSource/ExecutableSource.php
index ce3bd9fda..f6255bec9 100644
--- a/lib/Google/vendor/google/auth/src/CredentialSource/ExecutableSource.php
+++ b/lib/Google/vendor/google/auth/src/CredentialSource/ExecutableSource.php
@@ -88,12 +88,12 @@ class ExecutableSource implements ExternalAccountCredentialSourceInterface
/**
* @param string $command The string command to run to get the subject token.
- * @param string $outputFile
+ * @param string|null $outputFile
*/
public function __construct(
string $command,
?string $outputFile,
- ExecutableHandler $executableHandler = null,
+ ?ExecutableHandler $executableHandler = null,
) {
$this->command = $command;
$this->outputFile = $outputFile;
@@ -113,12 +113,12 @@ public function getCacheKey(): ?string
}
/**
- * @param callable $httpHandler unused.
+ * @param callable|null $httpHandler unused.
* @return string
* @throws RuntimeException if the executable is not allowed to run.
* @throws ExecutableResponseError if the executable response is invalid.
*/
- public function fetchSubjectToken(callable $httpHandler = null): string
+ public function fetchSubjectToken(?callable $httpHandler = null): string
{
// Check if the executable is allowed to run.
if (getenv(self::GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES) !== '1') {
diff --git a/lib/Google/vendor/google/auth/src/CredentialSource/FileSource.php b/lib/Google/vendor/google/auth/src/CredentialSource/FileSource.php
index 00ac835a8..2e79119b8 100644
--- a/lib/Google/vendor/google/auth/src/CredentialSource/FileSource.php
+++ b/lib/Google/vendor/google/auth/src/CredentialSource/FileSource.php
@@ -31,15 +31,15 @@ class FileSource implements ExternalAccountCredentialSourceInterface
private ?string $subjectTokenFieldName;
/**
- * @param string $file The file to read the subject token from.
- * @param string $format The format of the token in the file. Can be null or "json".
- * @param string $subjectTokenFieldName The name of the field containing the token in the file. This is required
- * when format is "json".
+ * @param string $file The file to read the subject token from.
+ * @param string|null $format The format of the token in the file. Can be null or "json".
+ * @param string|null $subjectTokenFieldName The name of the field containing the token in the file. This is required
+ * when format is "json".
*/
public function __construct(
string $file,
- string $format = null,
- string $subjectTokenFieldName = null
+ ?string $format = null,
+ ?string $subjectTokenFieldName = null
) {
$this->file = $file;
@@ -53,7 +53,7 @@ public function __construct(
$this->subjectTokenFieldName = $subjectTokenFieldName;
}
- public function fetchSubjectToken(callable $httpHandler = null): string
+ public function fetchSubjectToken(?callable $httpHandler = null): string
{
$contents = file_get_contents($this->file);
if ($this->format === 'json') {
diff --git a/lib/Google/vendor/google/auth/src/CredentialSource/UrlSource.php b/lib/Google/vendor/google/auth/src/CredentialSource/UrlSource.php
index 6046d52fa..d2f875ebf 100644
--- a/lib/Google/vendor/google/auth/src/CredentialSource/UrlSource.php
+++ b/lib/Google/vendor/google/auth/src/CredentialSource/UrlSource.php
@@ -39,17 +39,17 @@ class UrlSource implements ExternalAccountCredentialSourceInterface
private ?array $headers;
/**
- * @param string $url The URL to fetch the subject token from.
- * @param string $format The format of the token in the response. Can be null or "json".
- * @param string $subjectTokenFieldName The name of the field containing the token in the response. This is required
+ * @param string $url The URL to fetch the subject token from.
+ * @param string|null $format The format of the token in the response. Can be null or "json".
+ * @param string|null $subjectTokenFieldName The name of the field containing the token in the response. This is required
* when format is "json".
- * @param array $headers Request headers to send in with the request to the URL.
+ * @param array|null $headers Request headers to send in with the request to the URL.
*/
public function __construct(
string $url,
- string $format = null,
- string $subjectTokenFieldName = null,
- array $headers = null
+ ?string $format = null,
+ ?string $subjectTokenFieldName = null,
+ ?array $headers = null
) {
$this->url = $url;
@@ -64,7 +64,7 @@ public function __construct(
$this->headers = $headers;
}
- public function fetchSubjectToken(callable $httpHandler = null): string
+ public function fetchSubjectToken(?callable $httpHandler = null): string
{
if (is_null($httpHandler)) {
$httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
diff --git a/lib/Google/vendor/google/auth/src/Credentials/AppIdentityCredentials.php b/lib/Google/vendor/google/auth/src/Credentials/AppIdentityCredentials.php
index db29438ab..5e4cfa53a 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/AppIdentityCredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/AppIdentityCredentials.php
@@ -116,7 +116,7 @@ public static function onAppEngine()
* As the AppIdentityService uses protobufs to fetch the access token,
* the GuzzleHttp\ClientInterface instance passed in will not be used.
*
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return array {
* A set of auth related metadata, containing the following
*
@@ -124,7 +124,7 @@ public static function onAppEngine()
* @type string $expiration_time
* }
*/
- public function fetchAuthToken(callable $httpHandler = null)
+ public function fetchAuthToken(?callable $httpHandler = null)
{
try {
$this->checkAppEngineContext();
@@ -161,10 +161,10 @@ public function signBlob($stringToSign, $forceOpenSsl = false)
*
* Returns null if AppIdentityService is unavailable.
*
- * @param callable $httpHandler Not used by this type.
+ * @param callable|null $httpHandler Not used by this type.
* @return string|null
*/
- public function getProjectId(callable $httpHandler = null)
+ public function getProjectId(?callable $httpHandler = null)
{
try {
$this->checkAppEngineContext();
@@ -181,11 +181,11 @@ public function getProjectId(callable $httpHandler = null)
*
* Subsequent calls to this method will return a cached value.
*
- * @param callable $httpHandler Not used in this implementation.
+ * @param callable|null $httpHandler Not used in this implementation.
* @return string
* @throws \Exception If AppEngine SDK or mock is not available.
*/
- public function getClientName(callable $httpHandler = null)
+ public function getClientName(?callable $httpHandler = null)
{
$this->checkAppEngineContext();
diff --git a/lib/Google/vendor/google/auth/src/Credentials/ExternalAccountCredentials.php b/lib/Google/vendor/google/auth/src/Credentials/ExternalAccountCredentials.php
index 3614d24d0..c0306ee80 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/ExternalAccountCredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/ExternalAccountCredentials.php
@@ -52,6 +52,8 @@ class ExternalAccountCredentials implements
private ?string $serviceAccountImpersonationUrl;
private ?string $workforcePoolUserProject;
private ?string $projectId;
+ /** @var array */
+ private ?array $lastImpersonatedAccessToken;
private string $universeDomain;
/**
@@ -211,7 +213,7 @@ private static function buildCredentialSource(array $jsonKey): ExternalAccountCr
/**
* @param string $stsToken
- * @param callable $httpHandler
+ * @param callable|null $httpHandler
*
* @return array {
* A set of auth related metadata, containing the following
@@ -220,7 +222,7 @@ private static function buildCredentialSource(array $jsonKey): ExternalAccountCr
* @type int $expires_at
* }
*/
- private function getImpersonatedAccessToken(string $stsToken, callable $httpHandler = null): array
+ private function getImpersonatedAccessToken(string $stsToken, ?callable $httpHandler = null): array
{
if (!isset($this->serviceAccountImpersonationUrl)) {
throw new InvalidArgumentException(
@@ -251,7 +253,9 @@ private function getImpersonatedAccessToken(string $stsToken, callable $httpHand
}
/**
- * @param callable $httpHandler
+ * @param callable|null $httpHandler
+ * @param array $headers [optional] Metrics headers to be inserted
+ * into the token endpoint request present.
*
* @return array {
* A set of auth related metadata, containing the following
@@ -263,12 +267,15 @@ private function getImpersonatedAccessToken(string $stsToken, callable $httpHand
* @type string $token_type (identity pool only)
* }
*/
- public function fetchAuthToken(callable $httpHandler = null)
+ public function fetchAuthToken(?callable $httpHandler = null, array $headers = [])
{
- $stsToken = $this->auth->fetchAuthToken($httpHandler);
+ $stsToken = $this->auth->fetchAuthToken($httpHandler, $headers);
if (isset($this->serviceAccountImpersonationUrl)) {
- return $this->getImpersonatedAccessToken($stsToken['access_token'], $httpHandler);
+ return $this->lastImpersonatedAccessToken = $this->getImpersonatedAccessToken(
+ $stsToken['access_token'],
+ $httpHandler
+ );
}
return $stsToken;
@@ -299,7 +306,7 @@ public function getCacheKey(): ?string
public function getLastReceivedToken()
{
- return $this->auth->getLastReceivedToken();
+ return $this->lastImpersonatedAccessToken ?? $this->auth->getLastReceivedToken();
}
/**
@@ -325,13 +332,13 @@ public function getUniverseDomain(): string
/**
* Get the project ID.
*
- * @param callable $httpHandler Callback which delivers psr7 request
- * @param string $accessToken The access token to use to sign the blob. If
+ * @param callable|null $httpHandler Callback which delivers psr7 request
+ * @param string|null $accessToken The access token to use to sign the blob. If
* provided, saves a call to the metadata server for a new access
* token. **Defaults to** `null`.
* @return string|null
*/
- public function getProjectId(callable $httpHandler = null, string $accessToken = null)
+ public function getProjectId(?callable $httpHandler = null, ?string $accessToken = null)
{
if (isset($this->projectId)) {
return $this->projectId;
diff --git a/lib/Google/vendor/google/auth/src/Credentials/GCECredentials.php b/lib/Google/vendor/google/auth/src/Credentials/GCECredentials.php
index 8b7547816..ab6753bd8 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/GCECredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/GCECredentials.php
@@ -100,7 +100,7 @@ class GCECredentials extends CredentialsLoader implements
/**
* The metadata path of the project ID.
*/
- const UNIVERSE_DOMAIN_URI_PATH = 'v1/universe/universe_domain';
+ const UNIVERSE_DOMAIN_URI_PATH = 'v1/universe/universe-domain';
/**
* The header whose presence indicates GCE presence.
@@ -199,7 +199,7 @@ class GCECredentials extends CredentialsLoader implements
private ?string $universeDomain;
/**
- * @param Iam $iam [optional] An IAM instance.
+ * @param Iam|null $iam [optional] An IAM instance.
* @param string|string[] $scope [optional] the scope of the access request,
* expressed either as an array or as a space-delimited string.
* @param string $targetAudience [optional] The audience for the ID token.
@@ -207,16 +207,16 @@ class GCECredentials extends CredentialsLoader implements
* charges associated with the request.
* @param string $serviceAccountIdentity [optional] Specify a service
* account identity name to use instead of "default".
- * @param string $universeDomain [optional] Specify a universe domain to use
+ * @param string|null $universeDomain [optional] Specify a universe domain to use
* instead of fetching one from the metadata server.
*/
public function __construct(
- Iam $iam = null,
+ ?Iam $iam = null,
$scope = null,
$targetAudience = null,
$quotaProject = null,
$serviceAccountIdentity = null,
- string $universeDomain = null
+ ?string $universeDomain = null
) {
$this->iam = $iam;
@@ -355,10 +355,10 @@ public static function onAppEngineFlexible()
* host.
* If $httpHandler is not specified a the default HttpHandler is used.
*
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return bool True if this a GCEInstance, false otherwise
*/
- public static function onGce(callable $httpHandler = null)
+ public static function onGce(?callable $httpHandler = null)
{
$httpHandler = $httpHandler
?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
@@ -426,12 +426,12 @@ private static function detectResidencyWindows(string $registryProductKey): bool
try {
$productName = $shell->regRead($registryProductKey);
- } catch(com_exception) {
+ } catch (com_exception) {
// This means that we tried to read a key that doesn't exist on the registry
// which might mean that it is a windows instance that is not on GCE
return false;
}
-
+
return 0 === strpos($productName, self::PRODUCT_NAME);
}
@@ -441,7 +441,9 @@ private static function detectResidencyWindows(string $registryProductKey): bool
* Fetches the auth tokens from the GCE metadata host if it is available.
* If $httpHandler is not specified a the default HttpHandler is used.
*
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
+ * @param array $headers [optional] Headers to be inserted
+ * into the token endpoint request present.
*
* @return array {
* A set of auth related metadata, based on the token type.
@@ -453,7 +455,7 @@ private static function detectResidencyWindows(string $registryProductKey): bool
* }
* @throws \Exception
*/
- public function fetchAuthToken(callable $httpHandler = null)
+ public function fetchAuthToken(?callable $httpHandler = null, array $headers = [])
{
$httpHandler = $httpHandler
?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
@@ -469,7 +471,7 @@ public function fetchAuthToken(callable $httpHandler = null)
$response = $this->getFromMetadata(
$httpHandler,
$this->tokenUri,
- $this->applyTokenEndpointMetrics([], $this->targetAudience ? 'it' : 'at')
+ $this->applyTokenEndpointMetrics($headers, $this->targetAudience ? 'it' : 'at')
);
if ($this->targetAudience) {
@@ -524,10 +526,10 @@ public function getLastReceivedToken()
*
* Subsequent calls will return a cached value.
*
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return string
*/
- public function getClientName(callable $httpHandler = null)
+ public function getClientName(?callable $httpHandler = null)
{
if ($this->clientName) {
return $this->clientName;
@@ -558,10 +560,10 @@ public function getClientName(callable $httpHandler = null)
*
* Returns null if called outside GCE.
*
- * @param callable $httpHandler Callback which delivers psr7 request
+ * @param callable|null $httpHandler Callback which delivers psr7 request
* @return string|null
*/
- public function getProjectId(callable $httpHandler = null)
+ public function getProjectId(?callable $httpHandler = null)
{
if ($this->projectId) {
return $this->projectId;
@@ -586,10 +588,10 @@ public function getProjectId(callable $httpHandler = null)
/**
* Fetch the default universe domain from the metadata server.
*
- * @param callable $httpHandler Callback which delivers psr7 request
+ * @param callable|null $httpHandler Callback which delivers psr7 request
* @return string
*/
- public function getUniverseDomain(callable $httpHandler = null): string
+ public function getUniverseDomain(?callable $httpHandler = null): string
{
if (null !== $this->universeDomain) {
return $this->universeDomain;
diff --git a/lib/Google/vendor/google/auth/src/Credentials/IAMCredentials.php b/lib/Google/vendor/google/auth/src/Credentials/IAMCredentials.php
index 98780c6e0..96d1df734 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/IAMCredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/IAMCredentials.php
@@ -71,7 +71,7 @@ public function getUpdateMetadataFunc()
*
* @param array $metadata metadata hashmap
* @param string $unusedAuthUri optional auth uri
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* Note: this param is unused here, only included here for
* consistency with other credentials class
*
@@ -80,7 +80,7 @@ public function getUpdateMetadataFunc()
public function updateMetadata(
$metadata,
$unusedAuthUri = null,
- callable $httpHandler = null
+ ?callable $httpHandler = null
) {
$metadata_copy = $metadata;
$metadata_copy[self::SELECTOR_KEY] = $this->selector;
diff --git a/lib/Google/vendor/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php b/lib/Google/vendor/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php
index 5d3522827..8842cd17c 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php
@@ -18,65 +18,119 @@
namespace Google\Auth\Credentials;
+use Google\Auth\CacheTrait;
use Google\Auth\CredentialsLoader;
+use Google\Auth\FetchAuthTokenInterface;
+use Google\Auth\GetUniverseDomainInterface;
+use Google\Auth\HttpHandler\HttpClientCache;
+use Google\Auth\HttpHandler\HttpHandlerFactory;
use Google\Auth\IamSignerTrait;
use Google\Auth\SignBlobInterface;
+use GuzzleHttp\Psr7\Request;
+use InvalidArgumentException;
+use LogicException;
-class ImpersonatedServiceAccountCredentials extends CredentialsLoader implements SignBlobInterface
+class ImpersonatedServiceAccountCredentials extends CredentialsLoader implements
+ SignBlobInterface,
+ GetUniverseDomainInterface
{
+ use CacheTrait;
use IamSignerTrait;
private const CRED_TYPE = 'imp';
+ private const IAM_SCOPE = 'https://www.googleapis.com/auth/iam';
+ private const ID_TOKEN_IMPERSONATION_URL =
+ 'https://iamcredentials.UNIVERSE_DOMAIN/v1/projects/-/serviceAccounts/%s:generateIdToken';
/**
* @var string
*/
protected $impersonatedServiceAccountName;
+ protected FetchAuthTokenInterface $sourceCredentials;
+
+ private string $serviceAccountImpersonationUrl;
+
/**
- * @var UserRefreshCredentials
+ * @var string[]
*/
- protected $sourceCredentials;
+ private array $delegates;
+
+ /**
+ * @var string|string[]
+ */
+ private string|array $targetScope;
+
+ private int $lifetime;
/**
* Instantiate an instance of ImpersonatedServiceAccountCredentials from a credentials file that
- * has be created with the --impersonated-service-account flag.
+ * has be created with the --impersonate-service-account flag.
+ *
+ * @param string|string[]|null $scope The scope of the access request, expressed either as an
+ * array or as a space-delimited string.
+ * @param string|array $jsonKey JSON credential file path or JSON array credentials {
+ * JSON credentials as an associative array.
*
- * @param string|string[] $scope The scope of the access request, expressed either as an
- * array or as a space-delimited string.
- * @param string|array $jsonKey JSON credential file path or JSON credentials
- * as an associative array.
+ * @type string $service_account_impersonation_url The URL to the service account
+ * @type string|FetchAuthTokenInterface $source_credentials The source credentials to impersonate
+ * @type int $lifetime The lifetime of the impersonated credentials
+ * @type string[] $delegates The delegates to impersonate
+ * }
+ * @param string|null $targetAudience The audience to request an ID token.
*/
public function __construct(
- $scope,
- $jsonKey
+ string|array|null $scope,
+ string|array $jsonKey,
+ private ?string $targetAudience = null
) {
if (is_string($jsonKey)) {
if (!file_exists($jsonKey)) {
- throw new \InvalidArgumentException('file does not exist');
+ throw new InvalidArgumentException('file does not exist');
}
$json = file_get_contents($jsonKey);
if (!$jsonKey = json_decode((string) $json, true)) {
- throw new \LogicException('invalid json for auth config');
+ throw new LogicException('invalid json for auth config');
}
}
if (!array_key_exists('service_account_impersonation_url', $jsonKey)) {
- throw new \LogicException(
+ throw new LogicException(
'json key is missing the service_account_impersonation_url field'
);
}
if (!array_key_exists('source_credentials', $jsonKey)) {
- throw new \LogicException('json key is missing the source_credentials field');
+ throw new LogicException('json key is missing the source_credentials field');
+ }
+ if ($scope && $targetAudience) {
+ throw new InvalidArgumentException(
+ 'Scope and targetAudience cannot both be supplied'
+ );
+ }
+ if (is_array($jsonKey['source_credentials'])) {
+ if (!array_key_exists('type', $jsonKey['source_credentials'])) {
+ throw new InvalidArgumentException('json key source credentials are missing the type field');
+ }
+ if (
+ $targetAudience !== null
+ && $jsonKey['source_credentials']['type'] === 'service_account'
+ ) {
+ // Service account tokens MUST request a scope, and as this token is only used to impersonate
+ // an ID token, the narrowest scope we can request is `iam`.
+ $scope = self::IAM_SCOPE;
+ }
+ $jsonKey['source_credentials'] = CredentialsLoader::makeCredentials($scope, $jsonKey['source_credentials']);
}
+ $this->targetScope = $scope ?? [];
+ $this->lifetime = $jsonKey['lifetime'] ?? 3600;
+ $this->delegates = $jsonKey['delegates'] ?? [];
+
+ $this->serviceAccountImpersonationUrl = $jsonKey['service_account_impersonation_url'];
$this->impersonatedServiceAccountName = $this->getImpersonatedServiceAccountNameFromUrl(
- $jsonKey['service_account_impersonation_url']
+ $this->serviceAccountImpersonationUrl
);
- $this->sourceCredentials = new UserRefreshCredentials(
- $scope,
- $jsonKey['source_credentials']
- );
+ $this->sourceCredentials = $jsonKey['source_credentials'];
}
/**
@@ -103,13 +157,13 @@ private function getImpersonatedServiceAccountNameFromUrl(
* @param callable|null $unusedHttpHandler not used by this credentials type.
* @return string Token issuer email
*/
- public function getClientName(callable $unusedHttpHandler = null)
+ public function getClientName(?callable $unusedHttpHandler = null)
{
return $this->impersonatedServiceAccountName;
}
/**
- * @param callable $httpHandler
+ * @param callable|null $httpHandler
*
* @return array {
* A set of auth related metadata, containing the following
@@ -121,13 +175,69 @@ public function getClientName(callable $unusedHttpHandler = null)
* @type string $id_token
* }
*/
- public function fetchAuthToken(callable $httpHandler = null)
+ public function fetchAuthToken(?callable $httpHandler = null)
{
- // We don't support id token endpoint requests as of now for Impersonated Cred
- return $this->sourceCredentials->fetchAuthToken(
+ $httpHandler = $httpHandler ?? HttpHandlerFactory::build(HttpClientCache::getHttpClient());
+
+ // The FetchAuthTokenInterface technically does not have a "headers" argument, but all of
+ // the implementations do. Additionally, passing in more parameters than the function has
+ // defined is allowed in PHP. So we'll just ignore the phpstan error here.
+ // @phpstan-ignore-next-line
+ $authToken = $this->sourceCredentials->fetchAuthToken(
$httpHandler,
$this->applyTokenEndpointMetrics([], 'at')
);
+
+ $headers = $this->applyTokenEndpointMetrics([
+ 'Content-Type' => 'application/json',
+ 'Cache-Control' => 'no-store',
+ 'Authorization' => sprintf('Bearer %s', $authToken['access_token'] ?? $authToken['id_token']),
+ ], $this->isIdTokenRequest() ? 'it' : 'at');
+
+ $body = match ($this->isIdTokenRequest()) {
+ true => [
+ 'audience' => $this->targetAudience,
+ 'includeEmail' => true,
+ ],
+ false => [
+ 'scope' => $this->targetScope,
+ 'delegates' => $this->delegates,
+ 'lifetime' => sprintf('%ss', $this->lifetime),
+ ]
+ };
+
+ $url = $this->serviceAccountImpersonationUrl;
+ if ($this->isIdTokenRequest()) {
+ $regex = '/serviceAccounts\/(?[^:]+):generateAccessToken$/';
+ if (!preg_match($regex, $url, $matches)) {
+ throw new InvalidArgumentException(
+ 'Invalid service account impersonation URL - unable to parse service account email'
+ );
+ }
+ $url = str_replace(
+ 'UNIVERSE_DOMAIN',
+ $this->getUniverseDomain(),
+ sprintf(self::ID_TOKEN_IMPERSONATION_URL, $matches['email'])
+ );
+ }
+
+ $request = new Request(
+ 'POST',
+ $url,
+ $headers,
+ (string) json_encode($body)
+ );
+
+ $response = $httpHandler($request);
+ $body = json_decode((string) $response->getBody(), true);
+
+ return match ($this->isIdTokenRequest()) {
+ true => ['id_token' => $body['token']],
+ false => [
+ 'access_token' => $body['accessToken'],
+ 'expires_at' => strtotime($body['expireTime']),
+ ]
+ };
}
/**
@@ -138,7 +248,9 @@ public function fetchAuthToken(callable $httpHandler = null)
*/
public function getCacheKey()
{
- return $this->sourceCredentials->getCacheKey();
+ return $this->getFullCacheKey(
+ $this->serviceAccountImpersonationUrl . $this->sourceCredentials->getCacheKey()
+ );
}
/**
@@ -153,4 +265,16 @@ protected function getCredType(): string
{
return self::CRED_TYPE;
}
+
+ private function isIdTokenRequest(): bool
+ {
+ return !is_null($this->targetAudience);
+ }
+
+ public function getUniverseDomain(): string
+ {
+ return $this->sourceCredentials instanceof GetUniverseDomainInterface
+ ? $this->sourceCredentials->getUniverseDomain()
+ : self::DEFAULT_UNIVERSE_DOMAIN;
+ }
}
diff --git a/lib/Google/vendor/google/auth/src/Credentials/InsecureCredentials.php b/lib/Google/vendor/google/auth/src/Credentials/InsecureCredentials.php
index 9b9e24b11..5a2bef1c5 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/InsecureCredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/InsecureCredentials.php
@@ -36,10 +36,10 @@ class InsecureCredentials implements FetchAuthTokenInterface
/**
* Fetches the auth token. In this case it returns an empty string.
*
- * @param callable $httpHandler
+ * @param callable|null $httpHandler
* @return array{access_token:string} A set of auth related metadata
*/
- public function fetchAuthToken(callable $httpHandler = null)
+ public function fetchAuthToken(?callable $httpHandler = null)
{
return $this->token;
}
diff --git a/lib/Google/vendor/google/auth/src/Credentials/ServiceAccountCredentials.php b/lib/Google/vendor/google/auth/src/Credentials/ServiceAccountCredentials.php
index 5e7915333..3d23f71af 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/ServiceAccountCredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/ServiceAccountCredentials.php
@@ -17,8 +17,10 @@
namespace Google\Auth\Credentials;
+use Firebase\JWT\JWT;
use Google\Auth\CredentialsLoader;
use Google\Auth\GetQuotaProjectInterface;
+use Google\Auth\Iam;
use Google\Auth\OAuth2;
use Google\Auth\ProjectIdProviderInterface;
use Google\Auth\ServiceAccountSignerTrait;
@@ -71,6 +73,7 @@ class ServiceAccountCredentials extends CredentialsLoader implements
* @var string
*/
private const CRED_TYPE = 'sa';
+ private const IAM_SCOPE = 'https://www.googleapis.com/auth/iam';
/**
* The OAuth2 instance used to conduct authorization.
@@ -111,6 +114,12 @@ class ServiceAccountCredentials extends CredentialsLoader implements
*/
private string $universeDomain;
+ /**
+ * Whether this is an ID token request or an access token request. Used when
+ * building the metric header.
+ */
+ private bool $isIdTokenRequest = false;
+
/**
* Create a new ServiceAccountCredentials.
*
@@ -158,6 +167,7 @@ public function __construct(
$additionalClaims = [];
if ($targetAudience) {
$additionalClaims = ['target_audience' => $targetAudience];
+ $this->isIdTokenRequest = true;
}
$this->auth = new OAuth2([
'audience' => self::TOKEN_CREDENTIAL_URI,
@@ -165,6 +175,7 @@ public function __construct(
'scope' => $scope,
'signingAlgorithm' => 'RS256',
'signingKey' => $jsonKey['private_key'],
+ 'signingKeyId' => $jsonKey['private_key_id'] ?? null,
'sub' => $sub,
'tokenCredentialUri' => self::TOKEN_CREDENTIAL_URI,
'additionalClaims' => $additionalClaims,
@@ -189,7 +200,9 @@ public function useJwtAccessWithScope()
}
/**
- * @param callable $httpHandler
+ * @param callable|null $httpHandler
+ * @param array $headers [optional] Headers to be inserted
+ * into the token endpoint request present.
*
* @return array {
* A set of auth related metadata, containing the following
@@ -199,7 +212,7 @@ public function useJwtAccessWithScope()
* @type string $token_type
* }
*/
- public function fetchAuthToken(callable $httpHandler = null)
+ public function fetchAuthToken(?callable $httpHandler = null, array $headers = [])
{
if ($this->useSelfSignedJwt()) {
$jwtCreds = $this->createJwtAccessCredentials();
@@ -213,9 +226,34 @@ public function fetchAuthToken(callable $httpHandler = null)
return $accessToken;
}
- $authRequestType = empty($this->auth->getAdditionalClaims()['target_audience'])
- ? 'at' : 'it';
- return $this->auth->fetchAuthToken($httpHandler, $this->applyTokenEndpointMetrics([], $authRequestType));
+
+ if ($this->isIdTokenRequest && $this->getUniverseDomain() !== self::DEFAULT_UNIVERSE_DOMAIN) {
+ $now = time();
+ $jwt = Jwt::encode(
+ [
+ 'iss' => $this->auth->getIssuer(),
+ 'sub' => $this->auth->getIssuer(),
+ 'scope' => self::IAM_SCOPE,
+ 'exp' => ($now + $this->auth->getExpiry()),
+ 'iat' => ($now - OAuth2::DEFAULT_SKEW_SECONDS),
+ ],
+ $this->auth->getSigningKey(),
+ $this->auth->getSigningAlgorithm(),
+ $this->auth->getSigningKeyId()
+ );
+ // We create a new instance of Iam each time because the `$httpHandler` might change.
+ $idToken = (new Iam($httpHandler, $this->getUniverseDomain()))->generateIdToken(
+ $this->auth->getIssuer(),
+ $this->auth->getAdditionalClaims()['target_audience'],
+ $jwt,
+ $this->applyTokenEndpointMetrics($headers, 'it')
+ );
+ return ['id_token' => $idToken];
+ }
+ return $this->auth->fetchAuthToken(
+ $httpHandler,
+ $this->applyTokenEndpointMetrics($headers, $this->isIdTokenRequest ? 'it' : 'at')
+ );
}
/**
@@ -258,10 +296,10 @@ public function getLastReceivedToken()
*
* Returns null if the project ID does not exist in the keyfile.
*
- * @param callable $httpHandler Not used by this credentials type.
+ * @param callable|null $httpHandler Not used by this credentials type.
* @return string|null
*/
- public function getProjectId(callable $httpHandler = null)
+ public function getProjectId(?callable $httpHandler = null)
{
return $this->projectId;
}
@@ -271,13 +309,13 @@ public function getProjectId(callable $httpHandler = null)
*
* @param array $metadata metadata hashmap
* @param string $authUri optional auth uri
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return array updated metadata hashmap
*/
public function updateMetadata(
$metadata,
$authUri = null,
- callable $httpHandler = null
+ ?callable $httpHandler = null
) {
// scope exists. use oauth implementation
if (!$this->useSelfSignedJwt()) {
@@ -335,10 +373,10 @@ public function setSub($sub)
*
* In this case, it returns the keyfile's client_email key.
*
- * @param callable $httpHandler Not used by this credentials type.
+ * @param callable|null $httpHandler Not used by this credentials type.
* @return string
*/
- public function getClientName(callable $httpHandler = null)
+ public function getClientName(?callable $httpHandler = null)
{
return $this->auth->getIssuer();
}
@@ -399,8 +437,8 @@ private function useSelfSignedJwt()
return false;
}
- // If claims are set, this call is for "id_tokens"
- if ($this->auth->getAdditionalClaims()) {
+ // Do not use self-signed JWT for ID tokens
+ if ($this->isIdTokenRequest) {
return false;
}
diff --git a/lib/Google/vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php b/lib/Google/vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php
index 7bdc21848..50373760b 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php
@@ -114,13 +114,13 @@ public function __construct($jsonKey, $scope = null)
*
* @param array $metadata metadata hashmap
* @param string $authUri optional auth uri
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return array updated metadata hashmap
*/
public function updateMetadata(
$metadata,
$authUri = null,
- callable $httpHandler = null
+ ?callable $httpHandler = null
) {
$scope = $this->auth->getScope();
if (empty($authUri) && empty($scope)) {
@@ -135,11 +135,11 @@ public function updateMetadata(
/**
* Implements FetchAuthTokenInterface#fetchAuthToken.
*
- * @param callable $httpHandler
+ * @param callable|null $httpHandler
*
* @return null|array{access_token:string} A set of auth related metadata
*/
- public function fetchAuthToken(callable $httpHandler = null)
+ public function fetchAuthToken(?callable $httpHandler = null)
{
$audience = $this->auth->getAudience();
$scope = $this->auth->getScope();
@@ -196,10 +196,10 @@ public function getLastReceivedToken()
*
* Returns null if the project ID does not exist in the keyfile.
*
- * @param callable $httpHandler Not used by this credentials type.
+ * @param callable|null $httpHandler Not used by this credentials type.
* @return string|null
*/
- public function getProjectId(callable $httpHandler = null)
+ public function getProjectId(?callable $httpHandler = null)
{
return $this->projectId;
}
@@ -209,10 +209,10 @@ public function getProjectId(callable $httpHandler = null)
*
* In this case, it returns the keyfile's client_email key.
*
- * @param callable $httpHandler Not used by this credentials type.
+ * @param callable|null $httpHandler Not used by this credentials type.
* @return string
*/
- public function getClientName(callable $httpHandler = null)
+ public function getClientName(?callable $httpHandler = null)
{
return $this->auth->getIssuer();
}
diff --git a/lib/Google/vendor/google/auth/src/Credentials/UserRefreshCredentials.php b/lib/Google/vendor/google/auth/src/Credentials/UserRefreshCredentials.php
index d40055562..326f6cd86 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/UserRefreshCredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/UserRefreshCredentials.php
@@ -20,6 +20,8 @@
use Google\Auth\CredentialsLoader;
use Google\Auth\GetQuotaProjectInterface;
use Google\Auth\OAuth2;
+use InvalidArgumentException;
+use LogicException;
/**
* Authenticates requests using User Refresh credentials.
@@ -55,48 +57,67 @@ class UserRefreshCredentials extends CredentialsLoader implements GetQuotaProjec
*/
protected $quotaProject;
+ /**
+ * Whether this is an ID token request or an access token request. Used when
+ * building the metric header.
+ */
+ private bool $isIdTokenRequest = false;
+
/**
* Create a new UserRefreshCredentials.
*
- * @param string|string[] $scope the scope of the access request, expressed
+ * @param string|string[]|null $scope the scope of the access request, expressed
* either as an Array or as a space-delimited String.
* @param string|array $jsonKey JSON credential file path or JSON credentials
* as an associative array
+ * @param string|null $targetAudience The audience for the ID token.
*/
public function __construct(
$scope,
- $jsonKey
+ $jsonKey,
+ ?string $targetAudience = null
) {
if (is_string($jsonKey)) {
if (!file_exists($jsonKey)) {
- throw new \InvalidArgumentException('file does not exist');
+ throw new InvalidArgumentException('file does not exist or is unreadable');
}
$json = file_get_contents($jsonKey);
if (!$jsonKey = json_decode((string) $json, true)) {
- throw new \LogicException('invalid json for auth config');
+ throw new LogicException('invalid json for auth config');
}
}
if (!array_key_exists('client_id', $jsonKey)) {
- throw new \InvalidArgumentException(
+ throw new InvalidArgumentException(
'json key is missing the client_id field'
);
}
if (!array_key_exists('client_secret', $jsonKey)) {
- throw new \InvalidArgumentException(
+ throw new InvalidArgumentException(
'json key is missing the client_secret field'
);
}
if (!array_key_exists('refresh_token', $jsonKey)) {
- throw new \InvalidArgumentException(
+ throw new InvalidArgumentException(
'json key is missing the refresh_token field'
);
}
+ if ($scope && $targetAudience) {
+ throw new InvalidArgumentException(
+ 'Scope and targetAudience cannot both be supplied'
+ );
+ }
+ $additionalClaims = [];
+ if ($targetAudience) {
+ $additionalClaims = ['target_audience' => $targetAudience];
+ $this->isIdTokenRequest = true;
+ }
$this->auth = new OAuth2([
'clientId' => $jsonKey['client_id'],
'clientSecret' => $jsonKey['client_secret'],
'refresh_token' => $jsonKey['refresh_token'],
'scope' => $scope,
'tokenCredentialUri' => self::TOKEN_CREDENTIAL_URI,
+ 'additionalClaims' => $additionalClaims,
]);
if (array_key_exists('quota_project_id', $jsonKey)) {
$this->quotaProject = (string) $jsonKey['quota_project_id'];
@@ -104,8 +125,8 @@ public function __construct(
}
/**
- * @param callable $httpHandler
- * @param array $metricsHeader [optional] Metrics headers to be inserted
+ * @param callable|null $httpHandler
+ * @param array $headers [optional] Metrics headers to be inserted
* into the token endpoint request present.
* This could be passed from ImersonatedServiceAccountCredentials as it uses
* UserRefreshCredentials as source credentials.
@@ -120,12 +141,11 @@ public function __construct(
* @type string $id_token
* }
*/
- public function fetchAuthToken(callable $httpHandler = null, array $metricsHeader = [])
+ public function fetchAuthToken(?callable $httpHandler = null, array $headers = [])
{
- // We don't support id token endpoint requests as of now for User Cred
return $this->auth->fetchAuthToken(
$httpHandler,
- $this->applyTokenEndpointMetrics($metricsHeader, 'at')
+ $this->applyTokenEndpointMetrics($headers, $this->isIdTokenRequest ? 'it' : 'at')
);
}
diff --git a/lib/Google/vendor/google/auth/src/CredentialsLoader.php b/lib/Google/vendor/google/auth/src/CredentialsLoader.php
index 746b957a9..9fc07416d 100644
--- a/lib/Google/vendor/google/auth/src/CredentialsLoader.php
+++ b/lib/Google/vendor/google/auth/src/CredentialsLoader.php
@@ -76,7 +76,7 @@ private static function isOnWindows()
*/
public static function fromEnv()
{
- $path = getenv(self::ENV_VAR);
+ $path = self::getEnv(self::ENV_VAR);
if (empty($path)) {
return null;
}
@@ -85,6 +85,7 @@ public static function fromEnv()
throw new \DomainException(self::unableToReadEnv($cause));
}
$jsonKey = file_get_contents($path);
+
return json_decode((string) $jsonKey, true);
}
@@ -103,7 +104,7 @@ public static function fromEnv()
public static function fromWellKnownFile()
{
$rootEnv = self::isOnWindows() ? 'APPDATA' : 'HOME';
- $path = [getenv($rootEnv)];
+ $path = [self::getEnv($rootEnv)];
if (!self::isOnWindows()) {
$path[] = self::NON_WINDOWS_WELL_KNOWN_PATH_BASE;
}
@@ -119,6 +120,12 @@ public static function fromWellKnownFile()
/**
* Create a new Credentials instance.
*
+ * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an
+ * external source for authentication to Google Cloud Platform, you must validate it before
+ * providing it to any Google API or library. Providing an unvalidated credential configuration to
+ * Google APIs can compromise the security of your systems and data. For more information
+ * {@see https://cloud.google.com/docs/authentication/external/externally-sourced-credentials}
+ *
* @param string|string[] $scope the scope of the access request, expressed
* either as an Array or as a space-delimited String.
* @param array $jsonKey the JSON credentials.
@@ -165,15 +172,15 @@ public static function makeCredentials(
*
* @param FetchAuthTokenInterface $fetcher is used to fetch the auth token
* @param array $httpClientOptions (optional) Array of request options to apply.
- * @param callable $httpHandler (optional) http client to fetch the token.
- * @param callable $tokenCallback (optional) function to be called when a new token is fetched.
+ * @param callable|null $httpHandler (optional) http client to fetch the token.
+ * @param callable|null $tokenCallback (optional) function to be called when a new token is fetched.
* @return \GuzzleHttp\Client
*/
public static function makeHttpClient(
FetchAuthTokenInterface $fetcher,
array $httpClientOptions = [],
- callable $httpHandler = null,
- callable $tokenCallback = null
+ ?callable $httpHandler = null,
+ ?callable $tokenCallback = null
) {
$middleware = new Middleware\AuthTokenMiddleware(
$fetcher,
@@ -208,7 +215,7 @@ public static function makeInsecureCredentials()
*/
public static function quotaProjectFromEnv()
{
- return getenv(self::QUOTA_PROJECT_ENV_VAR) ?: null;
+ return self::getEnv(self::QUOTA_PROJECT_ENV_VAR) ?: null;
}
/**
@@ -244,7 +251,7 @@ public static function getDefaultClientCertSource()
*/
public static function shouldLoadClientCertSource()
{
- return filter_var(getenv(self::MTLS_CERT_ENV_VAR), FILTER_VALIDATE_BOOLEAN);
+ return filter_var(self::getEnv(self::MTLS_CERT_ENV_VAR), FILTER_VALIDATE_BOOLEAN);
}
/**
@@ -253,7 +260,7 @@ public static function shouldLoadClientCertSource()
private static function loadDefaultClientCertSourceFile()
{
$rootEnv = self::isOnWindows() ? 'APPDATA' : 'HOME';
- $path = sprintf('%s/%s', getenv($rootEnv), self::MTLS_WELL_KNOWN_PATH);
+ $path = sprintf('%s/%s', self::getEnv($rootEnv), self::MTLS_WELL_KNOWN_PATH);
if (!file_exists($path)) {
return null;
}
@@ -285,4 +292,9 @@ public function getUniverseDomain(): string
{
return self::DEFAULT_UNIVERSE_DOMAIN;
}
+
+ private static function getEnv(string $env): mixed
+ {
+ return getenv($env) ?: $_ENV[$env] ?? null;
+ }
}
diff --git a/lib/Google/vendor/google/auth/src/ExternalAccountCredentialSourceInterface.php b/lib/Google/vendor/google/auth/src/ExternalAccountCredentialSourceInterface.php
index 041b18d51..1492c6991 100644
--- a/lib/Google/vendor/google/auth/src/ExternalAccountCredentialSourceInterface.php
+++ b/lib/Google/vendor/google/auth/src/ExternalAccountCredentialSourceInterface.php
@@ -1,5 +1,5 @@
$cacheConfig Configuration for the cache
+ * @param array|null $cacheConfig Configuration for the cache
* @param CacheItemPoolInterface $cache
*/
public function __construct(
FetchAuthTokenInterface $fetcher,
- array $cacheConfig = null,
- CacheItemPoolInterface $cache
+ ?array $cacheConfig = null,
+ ?CacheItemPoolInterface $cache = null
) {
$this->fetcher = $fetcher;
$this->cache = $cache;
@@ -76,11 +76,11 @@ public function getFetcher()
* Checks the cache for a valid auth token and fetches the auth tokens
* from the supplied fetcher.
*
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return array the response
* @throws \Exception
*/
- public function fetchAuthToken(callable $httpHandler = null)
+ public function fetchAuthToken(?callable $httpHandler = null)
{
if ($cached = $this->fetchAuthTokenFromCache()) {
return $cached;
@@ -112,10 +112,10 @@ public function getLastReceivedToken()
/**
* Get the client name from the fetcher.
*
- * @param callable $httpHandler An HTTP handler to deliver PSR7 requests.
+ * @param callable|null $httpHandler An HTTP handler to deliver PSR7 requests.
* @return string
*/
- public function getClientName(callable $httpHandler = null)
+ public function getClientName(?callable $httpHandler = null)
{
if (!$this->fetcher instanceof SignBlobInterface) {
throw new \RuntimeException(
@@ -176,15 +176,15 @@ public function getQuotaProject()
return null;
}
- /*
+ /**
* Get the Project ID from the fetcher.
*
- * @param callable $httpHandler Callback which delivers psr7 request
+ * @param callable|null $httpHandler Callback which delivers psr7 request
* @return string|null
* @throws \RuntimeException If the fetcher does not implement
* `Google\Auth\ProvidesProjectIdInterface`.
*/
- public function getProjectId(callable $httpHandler = null)
+ public function getProjectId(?callable $httpHandler = null)
{
if (!$this->fetcher instanceof ProjectIdProviderInterface) {
throw new \RuntimeException(
@@ -227,7 +227,7 @@ public function getUniverseDomain(): string
*
* @param array $metadata metadata hashmap
* @param string $authUri optional auth uri
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return array updated metadata hashmap
* @throws \RuntimeException If the fetcher does not implement
* `Google\Auth\UpdateMetadataInterface`.
@@ -235,7 +235,7 @@ public function getUniverseDomain(): string
public function updateMetadata(
$metadata,
$authUri = null,
- callable $httpHandler = null
+ ?callable $httpHandler = null
) {
if (!$this->fetcher instanceof UpdateMetadataInterface) {
throw new \RuntimeException(
diff --git a/lib/Google/vendor/google/auth/src/FetchAuthTokenInterface.php b/lib/Google/vendor/google/auth/src/FetchAuthTokenInterface.php
index 64659550b..fbbd8b0c9 100644
--- a/lib/Google/vendor/google/auth/src/FetchAuthTokenInterface.php
+++ b/lib/Google/vendor/google/auth/src/FetchAuthTokenInterface.php
@@ -25,10 +25,10 @@ interface FetchAuthTokenInterface
/**
* Fetches the auth tokens based on the current state.
*
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return array a hash of auth tokens
*/
- public function fetchAuthToken(callable $httpHandler = null);
+ public function fetchAuthToken(?callable $httpHandler = null);
/**
* Obtains a key that can used to cache the results of #fetchAuthToken.
diff --git a/lib/Google/vendor/google/auth/src/GCECache.php b/lib/Google/vendor/google/auth/src/GCECache.php
index 804abdbe2..d3dcd8c6c 100644
--- a/lib/Google/vendor/google/auth/src/GCECache.php
+++ b/lib/Google/vendor/google/auth/src/GCECache.php
@@ -46,8 +46,8 @@ class GCECache
* @param CacheItemPoolInterface $cache
*/
public function __construct(
- array $cacheConfig = null,
- CacheItemPoolInterface $cache = null
+ ?array $cacheConfig = null,
+ ?CacheItemPoolInterface $cache = null
) {
$this->cache = $cache;
$this->cacheConfig = array_merge([
@@ -60,10 +60,10 @@ public function __construct(
* Caches the result of onGce so the metadata server is not called multiple
* times.
*
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return bool True if this a GCEInstance, false otherwise
*/
- public function onGce(callable $httpHandler = null)
+ public function onGce(?callable $httpHandler = null)
{
if (is_null($this->cache)) {
return GCECredentials::onGce($httpHandler);
diff --git a/lib/Google/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php b/lib/Google/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php
index 53a8865fd..ee2739eca 100644
--- a/lib/Google/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php
+++ b/lib/Google/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php
@@ -16,23 +16,35 @@
*/
namespace Google\Auth\HttpHandler;
+use Google\Auth\Logging\LoggingTrait;
+use Google\Auth\Logging\RpcLogEvent;
use GuzzleHttp\ClientInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
+use Psr\Log\LoggerInterface;
class Guzzle6HttpHandler
{
+ use LoggingTrait;
+
/**
* @var ClientInterface
*/
private $client;
+ /**
+ * @var null|LoggerInterface
+ */
+ private $logger;
+
/**
* @param ClientInterface $client
+ * @param null|LoggerInterface $logger
*/
- public function __construct(ClientInterface $client)
+ public function __construct(ClientInterface $client, ?LoggerInterface $logger = null)
{
$this->client = $client;
+ $this->logger = $logger;
}
/**
@@ -44,7 +56,19 @@ public function __construct(ClientInterface $client)
*/
public function __invoke(RequestInterface $request, array $options = [])
{
- return $this->client->send($request, $options);
+ $requestEvent = null;
+
+ if ($this->logger) {
+ $requestEvent = $this->requestLog($request, $options);
+ }
+
+ $response = $this->client->send($request, $options);
+
+ if ($this->logger) {
+ $this->responseLog($response, $requestEvent);
+ }
+
+ return $response;
}
/**
@@ -57,6 +81,60 @@ public function __invoke(RequestInterface $request, array $options = [])
*/
public function async(RequestInterface $request, array $options = [])
{
- return $this->client->sendAsync($request, $options);
+ $requestEvent = null;
+
+ if ($this->logger) {
+ $requestEvent = $this->requestLog($request, $options);
+ }
+
+ $promise = $this->client->sendAsync($request, $options);
+
+ if ($this->logger) {
+ $promise->then(function (ResponseInterface $response) use ($requestEvent) {
+ $this->responseLog($response, $requestEvent);
+ return $response;
+ });
+ }
+
+ return $promise;
+ }
+
+ /**
+ * @internal
+ * @param RequestInterface $request
+ * @param array $options
+ */
+ public function requestLog(RequestInterface $request, array $options): RpcLogEvent
+ {
+ $requestEvent = new RpcLogEvent();
+
+ $requestEvent->method = $request->getMethod();
+ $requestEvent->url = (string) $request->getUri();
+ $requestEvent->headers = $request->getHeaders();
+ $requestEvent->payload = $request->getBody()->getContents();
+ $requestEvent->retryAttempt = $options['retryAttempt'] ?? null;
+ $requestEvent->serviceName = $options['serviceName'] ?? null;
+ $requestEvent->processId = (int) getmypid();
+ $requestEvent->requestId = $options['requestId'] ?? crc32((string) spl_object_id($request) . getmypid());
+
+ $this->logRequest($requestEvent);
+
+ return $requestEvent;
+ }
+
+ /**
+ * @internal
+ */
+ public function responseLog(ResponseInterface $response, RpcLogEvent $requestEvent): void
+ {
+ $responseEvent = new RpcLogEvent($requestEvent->milliseconds);
+
+ $responseEvent->headers = $response->getHeaders();
+ $responseEvent->payload = $response->getBody()->getContents();
+ $responseEvent->status = $response->getStatusCode();
+ $responseEvent->processId = $requestEvent->processId;
+ $responseEvent->requestId = $requestEvent->requestId;
+
+ $this->logResponse($responseEvent);
}
}
diff --git a/lib/Google/vendor/google/auth/src/HttpHandler/HttpClientCache.php b/lib/Google/vendor/google/auth/src/HttpHandler/HttpClientCache.php
index f4a62b967..0159c8d09 100644
--- a/lib/Google/vendor/google/auth/src/HttpHandler/HttpClientCache.php
+++ b/lib/Google/vendor/google/auth/src/HttpHandler/HttpClientCache.php
@@ -37,7 +37,7 @@ class HttpClientCache
* @param ClientInterface|null $client
* @return void
*/
- public static function setHttpClient(ClientInterface $client = null)
+ public static function setHttpClient(?ClientInterface $client = null)
{
self::$httpClient = $client;
}
diff --git a/lib/Google/vendor/google/auth/src/HttpHandler/HttpHandlerFactory.php b/lib/Google/vendor/google/auth/src/HttpHandler/HttpHandlerFactory.php
index f19f87443..7b1bf045d 100644
--- a/lib/Google/vendor/google/auth/src/HttpHandler/HttpHandlerFactory.php
+++ b/lib/Google/vendor/google/auth/src/HttpHandler/HttpHandlerFactory.php
@@ -16,23 +16,28 @@
*/
namespace Google\Auth\HttpHandler;
+use Google\Auth\ApplicationDefaultCredentials;
use GuzzleHttp\BodySummarizer;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
+use Psr\Log\LoggerInterface;
class HttpHandlerFactory
{
/**
* Builds out a default http handler for the installed version of guzzle.
*
- * @param ClientInterface $client
+ * @param ClientInterface|null $client
+ * @param null|false|LoggerInterface $logger
* @return Guzzle6HttpHandler|Guzzle7HttpHandler
* @throws \Exception
*/
- public static function build(ClientInterface $client = null)
- {
+ public static function build(
+ ?ClientInterface $client = null,
+ null|false|LoggerInterface $logger = null,
+ ) {
if (is_null($client)) {
$stack = null;
if (class_exists(BodySummarizer::class)) {
@@ -45,6 +50,10 @@ public static function build(ClientInterface $client = null)
$client = new Client(['handler' => $stack]);
}
+ $logger = ($logger === false)
+ ? null
+ : $logger ?? ApplicationDefaultCredentials::getDefaultLogger();
+
$version = null;
if (defined('GuzzleHttp\ClientInterface::MAJOR_VERSION')) {
$version = ClientInterface::MAJOR_VERSION;
@@ -54,9 +63,9 @@ public static function build(ClientInterface $client = null)
switch ($version) {
case 6:
- return new Guzzle6HttpHandler($client);
+ return new Guzzle6HttpHandler($client, $logger);
case 7:
- return new Guzzle7HttpHandler($client);
+ return new Guzzle7HttpHandler($client, $logger);
default:
throw new \Exception('Version not supported');
}
diff --git a/lib/Google/vendor/google/auth/src/Iam.php b/lib/Google/vendor/google/auth/src/Iam.php
index 2f67f0009..b32ac6065 100644
--- a/lib/Google/vendor/google/auth/src/Iam.php
+++ b/lib/Google/vendor/google/auth/src/Iam.php
@@ -36,6 +36,7 @@ class Iam
const SIGN_BLOB_PATH = '%s:signBlob?alt=json';
const SERVICE_ACCOUNT_NAME = 'projects/-/serviceAccounts/%s';
private const IAM_API_ROOT_TEMPLATE = 'https://iamcredentials.UNIVERSE_DOMAIN/v1';
+ private const GENERATE_ID_TOKEN_PATH = '%s:generateIdToken';
/**
* @var callable
@@ -45,10 +46,10 @@ class Iam
private string $universeDomain;
/**
- * @param callable $httpHandler [optional] The HTTP Handler to send requests.
+ * @param callable|null $httpHandler [optional] The HTTP Handler to send requests.
*/
public function __construct(
- callable $httpHandler = null,
+ ?callable $httpHandler = null,
string $universeDomain = GetUniverseDomainInterface::DEFAULT_UNIVERSE_DOMAIN
) {
$this->httpHandler = $httpHandler
@@ -73,7 +74,6 @@ public function __construct(
*/
public function signBlob($email, $accessToken, $stringToSign, array $delegates = [])
{
- $httpHandler = $this->httpHandler;
$name = sprintf(self::SERVICE_ACCOUNT_NAME, $email);
$apiRoot = str_replace('UNIVERSE_DOMAIN', $this->universeDomain, self::IAM_API_ROOT_TEMPLATE);
$uri = $apiRoot . '/' . sprintf(self::SIGN_BLOB_PATH, $name);
@@ -102,9 +102,54 @@ public function signBlob($email, $accessToken, $stringToSign, array $delegates =
Utils::streamFor(json_encode($body))
);
- $res = $httpHandler($request);
+ $res = ($this->httpHandler)($request);
$body = json_decode((string) $res->getBody(), true);
return $body['signedBlob'];
}
+
+ /**
+ * Sign a string using the IAM signBlob API.
+ *
+ * Note that signing using IAM requires your service account to have the
+ * `iam.serviceAccounts.signBlob` permission, part of the "Service Account
+ * Token Creator" IAM role.
+ *
+ * @param string $clientEmail The service account email.
+ * @param string $targetAudience The audience for the ID token.
+ * @param string $bearerToken The token to authenticate the IAM request.
+ * @param array $headers [optional] Additional headers to send with the request.
+ *
+ * @return string The signed string, base64-encoded.
+ */
+ public function generateIdToken(
+ string $clientEmail,
+ string $targetAudience,
+ string $bearerToken,
+ array $headers = []
+ ): string {
+ $name = sprintf(self::SERVICE_ACCOUNT_NAME, $clientEmail);
+ $apiRoot = str_replace('UNIVERSE_DOMAIN', $this->universeDomain, self::IAM_API_ROOT_TEMPLATE);
+ $uri = $apiRoot . '/' . sprintf(self::GENERATE_ID_TOKEN_PATH, $name);
+
+ $headers['Authorization'] = 'Bearer ' . $bearerToken;
+
+ $body = [
+ 'audience' => $targetAudience,
+ 'includeEmail' => true,
+ 'useEmailAzp' => true,
+ ];
+
+ $request = new Psr7\Request(
+ 'POST',
+ $uri,
+ $headers,
+ Utils::streamFor(json_encode($body))
+ );
+
+ $res = ($this->httpHandler)($request);
+ $body = json_decode((string) $res->getBody(), true);
+
+ return $body['token'];
+ }
}
diff --git a/lib/Google/vendor/google/auth/src/Logging/LoggingTrait.php b/lib/Google/vendor/google/auth/src/Logging/LoggingTrait.php
new file mode 100644
index 000000000..2441a9bd7
--- /dev/null
+++ b/lib/Google/vendor/google/auth/src/Logging/LoggingTrait.php
@@ -0,0 +1,137 @@
+ $event->timestamp,
+ 'severity' => strtoupper(LogLevel::DEBUG),
+ 'processId' => $event->processId ?? null,
+ 'requestId' => $event->requestId ?? null,
+ ];
+
+ $debugEvent = array_filter($debugEvent, fn ($value) => !is_null($value));
+
+ $jsonPayload = [
+ 'request.method' => $event->method,
+ 'request.url' => $event->url,
+ 'request.headers' => $event->headers,
+ 'request.payload' => $this->truncatePayload($event->payload),
+ 'request.jwt' => $this->getJwtToken($event->headers ?? []),
+ 'retryAttempt' => $event->retryAttempt
+ ];
+
+ // Remove null values
+ $debugEvent['jsonPayload'] = array_filter($jsonPayload, fn ($value) => !is_null($value));
+
+ $stringifiedEvent = json_encode($debugEvent, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
+
+ // There was an error stringifying the event, return to not break execution
+ if ($stringifiedEvent === false) {
+ return;
+ }
+
+ $this->logger->debug($stringifiedEvent);
+ }
+
+ /**
+ * @param RpcLogEvent $event
+ */
+ private function logResponse(RpcLogEvent $event): void
+ {
+ $debugEvent = [
+ 'timestamp' => $event->timestamp,
+ 'severity' => strtoupper(LogLevel::DEBUG),
+ 'processId' => $event->processId ?? null,
+ 'requestId' => $event->requestId ?? null,
+ 'jsonPayload' => [
+ 'response.status' => $event->status,
+ 'response.headers' => $event->headers,
+ 'response.payload' => $this->truncatePayload($event->payload),
+ 'latencyMillis' => $event->latency,
+ ]
+ ];
+
+ // Remove null values
+ $debugEvent = array_filter($debugEvent, fn ($value) => !is_null($value));
+ $debugEvent['jsonPayload'] = array_filter(
+ $debugEvent['jsonPayload'],
+ fn ($value) => !is_null($value)
+ );
+
+ $stringifiedEvent = json_encode($debugEvent, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
+
+ // There was an error stringifying the event, return to not break execution
+ if ($stringifiedEvent !== false) {
+ $this->logger->debug($stringifiedEvent);
+ }
+ }
+
+ /**
+ * @param array $headers
+ * @return null|array
+ */
+ private function getJwtToken(array $headers): null|array
+ {
+ if (empty($headers)) {
+ return null;
+ }
+
+ $tokenHeader = $headers['Authorization'] ?? '';
+ $token = str_replace('Bearer ', '', $tokenHeader);
+
+ if (substr_count($token, '.') !== 2) {
+ return null;
+ }
+
+ [$header, $token, $_] = explode('.', $token);
+
+ return [
+ 'header' => base64_decode($header),
+ 'token' => base64_decode($token)
+ ];
+ }
+
+ /**
+ * @param null|string $payload
+ * @return string
+ */
+ private function truncatePayload(null|string $payload): null|string
+ {
+ $maxLength = 500;
+
+ if (is_null($payload) || strlen($payload) <= $maxLength) {
+ return $payload;
+ }
+
+ return substr($payload, 0, $maxLength) . '...';
+ }
+}
diff --git a/lib/Google/vendor/google/auth/src/Logging/RpcLogEvent.php b/lib/Google/vendor/google/auth/src/Logging/RpcLogEvent.php
new file mode 100644
index 000000000..50e89fe2f
--- /dev/null
+++ b/lib/Google/vendor/google/auth/src/Logging/RpcLogEvent.php
@@ -0,0 +1,136 @@
+
+ */
+ public null|array $headers = null;
+
+ /**
+ * An array representation of JSON for the response or request
+ *
+ * @var null|string
+ */
+ public null|string $payload = null;
+
+ /**
+ * Status code for REST or gRPC methods
+ *
+ * @var null|int|string
+ */
+ public null|int|string $status = null;
+
+ /**
+ * The latency in milliseconds
+ *
+ * @var null|int
+ */
+ public null|int $latency = null;
+
+ /**
+ * The retry attempt number
+ *
+ * @var null|int
+ */
+ public null|int $retryAttempt = null;
+
+ /**
+ * The name of the gRPC method being called
+ *
+ * @var null|string
+ */
+ public null|string $rpcName = null;
+
+ /**
+ * The Service Name of the gRPC
+ *
+ * @var null|string $serviceName
+ */
+ public null|string $serviceName = null;
+
+ /**
+ * The Process ID for tracing logs
+ *
+ * @var null|int $processId
+ */
+ public null|int $processId = null;
+
+ /**
+ * The Request id for tracing logs
+ *
+ * @var null|int $requestId;
+ */
+ public null|int $requestId = null;
+
+ /**
+ * Creates an object with all the fields required for logging
+ * Passing a string representation of a timestamp calculates the difference between
+ * these two times and sets the latency field with the result.
+ *
+ * @param null|float $startTime (Optional) Parameter to calculate the latency
+ */
+ public function __construct(null|float $startTime = null)
+ {
+ $this->timestamp = date(DATE_RFC3339);
+
+ // Takes the micro time and convets it to millis
+ $this->milliseconds = round(microtime(true) * 1000);
+
+ if ($startTime) {
+ $this->latency = (int) round($this->milliseconds - $startTime);
+ }
+ }
+}
diff --git a/lib/Google/vendor/google/auth/src/Logging/StdOutLogger.php b/lib/Google/vendor/google/auth/src/Logging/StdOutLogger.php
new file mode 100644
index 000000000..27b1f0eb3
--- /dev/null
+++ b/lib/Google/vendor/google/auth/src/Logging/StdOutLogger.php
@@ -0,0 +1,85 @@
+
+ */
+ private array $levelMapping = [
+ LogLevel::EMERGENCY => 7,
+ LogLevel::ALERT => 6,
+ LogLevel::CRITICAL => 5,
+ LogLevel::ERROR => 4,
+ LogLevel::WARNING => 3,
+ LogLevel::NOTICE => 2,
+ LogLevel::INFO => 1,
+ LogLevel::DEBUG => 0,
+ ];
+ private int $level;
+
+ /**
+ * Constructs a basic PSR-3 logger class that logs into StdOut for GCP Logging
+ *
+ * @param string $level The level of the logger instance.
+ */
+ public function __construct(string $level = LogLevel::DEBUG)
+ {
+ $this->level = $this->getLevelFromName($level);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function log($level, string|Stringable $message, array $context = []): void
+ {
+ if ($this->getLevelFromName($level) < $this->level) {
+ return;
+ }
+
+ print($message . "\n");
+ }
+
+ /**
+ * @param string $levelName
+ * @return int
+ * @throws InvalidArgumentException
+ */
+ private function getLevelFromName(string $levelName): int
+ {
+ if (!array_key_exists($levelName, $this->levelMapping)) {
+ throw new InvalidArgumentException('The level supplied to the Logger is not valid');
+ }
+
+ return $this->levelMapping[$levelName];
+ }
+}
diff --git a/lib/Google/vendor/google/auth/src/Middleware/AuthTokenMiddleware.php b/lib/Google/vendor/google/auth/src/Middleware/AuthTokenMiddleware.php
index 798766efa..b8f2c514c 100644
--- a/lib/Google/vendor/google/auth/src/Middleware/AuthTokenMiddleware.php
+++ b/lib/Google/vendor/google/auth/src/Middleware/AuthTokenMiddleware.php
@@ -59,13 +59,13 @@ class AuthTokenMiddleware
* Creates a new AuthTokenMiddleware.
*
* @param FetchAuthTokenInterface $fetcher is used to fetch the auth token
- * @param callable $httpHandler (optional) callback which delivers psr7 request
- * @param callable $tokenCallback (optional) function to be called when a new token is fetched.
+ * @param callable|null $httpHandler (optional) callback which delivers psr7 request
+ * @param callable|null $tokenCallback (optional) function to be called when a new token is fetched.
*/
public function __construct(
FetchAuthTokenInterface $fetcher,
- callable $httpHandler = null,
- callable $tokenCallback = null
+ ?callable $httpHandler = null,
+ ?callable $tokenCallback = null
) {
$this->fetcher = $fetcher;
$this->httpHandler = $httpHandler;
@@ -132,7 +132,8 @@ private function addAuthHeaders(RequestInterface $request)
) {
$token = $this->fetcher->fetchAuthToken();
$request = $request->withHeader(
- 'authorization', 'Bearer ' . ($token['access_token'] ?? $token['id_token'] ?? '')
+ 'authorization',
+ 'Bearer ' . ($token['access_token'] ?? $token['id_token'] ?? '')
);
} else {
$headers = $this->fetcher->updateMetadata($request->getHeaders(), null, $this->httpHandler);
diff --git a/lib/Google/vendor/google/auth/src/Middleware/ProxyAuthTokenMiddleware.php b/lib/Google/vendor/google/auth/src/Middleware/ProxyAuthTokenMiddleware.php
index 0f9ee429f..2c44871f9 100644
--- a/lib/Google/vendor/google/auth/src/Middleware/ProxyAuthTokenMiddleware.php
+++ b/lib/Google/vendor/google/auth/src/Middleware/ProxyAuthTokenMiddleware.php
@@ -53,13 +53,13 @@ class ProxyAuthTokenMiddleware
* Creates a new ProxyAuthTokenMiddleware.
*
* @param FetchAuthTokenInterface $fetcher is used to fetch the auth token
- * @param callable $httpHandler (optional) callback which delivers psr7 request
- * @param callable $tokenCallback (optional) function to be called when a new token is fetched.
+ * @param callable|null $httpHandler (optional) callback which delivers psr7 request
+ * @param callable|null $tokenCallback (optional) function to be called when a new token is fetched.
*/
public function __construct(
FetchAuthTokenInterface $fetcher,
- callable $httpHandler = null,
- callable $tokenCallback = null
+ ?callable $httpHandler = null,
+ ?callable $tokenCallback = null
) {
$this->fetcher = $fetcher;
$this->httpHandler = $httpHandler;
diff --git a/lib/Google/vendor/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php b/lib/Google/vendor/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php
index 8bb1d7a0b..f2f85cc16 100644
--- a/lib/Google/vendor/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php
+++ b/lib/Google/vendor/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php
@@ -54,14 +54,14 @@ class ScopedAccessTokenMiddleware
*
* @param callable $tokenFunc a token generator function
* @param array|string $scopes the token authentication scopes
- * @param array $cacheConfig configuration for the cache when it's present
- * @param CacheItemPoolInterface $cache an implementation of CacheItemPoolInterface
+ * @param array|null $cacheConfig configuration for the cache when it's present
+ * @param CacheItemPoolInterface|null $cache an implementation of CacheItemPoolInterface
*/
public function __construct(
callable $tokenFunc,
$scopes,
- array $cacheConfig = null,
- CacheItemPoolInterface $cache = null
+ ?array $cacheConfig = null,
+ ?CacheItemPoolInterface $cache = null
) {
$this->tokenFunc = $tokenFunc;
if (!(is_string($scopes) || is_array($scopes))) {
diff --git a/lib/Google/vendor/google/auth/src/OAuth2.php b/lib/Google/vendor/google/auth/src/OAuth2.php
index 4019e258a..ced3464ca 100644
--- a/lib/Google/vendor/google/auth/src/OAuth2.php
+++ b/lib/Google/vendor/google/auth/src/OAuth2.php
@@ -581,12 +581,12 @@ public function toJwt(array $config = [])
/**
* Generates a request for token credentials.
*
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @param array $headers [optional] Additional headers to pass to
* the token endpoint request.
* @return RequestInterface the authorization Url.
*/
- public function generateCredentialsRequest(callable $httpHandler = null, $headers = [])
+ public function generateCredentialsRequest(?callable $httpHandler = null, array $headers = [])
{
$uri = $this->getTokenCredentialUri();
if (is_null($uri)) {
@@ -611,6 +611,9 @@ public function generateCredentialsRequest(callable $httpHandler = null, $header
break;
case 'refresh_token':
$params['refresh_token'] = $this->getRefreshToken();
+ if (isset($this->getAdditionalClaims()['target_audience'])) {
+ $params['target_audience'] = $this->getAdditionalClaims()['target_audience'];
+ }
$this->addClientCredentials($params);
break;
case self::JWT_URN:
@@ -661,12 +664,12 @@ public function generateCredentialsRequest(callable $httpHandler = null, $header
/**
* Fetches the auth tokens based on the current state.
*
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @param array $headers [optional] If present, add these headers to the token
* endpoint request.
* @return array the response
*/
- public function fetchAuthToken(callable $httpHandler = null, $headers = [])
+ public function fetchAuthToken(?callable $httpHandler = null, array $headers = [])
{
if (is_null($httpHandler)) {
$httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
@@ -724,7 +727,7 @@ public function getSubjectTokenFetcher(): ?ExternalAccountCredentialSourceInterf
*/
public function parseTokenResponse(ResponseInterface $resp)
{
- $body = (string)$resp->getBody();
+ $body = (string) $resp->getBody();
if ($resp->hasHeader('Content-Type') &&
$resp->getHeaderLine('Content-Type') == 'application/x-www-form-urlencoded'
) {
@@ -1009,13 +1012,13 @@ public function setRedirectUri($uri)
if (!$this->isAbsoluteUri($uri)) {
// "postmessage" is a reserved URI string in Google-land
// @see https://developers.google.com/identity/sign-in/web/server-side-flow
- if ('postmessage' !== (string)$uri) {
+ if ('postmessage' !== (string) $uri) {
throw new InvalidArgumentException(
'Redirect URI must be absolute'
);
}
}
- $this->redirectUri = (string)$uri;
+ $this->redirectUri = (string) $uri;
}
/**
@@ -1127,7 +1130,7 @@ public function setGrantType($grantType)
'invalid grant type'
);
}
- $this->grantType = (string)$grantType;
+ $this->grantType = (string) $grantType;
}
}
@@ -1460,7 +1463,7 @@ public function setExpiresIn($expiresIn)
$this->issuedAt = null;
} else {
$this->issuedAt = time();
- $this->expiresIn = (int)$expiresIn;
+ $this->expiresIn = (int) $expiresIn;
}
}
@@ -1681,13 +1684,13 @@ public function getLastReceivedToken()
/**
* Get the client ID.
*
- * Alias of {@see Google\Auth\OAuth2::getClientId()}.
+ * Alias of {@see OAuth2::getClientId()}.
*
- * @param callable $httpHandler
+ * @param callable|null $httpHandler
* @return string
* @access private
*/
- public function getClientName(callable $httpHandler = null)
+ public function getClientName(?callable $httpHandler = null)
{
return $this->getClientId();
}
@@ -1768,7 +1771,8 @@ private function getFirebaseJwtKeys($publicKey, $allowedAlgs)
throw new \InvalidArgumentException(
'To have multiple allowed algorithms, You must provide an'
. ' array of Firebase\JWT\Key objects.'
- . ' See https://github.com/firebase/php-jwt for more information.');
+ . ' See https://github.com/firebase/php-jwt for more information.'
+ );
}
$allowedAlg = array_pop($allowedAlgs);
} else {
diff --git a/lib/Google/vendor/google/auth/src/ProjectIdProviderInterface.php b/lib/Google/vendor/google/auth/src/ProjectIdProviderInterface.php
index 0a41f7832..8d10c293a 100644
--- a/lib/Google/vendor/google/auth/src/ProjectIdProviderInterface.php
+++ b/lib/Google/vendor/google/auth/src/ProjectIdProviderInterface.php
@@ -25,8 +25,8 @@ interface ProjectIdProviderInterface
/**
* Get the project ID.
*
- * @param callable $httpHandler Callback which delivers psr7 request
+ * @param callable|null $httpHandler Callback which delivers psr7 request
* @return string|null
*/
- public function getProjectId(callable $httpHandler = null);
+ public function getProjectId(?callable $httpHandler = null);
}
diff --git a/lib/Google/vendor/google/auth/src/SignBlobInterface.php b/lib/Google/vendor/google/auth/src/SignBlobInterface.php
index 5f2c94414..b3c2b0505 100644
--- a/lib/Google/vendor/google/auth/src/SignBlobInterface.php
+++ b/lib/Google/vendor/google/auth/src/SignBlobInterface.php
@@ -36,9 +36,9 @@ public function signBlob($stringToSign, $forceOpenssl = false);
/**
* Returns the current Client Name.
*
- * @param callable $httpHandler callback which delivers psr7 request, if
+ * @param callable|null $httpHandler callback which delivers psr7 request, if
* one is required to obtain a client name.
* @return string
*/
- public function getClientName(callable $httpHandler = null);
+ public function getClientName(?callable $httpHandler = null);
}
diff --git a/lib/Google/vendor/google/auth/src/UpdateMetadataInterface.php b/lib/Google/vendor/google/auth/src/UpdateMetadataInterface.php
index 6d2e7d5d5..5cf5b42cc 100644
--- a/lib/Google/vendor/google/auth/src/UpdateMetadataInterface.php
+++ b/lib/Google/vendor/google/auth/src/UpdateMetadataInterface.php
@@ -30,12 +30,12 @@ interface UpdateMetadataInterface
*
* @param array $metadata metadata hashmap
* @param string $authUri optional auth uri
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return array updated metadata hashmap
*/
public function updateMetadata(
$metadata,
$authUri = null,
- callable $httpHandler = null
+ ?callable $httpHandler = null
);
}
diff --git a/lib/Google/vendor/google/auth/src/UpdateMetadataTrait.php b/lib/Google/vendor/google/auth/src/UpdateMetadataTrait.php
index 30d4060cf..486ec72a5 100644
--- a/lib/Google/vendor/google/auth/src/UpdateMetadataTrait.php
+++ b/lib/Google/vendor/google/auth/src/UpdateMetadataTrait.php
@@ -44,13 +44,13 @@ public function getUpdateMetadataFunc()
*
* @param array $metadata metadata hashmap
* @param string $authUri optional auth uri
- * @param callable $httpHandler callback which delivers psr7 request
+ * @param callable|null $httpHandler callback which delivers psr7 request
* @return array updated metadata hashmap
*/
public function updateMetadata(
$metadata,
$authUri = null,
- callable $httpHandler = null
+ ?callable $httpHandler = null
) {
$metadata_copy = $metadata;
diff --git a/lib/Google/vendor/google/cloud-core/.gitattributes b/lib/Google/vendor/google/cloud-core/.gitattributes
new file mode 100644
index 000000000..d43b60862
--- /dev/null
+++ b/lib/Google/vendor/google/cloud-core/.gitattributes
@@ -0,0 +1,3 @@
+/*.xml.dist export-ignore
+/tests export-ignore
+/.github export-ignore
diff --git a/lib/Google/vendor/google/cloud-core/README.md b/lib/Google/vendor/google/cloud-core/README.md
index 8c5e4b332..0f9dde29c 100644
--- a/lib/Google/vendor/google/cloud-core/README.md
+++ b/lib/Google/vendor/google/cloud-core/README.md
@@ -17,6 +17,11 @@ to the rest of the Google Cloud PHP components.
$ composer require google/cloud-core
```
+### Debugging
+
+Please see our [Debugging guide](https://github.com/googleapis/google-cloud-php/blob/main/DEBUG.md)
+for more information about the debugging tools.
+
### Version
This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in
diff --git a/lib/Google/vendor/google/cloud-core/VERSION b/lib/Google/vendor/google/cloud-core/VERSION
index 4d5fde5bd..940573042 100644
--- a/lib/Google/vendor/google/cloud-core/VERSION
+++ b/lib/Google/vendor/google/cloud-core/VERSION
@@ -1 +1 @@
-1.60.0
+1.64.0
diff --git a/lib/Google/vendor/google/cloud-core/composer.json b/lib/Google/vendor/google/cloud-core/composer.json
index f84a2979e..dcbd57598 100644
--- a/lib/Google/vendor/google/cloud-core/composer.json
+++ b/lib/Google/vendor/google/cloud-core/composer.json
@@ -5,20 +5,20 @@
"minimum-stability": "stable",
"require": {
"php": "^8.0",
- "rize/uri-template": "~0.3",
+ "rize/uri-template": "~0.3||~0.4",
"google/auth": "^1.34",
- "guzzlehttp/guzzle": "^6.5.8|^7.4.4",
+ "guzzlehttp/guzzle": "^6.5.8||^7.4.4",
"guzzlehttp/promises": "^1.4||^2.0",
"guzzlehttp/psr7": "^2.6",
- "monolog/monolog": "^2.9|^3.0",
- "psr/http-message": "^1.0|^2.0",
- "google/gax": "^1.34.0"
+ "monolog/monolog": "^2.9||^3.0",
+ "psr/http-message": "^1.0||^2.0",
+ "google/gax": "^1.36.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
- "phpdocumentor/reflection": "^5.3.3",
+ "phpdocumentor/reflection": "^5.3.3||^6.0",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"opis/closure": "^3",
diff --git a/lib/Google/vendor/google/cloud-core/snippet-bootstrap.php b/lib/Google/vendor/google/cloud-core/snippet-bootstrap.php
index 156f1a322..39897661f 100644
--- a/lib/Google/vendor/google/cloud-core/snippet-bootstrap.php
+++ b/lib/Google/vendor/google/cloud-core/snippet-bootstrap.php
@@ -1,7 +1,7 @@
token;
}
@@ -81,7 +81,7 @@ public function getLastReceivedToken()
public function updateMetadata(
$metadata,
$authUri = null,
- callable $httpHandler = null
+ ?callable $httpHandler = null
) {
return $metadata;
}
diff --git a/lib/Google/vendor/google/cloud-core/src/ApiHelperTrait.php b/lib/Google/vendor/google/cloud-core/src/ApiHelperTrait.php
index d9900ea22..245b7e962 100644
--- a/lib/Google/vendor/google/cloud-core/src/ApiHelperTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/ApiHelperTrait.php
@@ -20,7 +20,6 @@
use Google\ApiCore\ArrayTrait;
use Google\ApiCore\Options\CallOptions;
use Google\Protobuf\NullValue;
-use Google\Cloud\Core\Duration;
/**
* @internal
@@ -176,7 +175,7 @@ private function formatTimestampFromApi(array $timestamp)
*/
private function formatTimestampForApi($value)
{
- list ($dt, $nanos) = $this->parseTimeString($value);
+ list($dt, $nanos) = $this->parseTimeString($value);
return [
'seconds' => (int) $dt->format('U'),
@@ -239,11 +238,11 @@ protected function constructGapic($gapicName, array $config)
*
* @return array The modified array
*/
- private function convertDataToProtos(array $input, array $map) : array
+ private function convertDataToProtos(array $input, array $map): array
{
foreach ($map as $key => $className) {
if (isset($input[$key])) {
- $input[$key] = $this->serializer->decodeMessage(new $className, $input[$key]);
+ $input[$key] = $this->serializer->decodeMessage(new $className(), $input[$key]);
}
}
@@ -256,7 +255,7 @@ private function convertDataToProtos(array $input, array $map) : array
* We strictly treat the parameters allowed by `CallOptions` in GAX as the optional params
* and everything else that is passed is passed to the Proto message constructor.
*/
- private function splitOptionalArgs(array $input, array $extraAllowedKeys = []) : array
+ private function splitOptionalArgs(array $input, array $extraAllowedKeys = []): array
{
$callOptionFields = array_keys((new CallOptions([]))->toArray());
$keys = array_merge($callOptionFields, $extraAllowedKeys);
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/BatchRunner.php b/lib/Google/vendor/google/cloud-core/src/Batch/BatchRunner.php
index b2b55983e..0ee47ca57 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/BatchRunner.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/BatchRunner.php
@@ -57,8 +57,8 @@ class BatchRunner
* to use. **Defaults to** null. This is only for testing purpose.
*/
public function __construct(
- ConfigStorageInterface $configStorage = null,
- ProcessItemInterface $processor = null
+ ?ConfigStorageInterface $configStorage = null,
+ ?ProcessItemInterface $processor = null
) {
if ($configStorage === null || $processor === null) {
if ($this->isSysvIPCLoaded() && $this->isDaemonRunning()) {
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/BatchTrait.php b/lib/Google/vendor/google/cloud-core/src/Batch/BatchTrait.php
index 3ac284cf1..591410e62 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/BatchTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/BatchTrait.php
@@ -17,8 +17,6 @@
namespace Google\Cloud\Core\Batch;
-use Opis\Closure\SerializableClosure;
-
/**
* A trait to assist in the registering and processing of batch jobs.
*
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/InterruptTrait.php b/lib/Google/vendor/google/cloud-core/src/Batch/InterruptTrait.php
index dae64456f..88ef74be6 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/InterruptTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/InterruptTrait.php
@@ -32,10 +32,10 @@ trait InterruptTrait
private function setupSignalHandlers()
{
// setup signal handlers
- pcntl_signal(SIGTERM, [$this, "sigHandler"]);
- pcntl_signal(SIGINT, [$this, "sigHandler"]);
- pcntl_signal(SIGHUP, [$this, "sigHandler"]);
- pcntl_signal(SIGALRM, [$this, "sigHandler"]);
+ pcntl_signal(SIGTERM, [$this, 'sigHandler']);
+ pcntl_signal(SIGINT, [$this, 'sigHandler']);
+ pcntl_signal(SIGHUP, [$this, 'sigHandler']);
+ pcntl_signal(SIGALRM, [$this, 'sigHandler']);
}
/**
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/Retry.php b/lib/Google/vendor/google/cloud-core/src/Batch/Retry.php
index 483c7eb3d..8f66863ec 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/Retry.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/Retry.php
@@ -37,7 +37,7 @@ class Retry
*
* @param BatchRunner $runner [optional] **Defaults to** a new BatchRunner.
*/
- public function __construct(BatchRunner $runner = null)
+ public function __construct(?BatchRunner $runner = null)
{
$this->runner = $runner ?: new BatchRunner();
$this->initFailureFile();
diff --git a/lib/Google/vendor/google/cloud-core/src/ClientTrait.php b/lib/Google/vendor/google/cloud-core/src/ClientTrait.php
index 5df03e152..2bd86cc1c 100644
--- a/lib/Google/vendor/google/cloud-core/src/ClientTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/ClientTrait.php
@@ -17,8 +17,8 @@
namespace Google\Cloud\Core;
-use Google\Auth\CredentialsLoader;
use Google\Auth\Credentials\GCECredentials;
+use Google\Auth\CredentialsLoader;
use Google\Cloud\Core\Compute\Metadata;
use Google\Cloud\Core\Exception\GoogleException;
@@ -256,7 +256,7 @@ protected function onGce($httpHandler)
*/
protected function getMetaData()
{
- return new Metadata;
+ return new Metadata();
}
/**
diff --git a/lib/Google/vendor/google/cloud-core/src/Compute/Metadata.php b/lib/Google/vendor/google/cloud-core/src/Compute/Metadata.php
index 0f34adb5e..15a5eea02 100644
--- a/lib/Google/vendor/google/cloud-core/src/Compute/Metadata.php
+++ b/lib/Google/vendor/google/cloud-core/src/Compute/Metadata.php
@@ -59,7 +59,7 @@ class Metadata
/**
* @param ReaderInterface $reader [optional] A metadata reader implementation.
*/
- public function __construct(ReaderInterface $reader = null)
+ public function __construct(?ReaderInterface $reader = null)
{
$this->reader = $reader ?: new HttpHandlerReader();
}
@@ -142,7 +142,7 @@ public function getNumericProjectId()
*/
public function getProjectMetadata($key)
{
- $path = 'project/attributes/'.$key;
+ $path = 'project/attributes/' . $key;
return $this->get($path);
}
@@ -159,7 +159,7 @@ public function getProjectMetadata($key)
*/
public function getInstanceMetadata($key)
{
- $path = 'instance/attributes/'.$key;
+ $path = 'instance/attributes/' . $key;
return $this->get($path);
}
}
diff --git a/lib/Google/vendor/google/cloud-core/src/Compute/Metadata/Readers/HttpHandlerReader.php b/lib/Google/vendor/google/cloud-core/src/Compute/Metadata/Readers/HttpHandlerReader.php
index d1d7b1530..a057b138c 100644
--- a/lib/Google/vendor/google/cloud-core/src/Compute/Metadata/Readers/HttpHandlerReader.php
+++ b/lib/Google/vendor/google/cloud-core/src/Compute/Metadata/Readers/HttpHandlerReader.php
@@ -36,7 +36,7 @@ class HttpHandlerReader implements ReaderInterface
* @param callable $httpHandler [optional] An HTTP Handler capable of
* accepting PSR7 requests and returning PSR7 responses.
*/
- public function __construct(callable $httpHandler = null)
+ public function __construct(?callable $httpHandler = null)
{
$this->httpHandler = $httpHandler
?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
diff --git a/lib/Google/vendor/google/cloud-core/src/DetectProjectIdTrait.php b/lib/Google/vendor/google/cloud-core/src/DetectProjectIdTrait.php
index 8cd853076..f0ce26db9 100644
--- a/lib/Google/vendor/google/cloud-core/src/DetectProjectIdTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/DetectProjectIdTrait.php
@@ -71,7 +71,7 @@ private function detectProjectId(array $config)
if ($config['credentials']
&& $config['credentials'] instanceof ProjectIdProviderInterface
&& $projectId = $config['credentials']->getProjectId()) {
- return $projectId;
+ return $projectId;
}
if (getenv('GOOGLE_CLOUD_PROJECT')) {
diff --git a/lib/Google/vendor/google/cloud-core/src/Exception/ServiceException.php b/lib/Google/vendor/google/cloud-core/src/Exception/ServiceException.php
index b601eb677..0db353d6f 100644
--- a/lib/Google/vendor/google/cloud-core/src/Exception/ServiceException.php
+++ b/lib/Google/vendor/google/cloud-core/src/Exception/ServiceException.php
@@ -65,7 +65,7 @@ class ServiceException extends GoogleException
public function __construct(
$message = null,
$code = 0,
- Exception $serviceException = null,
+ ?Exception $serviceException = null,
array $metadata = []
) {
$this->serviceException = $serviceException;
diff --git a/lib/Google/vendor/google/cloud-core/src/ExponentialBackoff.php b/lib/Google/vendor/google/cloud-core/src/ExponentialBackoff.php
index e5a041311..58eea5ee7 100644
--- a/lib/Google/vendor/google/cloud-core/src/ExponentialBackoff.php
+++ b/lib/Google/vendor/google/cloud-core/src/ExponentialBackoff.php
@@ -64,8 +64,8 @@ class ExponentialBackoff
*/
public function __construct(
$retries = null,
- callable $retryFunction = null,
- callable $retryListener = null
+ ?callable $retryFunction = null,
+ ?callable $retryListener = null
) {
$this->retries = $retries !== null ? (int) $retries : 3;
$this->retryFunction = $retryFunction;
diff --git a/lib/Google/vendor/google/cloud-core/src/GrpcRequestWrapper.php b/lib/Google/vendor/google/cloud-core/src/GrpcRequestWrapper.php
index 9f8d3b50b..7bcfa7601 100644
--- a/lib/Google/vendor/google/cloud-core/src/GrpcRequestWrapper.php
+++ b/lib/Google/vendor/google/cloud-core/src/GrpcRequestWrapper.php
@@ -17,10 +17,9 @@
namespace Google\Cloud\Core;
-use Google\Auth\HttpHandler\HttpHandlerFactory;
-use Google\Cloud\Core\Exception;
use Google\ApiCore\ApiException;
use Google\ApiCore\Serializer;
+use Google\Auth\HttpHandler\HttpHandlerFactory;
use Google\Rpc\Code;
/**
@@ -77,7 +76,7 @@ public function __construct(array $config = [])
$config += [
'authHttpHandler' => null,
- 'serializer' => new Serializer,
+ 'serializer' => new Serializer(),
'grpcOptions' => []
];
diff --git a/lib/Google/vendor/google/cloud-core/src/GrpcTrait.php b/lib/Google/vendor/google/cloud-core/src/GrpcTrait.php
index bab9d6d32..83e23144f 100644
--- a/lib/Google/vendor/google/cloud-core/src/GrpcTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/GrpcTrait.php
@@ -17,13 +17,11 @@
namespace Google\Cloud\Core;
-use Google\Auth\GetUniverseDomainInterface;
use Google\ApiCore\CredentialsWrapper;
+use Google\Auth\GetUniverseDomainInterface;
use Google\Cloud\Core\Exception\NotFoundException;
use Google\Cloud\Core\Exception\ServiceException;
-use Google\Cloud\Core\GrpcRequestWrapper;
use Google\Protobuf\NullValue;
-use Google\Cloud\Core\Duration;
/**
* Provides shared functionality for gRPC service implementations.
@@ -98,8 +96,8 @@ public function send(callable $request, array $args, $whitelisted = false)
*/
private function getGaxConfig(
$version,
- callable $authHttpHandler = null,
- string $universeDomain = null
+ ?callable $authHttpHandler = null,
+ ?string $universeDomain = null
) {
$config = [
'libName' => 'gccl',
@@ -278,7 +276,7 @@ private function formatTimestampFromApi(array $timestamp)
*/
private function formatTimestampForApi($value)
{
- list ($dt, $nanos) = $this->parseTimeString($value);
+ list($dt, $nanos) = $this->parseTimeString($value);
return [
'seconds' => (int) $dt->format('U'),
@@ -315,6 +313,20 @@ private function formatDurationForApi($value)
];
}
+ /**
+ * Format a duration from the API
+ *
+ * @param array $value
+ * @return string
+ */
+ private function formatDurationFromApi($value): string
+ {
+ $seconds = $value['seconds'];
+ $nanos = str_pad($value['nanos'], 9, 0, STR_PAD_LEFT);
+
+ return "{$seconds}.{$nanos}s";
+ }
+
/**
* Construct a gapic client. Allows for tests to intercept.
*
diff --git a/lib/Google/vendor/google/cloud-core/src/Iam/IamManager.php b/lib/Google/vendor/google/cloud-core/src/Iam/IamManager.php
index a9e373fe7..7e1670a6e 100644
--- a/lib/Google/vendor/google/cloud-core/src/Iam/IamManager.php
+++ b/lib/Google/vendor/google/cloud-core/src/Iam/IamManager.php
@@ -19,11 +19,10 @@
use Google\ApiCore\Serializer;
use Google\Cloud\Core\ArrayTrait;
-use Google\Cloud\Core\Iam\PolicyBuilder;
-use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Core\RequestHandler;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\GetPolicyOptions;
+use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsRequest;
use InvalidArgumentException;
@@ -152,7 +151,7 @@ public function setPolicy($policy, array $options = [])
}
$policy = $this->serializer->decodeMessage(
- new Policy,
+ new Policy(),
$policy
);
diff --git a/lib/Google/vendor/google/cloud-core/src/Iam/PolicyBuilder.php b/lib/Google/vendor/google/cloud-core/src/Iam/PolicyBuilder.php
index d22962e7c..3de89eb19 100644
--- a/lib/Google/vendor/google/cloud-core/src/Iam/PolicyBuilder.php
+++ b/lib/Google/vendor/google/cloud-core/src/Iam/PolicyBuilder.php
@@ -17,8 +17,8 @@
namespace Google\Cloud\Core\Iam;
-use InvalidArgumentException;
use BadMethodCallException;
+use InvalidArgumentException;
/**
* Helper class for creating valid IAM policies
@@ -284,7 +284,7 @@ public function result()
private function validatePolicyVersion()
{
if (isset($this->version) && $this->version > 1) {
- throw new BadMethodCallException("Helper methods cannot be " .
+ throw new BadMethodCallException('Helper methods cannot be ' .
"invoked on policies with version {$this->version}.");
}
@@ -299,8 +299,8 @@ private function validateConditions()
foreach ($this->bindings as $binding) {
if (isset($binding['condition'])) {
- throw new BadMethodCallException("Helper methods cannot " .
- "be invoked on policies containing conditions.");
+ throw new BadMethodCallException('Helper methods cannot ' .
+ 'be invoked on policies containing conditions.');
}
}
}
diff --git a/lib/Google/vendor/google/cloud-core/src/Iterator/ItemIterator.php b/lib/Google/vendor/google/cloud-core/src/Iterator/ItemIterator.php
index 8c09be7d9..520822078 100644
--- a/lib/Google/vendor/google/cloud-core/src/Iterator/ItemIterator.php
+++ b/lib/Google/vendor/google/cloud-core/src/Iterator/ItemIterator.php
@@ -19,6 +19,9 @@
/**
* Iterates over a set of items.
+ *
+ * @template T
+ * @implements \Iterator
*/
class ItemIterator implements \Iterator
{
diff --git a/lib/Google/vendor/google/cloud-core/src/Logger/FormatterTrait.php b/lib/Google/vendor/google/cloud-core/src/Logger/FormatterTrait.php
index 095228ed2..329a507e5 100644
--- a/lib/Google/vendor/google/cloud-core/src/Logger/FormatterTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/Logger/FormatterTrait.php
@@ -36,12 +36,12 @@ protected function formatPayload($record, $message)
}
list($usec, $sec) = explode(' ', microtime());
- $usec = (int)(((float)$usec)*1000000000);
- $sec = (int)$sec;
+ $usec = (int) (((float) $usec) * 1000000000);
+ $sec = (int) $sec;
$payload = [
'message' => $message,
- 'timestamp'=> ['seconds' => $sec, 'nanos' => $usec],
+ 'timestamp' => ['seconds' => $sec, 'nanos' => $usec],
'thread' => '',
'severity' => $record['level_name'],
];
diff --git a/lib/Google/vendor/google/cloud-core/src/LongRunning/LROTrait.php b/lib/Google/vendor/google/cloud-core/src/LongRunning/LROTrait.php
index 477d5f3ea..ac9a04893 100644
--- a/lib/Google/vendor/google/cloud-core/src/LongRunning/LROTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/LongRunning/LROTrait.php
@@ -19,7 +19,6 @@
use Google\Cloud\Core\Iterator\ItemIterator;
use Google\Cloud\Core\Iterator\PageIterator;
-use Google\Cloud\Core\LongRunning\LongRunningConnectionInterface;
/**
* Provide Long Running Operation support to Google Cloud PHP Clients.
@@ -109,7 +108,7 @@ public function longRunningOperations(array $options = [])
$resultLimit = $this->pluck('resultLimit', $options, false) ?: 0;
- $options['name'] = $this->lroResource .'/operations';
+ $options['name'] = $this->lroResource . '/operations';
return new ItemIterator(
new PageIterator(
diff --git a/lib/Google/vendor/google/cloud-core/src/LongRunning/OperationResponseTrait.php b/lib/Google/vendor/google/cloud-core/src/LongRunning/OperationResponseTrait.php
index 2c5cad0b6..90e133936 100644
--- a/lib/Google/vendor/google/cloud-core/src/LongRunning/OperationResponseTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/LongRunning/OperationResponseTrait.php
@@ -20,7 +20,6 @@
use Google\ApiCore\OperationResponse;
use Google\ApiCore\Serializer;
use Google\GAX\OperationResponse as GaxOperationResponse;
-use Google\GAX\Serializer as GaxSerialzer;
/**
* Serializes and deserializes ApiCore LRO Response objects.
diff --git a/lib/Google/vendor/google/cloud-core/src/PhpArray.php b/lib/Google/vendor/google/cloud-core/src/PhpArray.php
index f456e70da..efd722657 100644
--- a/lib/Google/vendor/google/cloud-core/src/PhpArray.php
+++ b/lib/Google/vendor/google/cloud-core/src/PhpArray.php
@@ -18,10 +18,10 @@
namespace Google\Cloud\Core;
use DrSlump\Protobuf;
-use google\protobuf\Value;
use google\protobuf\ListValue;
use google\protobuf\NullValue;
use google\protobuf\Struct;
+use google\protobuf\Value;
/**
* Extend the Protobuf-PHP array codec to allow messages to match the format
@@ -86,7 +86,7 @@ protected function encodeMessage(Protobuf\Message $message)
if ($field->isRepeated()) {
// Make sure the value is an array of values
- $v = is_array($v) ? $v : array($v);
+ $v = is_array($v) ? $v : [$v];
$arr = [];
foreach ($v as $k => $vv) {
@@ -145,7 +145,7 @@ protected function decodeMessage(Protobuf\Message $message, $data)
if ($field->isRepeated()) {
// Make sure the value is an array of values
- $v = is_array($v) && is_int(key($v)) ? $v : array($v);
+ $v = is_array($v) && is_int(key($v)) ? $v : [$v];
foreach ($v as $k => $vv) {
$v[$k] = $this->filterValue($vv, $field);
}
diff --git a/lib/Google/vendor/google/cloud-core/src/Report/CloudRunJobMetadataProvider.php b/lib/Google/vendor/google/cloud-core/src/Report/CloudRunJobMetadataProvider.php
new file mode 100644
index 000000000..fe8d94ef4
--- /dev/null
+++ b/lib/Google/vendor/google/cloud-core/src/Report/CloudRunJobMetadataProvider.php
@@ -0,0 +1,144 @@
+serviceId = $env['CLOUD_RUN_JOB'] ?? 'unknown-job';
+ $this->revisionId = $env['CLOUD_RUN_EXECUTION'] ?? '';
+ $this->taskIndex = $env['CLOUD_RUN_TASK_INDEX'] ?? '';
+ $this->taskAttempt = $env['CLOUD_RUN_TASK_ATTEMPT'] ?? '';
+
+ $this->traceId = isset($env['HTTP_X_CLOUD_TRACE_CONTEXT'])
+ ? \substr($env['HTTP_X_CLOUD_TRACE_CONTEXT'], 0, 32)
+ : null;
+
+ $this->metadata = $metadata ?? new Metadata();
+ $this->region = \basename($this->metadata->get('instance/region'));
+ $this->instanceId = $this->metadata->get('instance/id');
+ }
+
+ /**
+ * @return array
+ */
+ public function monitoredResource()
+ {
+ return [
+ 'type' => 'cloud_run_job',
+ 'labels' => [
+ 'job_name' => $this->serviceId,
+ 'location' => $this->region,
+ 'project_id' => $this->projectId(),
+ ],
+ ];
+ }
+
+ /**
+ * Return the project id.
+ * @return string
+ */
+ public function projectId()
+ {
+ return $this->metadata->getProjectId();
+ }
+
+ /**
+ * Return the service id.
+ * @return string
+ */
+ public function serviceId()
+ {
+ return $this->serviceId;
+ }
+
+ /**
+ * Return the version id.
+ * @return string
+ */
+ public function versionId()
+ {
+ return $this->revisionId;
+ }
+
+ /**
+ * Return the labels.
+ * @return array
+ */
+ public function labels()
+ {
+ $labels = [
+ 'instanceId' => $this->instanceId,
+ 'run.googleapis.com/execution_name' => $this->revisionId,
+ 'run.googleapis.com/task_attempt' => $this->taskAttempt,
+ 'run.googleapis.com/task_index' => $this->taskIndex,
+ 'run.googleapis.com/trace_id' => $this->traceId,
+ ];
+ return \array_filter($labels);
+ }
+}
diff --git a/lib/Google/vendor/google/cloud-core/src/Report/CloudRunMetadataProvider.php b/lib/Google/vendor/google/cloud-core/src/Report/CloudRunMetadataProvider.php
index 5b7d77192..00b6b9fbd 100644
--- a/lib/Google/vendor/google/cloud-core/src/Report/CloudRunMetadataProvider.php
+++ b/lib/Google/vendor/google/cloud-core/src/Report/CloudRunMetadataProvider.php
@@ -17,91 +17,9 @@
namespace Google\Cloud\Core\Report;
-use Google\Cloud\Core\Compute\Metadata;
-
/**
- * A MetadataProvider for Cloud Run.
+ * @deprecated Use \Google\Cloud\Core\Report\CloudRunServiceMetadataProvider instead
*/
-class CloudRunMetadataProvider implements MetadataProviderInterface
+class CloudRunMetadataProvider extends CloudRunServiceMetadataProvider
{
- /**
- * @var Metadata
- */
- private $metadata;
-
- /**
- * @var string
- */
- private $serviceId;
-
- /**
- * @var string
- */
- private $revisionId;
-
- /**
- * @var string
- */
- private $traceId;
-
- public function __construct(array $env)
- {
- $this->serviceId = isset($env['K_SERVICE'])
- ? $env['K_SERVICE']
- : 'unknown-service';
- $this->revisionId = isset($env['K_REVISION'])
- ? $env['K_REVISION']
- : 'unknown-revision';
- $this->traceId = isset($env['HTTP_X_CLOUD_TRACE_CONTEXT'])
- ? substr($env['HTTP_X_CLOUD_TRACE_CONTEXT'], 0, 32)
- : null;
- $this->metadata = new Metadata();
- }
-
- /**
- * not implemented
- * @TODO
- */
- public function monitoredResource()
- {
- return [];
- }
-
- /**
- * not implemented
- * @TODO
- */
- public function projectId()
- {
- return $this->metadata->getProjectId();
- }
-
- /**
- * Return the service id.
- * @return string
- */
- public function serviceId()
- {
- return $this->serviceId;
- }
-
- /**
- * Return the version id.
- * @return string
- */
- public function versionId()
- {
- return $this->revisionId;
- }
-
- /**
- * Return the labels. We need to evaluate $_SERVER for each request.
- * @return array
- */
- public function labels()
- {
- return !empty($this->traceId)
- ? ['run.googleapis.com/trace_id' => $this->traceId ]
- : [];
- }
}
diff --git a/lib/Google/vendor/google/cloud-core/src/Report/CloudRunServiceMetadataProvider.php b/lib/Google/vendor/google/cloud-core/src/Report/CloudRunServiceMetadataProvider.php
new file mode 100644
index 000000000..ece4061fd
--- /dev/null
+++ b/lib/Google/vendor/google/cloud-core/src/Report/CloudRunServiceMetadataProvider.php
@@ -0,0 +1,138 @@
+configurationId = $env['K_CONFIGURATION'] ?? 'unknown-configuration';
+ $this->serviceId = $env['K_SERVICE'] ?? 'unknown-service';
+ $this->revisionId = $env['K_REVISION'] ?? 'unknown-revision';
+ $this->traceId = isset($env['HTTP_X_CLOUD_TRACE_CONTEXT'])
+ ? \substr($env['HTTP_X_CLOUD_TRACE_CONTEXT'], 0, 32)
+ : null;
+
+ $this->metadata = $metadata ?? new Metadata();
+ $this->region = \basename($this->metadata->get('instance/region'));
+ $this->instanceId = $this->metadata->get('instance/id');
+ }
+
+ /**
+ * @return array
+ */
+ public function monitoredResource()
+ {
+ return [
+ 'type' => 'cloud_run_revision',
+ 'labels' => [
+ 'configuration_name' => $this->configurationId,
+ 'location' => $this->region,
+ 'project_id' => $this->projectId(),
+ 'revision_name' => $this->revisionId,
+ 'service_name' => $this->serviceId,
+ ],
+ ];
+ }
+
+ /**
+ * Return the project id.
+ * @return string
+ */
+ public function projectId()
+ {
+ return $this->metadata->getProjectId();
+ }
+
+ /**
+ * Return the service id.
+ * @return string
+ */
+ public function serviceId()
+ {
+ return $this->serviceId;
+ }
+
+ /**
+ * Return the version id.
+ * @return string
+ */
+ public function versionId()
+ {
+ return $this->revisionId;
+ }
+
+ /**
+ * Return the labels. We need to evaluate $_SERVER for each request.
+ *
+ * @return array
+ * @todo Figure out where to get the `container_name` from
+ */
+ public function labels()
+ {
+ $labels = [
+ 'instanceId' => $this->instanceId,
+ 'run.googleapis.com/trace_id' => $this->traceId,
+ ];
+ return \array_filter($labels);
+ }
+}
diff --git a/lib/Google/vendor/google/cloud-core/src/Report/MetadataProviderUtils.php b/lib/Google/vendor/google/cloud-core/src/Report/MetadataProviderUtils.php
index 20ce785bd..cdd3e5130 100644
--- a/lib/Google/vendor/google/cloud-core/src/Report/MetadataProviderUtils.php
+++ b/lib/Google/vendor/google/cloud-core/src/Report/MetadataProviderUtils.php
@@ -17,6 +17,8 @@
namespace Google\Cloud\Core\Report;
+use Google\Cloud\Core\Compute\Metadata;
+
/**
* Utility class for MetadataProvider.
*/
@@ -28,7 +30,7 @@ class MetadataProviderUtils
* @param array $server Normally pass the $_SERVER.
* @return MetadataProviderInterface
*/
- public static function autoSelect($server)
+ public static function autoSelect($server, ?Metadata $metadata = null)
{
if (isset($server['GAE_SERVICE'])) {
if (isset($server['GAE_ENV']) && $server['GAE_ENV'] === 'standard') {
@@ -36,8 +38,11 @@ public static function autoSelect($server)
}
return new GAEFlexMetadataProvider($server);
}
- if (!empty(getenv('K_CONFIGURATION'))) {
- return new CloudRunMetadataProvider(getenv());
+ if (!empty(\getenv('K_CONFIGURATION'))) {
+ return new CloudRunServiceMetadataProvider(\getenv(), $metadata);
+ }
+ if (!empty(\getenv('CLOUD_RUN_JOB'))) {
+ return new CloudRunJobMetadataProvider(\getenv(), $metadata);
}
return new EmptyMetadataProvider();
}
diff --git a/lib/Google/vendor/google/cloud-core/src/RequestBuilder.php b/lib/Google/vendor/google/cloud-core/src/RequestBuilder.php
index 0f31f9329..1a131651a 100644
--- a/lib/Google/vendor/google/cloud-core/src/RequestBuilder.php
+++ b/lib/Google/vendor/google/cloud-core/src/RequestBuilder.php
@@ -112,8 +112,17 @@ public function build($resource, $method, array $options = [])
unset($options[$parameter]);
}
- if ($parameterOptions['location'] === 'query' && array_key_exists($parameter, $options)) {
- $query[$parameter] = $options[$parameter];
+ if ($parameterOptions['location'] === 'query') {
+ // flatten nested querystring parameters into dot-syntax
+ if (false !== strpos($parameter, '.')) {
+ list($object, $property) = explode('.', $parameter, 2);
+ if (isset($options[$object][$property])) {
+ $options[$parameter] = $options[$object][$property];
+ }
+ }
+ if (array_key_exists($parameter, $options)) {
+ $query[$parameter] = $options[$parameter];
+ }
}
}
}
diff --git a/lib/Google/vendor/google/cloud-core/src/RequestHandler.php b/lib/Google/vendor/google/cloud-core/src/RequestHandler.php
index 6e11b4d61..f650b942b 100644
--- a/lib/Google/vendor/google/cloud-core/src/RequestHandler.php
+++ b/lib/Google/vendor/google/cloud-core/src/RequestHandler.php
@@ -17,15 +17,12 @@
namespace Google\Cloud\Core;
-use Google\ApiCore\Serializer;
-use Google\Cloud\Core\ArrayTrait;
-use Google\Cloud\Core\Exception\NotFoundException;
-use Google\Cloud\Core\Exception\ServiceException;
-use Google\Cloud\Core\TimeTrait;
-use Google\Cloud\Core\WhitelistTrait;
use \Google\Protobuf\Internal\Message;
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
+use Google\ApiCore\Serializer;
+use Google\Cloud\Core\Exception\NotFoundException;
+use Google\Cloud\Core\Exception\ServiceException;
/**
* @internal
@@ -76,7 +73,7 @@ public function __construct(
);
}
//@codeCoverageIgnoreEnd
-
+
// Initialize the client classes and store them in memory
$this->clients = [];
foreach ($clientClasses as $className) {
diff --git a/lib/Google/vendor/google/cloud-core/src/RequestProcessorTrait.php b/lib/Google/vendor/google/cloud-core/src/RequestProcessorTrait.php
index 72440cd91..0f7c28afe 100644
--- a/lib/Google/vendor/google/cloud-core/src/RequestProcessorTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/RequestProcessorTrait.php
@@ -17,14 +17,14 @@
namespace Google\Cloud\Core;
-use Google\ApiCore\ServerStream;
-use Google\Rpc\Code;
+use \Google\Protobuf\Internal\Message;
+use Google\ApiCore\OperationResponse;
use Google\ApiCore\PagedListResponse;
+use Google\ApiCore\ServerStream;
use Google\Cloud\Core\Exception\ServiceException;
-use Google\ApiCore\OperationResponse;
-use \Google\Protobuf\Internal\Message;
-use Google\Rpc\RetryInfo;
use Google\Rpc\BadRequest;
+use Google\Rpc\Code;
+use Google\Rpc\RetryInfo;
/**
* @internal
@@ -140,7 +140,7 @@ private function convertToGoogleException(\Exception $ex): ServiceException
if (!isset($this->metadataTypes[$type])) {
continue;
}
- $metadataElement = new $this->metadataTypes[$type];
+ $metadataElement = new $this->metadataTypes[$type]();
$metadataElement->mergeFromString($binaryValue[0]);
$metadata[] = $this->serializer->encodeMessage($metadataElement);
}
diff --git a/lib/Google/vendor/google/cloud-core/src/RequestWrapper.php b/lib/Google/vendor/google/cloud-core/src/RequestWrapper.php
index eb8f76502..849d15f2b 100644
--- a/lib/Google/vendor/google/cloud-core/src/RequestWrapper.php
+++ b/lib/Google/vendor/google/cloud-core/src/RequestWrapper.php
@@ -24,15 +24,13 @@
use Google\Auth\HttpHandler\Guzzle6HttpHandler;
use Google\Auth\HttpHandler\HttpHandlerFactory;
use Google\Auth\UpdateMetadataInterface;
-use Google\Cloud\Core\Exception\ServiceException;
-use Google\Cloud\Core\RequestWrapperTrait;
use Google\Cloud\Core\Exception\GoogleException;
+use Google\Cloud\Core\Exception\ServiceException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Promise\PromiseInterface;
use GuzzleHttp\Psr7\Utils;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
-use Psr\Http\Message\StreamInterface;
/**
* The RequestWrapper is responsible for delivering and signing requests.
@@ -370,7 +368,8 @@ private function addAuthHeaders(RequestInterface $request, FetchAuthTokenInterfa
return $backoff->execute(
function () use ($request, $fetcher) {
if (!$fetcher instanceof UpdateMetadataInterface ||
- ($fetcher instanceof FetchAuthTokenCache &&
+ (
+ $fetcher instanceof FetchAuthTokenCache &&
!$fetcher->getFetcher() instanceof UpdateMetadataInterface
)
) {
@@ -511,7 +510,7 @@ private function buildDefaultAsyncHandler()
/**
* Verify that the expected universe domain matches the universe domain from the credentials.
*/
- private function checkUniverseDomain(FetchAuthTokenInterface $credentialsFetcher = null)
+ private function checkUniverseDomain(?FetchAuthTokenInterface $credentialsFetcher = null)
{
if (false === $this->hasCheckedUniverse) {
if ($this->universeDomain === '') {
diff --git a/lib/Google/vendor/google/cloud-core/src/RestTrait.php b/lib/Google/vendor/google/cloud-core/src/RestTrait.php
index 70966a8a0..20b61cc00 100644
--- a/lib/Google/vendor/google/cloud-core/src/RestTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/RestTrait.php
@@ -122,7 +122,7 @@ public function send($resource, $method, array $options = [], $whitelisted = fal
* @param string $apiEndpointTemplate
* @return string
*/
- private function getApiEndpoint($default, array $config, string $apiEndpointTemplate = null)
+ private function getApiEndpoint($default, array $config, ?string $apiEndpointTemplate = null)
{
// If the $default parameter is provided, or the user has set an "apiEndoint" config option,
// fall back to the previous behavior.
diff --git a/lib/Google/vendor/google/cloud-core/src/Retry.php b/lib/Google/vendor/google/cloud-core/src/Retry.php
index 67b6000b4..6083b5857 100644
--- a/lib/Google/vendor/google/cloud-core/src/Retry.php
+++ b/lib/Google/vendor/google/cloud-core/src/Retry.php
@@ -54,7 +54,7 @@ class Retry
public function __construct(
$retries,
callable $delayFunction,
- callable $retryFunction = null
+ ?callable $retryFunction = null
) {
$this->retries = $retries !== null ? (int) $retries : 3;
$this->delayFunction = $delayFunction;
diff --git a/lib/Google/vendor/google/cloud-core/src/ServiceBuilder.php b/lib/Google/vendor/google/cloud-core/src/ServiceBuilder.php
index 9a5ac3f4f..2de759b76 100644
--- a/lib/Google/vendor/google/cloud-core/src/ServiceBuilder.php
+++ b/lib/Google/vendor/google/cloud-core/src/ServiceBuilder.php
@@ -22,15 +22,19 @@
use Google\Cloud\BigQuery\BigQueryClient;
use Google\Cloud\Datastore\DatastoreClient;
use Google\Cloud\Firestore\FirestoreClient;
-use Google\Cloud\Language\LanguageClient;
+use Google\Cloud\Language\LanguageClient as DeprecatedLanguageClient;
+use Google\Cloud\Language\V2\Client\LanguageServiceClient;
use Google\Cloud\Logging\LoggingClient;
use Google\Cloud\PubSub\PubSubClient;
use Google\Cloud\Spanner\SpannerClient;
-use Google\Cloud\Speech\SpeechClient;
+use Google\Cloud\Speech\SpeechClient as DeprecatedSpeechClient;
+use Google\Cloud\Speech\V2\Client\SpeechClient;
use Google\Cloud\Storage\StorageClient;
use Google\Cloud\Trace\TraceClient;
-use Google\Cloud\Translate\V2\TranslateClient;
-use Google\Cloud\Vision\VisionClient;
+use Google\Cloud\Translate\V2\TranslateClient as DeprecatedTranslateClient;
+use Google\Cloud\Translate\V3\Client\TranslationServiceClient;
+use Google\Cloud\Vision\V1\Client\ImageAnnotatorClient;
+use Google\Cloud\Vision\VisionClient as DeprecatedVisionClient;
use Psr\Cache\CacheItemPoolInterface;
/**
@@ -49,6 +53,8 @@
*
* Please note that unless otherwise noted the examples below take advantage of
* [Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials).
+ *
+ * @deprecated
*/
class ServiceBuilder
{
@@ -211,11 +217,17 @@ public function logging(array $config = [])
*
* @param array $config [optional] Configuration options. See
* {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
- * @return LanguageClient
+ * @return LanguageServiceClient
*/
public function language(array $config = [])
{
- return $this->createClient(LanguageClient::class, 'language', $config);
+ if (class_exists(DeprecatedLanguageClient::class)) {
+ return $this->createClient(DeprecatedLanguageClient::class, 'vision', $config);
+ }
+ throw new \BadMethodCallException(sprintf(
+ 'This method is no longer supported, create %s directly instead.',
+ LanguageServiceClient::class
+ ));
}
/**
@@ -268,32 +280,19 @@ public function spanner(array $config = [])
}
/**
- * Google Cloud Speech enables easy integration of Google speech recognition
- * technologies into developer applications. Send audio and receive a text
- * transcription from the Cloud Speech API service. Find more information at
- * the [Google Cloud Speech API docs](https://cloud.google.com/speech/docs/).
- *
- * Example:
- * ```
- * $speech = $cloud->speech([
- * 'languageCode' => 'en-US'
- * ]);
- * ```
- *
- * @param array $config [optional] {
- * Configuration options. See
- * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
- *
- * @type string $languageCode The language of the content to
- * be recognized. Only BCP-47 (e.g., `"en-US"`, `"es-ES"`)
- * language codes are accepted. See
- * [Language Support](https://cloud.google.com/speech/docs/languages)
- * for a list of the currently supported language codes.
- * @return SpeechClient
+ * @deprecated
+ * @see SpeechClient
+ * @throws \BadMethodCallException
*/
public function speech(array $config = [])
{
- return $this->createClient(SpeechClient::class, 'speech', $config);
+ if (class_exists(DeprecatedSpeechClient::class)) {
+ return $this->createClient(DeprecatedSpeechClient::class, 'speech', $config);
+ }
+ throw new \BadMethodCallException(sprintf(
+ 'This method is no longer supported, create %s directly instead.',
+ SpeechClient::class
+ ));
}
/**
@@ -315,7 +314,6 @@ public function storage(array $config = [])
return $this->createClient(StorageClient::class, 'storage', $config);
}
-
/**
* Google Stackdriver Trace allows you to collect latency data from your applications
* and display it in the Google Cloud Platform Console. Find more information at
@@ -336,71 +334,35 @@ public function trace(array $config = [])
}
/**
- * Google Cloud Vision allows you to understand the content of an image,
- * classify images into categories, detect text, objects, faces and more.
- * Find more information at the
- * [Google Cloud Vision docs](https://cloud.google.com/vision/docs/).
- *
- * Example:
- * ```
- * $vision = $cloud->vision();
- * ```
- *
- * @param array $config [optional] Configuration options. See
- * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
- * @return VisionClient
+ * @deprecated
+ * @see ImageAnnotatorClient
+ * @throws \BadMethodCallException
*/
public function vision(array $config = [])
{
- return $this->createClient(VisionClient::class, 'vision', $config);
+ if (class_exists(DeprecatedVisionClient::class)) {
+ return $this->createClient(DeprecatedVisionClient::class, 'vision', $config);
+ }
+ throw new \BadMethodCallException(sprintf(
+ 'This method is no longer supported, create %s directly instead.',
+ ImageAnnotatorClient::class
+ ));
}
/**
- * Google Cloud Translation provides the ability to dynamically translate
- * text between thousands of language pairs and lets websites and programs
- * integrate with translation service programmatically.
- *
- * The Google Cloud Translation API is available as a paid
- * service. See the [Pricing](https://cloud.google.com/translation/v2/pricing)
- * and [FAQ](https://cloud.google.com/translation/v2/faq) pages for details.
- * Find more information at the the
- * [Google Cloud Translation docs](https://cloud.google.com/translation/docs/).
- *
- * Please note that while the Google Cloud Translation API supports
- * authentication via service account and application default credentials
- * like other Cloud Platform APIs, it also supports authentication via a
- * public API access key. If you wish to authenticate using an API key,
- * follow the
- * [before you begin](https://cloud.google.com/translation/v2/translating-text-with-rest#before-you-begin)
- * instructions to learn how to generate a key.
- *
- * Example:
- * ```
- * use Google\Cloud\Core\ServiceBuilder;
- *
- * $builder = new ServiceBuilder([
- * 'key' => 'YOUR_KEY'
- * ]);
- *
- * $translate = $builder->translate();
- * ```
- *
- * @param array $config [optional] {
- * Configuration options.
- *
- * @type string $key A public API access key.
- * @type string $target The target language to assign to the client.
- * Defaults to `en` (English).
- * @type callable $httpHandler A handler used to deliver Psr7 requests.
- * Only valid for requests sent over REST.
- * @type int $retries Number of retries for a failed request.
- * **Defaults to** `3`.
- * }
- * @return TranslateClient
+ * @deprecated
+ * @see TranslationServiceClient
+ * @throws \BadMethodCallException
*/
public function translate(array $config = [])
{
- return $this->createClient(TranslateClient::class, 'translate', $config);
+ if (class_exists(DeprecatedTranslateClient::class)) {
+ return $this->createClient(DeprecatedTranslateClient::class, 'translate', $config);
+ }
+ throw new \BadMethodCallException(sprintf(
+ 'This method is no longer supported, create %s directly instead.',
+ TranslationServiceClient::class
+ ));
}
/**
diff --git a/lib/Google/vendor/google/cloud-core/src/Testing/ArrayHasSameValuesToken.php b/lib/Google/vendor/google/cloud-core/src/Testing/ArrayHasSameValuesToken.php
index d6acbca9c..213dd6dde 100644
--- a/lib/Google/vendor/google/cloud-core/src/Testing/ArrayHasSameValuesToken.php
+++ b/lib/Google/vendor/google/cloud-core/src/Testing/ArrayHasSameValuesToken.php
@@ -25,7 +25,7 @@ class ArrayHasSameValuesToken implements TokenInterface
* @experimental
* @internal
*/
- public function __construct($value, StringUtil $util = null)
+ public function __construct($value, ?StringUtil $util = null)
{
$this->value = $value;
$this->util = $util ?: new StringUtil();
diff --git a/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerFactory.php b/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerFactory.php
index 6c4b7b427..7adc137e2 100644
--- a/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerFactory.php
+++ b/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerFactory.php
@@ -17,6 +17,8 @@
namespace Google\Cloud\Core\Testing\Reflection;
+use phpDocumentor\Reflection\Php\Factory\Argument;
+
/**
* Class for determining which verison of phpdocumentor/reflection is being used.
* @internal
@@ -28,6 +30,8 @@ class ReflectionHandlerFactory
*/
public static function create()
{
- return new ReflectionHandlerV5();
+ return class_exists(Argument::class)
+ ? new ReflectionHandlerV5()
+ : new ReflectionHandlerV6();
}
}
diff --git a/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerV5.php b/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerV5.php
index 9f61f3938..ea4e2b001 100644
--- a/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerV5.php
+++ b/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerV5.php
@@ -99,14 +99,33 @@ public function classes(array $files)
}
/**
- * @return ProjectFactory
+ * Split this into a separate method because ReflectionHandler V6 looks
+ * different
*/
- public function createProjectFactory()
+ protected function createParser()
{
- $parser = (new ParserFactory())->create(
+ return (new ParserFactory())->create(
ParserFactory::ONLY_PHP7,
new Lexer\Emulative(['phpVersion' => Lexer\Emulative::PHP_8_0])
);
+ }
+
+ /**
+ * Split this into a separate method because V6 does not support it
+ */
+ protected function getAdditionalStrategies()
+ {
+ return [
+ new Factory\Argument(new PrettyPrinter()) // @phpstan-ignore-line
+ ];
+ }
+
+ /**
+ * @return ProjectFactory
+ */
+ public function createProjectFactory()
+ {
+ $parser = $this->createParser();
$nodeTraverser = new NodeTraverser();
$nodeTraverser->addVisitor(new NameResolver());
$nodeTraverser->addVisitor(new ElementNameResolver());
@@ -119,7 +138,6 @@ public function createProjectFactory()
$strategies = new ProjectFactoryStrategies(
[
new Factory\Namespace_(),
- new Factory\Argument(new PrettyPrinter()),
new Factory\Class_($docblockFactory),
new Factory\Enum_($docblockFactory),
new Factory\EnumCase($docblockFactory, new PrettyPrinter()),
@@ -134,7 +152,7 @@ public function createProjectFactory()
new Factory\Trait_($docblockFactory),
new Factory\IfStatement(),
new TraitUse(),
- ]
+ ] + $this->getAdditionalStrategies()
);
$strategies->addStrategy(
diff --git a/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerV6.php b/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerV6.php
new file mode 100644
index 000000000..b04a9efe0
--- /dev/null
+++ b/lib/Google/vendor/google/cloud-core/src/Testing/Reflection/ReflectionHandlerV6.php
@@ -0,0 +1,46 @@
+createForVersion($phpVersion);
+ }
+
+ /**
+ * @see ReflectionHandlerV5
+ */
+ protected function getAdditionalStrategies()
+ {
+ return [];
+ }
+}
diff --git a/lib/Google/vendor/google/cloud-core/src/Testing/System/DeletionQueue.php b/lib/Google/vendor/google/cloud-core/src/Testing/System/DeletionQueue.php
index f29bda287..820d9f194 100644
--- a/lib/Google/vendor/google/cloud-core/src/Testing/System/DeletionQueue.php
+++ b/lib/Google/vendor/google/cloud-core/src/Testing/System/DeletionQueue.php
@@ -90,7 +90,7 @@ public function add($toDelete)
* @experimental
* @internal
*/
- public function process(callable $action = null)
+ public function process(?callable $action = null)
{
if ($action) {
$action($this->queue);
diff --git a/lib/Google/vendor/google/cloud-core/src/TimeTrait.php b/lib/Google/vendor/google/cloud-core/src/TimeTrait.php
index 773729b8b..ab10cf269 100644
--- a/lib/Google/vendor/google/cloud-core/src/TimeTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/TimeTrait.php
@@ -38,7 +38,7 @@ private function parseTimeString($timestamp)
$subSeconds = $matches[1] ?? '0';
if (strlen($subSeconds) > 6) {
- $timestamp = str_replace('.'. $subSeconds, '.' . substr($subSeconds, 0, 6), $timestamp);
+ $timestamp = str_replace('.' . $subSeconds, '.' . substr($subSeconds, 0, 6), $timestamp);
}
$dt = new \DateTimeImmutable($timestamp);
@@ -73,6 +73,9 @@ private function createDateTimeFromSeconds($seconds)
*/
private function formatTimeAsString(\DateTimeInterface $dateTime, $ns)
{
+ if (!$dateTime instanceof \DateTimeImmutable) {
+ $dateTime = clone $dateTime;
+ }
$dateTime = $dateTime->setTimeZone(new \DateTimeZone('UTC'));
if ($ns === null) {
return $dateTime->format(Timestamp::FORMAT);
diff --git a/lib/Google/vendor/google/cloud-core/src/TimestampTrait.php b/lib/Google/vendor/google/cloud-core/src/TimestampTrait.php
index 4ed589e2f..78ea1d355 100644
--- a/lib/Google/vendor/google/cloud-core/src/TimestampTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/TimestampTrait.php
@@ -18,8 +18,6 @@
namespace Google\Cloud\Core;
-use Google\Cloud\Core\Timestamp;
-
/**
* Helper methods to work on Google\Cloud\Core\Timestamp.
* @internal
diff --git a/lib/Google/vendor/google/cloud-core/src/Upload/ResumableUploader.php b/lib/Google/vendor/google/cloud-core/src/Upload/ResumableUploader.php
index 220a2a165..ecea6703f 100644
--- a/lib/Google/vendor/google/cloud-core/src/Upload/ResumableUploader.php
+++ b/lib/Google/vendor/google/cloud-core/src/Upload/ResumableUploader.php
@@ -19,7 +19,6 @@
use Google\Cloud\Core\Exception\GoogleException;
use Google\Cloud\Core\Exception\ServiceException;
-use Google\Cloud\Core\Exception\UploadException;
use Google\Cloud\Core\JsonTrait;
use Google\Cloud\Core\RequestWrapper;
use GuzzleHttp\Promise\PromiseInterface;
diff --git a/lib/Google/vendor/google/cloud-core/src/ValidateTrait.php b/lib/Google/vendor/google/cloud-core/src/ValidateTrait.php
index f1582702f..1e9f913c0 100644
--- a/lib/Google/vendor/google/cloud-core/src/ValidateTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/ValidateTrait.php
@@ -37,7 +37,7 @@ trait ValidateTrait
private function validateBatch(
array $input,
$type,
- callable $additionalCheck = null
+ ?callable $additionalCheck = null
) {
foreach ($input as $element) {
if (!($element instanceof $type)) {
diff --git a/lib/Google/vendor/google/cloud-core/src/ValueMapperTrait.php b/lib/Google/vendor/google/cloud-core/src/ValueMapperTrait.php
index ddb39b390..c9cd904bb 100644
--- a/lib/Google/vendor/google/cloud-core/src/ValueMapperTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/ValueMapperTrait.php
@@ -47,7 +47,7 @@ public function createTimestampWithNanos($timestamp, $returnType = Timestamp::cl
$dt = $this->createDateTimeFromSeconds($timestamp['seconds']);
$nanos = $timestamp['nanos'];
} else {
- list ($dt, $nanos) = $this->parseTimeString($timestamp);
+ list($dt, $nanos) = $this->parseTimeString($timestamp);
}
return new $returnType($dt, $nanos);
diff --git a/lib/Google/vendor/google/cloud-core/unit-bootstrap.php b/lib/Google/vendor/google/cloud-core/unit-bootstrap.php
index 864cd9436..001e59dd2 100644
--- a/lib/Google/vendor/google/cloud-core/unit-bootstrap.php
+++ b/lib/Google/vendor/google/cloud-core/unit-bootstrap.php
@@ -1,9 +1,9 @@
register(new MessageAwareArrayComparator());
diff --git a/lib/Google/vendor/google/gax/.repo-metadata.json b/lib/Google/vendor/google/gax/.repo-metadata.json
new file mode 100644
index 000000000..2fe16da27
--- /dev/null
+++ b/lib/Google/vendor/google/gax/.repo-metadata.json
@@ -0,0 +1,7 @@
+{
+ "language": "php",
+ "distribution_name": "google/gax",
+ "release_level": "stable",
+ "client_documentation": "https://cloud.google.com/php/docs/reference/gax/latest",
+ "library_type": "CORE"
+}
diff --git a/lib/Google/vendor/google/gax/CHANGELOG.md b/lib/Google/vendor/google/gax/CHANGELOG.md
index 10d92869c..32f7fe85c 100644
--- a/lib/Google/vendor/google/gax/CHANGELOG.md
+++ b/lib/Google/vendor/google/gax/CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog
+## [1.36.1](https://github.com/googleapis/gax-php/compare/v1.36.0...v1.36.1) (2025-05-20)
+
+
+### Bug Fixes
+
+* Protobuf 4.31 deprecations ([#616](https://github.com/googleapis/gax-php/issues/616)) ([b06048b](https://github.com/googleapis/gax-php/commit/b06048be5c29a2534ba1c908642c69798e145d99))
+
+## [1.36.0](https://github.com/googleapis/gax-php/compare/v1.35.1...v1.36.0) (2024-12-11)
+
+
+### Features
+
+* Add logging to the supported transports ([#585](https://github.com/googleapis/gax-php/issues/585)) ([819a677](https://github.com/googleapis/gax-php/commit/819a677e0d89d75662b30a1dbdd45f6a610d9f0c))
+
## [1.35.1](https://github.com/googleapis/gax-php/compare/v1.35.0...v1.35.1) (2024-12-04)
diff --git a/lib/Google/vendor/google/gax/README.md b/lib/Google/vendor/google/gax/README.md
index 3d148a1ec..5a5875b70 100644
--- a/lib/Google/vendor/google/gax/README.md
+++ b/lib/Google/vendor/google/gax/README.md
@@ -2,7 +2,7 @@

-- [Documentation](https://googleapis.github.io/gax-php)
+- [Documentation](https://cloud.google.com/php/docs/reference/gax/latest)
Google API Core for PHP (gax-php) is a set of modules which aids the development
of APIs for clients based on [gRPC][] and Google API conventions.
diff --git a/lib/Google/vendor/google/gax/VERSION b/lib/Google/vendor/google/gax/VERSION
index 7eee78574..f107550c2 100644
--- a/lib/Google/vendor/google/gax/VERSION
+++ b/lib/Google/vendor/google/gax/VERSION
@@ -1 +1 @@
-1.35.1
+1.36.1
diff --git a/lib/Google/vendor/google/gax/composer.json b/lib/Google/vendor/google/gax/composer.json
index 2806aeb22..06152f6ed 100644
--- a/lib/Google/vendor/google/gax/composer.json
+++ b/lib/Google/vendor/google/gax/composer.json
@@ -7,7 +7,7 @@
"license": "BSD-3-Clause",
"require": {
"php": "^8.0",
- "google/auth": "^1.34.0",
+ "google/auth": "^1.45",
"google/grpc-gcp": "^0.4",
"grpc/grpc": "^1.13",
"google/protobuf": "^v3.25.3||^4.26.1",
@@ -21,7 +21,7 @@
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "3.*",
"phpspec/prophecy-phpunit": "^2.1",
- "phpstan/phpstan": "^1.10"
+ "phpstan/phpstan": "^2.0"
},
"conflict": {
"ext-protobuf": "<3.7.0"
@@ -35,7 +35,7 @@
"autoload-dev": {
"psr-4": {
"Google\\ApiCore\\Dev\\": "dev/src",
- "Google\\ApiCore\\": "tests",
+ "Google\\ApiCore\\Tests\\": "tests",
"GPBMetadata\\Google\\": "metadata/Google"
}
},
diff --git a/lib/Google/vendor/google/gax/phpunit.xml.dist b/lib/Google/vendor/google/gax/phpunit.xml.dist
index 3112d3d95..825f7f706 100644
--- a/lib/Google/vendor/google/gax/phpunit.xml.dist
+++ b/lib/Google/vendor/google/gax/phpunit.xml.dist
@@ -1,7 +1,7 @@
-
+
@@ -10,7 +10,7 @@
- tests/Tests/Unit
+ tests/Unit
diff --git a/lib/Google/vendor/google/gax/src/BidiStream.php b/lib/Google/vendor/google/gax/src/BidiStream.php
index daf81a570..e4d6718b2 100644
--- a/lib/Google/vendor/google/gax/src/BidiStream.php
+++ b/lib/Google/vendor/google/gax/src/BidiStream.php
@@ -31,32 +31,44 @@
*/
namespace Google\ApiCore;
+use Google\Auth\Logging\LoggingTrait;
+use Google\Auth\Logging\RpcLogEvent;
+use Google\Protobuf\Internal\Message;
use Google\Rpc\Code;
use Grpc\BidiStreamingCall;
+use Psr\Log\LoggerInterface;
/**
* BidiStream is the response object from a gRPC bidirectional streaming API call.
*/
class BidiStream
{
+ use LoggingTrait;
+
private $call;
private $isComplete = false;
private $writesClosed = false;
private $resourcesGetMethod = null;
private $pendingResources = [];
+ private null|LoggerInterface $logger = null;
/**
* BidiStream constructor.
*
* @param BidiStreamingCall $bidiStreamingCall The gRPC bidirectional streaming call object
* @param array $streamingDescriptor
+ * @param null|LoggerInterface $logger
*/
- public function __construct(BidiStreamingCall $bidiStreamingCall, array $streamingDescriptor = [])
- {
+ public function __construct(
+ BidiStreamingCall $bidiStreamingCall,
+ array $streamingDescriptor = [],
+ null|LoggerInterface $logger = null,
+ ) {
$this->call = $bidiStreamingCall;
if (array_key_exists('resourcesGetMethod', $streamingDescriptor)) {
$this->resourcesGetMethod = $streamingDescriptor['resourcesGetMethod'];
}
+ $this->logger = $logger;
}
/**
@@ -73,6 +85,18 @@ public function write($request)
if ($this->writesClosed) {
throw new ValidationException('Cannot call write() after calling closeWrite().');
}
+
+ if ($this->logger && $request instanceof Message) {
+ $logEvent = new RpcLogEvent();
+
+ $logEvent->headers = null;
+ $logEvent->payload = $request->serializeToJsonString();
+ $logEvent->processId = (int) getmypid();
+ $logEvent->requestId = crc32((string) spl_object_id($this) . getmypid());
+
+ $this->logRequest($logEvent);
+ }
+
$this->call->write($request);
}
@@ -144,6 +168,22 @@ public function read()
throw ApiException::createFromStdClass($status);
}
}
+
+ if ($this->logger) {
+ $responseEvent = new RpcLogEvent();
+
+ $responseEvent->headers = $this->call->getMetadata();
+ $responseEvent->status = $status->code ?? null;
+ $responseEvent->processId = (int) getmypid();
+ $responseEvent->requestId = crc32((string) spl_object_id($this) . getmypid());
+
+ if ($result instanceof Message) {
+ $responseEvent->payload = $result->serializeToJsonString();
+ }
+
+ $this->logResponse($responseEvent);
+ }
+
return $result;
}
diff --git a/lib/Google/vendor/google/gax/src/ClientOptionsTrait.php b/lib/Google/vendor/google/gax/src/ClientOptionsTrait.php
index ece1a41a6..62ea0ec36 100644
--- a/lib/Google/vendor/google/gax/src/ClientOptionsTrait.php
+++ b/lib/Google/vendor/google/gax/src/ClientOptionsTrait.php
@@ -32,11 +32,15 @@
namespace Google\ApiCore;
+use Google\Auth\ApplicationDefaultCredentials;
use Google\Auth\CredentialsLoader;
use Google\Auth\FetchAuthTokenInterface;
use Google\Auth\GetUniverseDomainInterface;
+use Google\Auth\HttpHandler\HttpHandlerFactory;
use Grpc\Gcp\ApiConfig;
use Grpc\Gcp\Config;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LogLevel;
/**
* Common functions used to work with various clients.
@@ -98,6 +102,7 @@ private function buildClientOptions(array $options)
'apiEndpoint' => null,
'clientCertSource' => null,
'universeDomain' => null,
+ 'logger' => null,
];
$supportedTransports = $this->supportedTransports();
@@ -115,18 +120,51 @@ private function buildClientOptions(array $options)
// Keep track of the API Endpoint
$apiEndpoint = $options['apiEndpoint'] ?? null;
+ // Keep track of the original user supplied options for logging the configuration
+ $clientSuppliedOptions = $options;
+
// Merge defaults into $options starting from top level
// variables, then going into deeper nesting, so that
// we will not encounter missing keys
$options += $defaultOptions;
+
+ // If logger is explicitly set to false, logging is disabled
+ if (is_null($options['logger'])) {
+ $options['logger'] = ApplicationDefaultCredentials::getDefaultLogger();
+ }
+
+ if (
+ $options['logger'] !== null
+ && $options['logger'] !== false
+ && !$options['logger'] instanceof LoggerInterface
+ ) {
+ throw new ValidationException(
+ 'The "logger" option in the options array should be PSR-3 LoggerInterface compatible'
+ );
+ }
+
+ // Log the user supplied configuration.
+ $this->logConfiguration($options['logger'], $clientSuppliedOptions);
+
+ if (isset($options['logger'])) {
+ $options['credentialsConfig']['authHttpHandler'] = HttpHandlerFactory::build(
+ logger: $options['logger']
+ );
+ }
+
$options['credentialsConfig'] += $defaultOptions['credentialsConfig'];
$options['transportConfig'] += $defaultOptions['transportConfig']; // @phpstan-ignore-line
if (isset($options['transportConfig']['grpc'])) {
$options['transportConfig']['grpc'] += $defaultOptions['transportConfig']['grpc'];
$options['transportConfig']['grpc']['stubOpts'] += $defaultOptions['transportConfig']['grpc']['stubOpts'];
+ $options['transportConfig']['grpc']['logger'] = $options['logger'] ?? null;
}
if (isset($options['transportConfig']['rest'])) {
$options['transportConfig']['rest'] += $defaultOptions['transportConfig']['rest'];
+ $options['transportConfig']['rest']['logger'] = $options['logger'] ?? null;
+ }
+ if (isset($options['transportConfig']['grpc-fallback'])) {
+ $options['transportConfig']['grpc-fallback']['logger'] = $options['logger'] ?? null;
}
// These calls do not apply to "New Surface" clients.
@@ -317,4 +355,27 @@ private function isBackwardsCompatibilityMode(): bool
{
return false;
}
+
+ /**
+ * @param null|false|LoggerInterface $logger
+ * @param string $options
+ */
+ private function logConfiguration(null|false|LoggerInterface $logger, array $options): void
+ {
+ if (!$logger) {
+ return;
+ }
+
+ $configurationLog = [
+ 'timestamp' => date(DATE_RFC3339),
+ 'severity' => strtoupper(LogLevel::DEBUG),
+ 'processId' => getmypid(),
+ 'jsonPayload' => [
+ 'serviceName' => self::SERVICE_NAME, // @phpstan-ignore-line
+ 'clientConfiguration' => $options,
+ ]
+ ];
+
+ $logger->debug(json_encode($configurationLog));
+ }
}
diff --git a/lib/Google/vendor/google/gax/src/ClientStream.php b/lib/Google/vendor/google/gax/src/ClientStream.php
index 7e08b1327..6c249551c 100644
--- a/lib/Google/vendor/google/gax/src/ClientStream.php
+++ b/lib/Google/vendor/google/gax/src/ClientStream.php
@@ -31,27 +31,37 @@
*/
namespace Google\ApiCore;
+use Google\Auth\Logging\LoggingTrait;
+use Google\Auth\Logging\RpcLogEvent;
+use Google\Protobuf\Internal\Message;
use Google\Rpc\Code;
use Grpc\ClientStreamingCall;
+use Psr\Log\LoggerInterface;
/**
* ClientStream is the response object from a gRPC client streaming API call.
*/
class ClientStream
{
+ use LoggingTrait;
+
private $call;
+ private null|LoggerInterface $logger;
/**
* ClientStream constructor.
*
* @param ClientStreamingCall $clientStreamingCall The gRPC client streaming call object
* @param array $streamingDescriptor
+ * @param null|LoggerInterface $logger A PSR-3 compliant logger.
*/
public function __construct(// @phpstan-ignore-line
ClientStreamingCall $clientStreamingCall,
- array $streamingDescriptor = []
+ array $streamingDescriptor = [],
+ null|LoggerInterface $logger = null,
) {
$this->call = $clientStreamingCall;
+ $this->logger = $logger;
}
/**
@@ -61,6 +71,17 @@ public function __construct(// @phpstan-ignore-line
*/
public function write($request)
{
+ // In some cases, $request can be a string
+ if ($this->logger && $request instanceof Message) {
+ $requestEvent = new RpcLogEvent();
+
+ $requestEvent->payload = $request->serializeToJsonString();
+ $requestEvent->processId = (int) getmypid();
+ $requestEvent->requestId = crc32((string) spl_object_id($this) . getmypid());
+
+ $this->logRequest($requestEvent);
+ }
+
$this->call->write($request);
}
@@ -74,6 +95,21 @@ public function readResponse()
{
list($response, $status) = $this->call->wait();
if ($status->code == Code::OK) {
+ if ($this->logger) {
+ $responseEvent = new RpcLogEvent();
+
+ $responseEvent->headers = $status->metadata;
+ $responseEvent->status = $status->code;
+ $responseEvent->processId = (int) getmypid();
+ $responseEvent->requestId = crc32((string) spl_object_id($this) . getmypid());
+
+ if ($response instanceof Message) {
+ $response->serializeToJsonString();
+ }
+
+ $this->logResponse($responseEvent);
+ }
+
return $response;
} else {
throw ApiException::createFromStdClass($status);
diff --git a/lib/Google/vendor/google/gax/src/Middleware/RetryMiddleware.php b/lib/Google/vendor/google/gax/src/Middleware/RetryMiddleware.php
index 4a791cd71..4e8f6e79d 100644
--- a/lib/Google/vendor/google/gax/src/Middleware/RetryMiddleware.php
+++ b/lib/Google/vendor/google/gax/src/Middleware/RetryMiddleware.php
@@ -84,6 +84,11 @@ public function __invoke(Call $call, array $options)
}
}
+ // Setting the retry attempt for logging
+ if ($this->retryAttempts > 0) {
+ $options['retryAttempt'] = $this->retryAttempts;
+ }
+
// Call the handler immediately if retry settings are disabled.
if (!$this->retrySettings->retriesEnabled()) {
return $nextHandler($call, $options);
diff --git a/lib/Google/vendor/google/gax/src/Options/ClientOptions.php b/lib/Google/vendor/google/gax/src/Options/ClientOptions.php
index 5ad4268c2..ae52db06a 100644
--- a/lib/Google/vendor/google/gax/src/Options/ClientOptions.php
+++ b/lib/Google/vendor/google/gax/src/Options/ClientOptions.php
@@ -38,6 +38,7 @@
use Google\ApiCore\Transport\TransportInterface;
use Google\Auth\FetchAuthTokenInterface;
use InvalidArgumentException;
+use Psr\Log\LoggerInterface;
/**
* The ClientOptions class adds typing to the associative array of options
@@ -96,6 +97,8 @@ class ClientOptions implements ArrayAccess
private ?string $apiKey;
+ private null|false|LoggerInterface $logger;
+
/**
* @param array $options {
* @type string $apiEndpoint
@@ -117,6 +120,12 @@ class ClientOptions implements ArrayAccess
* \Google\Auth\FetchAuthTokenInterface object or \Google\ApiCore\CredentialsWrapper
* object. Note that when one of these objects are provided, any settings in
* $authConfig will be ignored.
+ * *Important*: If you accept a credential configuration (credential JSON/File/Stream)
+ * from an external source for authentication to Google Cloud Platform, you must
+ * validate it before providing it to any Google API or library. Providing an
+ * unvalidated credential configuration to Google APIs can compromise the security of
+ * your systems and data. For more information
+ * {@see https://cloud.google.com/docs/authentication/external/externally-sourced-credentials}
* @type array $credentialsConfig
* Options used to configure credentials, including auth token caching, for the client.
* For a full list of supporting configuration options, see
@@ -154,8 +163,10 @@ class ClientOptions implements ArrayAccess
* A callable which returns the client cert as a string.
* @type string $universeDomain
* The default service domain for a given Cloud universe.
- * @type string $apiKey
+ * @type string $apiKey
* The API key to be used for the client.
+ * @type null|false|LoggerInterface
+ * A PSR-3 compliant logger.
* }
*/
public function __construct(array $options)
@@ -186,6 +197,7 @@ private function fromArray(array $arr): void
$this->setClientCertSource($arr['clientCertSource'] ?? null);
$this->setUniverseDomain($arr['universeDomain'] ?? null);
$this->setApiKey($arr['apiKey'] ?? null);
+ $this->setLogger($arr['logger'] ?? null);
}
/**
@@ -328,4 +340,12 @@ public function setApiKey(?string $apiKey)
{
$this->apiKey = $apiKey;
}
+
+ /**
+ * @param null|false|LoggerInterface $logger
+ */
+ public function setLogger(null|false|LoggerInterface $logger)
+ {
+ $this->logger = $logger;
+ }
}
diff --git a/lib/Google/vendor/google/gax/src/Options/TransportOptions/GrpcFallbackTransportOptions.php b/lib/Google/vendor/google/gax/src/Options/TransportOptions/GrpcFallbackTransportOptions.php
index 73ac2267c..285a9803d 100644
--- a/lib/Google/vendor/google/gax/src/Options/TransportOptions/GrpcFallbackTransportOptions.php
+++ b/lib/Google/vendor/google/gax/src/Options/TransportOptions/GrpcFallbackTransportOptions.php
@@ -35,6 +35,7 @@
use ArrayAccess;
use Closure;
use Google\ApiCore\Options\OptionsTrait;
+use Psr\Log\LoggerInterface;
/**
* The GrpcFallbackTransportOptions class provides typing to the associative array of options used
@@ -48,6 +49,8 @@ class GrpcFallbackTransportOptions implements ArrayAccess
private ?Closure $httpHandler;
+ private null|false|LoggerInterface $logger;
+
/**
* @param array $options {
* Config options used to construct the gRPC Fallback transport.
@@ -56,6 +59,8 @@ class GrpcFallbackTransportOptions implements ArrayAccess
* A callable which returns the client cert as a string.
* @type callable $httpHandler
* A handler used to deliver PSR-7 requests.
+ * @type null|false|LoggerInterface
+ * A PSR-3 logger interface instance.
* }
*/
public function __construct(array $options)
@@ -72,6 +77,7 @@ private function fromArray(array $arr): void
{
$this->setClientCertSource($arr['clientCertSource'] ?? null);
$this->setHttpHandler($arr['httpHandler'] ?? null);
+ $this->setLogger($arr['logger'] ?? null);
}
public function setHttpHandler(?callable $httpHandler)
@@ -92,4 +98,12 @@ public function setClientCertSource(?callable $clientCertSource)
}
$this->clientCertSource = $clientCertSource;
}
+
+ /**
+ * @param null|false|LoggerInterface $logger
+ */
+ public function setLogger(null|false|LoggerInterface $logger)
+ {
+ $this->logger = $logger;
+ }
}
diff --git a/lib/Google/vendor/google/gax/src/Options/TransportOptions/GrpcTransportOptions.php b/lib/Google/vendor/google/gax/src/Options/TransportOptions/GrpcTransportOptions.php
index 3a7d45015..65fdda5fe 100644
--- a/lib/Google/vendor/google/gax/src/Options/TransportOptions/GrpcTransportOptions.php
+++ b/lib/Google/vendor/google/gax/src/Options/TransportOptions/GrpcTransportOptions.php
@@ -38,6 +38,7 @@
use Google\ApiCore\Transport\Grpc\UnaryInterceptorInterface;
use Grpc\Channel;
use Grpc\Interceptor;
+use Psr\Log\LoggerInterface;
/**
* The GrpcTransportOptions class provides typing to the associative array of options used to
@@ -51,6 +52,8 @@ class GrpcTransportOptions implements ArrayAccess
private ?Channel $channel;
+ private null|false|LoggerInterface $logger;
+
/**
* @var Interceptor[]|UnaryInterceptorInterface[]
*/
@@ -74,6 +77,7 @@ class GrpcTransportOptions implements ArrayAccess
* `UnaryInterceptorInterface` implementations over to a class which
* extends {@see Grpc\Interceptor}.
* @type callable $clientCertSource A callable which returns the client cert as a string.
+ * @type null|false|LoggerInterface A PSR-3 Logger Interface.
* }
*/
public function __construct(array $options)
@@ -92,6 +96,7 @@ private function fromArray(array $arr): void
$this->setChannel($arr['channel'] ?? null);
$this->setInterceptors($arr['interceptors'] ?? []);
$this->setClientCertSource($arr['clientCertSource'] ?? null);
+ $this->setLogger($arr['logger'] ?? null);
}
/**
@@ -128,4 +133,12 @@ public function setClientCertSource(?callable $clientCertSource)
}
$this->clientCertSource = $clientCertSource;
}
+
+ /**
+ * @param null|false|LoggerInterface $logger
+ */
+ public function setLogger(null|false|LoggerInterface $logger)
+ {
+ $this->logger = $logger;
+ }
}
diff --git a/lib/Google/vendor/google/gax/src/Options/TransportOptions/RestTransportOptions.php b/lib/Google/vendor/google/gax/src/Options/TransportOptions/RestTransportOptions.php
index 4bb4b53f8..0f0fd3a92 100644
--- a/lib/Google/vendor/google/gax/src/Options/TransportOptions/RestTransportOptions.php
+++ b/lib/Google/vendor/google/gax/src/Options/TransportOptions/RestTransportOptions.php
@@ -35,6 +35,7 @@
use ArrayAccess;
use Closure;
use Google\ApiCore\Options\OptionsTrait;
+use Psr\Log\LoggerInterface;
/**
* The RestTransportOptions class provides typing to the associative array of options used to
@@ -50,6 +51,8 @@ class RestTransportOptions implements ArrayAccess
private ?string $restClientConfigPath;
+ private null|false|LoggerInterface $logger;
+
/**
* @param array $options {
* Config options used to construct the REST transport.
@@ -60,6 +63,8 @@ class RestTransportOptions implements ArrayAccess
* A callable which returns the client cert as a string.
* @type string $restClientConfigPath
* The path to the REST client config file.
+ * @typo null|false|LoggerInterface
+ * A PSR-3 compliant logger instance.
* }
*/
public function __construct(array $options)
@@ -77,6 +82,7 @@ private function fromArray(array $arr): void
$this->setHttpHandler($arr['httpHandler'] ?? null);
$this->setClientCertSource($arr['clientCertSource'] ?? null);
$this->setRestClientConfigPath($arr['restClientConfigPath'] ?? null);
+ $this->setLogger($arr['logger'] ?? null);
}
/**
@@ -108,4 +114,12 @@ public function setRestClientConfigPath(?string $restClientConfigPath)
{
$this->restClientConfigPath = $restClientConfigPath;
}
+
+ /**
+ * @param null|false|LoggerInterface $logger
+ */
+ public function setLogger(null|false|LoggerInterface $logger)
+ {
+ $this->logger = $logger;
+ }
}
diff --git a/lib/Google/vendor/google/gax/src/RetrySettings.php b/lib/Google/vendor/google/gax/src/RetrySettings.php
index 94bb6f189..0ca128848 100644
--- a/lib/Google/vendor/google/gax/src/RetrySettings.php
+++ b/lib/Google/vendor/google/gax/src/RetrySettings.php
@@ -77,7 +77,7 @@
* RetrySettings objects can be used to control retries for many RPC methods in
* [google-cloud-php](https://github.com/googleapis/google-cloud-php).
* The examples below make use of the
- * [GroupServiceClient](https://googleapis.github.io/google-cloud-php/#/docs/google-cloud/monitoring/v3/groupserviceclient)
+ * [GroupServiceClient](https://cloud.google.com/php/docs/reference/cloud-monitoring/latest/V3.Client.GroupServiceClient)
* from the [Monitoring V3 API](https://github.com/googleapis/google-cloud-php/tree/master/src/Monitoring/V3),
* but they can be applied to other APIs in the
* [google-cloud-php](https://github.com/googleapis/google-cloud-php) repository.
@@ -88,7 +88,7 @@
* the particular retry parameters to be updated.
*
* Example of disabling retries for a single call to the
- * [listGroups](https://googleapis.github.io/google-cloud-php/#/docs/google-cloud/monitoring/v3/groupserviceclient?method=listGroups)
+ * [listGroups](https://cloud.google.com/php/docs/reference/cloud-monitoring/latest/V3.Client.GroupServiceClient#_Google_Cloud_Monitoring_V3_Client_GroupServiceClient__listGroups__)
* method, and setting a custom timeout:
* ```
* $result = $client->listGroups($name, [
@@ -101,7 +101,7 @@
*
* Example of creating a new RetrySettings object and using it to override
* the retry settings for a call to the
- * [listGroups](https://googleapis.github.io/google-cloud-php/#/docs/google-cloud/monitoring/v3/groupserviceclient?method=listGroups)
+ * [listGroups](https://cloud.google.com/php/docs/reference/cloud-monitoring/latest/V3.Client.GroupServiceClient#_Google_Cloud_Monitoring_V3_Client_GroupServiceClient__listGroups__)
* method:
* ```
* $customRetrySettings = new RetrySettings([
@@ -126,8 +126,8 @@
* It is also possible to specify the retry behavior for RPC methods when
* constructing a client object using the 'retrySettingsArray'. The examples
* below again make use of the
- * [GroupServiceClient](https://googleapis.github.io/google-cloud-php/#/docs/google-cloud/monitoring/v3/groupserviceclient)
- * from the [Monitoring V3 API](https://github.com/googleapis/google-cloud-php/tree/master/src/Monitoring/V3),
+ * [GroupServiceClient](https://cloud.google.com/php/docs/reference/cloud-monitoring/latest/V3.Client.GroupServiceClient)
+ * from the [Monitoring V3 API](https://github.com/googleapis/google-cloud-php/tree/main/Monitoring/src/V3),
* but they can be applied to other APIs in the
* [google-cloud-php](https://github.com/googleapis/google-cloud-php) repository.
*
diff --git a/lib/Google/vendor/google/gax/src/Serializer.php b/lib/Google/vendor/google/gax/src/Serializer.php
index 8c1047ee1..a4e404dda 100644
--- a/lib/Google/vendor/google/gax/src/Serializer.php
+++ b/lib/Google/vendor/google/gax/src/Serializer.php
@@ -344,7 +344,7 @@ private function encodeMessageImpl(Message $message, Descriptor $messageType)
$arr[$this->encodeElement($keyField, $k)] = $this->encodeElement($valueField, $vv);
}
$v = $arr;
- } elseif ($field->getLabel() === GPBLabel::REPEATED) {
+ } elseif ($this->checkFieldRepeated($field)) {
$arr = [];
foreach ($v as $k => $vv) {
$arr[$k] = $this->encodeElement($field, $vv);
@@ -427,7 +427,7 @@ private function decodeMessageImpl(Message $message, Descriptor $messageType, ar
$arr[$this->decodeElement($keyField, $k)] = $this->decodeElement($valueField, $vv);
}
$value = $arr;
- } elseif ($field->getLabel() === GPBLabel::REPEATED) {
+ } elseif ($this->checkFieldRepeated($field)) {
$arr = [];
foreach ($v as $k => $vv) {
$arr[$k] = $this->decodeElement($field, $vv);
@@ -447,6 +447,17 @@ private function decodeMessageImpl(Message $message, Descriptor $messageType, ar
return $message;
}
+ /**
+ * @param FieldDescriptor $field
+ * @return bool
+ */
+ private function checkFieldRepeated(FieldDescriptor $field): bool
+ {
+ return method_exists($field, 'isRepeated')
+ ? $field->isRepeated()
+ : $field->getLabel() === GPBLabel::REPEATED;
+ }
+
/**
* @param string $name
* @return string Getter function
diff --git a/lib/Google/vendor/google/gax/src/ServerStream.php b/lib/Google/vendor/google/gax/src/ServerStream.php
index b9c632591..548b6b48c 100644
--- a/lib/Google/vendor/google/gax/src/ServerStream.php
+++ b/lib/Google/vendor/google/gax/src/ServerStream.php
@@ -31,28 +31,40 @@
*/
namespace Google\ApiCore;
+use Google\Auth\Logging\LoggingTrait;
+use Google\Auth\Logging\RpcLogEvent;
+use Google\Protobuf\Internal\Message;
use Google\Rpc\Code;
+use Psr\Log\LoggerInterface;
/**
* ServerStream is the response object from a server streaming API call.
*/
class ServerStream
{
+ use LoggingTrait;
+
private $call;
private $resourcesGetMethod;
+ private null|LoggerInterface $logger;
/**
* ServerStream constructor.
*
* @param ServerStreamingCallInterface $serverStreamingCall The server streaming call object
* @param array $streamingDescriptor
+ * @param null|LoggerInterface $logger A PSR-3 compliant logger.
*/
- public function __construct($serverStreamingCall, array $streamingDescriptor = [])
- {
+ public function __construct(
+ $serverStreamingCall,
+ array $streamingDescriptor = [],
+ null|LoggerInterface $logger = null
+ ) {
$this->call = $serverStreamingCall;
if (array_key_exists('resourcesGetMethod', $streamingDescriptor)) {
$this->resourcesGetMethod = $streamingDescriptor['resourcesGetMethod'];
}
+ $this->logger = $logger;
}
/**
@@ -65,14 +77,21 @@ public function __construct($serverStreamingCall, array $streamingDescriptor = [
public function readAll()
{
$resourcesGetMethod = $this->resourcesGetMethod;
- if (!is_null($resourcesGetMethod)) {
- foreach ($this->call->responses() as $response) {
+ foreach ($this->call->responses() as $response) {
+ if ($this->logger && $response instanceof Message) {
+ $responseEvent = new RpcLogEvent();
+ $responseEvent->payload = $response->serializeToJsonString();
+ $responseEvent->processId = (int) getmypid();
+ $responseEvent->requestId = crc32((string) spl_object_id($this) . getmypid());
+
+ $this->logResponse($responseEvent);
+ }
+
+ if (!is_null($resourcesGetMethod)) {
foreach ($response->$resourcesGetMethod() as $resource) {
yield $resource;
}
- }
- } else {
- foreach ($this->call->responses() as $response) {
+ } else {
yield $response;
}
}
@@ -80,6 +99,16 @@ public function readAll()
// Errors in the REST transport will be thrown from there and not reach
// this handling. Successful REST server-streams will have an OK status.
$status = $this->call->getStatus();
+
+ if ($this->logger) {
+ $statusEvent = new RpcLogEvent();
+ $statusEvent->status = $status->code;
+ $statusEvent->processId = (int) getmypid();
+ $statusEvent->requestId = crc32((string) spl_object_id($this) . getmypid());
+
+ $this->logResponse($statusEvent);
+ }
+
if ($status->code !== Code::OK) {
throw ApiException::createFromStdClass($status);
}
diff --git a/lib/Google/vendor/google/gax/src/Transport/GrpcFallbackTransport.php b/lib/Google/vendor/google/gax/src/Transport/GrpcFallbackTransport.php
index 808c176c7..b248b052e 100644
--- a/lib/Google/vendor/google/gax/src/Transport/GrpcFallbackTransport.php
+++ b/lib/Google/vendor/google/gax/src/Transport/GrpcFallbackTransport.php
@@ -62,7 +62,7 @@ class GrpcFallbackTransport implements TransportInterface
*/
public function __construct(
string $baseUri,
- callable $httpHandler
+ callable $httpHandler,
) {
$this->baseUri = $baseUri;
$this->httpHandler = $httpHandler;
@@ -87,9 +87,10 @@ public static function build(string $apiEndpoint, array $config = [])
$config += [
'httpHandler' => null,
'clientCertSource' => null,
+ 'logger' => null,
];
list($baseUri, $port) = self::normalizeServiceAddress($apiEndpoint);
- $httpHandler = $config['httpHandler'] ?: self::buildHttpHandlerAsync();
+ $httpHandler = $config['httpHandler'] ?: self::buildHttpHandlerAsync(logger: $config['logger']);
$transport = new GrpcFallbackTransport("$baseUri:$port", $httpHandler);
if ($config['clientCertSource']) {
$transport->configureMtlsChannel($config['clientCertSource']);
@@ -103,6 +104,9 @@ public static function build(string $apiEndpoint, array $config = [])
public function startUnaryCall(Call $call, array $options)
{
$httpHandler = $this->httpHandler;
+
+ $options['requestId'] = crc32((string) spl_object_id($call) . getmypid());
+
return $httpHandler(
$this->buildRequest($call, $options),
$this->getCallOptions($options)
@@ -176,6 +180,14 @@ private function getCallOptions(array $options)
$callOptions['timeout'] = $options['timeoutMillis'] / 1000;
}
+ if (isset($options['retryAttempt'])) {
+ $callOptions['retryAttempt'] = $options['retryAttempt'];
+ }
+
+ if (isset($options['requestId'])) {
+ $callOptions['requestId'] = $options['requestId'];
+ }
+
if ($this->clientCertSource) {
list($cert, $key) = self::loadClientCertSource($this->clientCertSource);
$callOptions['cert'] = $cert;
diff --git a/lib/Google/vendor/google/gax/src/Transport/GrpcTransport.php b/lib/Google/vendor/google/gax/src/Transport/GrpcTransport.php
index 816de0c78..ebcbc07b2 100644
--- a/lib/Google/vendor/google/gax/src/Transport/GrpcTransport.php
+++ b/lib/Google/vendor/google/gax/src/Transport/GrpcTransport.php
@@ -44,12 +44,15 @@
use Google\ApiCore\Transport\Grpc\UnaryInterceptorInterface;
use Google\ApiCore\ValidationException;
use Google\ApiCore\ValidationTrait;
+use Google\Auth\Logging\LoggingTrait;
+use Google\Auth\Logging\RpcLogEvent;
use Google\Rpc\Code;
use Grpc\BaseStub;
use Grpc\Channel;
use Grpc\ChannelCredentials;
use Grpc\Interceptor;
use GuzzleHttp\Promise\Promise;
+use Psr\Log\LoggerInterface;
/**
* A gRPC based transport implementation.
@@ -59,6 +62,9 @@ class GrpcTransport extends BaseStub implements TransportInterface
use ValidationTrait;
use GrpcSupportTrait;
use ServiceAddressTrait;
+ use LoggingTrait;
+
+ private null|LoggerInterface $logger;
/**
* @param string $hostname
@@ -75,10 +81,16 @@ class GrpcTransport extends BaseStub implements TransportInterface
* release. To prepare for this, please take the time to convert
* `UnaryInterceptorInterface` implementations over to a class which
* extends {@see Grpc\Interceptor}.
+ * @param null|false|LoggerInterface $logger A PSR-3 Compliant logger.
* @throws Exception
*/
- public function __construct(string $hostname, array $opts, ?Channel $channel = null, array $interceptors = [])
- {
+ public function __construct(
+ string $hostname,
+ array $opts,
+ ?Channel $channel = null,
+ array $interceptors = [],
+ null|false|LoggerInterface $logger = null
+ ) {
if ($interceptors) {
$channel = Interceptor::intercept(
$channel ?: new Channel($hostname, $opts),
@@ -87,6 +99,7 @@ public function __construct(string $hostname, array $opts, ?Channel $channel = n
}
parent::__construct($hostname, $opts, $channel);
+ $this->logger = $logger;
}
/**
@@ -122,6 +135,7 @@ public static function build(string $apiEndpoint, array $config = [])
'channel' => null,
'interceptors' => [],
'clientCertSource' => null,
+ 'logger' => null,
];
list($addr, $port) = self::normalizeServiceAddress($apiEndpoint);
$host = "$addr:$port";
@@ -144,7 +158,10 @@ public static function build(string $apiEndpoint, array $config = [])
);
}
try {
- return new GrpcTransport($host, $stubOpts, $channel, $config['interceptors']);
+ if ($config['logger'] === false) {
+ $config['logger'] = null;
+ }
+ return new GrpcTransport($host, $stubOpts, $channel, $config['interceptors'], $config['logger']);
} catch (Exception $ex) {
throw new ValidationException(
'Failed to build GrpcTransport: ' . $ex->getMessage(),
@@ -168,7 +185,8 @@ public function startBidiStreamingCall(Call $call, array $options)
isset($options['headers']) ? $options['headers'] : [],
$this->getCallOptions($options)
),
- $call->getDescriptor()
+ $call->getDescriptor(),
+ $this->logger
);
}
@@ -187,7 +205,8 @@ public function startClientStreamingCall(Call $call, array $options)
isset($options['headers']) ? $options['headers'] : [],
$this->getCallOptions($options)
),
- $call->getDescriptor()
+ $call->getDescriptor(),
+ $this->logger
);
}
@@ -212,10 +231,28 @@ public function startServerStreamingCall(Call $call, array $options)
isset($options['headers']) ? $options['headers'] : [],
$this->getCallOptions($options)
);
- return new ServerStream(
+
+ $serverStream = new ServerStream(
new ServerStreamingCallWrapper($stream),
- $call->getDescriptor()
+ $call->getDescriptor(),
+ $this->logger
);
+
+ if ($this->logger) {
+ $requestEvent = new RpcLogEvent();
+
+ $requestEvent->headers = $options['headers'];
+ $requestEvent->payload = $call->getMessage()->serializeToJsonString();
+ $requestEvent->retryAttempt = $options['retryAttempt'] ?? null;
+ $requestEvent->serviceName = $options['serviceName'] ?? null;
+ $requestEvent->rpcName = $call->getMethod();
+ $requestEvent->processId = (int) getmypid();
+ $requestEvent->requestId = crc32((string) spl_object_id($serverStream) . getmypid());
+
+ $this->logRequest($requestEvent);
+ }
+
+ return $serverStream;
}
/**
@@ -224,6 +261,8 @@ public function startServerStreamingCall(Call $call, array $options)
public function startUnaryCall(Call $call, array $options)
{
$this->verifyUniverseDomain($options);
+ $headers = $options['headers'] ?? [];
+ $requestEvent = null;
$unaryCall = $this->_simpleRequest(
'/' . $call->getMethod(),
@@ -233,11 +272,37 @@ public function startUnaryCall(Call $call, array $options)
$this->getCallOptions($options)
);
+ if ($this->logger) {
+ $requestEvent = new RpcLogEvent();
+
+ $requestEvent->headers = $headers;
+ $requestEvent->payload = $call->getMessage()->serializeToJsonString();
+ $requestEvent->retryAttempt = $options['retryAttempt'] ?? null;
+ $requestEvent->serviceName = $options['serviceName'] ?? null;
+ $requestEvent->rpcName = $call->getMethod();
+ $requestEvent->processId = (int) getmypid();
+ $requestEvent->requestId = crc32((string) spl_object_id($call) . getmypid());
+
+ $this->logRequest($requestEvent);
+ }
+
/** @var Promise $promise */
$promise = new Promise(
- function () use ($unaryCall, $options, &$promise) {
+ function () use ($unaryCall, $options, &$promise, $requestEvent) {
list($response, $status) = $unaryCall->wait();
+ if ($this->logger) {
+ $responseEvent = new RpcLogEvent($requestEvent->milliseconds);
+
+ $responseEvent->headers = $status->metadata;
+ $responseEvent->payload = ($response) ? $response->serializeToJsonString() : null;
+ $responseEvent->status = $status->code;
+ $responseEvent->processId = $requestEvent->processId;
+ $responseEvent->requestId = $requestEvent->requestId;
+
+ $this->logResponse($responseEvent);
+ }
+
if ($status->code == Code::OK) {
if (isset($options['metadataCallback'])) {
$metadataCallback = $options['metadataCallback'];
diff --git a/lib/Google/vendor/google/gax/src/Transport/HttpUnaryTransportTrait.php b/lib/Google/vendor/google/gax/src/Transport/HttpUnaryTransportTrait.php
index fd082d5b3..38c4ca1f5 100644
--- a/lib/Google/vendor/google/gax/src/Transport/HttpUnaryTransportTrait.php
+++ b/lib/Google/vendor/google/gax/src/Transport/HttpUnaryTransportTrait.php
@@ -35,6 +35,7 @@
use Google\ApiCore\Call;
use Google\ApiCore\ValidationException;
use Google\Auth\HttpHandler\HttpHandlerFactory;
+use Psr\Log\LoggerInterface;
/**
* A trait for shared functionality between transports that support only unary RPCs using simple
@@ -126,10 +127,10 @@ private static function buildCommonHeaders(array $options)
* @return callable
* @throws ValidationException
*/
- private static function buildHttpHandlerAsync()
+ private static function buildHttpHandlerAsync(null|false|LoggerInterface $logger = null)
{
try {
- return [HttpHandlerFactory::build(), 'async'];
+ return [HttpHandlerFactory::build(logger: $logger), 'async'];
} catch (Exception $ex) {
throw new ValidationException('Failed to build HttpHandler', $ex->getCode(), $ex);
}
diff --git a/lib/Google/vendor/google/gax/src/Transport/RestTransport.php b/lib/Google/vendor/google/gax/src/Transport/RestTransport.php
index 39ef012ba..296937fa4 100644
--- a/lib/Google/vendor/google/gax/src/Transport/RestTransport.php
+++ b/lib/Google/vendor/google/gax/src/Transport/RestTransport.php
@@ -95,12 +95,13 @@ public static function build(string $apiEndpoint, string $restConfigPath, array
'httpHandler' => null,
'clientCertSource' => null,
'hasEmulator' => false,
+ 'logger' => null,
];
list($baseUri, $port) = self::normalizeServiceAddress($apiEndpoint);
$requestBuilder = $config['hasEmulator']
? new InsecureRequestBuilder("$baseUri:$port", $restConfigPath)
: new RequestBuilder("$baseUri:$port", $restConfigPath);
- $httpHandler = $config['httpHandler'] ?: self::buildHttpHandlerAsync();
+ $httpHandler = $config['httpHandler'] ?: self::buildHttpHandlerAsync($config['logger']);
$transport = new RestTransport($requestBuilder, $httpHandler);
if ($config['clientCertSource']) {
$transport->configureMtlsChannel($config['clientCertSource']);
@@ -115,6 +116,9 @@ public function startUnaryCall(Call $call, array $options)
{
$headers = self::buildCommonHeaders($options);
+ // Add the $call object ID for logging
+ $options['requestId'] = crc32((string) spl_object_id($call) . getmypid());
+
// call the HTTP handler
$httpHandler = $this->httpHandler;
return $httpHandler(
@@ -266,6 +270,14 @@ private function getCallOptions(array $options)
$callOptions['key'] = $key;
}
+ if (isset($options['retryAttempt'])) {
+ $callOptions['retryAttempt'] = $options['retryAttempt'];
+ }
+
+ if (isset($options['requestId'])) {
+ $callOptions['requestId'] = $options['requestId'];
+ }
+
return $callOptions;
}
}
diff --git a/lib/Google/vendor/google/longrunning/.gitattributes b/lib/Google/vendor/google/longrunning/.gitattributes
new file mode 100644
index 000000000..f51251a9b
--- /dev/null
+++ b/lib/Google/vendor/google/longrunning/.gitattributes
@@ -0,0 +1,6 @@
+/*.xml.dist export-ignore
+/tests export-ignore
+/.github export-ignore
+/.OwlBot.yaml export-ignore
+/owlbot.py export-ignore
+/src/**/gapic_metadata.json export-ignore
diff --git a/lib/Google/vendor/google/longrunning/VERSION b/lib/Google/vendor/google/longrunning/VERSION
index f90568270..a918a2aa1 100644
--- a/lib/Google/vendor/google/longrunning/VERSION
+++ b/lib/Google/vendor/google/longrunning/VERSION
@@ -1 +1 @@
-0.4.7
+0.6.0
diff --git a/lib/Google/vendor/google/longrunning/composer.json b/lib/Google/vendor/google/longrunning/composer.json
index df405a30d..70838557a 100644
--- a/lib/Google/vendor/google/longrunning/composer.json
+++ b/lib/Google/vendor/google/longrunning/composer.json
@@ -3,7 +3,7 @@
"description": "Google LongRunning Client for PHP",
"license": "Apache-2.0",
"minimum-stability": "stable",
- "version": "0.4.7",
+ "version": "0.6.0",
"autoload": {
"psr-4": {
"Google\\ApiCore\\LongRunning\\": "src/ApiCore/LongRunning",
@@ -20,7 +20,7 @@
}
},
"require-dev": {
- "google/gax": "^1.36.0",
+ "google/gax": "^1.38.0",
"phpunit/phpunit": "^9.0"
}
}
diff --git a/lib/Google/vendor/google/longrunning/metadata/Longrunning/Operations.php b/lib/Google/vendor/google/longrunning/metadata/Longrunning/Operations.php
index 0dcf976e5..3dd611b68 100644
Binary files a/lib/Google/vendor/google/longrunning/metadata/Longrunning/Operations.php and b/lib/Google/vendor/google/longrunning/metadata/Longrunning/Operations.php differ
diff --git a/lib/Google/vendor/google/longrunning/src/LongRunning/Client/OperationsClient.php b/lib/Google/vendor/google/longrunning/src/LongRunning/Client/OperationsClient.php
index b5f5acafd..ea8662350 100644
--- a/lib/Google/vendor/google/longrunning/src/LongRunning/Client/OperationsClient.php
+++ b/lib/Google/vendor/google/longrunning/src/LongRunning/Client/OperationsClient.php
@@ -27,6 +27,7 @@
use Google\ApiCore\ApiException;
use Google\ApiCore\CredentialsWrapper;
use Google\ApiCore\GapicClientTrait;
+use Google\ApiCore\Options\ClientOptions;
use Google\ApiCore\PagedListResponse;
use Google\ApiCore\RetrySettings;
use Google\ApiCore\Transport\TransportInterface;
@@ -109,25 +110,28 @@ private static function getClientDefaults()
/**
* Constructor.
*
- * @param array $options {
+ * @param array|ClientOptions $options {
* Optional. Options for configuring the service API wrapper.
*
* @type string $apiEndpoint
* The address of the API remote host. May optionally include the port, formatted
* as ":". Default 'longrunning.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * *Important*: If you accept a credential configuration (credential
- * JSON/File/Stream) from an external source for authentication to Google Cloud
- * Platform, you must validate it before providing it to any Google API or library.
- * Providing an unvalidated credential configuration to Google APIs can compromise
- * the security of your systems and data. For more information {@see
+ * @type FetchAuthTokenInterface|CredentialsWrapper $credentials
+ * This option should only be used with a pre-constructed
+ * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that
+ * when one of these objects are provided, any settings in $credentialsConfig will
+ * be ignored.
+ * **Important**: If you are providing a path to a credentials file, or a decoded
+ * credentials file as a PHP array, this usage is now DEPRECATED. Providing an
+ * unvalidated credential configuration to Google APIs can compromise the security
+ * of your systems and data. It is recommended to create the credentials explicitly
+ * ```
+ * use Google\Auth\Credentials\ServiceAccountCredentials;
+ * use Google\LongRunning\OperationsClient;
+ * $creds = new ServiceAccountCredentials($scopes, $json);
+ * $options = new OperationsClient(['credentials' => $creds]);
+ * ```
+ * {@see
* https://cloud.google.com/docs/authentication/external/externally-sourced-credentials}
* @type array $credentialsConfig
* Options used to configure credentials, including auth token caching, for the
@@ -165,11 +169,13 @@ private static function getClientDefaults()
* @type false|LoggerInterface $logger
* A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
* 'GOOGLE_SDK_PHP_LOGGING' environment flag
+ * @type string $universeDomain
+ * The service domain for the client. Defaults to 'googleapis.com'.
* }
*
* @throws ValidationException
*/
- public function __construct(array $options = [])
+ public function __construct(array|ClientOptions $options = [])
{
$clientOptions = $this->buildClientOptions($options);
$this->setClientOptions($clientOptions);
diff --git a/lib/Google/vendor/google/longrunning/src/LongRunning/Gapic/OperationsGapicClient.php b/lib/Google/vendor/google/longrunning/src/LongRunning/Gapic/OperationsGapicClient.php
index 3c31a4fda..4185fb84d 100644
--- a/lib/Google/vendor/google/longrunning/src/LongRunning/Gapic/OperationsGapicClient.php
+++ b/lib/Google/vendor/google/longrunning/src/LongRunning/Gapic/OperationsGapicClient.php
@@ -376,6 +376,17 @@ public function getOperation($name, array $optionalArgs = [])
* If no page token is specified (the default), the first page
* of values will be returned. Any page token used here must have
* been generated by a previous call to the API.
+ * @type bool $returnPartialSuccess
+ * When set to `true`, operations that are reachable are returned as normal,
+ * and those that are unreachable are returned in the
+ * [ListOperationsResponse.unreachable] field.
+ *
+ * This can only be `true` when reading across collections e.g. when `parent`
+ * is set to `"projects/example/locations/-"`.
+ *
+ * This field is not by default supported and will result in an
+ * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
+ * service or product specific documentation.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
@@ -401,6 +412,12 @@ public function listOperations($name, $filter, array $optionalArgs = [])
$request->setPageToken($optionalArgs['pageToken']);
}
+ if (isset($optionalArgs['returnPartialSuccess'])) {
+ $request->setReturnPartialSuccess(
+ $optionalArgs['returnPartialSuccess']
+ );
+ }
+
$requestParams = new RequestParamsHeaderDescriptor(
$requestParamHeaders
);
diff --git a/lib/Google/vendor/google/longrunning/src/LongRunning/ListOperationsRequest.php b/lib/Google/vendor/google/longrunning/src/LongRunning/ListOperationsRequest.php
index 08049d248..f1d7ea3da 100644
--- a/lib/Google/vendor/google/longrunning/src/LongRunning/ListOperationsRequest.php
+++ b/lib/Google/vendor/google/longrunning/src/LongRunning/ListOperationsRequest.php
@@ -40,6 +40,19 @@ class ListOperationsRequest extends \Google\Protobuf\Internal\Message
* Generated from protobuf field string page_token = 3;
*/
private $page_token = '';
+ /**
+ * When set to `true`, operations that are reachable are returned as normal,
+ * and those that are unreachable are returned in the
+ * [ListOperationsResponse.unreachable] field.
+ * This can only be `true` when reading across collections e.g. when `parent`
+ * is set to `"projects/example/locations/-"`.
+ * This field is not by default supported and will result in an
+ * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
+ * service or product specific documentation.
+ *
+ * Generated from protobuf field bool return_partial_success = 5;
+ */
+ private $return_partial_success = false;
/**
* @param string $name The name of the operation's parent resource.
@@ -70,6 +83,15 @@ public static function build(string $name, string $filter): self
* The standard list page size.
* @type string $page_token
* The standard list page token.
+ * @type bool $return_partial_success
+ * When set to `true`, operations that are reachable are returned as normal,
+ * and those that are unreachable are returned in the
+ * [ListOperationsResponse.unreachable] field.
+ * This can only be `true` when reading across collections e.g. when `parent`
+ * is set to `"projects/example/locations/-"`.
+ * This field is not by default supported and will result in an
+ * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
+ * service or product specific documentation.
* }
*/
public function __construct($data = NULL) {
@@ -181,5 +203,45 @@ public function setPageToken($var)
return $this;
}
+ /**
+ * When set to `true`, operations that are reachable are returned as normal,
+ * and those that are unreachable are returned in the
+ * [ListOperationsResponse.unreachable] field.
+ * This can only be `true` when reading across collections e.g. when `parent`
+ * is set to `"projects/example/locations/-"`.
+ * This field is not by default supported and will result in an
+ * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
+ * service or product specific documentation.
+ *
+ * Generated from protobuf field bool return_partial_success = 5;
+ * @return bool
+ */
+ public function getReturnPartialSuccess()
+ {
+ return $this->return_partial_success;
+ }
+
+ /**
+ * When set to `true`, operations that are reachable are returned as normal,
+ * and those that are unreachable are returned in the
+ * [ListOperationsResponse.unreachable] field.
+ * This can only be `true` when reading across collections e.g. when `parent`
+ * is set to `"projects/example/locations/-"`.
+ * This field is not by default supported and will result in an
+ * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
+ * service or product specific documentation.
+ *
+ * Generated from protobuf field bool return_partial_success = 5;
+ * @param bool $var
+ * @return $this
+ */
+ public function setReturnPartialSuccess($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->return_partial_success = $var;
+
+ return $this;
+ }
+
}
diff --git a/lib/Google/vendor/google/longrunning/src/LongRunning/ListOperationsResponse.php b/lib/Google/vendor/google/longrunning/src/LongRunning/ListOperationsResponse.php
index 4fd271861..f4ad922bd 100644
--- a/lib/Google/vendor/google/longrunning/src/LongRunning/ListOperationsResponse.php
+++ b/lib/Google/vendor/google/longrunning/src/LongRunning/ListOperationsResponse.php
@@ -28,6 +28,15 @@ class ListOperationsResponse extends \Google\Protobuf\Internal\Message
* Generated from protobuf field string next_page_token = 2;
*/
private $next_page_token = '';
+ /**
+ * Unordered list. Unreachable resources. Populated when the request sets
+ * `ListOperationsRequest.return_partial_success` and reads across
+ * collections e.g. when attempting to list all resources across all supported
+ * locations.
+ *
+ * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST];
+ */
+ private $unreachable;
/**
* Constructor.
@@ -39,6 +48,11 @@ class ListOperationsResponse extends \Google\Protobuf\Internal\Message
* A list of operations that matches the specified filter in the request.
* @type string $next_page_token
* The standard List next-page token.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Unordered list. Unreachable resources. Populated when the request sets
+ * `ListOperationsRequest.return_partial_success` and reads across
+ * collections e.g. when attempting to list all resources across all supported
+ * locations.
* }
*/
public function __construct($data = NULL) {
@@ -98,5 +112,37 @@ public function setNextPageToken($var)
return $this;
}
+ /**
+ * Unordered list. Unreachable resources. Populated when the request sets
+ * `ListOperationsRequest.return_partial_success` and reads across
+ * collections e.g. when attempting to list all resources across all supported
+ * locations.
+ *
+ * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Unordered list. Unreachable resources. Populated when the request sets
+ * `ListOperationsRequest.return_partial_success` and reads across
+ * collections e.g. when attempting to list all resources across all supported
+ * locations.
+ *
+ * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUnreachable($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->unreachable = $arr;
+
+ return $this;
+ }
+
}
diff --git a/lib/Google/vendor/grpc/grpc/composer.json b/lib/Google/vendor/grpc/grpc/composer.json
index 755ea4bea..a585b40eb 100644
--- a/lib/Google/vendor/grpc/grpc/composer.json
+++ b/lib/Google/vendor/grpc/grpc/composer.json
@@ -5,7 +5,7 @@
"keywords": ["rpc"],
"homepage": "https://grpc.io",
"license": "Apache-2.0",
- "version": "1.57.0",
+ "version": "1.74.0",
"require": {
"php": ">=7.0.0"
},
diff --git a/lib/Google/vendor/grpc/grpc/src/lib/BaseStub.php b/lib/Google/vendor/grpc/grpc/src/lib/BaseStub.php
index d9da4ca1a..97d0b2474 100644
--- a/lib/Google/vendor/grpc/grpc/src/lib/BaseStub.php
+++ b/lib/Google/vendor/grpc/grpc/src/lib/BaseStub.php
@@ -228,7 +228,7 @@ private function _get_jwt_aud_uri($method)
}
// Remove the port if it is 443
- // See https://github.com/grpc/grpc/blob/07c9f7a36b2a0d34fcffebc85649cf3b8c339b5d/src/core/lib/security/transport/client_auth_filter.cc#L205
+ // See https://github.com/grpc/grpc/blob/07c9f7a36b2a0d34fcffebc85649cf3b8c339b5d/src/core/filter/auth/client_auth_filter.cc#L205
if ((strlen($hostname) > 4) && (substr($hostname, -4) === ":443")) {
$hostname = substr($hostname, 0, -4);
}
diff --git a/lib/Google/vendor/grpc/grpc/src/lib/ServerCallWriter.php b/lib/Google/vendor/grpc/grpc/src/lib/ServerCallWriter.php
index aceb20c38..40fbe995d 100644
--- a/lib/Google/vendor/grpc/grpc/src/lib/ServerCallWriter.php
+++ b/lib/Google/vendor/grpc/grpc/src/lib/ServerCallWriter.php
@@ -81,7 +81,7 @@ public function finish(
private function addSendInitialMetadataOpIfNotSent(
array &$batch,
- array $initialMetadata = null
+ ?array $initialMetadata = null
) {
if (!$this->initialMetadataSent_) {
$batch[OP_SEND_INITIAL_METADATA] = $initialMetadata ?? [];
diff --git a/lib/Google/vendor/grpc/grpc/src/lib/Status.php b/lib/Google/vendor/grpc/grpc/src/lib/Status.php
index add208f6d..d47480fa8 100644
--- a/lib/Google/vendor/grpc/grpc/src/lib/Status.php
+++ b/lib/Google/vendor/grpc/grpc/src/lib/Status.php
@@ -32,7 +32,7 @@
*/
class Status
{
- public static function status(int $code, string $details, array $metadata = null): array
+ public static function status(int $code, string $details, ?array $metadata = null): array
{
$status = [
'code' => $code,
@@ -44,7 +44,7 @@ public static function status(int $code, string $details, array $metadata = null
return $status;
}
- public static function ok(array $metadata = null): array
+ public static function ok(?array $metadata = null): array
{
return Status::status(STATUS_OK, 'OK', $metadata);
}
diff --git a/lib/Google/vendor/grpc/grpc/src/lib/UnaryCall.php b/lib/Google/vendor/grpc/grpc/src/lib/UnaryCall.php
index e8496492b..4b7180fba 100644
--- a/lib/Google/vendor/grpc/grpc/src/lib/UnaryCall.php
+++ b/lib/Google/vendor/grpc/grpc/src/lib/UnaryCall.php
@@ -22,6 +22,8 @@
/**
* Represents an active call that sends a single message and then gets a
* single response.
+ *
+ * @template T of \Google\Protobuf\Internal\Message
*/
class UnaryCall extends AbstractCall
{
@@ -50,7 +52,7 @@ public function start($data, array $metadata = [], array $options = [])
/**
* Wait for the server to respond with data and a status.
*
- * @return array [response data, status]
+ * @return array{0: T|null, 1: \stdClass} [response data, status]
*/
public function wait()
{
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/CHANGELOG.md b/lib/Google/vendor/guzzlehttp/guzzle/CHANGELOG.md
index 7600ef497..5fe721e03 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/CHANGELOG.md
+++ b/lib/Google/vendor/guzzlehttp/guzzle/CHANGELOG.md
@@ -2,6 +2,17 @@
Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
+## 7.10.0 - 2025-08-23
+
+### Added
+
+- Support for PHP 8.5
+
+### Changed
+
+- Adjusted `guzzlehttp/promises` version constraint to `^2.3`
+- Adjusted `guzzlehttp/psr7` version constraint to `^2.8`
+
## 7.9.3 - 2025-03-27
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/composer.json b/lib/Google/vendor/guzzlehttp/guzzle/composer.json
index cbede149a..0db75a950 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/composer.json
+++ b/lib/Google/vendor/guzzlehttp/guzzle/composer.json
@@ -81,8 +81,8 @@
"require": {
"php": "^7.2.5 || ^8.0",
"ext-json": "*",
- "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
- "guzzlehttp/psr7": "^2.7.0",
+ "guzzlehttp/promises": "^2.3",
+ "guzzlehttp/psr7": "^2.8",
"psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0"
},
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php b/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
index fe3613751..3c1fa9c13 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
@@ -125,7 +125,9 @@ public function release(EasyHandle $easy): void
unset($easy->handle);
if (\count($this->handles) >= $this->maxHandles) {
- \curl_close($resource);
+ if (PHP_VERSION_ID < 80000) {
+ \curl_close($resource);
+ }
} else {
// Remove all callback functions as they can hold onto references
// and are not cleaned up by curl_reset. Using curl_setopt_array
@@ -729,7 +731,10 @@ private function createHeaderFn(EasyHandle $easy): callable
public function __destruct()
{
foreach ($this->handles as $id => $handle) {
- \curl_close($handle);
+ if (PHP_VERSION_ID < 80000) {
+ \curl_close($handle);
+ }
+
unset($this->handles[$id]);
}
}
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
index 73a6abe33..21abbedf3 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
@@ -240,7 +240,10 @@ private function cancel($id): bool
$handle = $this->handles[$id]['easy']->handle;
unset($this->delays[$id], $this->handles[$id]);
\curl_multi_remove_handle($this->_mh, $handle);
- \curl_close($handle);
+
+ if (PHP_VERSION_ID < 80000) {
+ \curl_close($handle);
+ }
return true;
}
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php b/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
index 083049ea8..f24921f47 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
@@ -333,8 +333,15 @@ static function () use ($context, $params) {
);
return $this->createResource(
- function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) {
+ function () use ($uri, $contextResource, $context, $options, $request) {
$resource = @\fopen((string) $uri, 'r', false, $contextResource);
+
+ // See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable
+ if (function_exists('http_get_last_response_headers')) {
+ /** @var array|null */
+ $http_response_header = \http_get_last_response_headers();
+ }
+
$this->lastHeaders = $http_response_header ?? [];
if (false === $resource) {
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/Middleware.php b/lib/Google/vendor/guzzlehttp/guzzle/src/Middleware.php
index 6edbb3fe4..9901da44a 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/Middleware.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/Middleware.php
@@ -187,12 +187,12 @@ public static function retry(callable $decider, ?callable $delay = null): callab
* Middleware that logs requests, responses, and errors using a message
* formatter.
*
- * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.
- *
* @param LoggerInterface $logger Logs messages.
* @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings.
* @param string $logLevel Level at which to log requests.
*
+ * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.
+ *
* @return callable Returns a function that accepts the next handler.
*/
public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info'): callable
diff --git a/lib/Google/vendor/guzzlehttp/promises/CHANGELOG.md b/lib/Google/vendor/guzzlehttp/promises/CHANGELOG.md
index 1d8045032..7df9c0ae6 100644
--- a/lib/Google/vendor/guzzlehttp/promises/CHANGELOG.md
+++ b/lib/Google/vendor/guzzlehttp/promises/CHANGELOG.md
@@ -1,6 +1,13 @@
# CHANGELOG
+## 2.3.0 - 2025-08-22
+
+### Added
+
+- PHP 8.5 support
+
+
## 2.2.0 - 2025-03-27
### Fixed
diff --git a/lib/Google/vendor/guzzlehttp/promises/README.md b/lib/Google/vendor/guzzlehttp/promises/README.md
index d1c814fe7..493a9315b 100644
--- a/lib/Google/vendor/guzzlehttp/promises/README.md
+++ b/lib/Google/vendor/guzzlehttp/promises/README.md
@@ -41,7 +41,7 @@ composer require guzzlehttp/promises
| Version | Status | PHP Version |
|---------|---------------------|--------------|
| 1.x | Security fixes only | >=5.5,<8.3 |
-| 2.x | Latest | >=7.2.5,<8.5 |
+| 2.x | Latest | >=7.2.5,<8.6 |
## Quick Start
diff --git a/lib/Google/vendor/guzzlehttp/promises/composer.json b/lib/Google/vendor/guzzlehttp/promises/composer.json
index f64ed7714..9d6e85678 100644
--- a/lib/Google/vendor/guzzlehttp/promises/composer.json
+++ b/lib/Google/vendor/guzzlehttp/promises/composer.json
@@ -30,7 +30,7 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
- "phpunit/phpunit": "^8.5.39 || ^9.6.20"
+ "phpunit/phpunit": "^8.5.44 || ^9.6.25"
},
"autoload": {
"psr-4": {
diff --git a/lib/Google/vendor/guzzlehttp/psr7/CHANGELOG.md b/lib/Google/vendor/guzzlehttp/psr7/CHANGELOG.md
index a85929521..4a2a12194 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/CHANGELOG.md
+++ b/lib/Google/vendor/guzzlehttp/psr7/CHANGELOG.md
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## 2.8.0 - 2025-08-23
+
+### Added
+
+- Allow empty lists as header values
+
+### Changed
+
+- PHP 8.5 support
+
## 2.7.1 - 2025-03-27
### Fixed
diff --git a/lib/Google/vendor/guzzlehttp/psr7/README.md b/lib/Google/vendor/guzzlehttp/psr7/README.md
index 2e9bb0b9b..24aad8605 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/README.md
+++ b/lib/Google/vendor/guzzlehttp/psr7/README.md
@@ -25,7 +25,7 @@ composer require guzzlehttp/psr7
| Version | Status | PHP Version |
|---------|---------------------|--------------|
| 1.x | EOL (2024-06-30) | >=5.4,<8.2 |
-| 2.x | Latest | >=7.2.5,<8.5 |
+| 2.x | Latest | >=7.2.5,<8.6 |
## AppendStream
diff --git a/lib/Google/vendor/guzzlehttp/psr7/composer.json b/lib/Google/vendor/guzzlehttp/psr7/composer.json
index 28d15f571..96098f536 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/composer.json
+++ b/lib/Google/vendor/guzzlehttp/psr7/composer.json
@@ -62,7 +62,7 @@
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "0.9.0",
- "phpunit/phpunit": "^8.5.39 || ^9.6.20"
+ "phpunit/phpunit": "^8.5.44 || ^9.6.25"
},
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/MessageTrait.php b/lib/Google/vendor/guzzlehttp/psr7/src/MessageTrait.php
index 65dbc4ba0..c15ee63fc 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/MessageTrait.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/MessageTrait.php
@@ -174,10 +174,6 @@ private function normalizeHeaderValue($value): array
return $this->trimAndValidateHeaderValues([$value]);
}
- if (count($value) === 0) {
- throw new \InvalidArgumentException('Header value can not be an empty array.');
- }
-
return $this->trimAndValidateHeaderValues($value);
}
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/Utils.php b/lib/Google/vendor/guzzlehttp/psr7/src/Utils.php
index 7682d2cdc..5451e3dcd 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/Utils.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/Utils.php
@@ -397,7 +397,7 @@ public static function tryFopen(string $filename, string $mode)
restore_error_handler();
if ($ex) {
- /** @var $ex \RuntimeException */
+ /** @var \RuntimeException $ex */
throw $ex;
}
@@ -444,7 +444,7 @@ public static function tryGetContents($stream): string
restore_error_handler();
if ($ex) {
- /** @var $ex \RuntimeException */
+ /** @var \RuntimeException $ex */
throw $ex;
}
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/composer.json b/lib/Google/vendor/paragonie/constant_time_encoding/composer.json
index 5023095b4..11fad5e63 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/composer.json
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/composer.json
@@ -40,8 +40,10 @@
"php": "^8"
},
"require-dev": {
- "phpunit/phpunit": "^9",
- "vimeo/psalm": "^4|^5"
+ "infection/infection": "^0",
+ "nikic/php-fuzzer": "^0",
+ "phpunit/phpunit": "^9|^10|^11",
+ "vimeo/psalm": "^4|^5|^6"
},
"autoload": {
"psr-4": {
@@ -52,5 +54,14 @@
"psr-4": {
"ParagonIE\\ConstantTime\\Tests\\": "tests/"
}
+ },
+ "scripts": {
+ "mutation-test": "infection"
+ },
+ "config": {
+ "process-timeout": 0,
+ "allow-plugins": {
+ "infection/extension-installer": true
+ }
}
}
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base32.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base32.php
index 48d00b991..379552af5 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base32.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base32.php
@@ -3,8 +3,15 @@
namespace ParagonIE\ConstantTime;
use InvalidArgumentException;
+use Override;
use RangeException;
+use SensitiveParameter;
use TypeError;
+use function pack;
+use function rtrim;
+use function strlen;
+use function substr;
+use function unpack;
/**
* Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
@@ -44,8 +51,9 @@ abstract class Base32 implements EncoderInterface
* @param bool $strictPadding
* @return string
*/
+ #[Override]
public static function decode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $encodedString,
bool $strictPadding = false
): string {
@@ -60,7 +68,7 @@ public static function decode(
* @return string
*/
public static function decodeUpper(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $src,
bool $strictPadding = false
): string {
@@ -74,8 +82,9 @@ public static function decodeUpper(
* @return string
* @throws TypeError
*/
+ #[Override]
public static function encode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $binString
): string {
return static::doEncode($binString, false, true);
@@ -87,9 +96,10 @@ public static function encode(
* @param string $src
* @return string
* @throws TypeError
+ * @api
*/
public static function encodeUnpadded(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $src
): string {
return static::doEncode($src, false, false);
@@ -101,9 +111,10 @@ public static function encodeUnpadded(
* @param string $src
* @return string
* @throws TypeError
+ * @api
*/
public static function encodeUpper(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $src
): string {
return static::doEncode($src, true, true);
@@ -115,9 +126,10 @@ public static function encodeUpper(
* @param string $src
* @return string
* @throws TypeError
+ * @api
*/
public static function encodeUpperUnpadded(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $src
): string {
return static::doEncode($src, true, false);
@@ -129,6 +141,7 @@ public static function encodeUpperUnpadded(
*
* @param int $src
* @return int
+ * @api
*/
protected static function decode5Bits(int $src): int
{
@@ -151,6 +164,7 @@ protected static function decode5Bits(int $src): int
*
* @param int $src
* @return int
+ * @api
*/
protected static function decode5BitsUpper(int $src): int
{
@@ -171,6 +185,7 @@ protected static function decode5BitsUpper(int $src): int
*
* @param int $src
* @return string
+ * @api
*/
protected static function encode5Bits(int $src): string
{
@@ -179,7 +194,7 @@ protected static function encode5Bits(int $src): string
// if ($src > 25) $ret -= 72;
$diff -= ((25 - $src) >> 8) & 73;
- return \pack('C', $src + $diff);
+ return pack('C', $src + $diff);
}
/**
@@ -190,6 +205,7 @@ protected static function encode5Bits(int $src): string
*
* @param int $src
* @return string
+ * @api
*/
protected static function encode5BitsUpper(int $src): string
{
@@ -198,20 +214,21 @@ protected static function encode5BitsUpper(int $src): string
// if ($src > 25) $ret -= 40;
$diff -= ((25 - $src) >> 8) & 41;
- return \pack('C', $src + $diff);
+ return pack('C', $src + $diff);
}
/**
* @param string $encodedString
* @param bool $upper
* @return string
+ * @api
*/
public static function decodeNoPadding(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $encodedString,
bool $upper = false
): string {
- $srcLen = Binary::safeStrlen($encodedString);
+ $srcLen = strlen($encodedString);
if ($srcLen === 0) {
return '';
}
@@ -242,7 +259,7 @@ public static function decodeNoPadding(
* @throws TypeError
*/
protected static function doDecode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $src,
bool $upper = false,
bool $strictPadding = false
@@ -253,7 +270,7 @@ protected static function doDecode(
: 'decode5Bits';
// Remove padding
- $srcLen = Binary::safeStrlen($src);
+ $srcLen = strlen($src);
if ($srcLen === 0) {
return '';
}
@@ -273,8 +290,8 @@ protected static function doDecode(
);
}
} else {
- $src = \rtrim($src, '=');
- $srcLen = Binary::safeStrlen($src);
+ $src = rtrim($src, '=');
+ $srcLen = strlen($src);
}
$err = 0;
@@ -282,7 +299,7 @@ protected static function doDecode(
// Main loop (no padding):
for ($i = 0; $i + 8 <= $srcLen; $i += 8) {
/** @var array $chunk */
- $chunk = \unpack('C*', Binary::safeSubstr($src, $i, 8));
+ $chunk = unpack('C*', substr($src, $i, 8));
/** @var int $c0 */
$c0 = static::$method($chunk[1]);
/** @var int $c1 */
@@ -300,7 +317,7 @@ protected static function doDecode(
/** @var int $c7 */
$c7 = static::$method($chunk[8]);
- $dest .= \pack(
+ $dest .= pack(
'CCCCC',
(($c0 << 3) | ($c1 >> 2) ) & 0xff,
(($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff,
@@ -313,7 +330,7 @@ protected static function doDecode(
// The last chunk, which may have padding:
if ($i < $srcLen) {
/** @var array $chunk */
- $chunk = \unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i));
+ $chunk = unpack('C*', substr($src, $i, $srcLen - $i));
/** @var int $c0 */
$c0 = static::$method($chunk[1]);
@@ -331,7 +348,7 @@ protected static function doDecode(
/** @var int $c6 */
$c6 = static::$method($chunk[7]);
- $dest .= \pack(
+ $dest .= pack(
'CCCC',
(($c0 << 3) | ($c1 >> 2) ) & 0xff,
(($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff,
@@ -354,7 +371,7 @@ protected static function doDecode(
/** @var int $c5 */
$c5 = static::$method($chunk[6]);
- $dest .= \pack(
+ $dest .= pack(
'CCCC',
(($c0 << 3) | ($c1 >> 2) ) & 0xff,
(($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff,
@@ -372,7 +389,7 @@ protected static function doDecode(
/** @var int $c4 */
$c4 = static::$method($chunk[5]);
- $dest .= \pack(
+ $dest .= pack(
'CCC',
(($c0 << 3) | ($c1 >> 2) ) & 0xff,
(($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff,
@@ -390,7 +407,7 @@ protected static function doDecode(
/** @var int $c3 */
$c3 = static::$method($chunk[4]);
- $dest .= \pack(
+ $dest .= pack(
'CC',
(($c0 << 3) | ($c1 >> 2) ) & 0xff,
(($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff
@@ -405,7 +422,7 @@ protected static function doDecode(
/** @var int $c2 */
$c2 = static::$method($chunk[3]);
- $dest .= \pack(
+ $dest .= pack(
'CC',
(($c0 << 3) | ($c1 >> 2) ) & 0xff,
(($c1 << 6) | ($c2 << 1) ) & 0xff
@@ -418,7 +435,7 @@ protected static function doDecode(
/** @var int $c1 */
$c1 = static::$method($chunk[2]);
- $dest .= \pack(
+ $dest .= pack(
'C',
(($c0 << 3) | ($c1 >> 2) ) & 0xff
);
@@ -427,7 +444,7 @@ protected static function doDecode(
$err |= ($c1 << 6) & 0xff;
}
} else {
- $dest .= \pack(
+ $dest .= pack(
'C',
(($c0 << 3) ) & 0xff
);
@@ -453,10 +470,10 @@ protected static function doDecode(
* @throws TypeError
*/
protected static function doEncode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $src,
bool $upper = false,
- $pad = true
+ bool $pad = true
): string {
// We do this to reduce code duplication:
$method = $upper
@@ -464,12 +481,12 @@ protected static function doEncode(
: 'encode5Bits';
$dest = '';
- $srcLen = Binary::safeStrlen($src);
+ $srcLen = strlen($src);
// Main loop (no padding):
for ($i = 0; $i + 5 <= $srcLen; $i += 5) {
/** @var array $chunk */
- $chunk = \unpack('C*', Binary::safeSubstr($src, $i, 5));
+ $chunk = unpack('C*', substr($src, $i, 5));
$b0 = $chunk[1];
$b1 = $chunk[2];
$b2 = $chunk[3];
@@ -488,7 +505,7 @@ protected static function doEncode(
// The last chunk, which may have padding:
if ($i < $srcLen) {
/** @var array $chunk */
- $chunk = \unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i));
+ $chunk = unpack('C*', substr($src, $i, $srcLen - $i));
$b0 = $chunk[1];
if ($i + 3 < $srcLen) {
$b1 = $chunk[2];
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base32Hex.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base32Hex.php
index b868dd048..4323a573a 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base32Hex.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base32Hex.php
@@ -2,6 +2,9 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use Override;
+use function pack;
+
/**
* Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
@@ -40,6 +43,7 @@ abstract class Base32Hex extends Base32
* @param int $src
* @return int
*/
+ #[Override]
protected static function decode5Bits(int $src): int
{
$ret = -1;
@@ -60,6 +64,7 @@ protected static function decode5Bits(int $src): int
* @param int $src
* @return int
*/
+ #[Override]
protected static function decode5BitsUpper(int $src): int
{
$ret = -1;
@@ -80,6 +85,7 @@ protected static function decode5BitsUpper(int $src): int
* @param int $src
* @return string
*/
+ #[Override]
protected static function encode5Bits(int $src): string
{
$src += 0x30;
@@ -87,7 +93,7 @@ protected static function encode5Bits(int $src): string
// if ($src > 0x39) $src += 0x61 - 0x3a; // 39
$src += ((0x39 - $src) >> 8) & 39;
- return \pack('C', $src);
+ return pack('C', $src);
}
/**
@@ -99,6 +105,7 @@ protected static function encode5Bits(int $src): string
* @param int $src
* @return string
*/
+ #[Override]
protected static function encode5BitsUpper(int $src): string
{
$src += 0x30;
@@ -106,6 +113,6 @@ protected static function encode5BitsUpper(int $src): string
// if ($src > 0x39) $src += 0x41 - 0x3a; // 7
$src += ((0x39 - $src) >> 8) & 7;
- return \pack('C', $src);
+ return pack('C', $src);
}
}
\ No newline at end of file
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64.php
index 2e3ecc859..9679748dc 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64.php
@@ -3,8 +3,23 @@
namespace ParagonIE\ConstantTime;
use InvalidArgumentException;
+use Override;
use RangeException;
+use SensitiveParameter;
+use SodiumException;
use TypeError;
+use function extension_loaded;
+use function pack;
+use function rtrim;
+use function sodium_base642bin;
+use function sodium_bin2base64;
+use function strlen;
+use function substr;
+use function unpack;
+use const SODIUM_BASE64_VARIANT_ORIGINAL;
+use const SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING;
+use const SODIUM_BASE64_VARIANT_URLSAFE;
+use const SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING;
/**
* Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
@@ -47,10 +62,25 @@ abstract class Base64 implements EncoderInterface
*
* @throws TypeError
*/
+ #[Override]
public static function encode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $binString
): string {
+ if (extension_loaded('sodium')) {
+ $variant = match(static::class) {
+ Base64::class => SODIUM_BASE64_VARIANT_ORIGINAL,
+ Base64UrlSafe::class => SODIUM_BASE64_VARIANT_URLSAFE,
+ default => 0,
+ };
+ if ($variant > 0) {
+ try {
+ return sodium_bin2base64($binString, $variant);
+ } catch (SodiumException $ex) {
+ throw new RangeException($ex->getMessage(), $ex->getCode(), $ex);
+ }
+ }
+ }
return static::doEncode($binString, true);
}
@@ -63,11 +93,26 @@ public static function encode(
* @return string
*
* @throws TypeError
+ * @api
*/
public static function encodeUnpadded(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $src
): string {
+ if (extension_loaded('sodium')) {
+ $variant = match(static::class) {
+ Base64::class => SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING,
+ Base64UrlSafe::class => SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING,
+ default => 0,
+ };
+ if ($variant > 0) {
+ try {
+ return sodium_bin2base64($src, $variant);
+ } catch (SodiumException $ex) {
+ throw new RangeException($ex->getMessage(), $ex->getCode(), $ex);
+ }
+ }
+ }
return static::doEncode($src, false);
}
@@ -79,16 +124,16 @@ public static function encodeUnpadded(
* @throws TypeError
*/
protected static function doEncode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $src,
bool $pad = true
): string {
$dest = '';
- $srcLen = Binary::safeStrlen($src);
+ $srcLen = strlen($src);
// Main loop (no padding):
for ($i = 0; $i + 3 <= $srcLen; $i += 3) {
/** @var array $chunk */
- $chunk = \unpack('C*', Binary::safeSubstr($src, $i, 3));
+ $chunk = unpack('C*', substr($src, $i, 3));
$b0 = $chunk[1];
$b1 = $chunk[2];
$b2 = $chunk[3];
@@ -102,7 +147,7 @@ protected static function doEncode(
// The last chunk, which may have padding:
if ($i < $srcLen) {
/** @var array $chunk */
- $chunk = \unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i));
+ $chunk = unpack('C*', substr($src, $i, $srcLen - $i));
$b0 = $chunk[1];
if ($i + 1 < $srcLen) {
$b1 = $chunk[2];
@@ -137,13 +182,14 @@ protected static function doEncode(
* @throws RangeException
* @throws TypeError
*/
+ #[Override]
public static function decode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $encodedString,
bool $strictPadding = false
): string {
// Remove padding
- $srcLen = Binary::safeStrlen($encodedString);
+ $srcLen = strlen($encodedString);
if ($srcLen === 0) {
return '';
}
@@ -167,9 +213,24 @@ public static function decode(
'Incorrect padding'
);
}
+ if (extension_loaded('sodium')) {
+ $variant = match(static::class) {
+ Base64::class => SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING,
+ Base64UrlSafe::class => SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING,
+ default => 0,
+ };
+ if ($variant > 0) {
+ try {
+ return sodium_base642bin(substr($encodedString, 0, $srcLen), $variant);
+ } catch (SodiumException $ex) {
+ throw new RangeException($ex->getMessage(), $ex->getCode(), $ex);
+ }
+ }
+ }
} else {
- $encodedString = \rtrim($encodedString, '=');
- $srcLen = Binary::safeStrlen($encodedString);
+ // Just remove all padding.
+ $encodedString = rtrim($encodedString, '=');
+ $srcLen = strlen($encodedString);
}
$err = 0;
@@ -177,13 +238,13 @@ public static function decode(
// Main loop (no padding):
for ($i = 0; $i + 4 <= $srcLen; $i += 4) {
/** @var array $chunk */
- $chunk = \unpack('C*', Binary::safeSubstr($encodedString, $i, 4));
+ $chunk = unpack('C*', substr($encodedString, $i, 4));
$c0 = static::decode6Bits($chunk[1]);
$c1 = static::decode6Bits($chunk[2]);
$c2 = static::decode6Bits($chunk[3]);
$c3 = static::decode6Bits($chunk[4]);
- $dest .= \pack(
+ $dest .= pack(
'CCC',
((($c0 << 2) | ($c1 >> 4)) & 0xff),
((($c1 << 4) | ($c2 >> 2)) & 0xff),
@@ -194,13 +255,13 @@ public static function decode(
// The last chunk, which may have padding:
if ($i < $srcLen) {
/** @var array $chunk */
- $chunk = \unpack('C*', Binary::safeSubstr($encodedString, $i, $srcLen - $i));
+ $chunk = unpack('C*', substr($encodedString, $i, $srcLen - $i));
$c0 = static::decode6Bits($chunk[1]);
if ($i + 2 < $srcLen) {
$c1 = static::decode6Bits($chunk[2]);
$c2 = static::decode6Bits($chunk[3]);
- $dest .= \pack(
+ $dest .= pack(
'CC',
((($c0 << 2) | ($c1 >> 4)) & 0xff),
((($c1 << 4) | ($c2 >> 2)) & 0xff)
@@ -211,7 +272,7 @@ public static function decode(
}
} elseif ($i + 1 < $srcLen) {
$c1 = static::decode6Bits($chunk[2]);
- $dest .= \pack(
+ $dest .= pack(
'C',
((($c0 << 2) | ($c1 >> 4)) & 0xff)
);
@@ -235,12 +296,13 @@ public static function decode(
/**
* @param string $encodedString
* @return string
+ * @api
*/
public static function decodeNoPadding(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $encodedString
): string {
- $srcLen = Binary::safeStrlen($encodedString);
+ $srcLen = strlen($encodedString);
if ($srcLen === 0) {
return '';
}
@@ -314,6 +376,6 @@ protected static function encode6Bits(int $src): string
// if ($src > 62) $diff += 0x2f - 0x2b - 1; // 3
$diff += ((62 - $src) >> 8) & 3;
- return \pack('C', $src + $diff);
+ return pack('C', $src + $diff);
}
}
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php
index 5e98a8f79..847751767 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php
@@ -2,6 +2,8 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use Override;
+
/**
* Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
@@ -44,6 +46,7 @@ abstract class Base64DotSlash extends Base64
* @param int $src
* @return int
*/
+ #[Override]
protected static function decode6Bits(int $src): int
{
$ret = -1;
@@ -70,6 +73,7 @@ protected static function decode6Bits(int $src): int
* @param int $src
* @return string
*/
+ #[Override]
protected static function encode6Bits(int $src): string
{
$src += 0x2e;
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php
index 9780b14bb..2c42db37f 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php
@@ -2,6 +2,8 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use Override;
+
/**
* Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
@@ -44,6 +46,7 @@ abstract class Base64DotSlashOrdered extends Base64
* @param int $src
* @return int
*/
+ #[Override]
protected static function decode6Bits(int $src): int
{
$ret = -1;
@@ -67,6 +70,7 @@ protected static function decode6Bits(int $src): int
* @param int $src
* @return string
*/
+ #[Override]
protected static function encode6Bits(int $src): string
{
$src += 0x2e;
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php
index 8192c63d5..845aaf626 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php
@@ -2,6 +2,8 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use Override;
+
/**
* Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
@@ -45,6 +47,7 @@ abstract class Base64UrlSafe extends Base64
* @param int $src
* @return int
*/
+ #[Override]
protected static function decode6Bits(int $src): int
{
$ret = -1;
@@ -74,6 +77,7 @@ protected static function decode6Bits(int $src): int
* @param int $src
* @return string
*/
+ #[Override]
protected static function encode6Bits(int $src): string
{
$diff = 0x41;
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/Binary.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/Binary.php
index a958f2f7c..369584407 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/Binary.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/Binary.php
@@ -2,7 +2,10 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use SensitiveParameter;
use TypeError;
+use function strlen;
+use function substr;
/**
* Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
@@ -46,16 +49,10 @@ abstract class Binary
* @return int
*/
public static function safeStrlen(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): int {
- if (\function_exists('mb_strlen')) {
- // mb_strlen in PHP 7.x can return false.
- /** @psalm-suppress RedundantCast */
- return (int) \mb_strlen($str, '8bit');
- } else {
- return \strlen($str);
- }
+ return strlen($str);
}
/**
@@ -72,7 +69,7 @@ public static function safeStrlen(
* @throws TypeError
*/
public static function safeSubstr(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str,
int $start = 0,
?int $length = null
@@ -80,14 +77,11 @@ public static function safeSubstr(
if ($length === 0) {
return '';
}
- if (\function_exists('mb_substr')) {
- return \mb_substr($str, $start, $length, '8bit');
- }
// Unlike mb_substr(), substr() doesn't accept NULL for length
if ($length !== null) {
- return \substr($str, $start, $length);
+ return substr($str, $start, $length);
} else {
- return \substr($str, $start);
+ return substr($str, $start);
}
}
}
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php
index 9cafbf96c..cb358ea0d 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php
@@ -2,6 +2,8 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use SensitiveParameter;
+
/**
* Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
@@ -38,7 +40,10 @@ interface EncoderInterface
* @param string $binString (raw binary)
* @return string
*/
- public static function encode(string $binString): string;
+ public static function encode(
+ #[SensitiveParameter]
+ string $binString
+ ): string;
/**
* Convert a binary string into a hexadecimal string without cache-timing
@@ -48,5 +53,9 @@ public static function encode(string $binString): string;
* @param bool $strictPadding Error on invalid padding
* @return string (raw binary)
*/
- public static function decode(string $encodedString, bool $strictPadding = false): string;
+ public static function decode(
+ #[SensitiveParameter]
+ string $encodedString,
+ bool $strictPadding = false
+ ): string;
}
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/Encoding.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/Encoding.php
index 8b7e3878e..b28a5014e 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/Encoding.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/Encoding.php
@@ -2,6 +2,8 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use RangeException;
+use SensitiveParameter;
use TypeError;
/**
@@ -30,6 +32,7 @@
/**
* Class Encoding
* @package ParagonIE\ConstantTime
+ * @api
*/
abstract class Encoding
{
@@ -41,7 +44,7 @@ abstract class Encoding
* @throws TypeError
*/
public static function base32Encode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32::encode($str);
@@ -55,7 +58,7 @@ public static function base32Encode(
* @throws TypeError
*/
public static function base32EncodeUpper(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32::encodeUpper($str);
@@ -69,7 +72,7 @@ public static function base32EncodeUpper(
* @throws TypeError
*/
public static function base32Decode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32::decode($str);
@@ -83,7 +86,7 @@ public static function base32Decode(
* @throws TypeError
*/
public static function base32DecodeUpper(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32::decodeUpper($str);
@@ -97,7 +100,7 @@ public static function base32DecodeUpper(
* @throws TypeError
*/
public static function base32HexEncode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32Hex::encode($str);
@@ -111,7 +114,7 @@ public static function base32HexEncode(
* @throws TypeError
*/
public static function base32HexEncodeUpper(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32Hex::encodeUpper($str);
@@ -125,7 +128,7 @@ public static function base32HexEncodeUpper(
* @throws TypeError
*/
public static function base32HexDecode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32Hex::decode($str);
@@ -139,7 +142,7 @@ public static function base32HexDecode(
* @throws TypeError
*/
public static function base32HexDecodeUpper(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32Hex::decodeUpper($str);
@@ -153,7 +156,7 @@ public static function base32HexDecodeUpper(
* @throws TypeError
*/
public static function base64Encode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base64::encode($str);
@@ -167,7 +170,7 @@ public static function base64Encode(
* @throws TypeError
*/
public static function base64Decode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base64::decode($str);
@@ -182,7 +185,7 @@ public static function base64Decode(
* @throws TypeError
*/
public static function base64EncodeDotSlash(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base64DotSlash::encode($str);
@@ -195,11 +198,11 @@ public static function base64EncodeDotSlash(
*
* @param string $str
* @return string
- * @throws \RangeException
+ * @throws RangeException
* @throws TypeError
*/
public static function base64DecodeDotSlash(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base64DotSlash::decode($str);
@@ -214,7 +217,7 @@ public static function base64DecodeDotSlash(
* @throws TypeError
*/
public static function base64EncodeDotSlashOrdered(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base64DotSlashOrdered::encode($str);
@@ -227,11 +230,11 @@ public static function base64EncodeDotSlashOrdered(
*
* @param string $str
* @return string
- * @throws \RangeException
+ * @throws RangeException
* @throws TypeError
*/
public static function base64DecodeDotSlashOrdered(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base64DotSlashOrdered::decode($str);
@@ -246,7 +249,7 @@ public static function base64DecodeDotSlashOrdered(
* @throws TypeError
*/
public static function hexEncode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $bin_string
): string {
return Hex::encode($bin_string);
@@ -258,10 +261,10 @@ public static function hexEncode(
*
* @param string $hex_string
* @return string (raw binary)
- * @throws \RangeException
+ * @throws RangeException
*/
public static function hexDecode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $hex_string
): string {
return Hex::decode($hex_string);
@@ -276,7 +279,7 @@ public static function hexDecode(
* @throws TypeError
*/
public static function hexEncodeUpper(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $bin_string
): string {
return Hex::encodeUpper($bin_string);
@@ -290,7 +293,7 @@ public static function hexEncodeUpper(
* @return string
*/
public static function hexDecodeUpper(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $bin_string
): string {
return Hex::decode($bin_string);
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/Hex.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/Hex.php
index 97c2046f0..b515b9758 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/Hex.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/Hex.php
@@ -2,11 +2,20 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use Override;
use RangeException;
+use SensitiveParameter;
+use SodiumException;
use TypeError;
+use function extension_loaded;
+use function pack;
+use function sodium_bin2hex;
+use function sodium_hex2bin;
+use function strlen;
+use function unpack;
/**
- * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2025 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -42,19 +51,27 @@ abstract class Hex implements EncoderInterface
* @return string
* @throws TypeError
*/
+ #[Override]
public static function encode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $binString
): string {
+ if (extension_loaded('sodium')) {
+ try {
+ return sodium_bin2hex($binString);
+ } catch (SodiumException $ex) {
+ throw new RangeException($ex->getMessage(), $ex->getCode(), $ex);
+ }
+ }
$hex = '';
- $len = Binary::safeStrlen($binString);
+ $len = strlen($binString);
for ($i = 0; $i < $len; ++$i) {
/** @var array $chunk */
- $chunk = \unpack('C', $binString[$i]);
+ $chunk = unpack('C', $binString[$i]);
$c = $chunk[1] & 0xf;
$b = $chunk[1] >> 4;
- $hex .= \pack(
+ $hex .= pack(
'CC',
(87 + $b + ((($b - 10) >> 8) & ~38)),
(87 + $c + ((($c - 10) >> 8) & ~38))
@@ -72,19 +89,19 @@ public static function encode(
* @throws TypeError
*/
public static function encodeUpper(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $binString
): string {
$hex = '';
- $len = Binary::safeStrlen($binString);
+ $len = strlen($binString);
for ($i = 0; $i < $len; ++$i) {
/** @var array $chunk */
- $chunk = \unpack('C', $binString[$i]);
+ $chunk = unpack('C', $binString[$i]);
$c = $chunk[1] & 0xf;
$b = $chunk[1] >> 4;
- $hex .= \pack(
+ $hex .= pack(
'CC',
(55 + $b + ((($b - 10) >> 8) & ~6)),
(55 + $c + ((($c - 10) >> 8) & ~6))
@@ -102,15 +119,23 @@ public static function encodeUpper(
* @return string (raw binary)
* @throws RangeException
*/
+ #[Override]
public static function decode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $encodedString,
bool $strictPadding = false
): string {
+ if (extension_loaded('sodium') && $strictPadding) {
+ try {
+ return sodium_hex2bin($encodedString);
+ } catch (SodiumException $ex) {
+ throw new RangeException($ex->getMessage(), $ex->getCode(), $ex);
+ }
+ }
$hex_pos = 0;
$bin = '';
$c_acc = 0;
- $hex_len = Binary::safeStrlen($encodedString);
+ $hex_len = strlen($encodedString);
$state = 0;
if (($hex_len & 1) !== 0) {
if ($strictPadding) {
@@ -124,7 +149,7 @@ public static function decode(
}
/** @var array $chunk */
- $chunk = \unpack('C*', $encodedString);
+ $chunk = unpack('C*', $encodedString);
while ($hex_pos < $hex_len) {
++$hex_pos;
$c = $chunk[$hex_pos];
@@ -142,7 +167,7 @@ public static function decode(
if ($state === 0) {
$c_acc = $c_val * 16;
} else {
- $bin .= \pack('C', $c_acc | $c_val);
+ $bin .= pack('C', $c_acc | $c_val);
}
$state ^= 1;
}
diff --git a/lib/Google/vendor/paragonie/constant_time_encoding/src/RFC4648.php b/lib/Google/vendor/paragonie/constant_time_encoding/src/RFC4648.php
index 7cd2e9909..fb66f73d7 100644
--- a/lib/Google/vendor/paragonie/constant_time_encoding/src/RFC4648.php
+++ b/lib/Google/vendor/paragonie/constant_time_encoding/src/RFC4648.php
@@ -2,6 +2,7 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use SensitiveParameter;
use TypeError;
/**
@@ -33,6 +34,7 @@
* This class conforms strictly to the RFC
*
* @package ParagonIE\ConstantTime
+ * @api
*/
abstract class RFC4648
{
@@ -47,7 +49,7 @@ abstract class RFC4648
* @throws TypeError
*/
public static function base64Encode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base64::encode($str);
@@ -64,7 +66,7 @@ public static function base64Encode(
* @throws TypeError
*/
public static function base64Decode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base64::decode($str, true);
@@ -81,7 +83,7 @@ public static function base64Decode(
* @throws TypeError
*/
public static function base64UrlSafeEncode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base64UrlSafe::encode($str);
@@ -98,7 +100,7 @@ public static function base64UrlSafeEncode(
* @throws TypeError
*/
public static function base64UrlSafeDecode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base64UrlSafe::decode($str, true);
@@ -115,7 +117,7 @@ public static function base64UrlSafeDecode(
* @throws TypeError
*/
public static function base32Encode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32::encodeUpper($str);
@@ -132,7 +134,7 @@ public static function base32Encode(
* @throws TypeError
*/
public static function base32Decode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32::decodeUpper($str, true);
@@ -149,7 +151,7 @@ public static function base32Decode(
* @throws TypeError
*/
public static function base32HexEncode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32::encodeUpper($str);
@@ -166,7 +168,7 @@ public static function base32HexEncode(
* @throws TypeError
*/
public static function base32HexDecode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Base32::decodeUpper($str, true);
@@ -183,7 +185,7 @@ public static function base32HexDecode(
* @throws TypeError
*/
public static function base16Encode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Hex::encodeUpper($str);
@@ -198,7 +200,7 @@ public static function base16Encode(
* @return string
*/
public static function base16Decode(
- #[\SensitiveParameter]
+ #[SensitiveParameter]
string $str
): string {
return Hex::decode($str, true);
diff --git a/lib/Google/vendor/phpseclib/phpseclib/README.md b/lib/Google/vendor/phpseclib/phpseclib/README.md
index 37cbcb9d5..c26edd49b 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/README.md
+++ b/lib/Google/vendor/phpseclib/phpseclib/README.md
@@ -51,7 +51,7 @@ SSH-2, SFTP, X.509, an arbitrary-precision integer arithmetic library, Ed25519 /
* PHP4 compatible
* Composer compatible (PSR-0 autoloading)
* Install using Composer: `composer require phpseclib/phpseclib:~1.0`
-* [Download 1.0.23 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.23.zip/download)
+* [Download 1.0.24 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.24.zip/download)
## Security contact information
@@ -63,14 +63,20 @@ Need Support?
* [Checkout Questions and Answers on Stack Overflow](http://stackoverflow.com/questions/tagged/phpseclib)
* [Create a Support Ticket on GitHub](https://github.com/phpseclib/phpseclib/issues/new)
-* [Browse the Support Forum](http://www.frostjedi.com/phpbb/viewforum.php?f=46) (no longer in use)
## Special Thanks
-Special Thanks to our $50+ sponsors!:
+
+
+
+
+
+
+## Additional Thanks
- Allan Simon
- [ChargeOver](https://chargeover.com/)
+-
## Contributing
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Common/Functions/Strings.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Common/Functions/Strings.php
index fa750ba28..ad8f63b65 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Common/Functions/Strings.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Common/Functions/Strings.php
@@ -126,7 +126,9 @@ public static function unpackSSH2($format, &$data)
// 64-bit floats can be used to get larger numbers then 32-bit signed ints would allow
// for. sure, you're not gonna get the full precision of 64-bit numbers but just because
// you need > 32-bit precision doesn't mean you need the full 64-bit precision
- extract(unpack('Nupper/Nlower', self::shift($data, 8)));
+ $unpacked = unpack('Nupper/Nlower', self::shift($data, 8));
+ $upper = $unpacked['upper'];
+ $lower = $unpacked['lower'];
$temp = $upper ? 4294967296 * $upper : 0;
$temp += $lower < 0 ? ($lower & 0x7FFFFFFFF) + 0x80000000 : $lower;
// $temp = hexdec(bin2hex(self::shift($data, 8)));
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php
index 3cb2b3055..998cf8bb3 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php
@@ -129,7 +129,7 @@ class Blowfish extends BlockCipher
/**
* Block Length of the cipher
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::block_size
+ * @see Common\SymmetricKey::block_size
* @var int
*/
protected $block_size = 8;
@@ -137,7 +137,7 @@ class Blowfish extends BlockCipher
/**
* The mcrypt specific name of the cipher
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
+ * @see Common\SymmetricKey::cipher_name_mcrypt
* @var string
*/
protected $cipher_name_mcrypt = 'blowfish';
@@ -145,7 +145,7 @@ class Blowfish extends BlockCipher
/**
* Optimizing value while CFB-encrypting
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len
+ * @see Common\SymmetricKey::cfb_init_len
* @var int
*/
protected $cfb_init_len = 500;
@@ -325,7 +325,7 @@ class Blowfish extends BlockCipher
* derive this from $key_length or vice versa, but that'd mean we'd have to do multiple shift operations, so in lieu
* of that, we'll just precompute it once.}
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setKeyLength()
+ * @see Common\SymmetricKey::setKeyLength()
* @var int
*/
protected $key_length = 16;
@@ -368,7 +368,7 @@ public function setKeyLength($length)
*
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
+ * @see Common\SymmetricKey::isValidEngine()
* @param int $engine
* @return bool
*/
@@ -394,7 +394,7 @@ protected function isValidEngineHelper($engine)
/**
* Setup the key (expansion)
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupKey()
+ * @see Common\SymmetricKey::_setupKey()
*/
protected function setupKey()
{
@@ -755,7 +755,7 @@ protected function decryptBlock($in)
/**
* Setup the performance-optimized function for de/encrypt()
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupInlineCrypt()
+ * @see Common\SymmetricKey::_setupInlineCrypt()
*/
protected function setupInlineCrypt()
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/JWK.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/JWK.php
index 4c761b839..98b8dacc9 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/JWK.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/JWK.php
@@ -50,6 +50,14 @@ public static function load($key, $password = '')
return $key;
}
+ if (!is_object($key)) {
+ throw new \RuntimeException('invalid JWK: not an object');
+ }
+
+ if (!isset($key->keys)) {
+ throw new \RuntimeException('invalid JWK: object has no property "keys"');
+ }
+
if (count($key->keys) != 1) {
throw new \RuntimeException('Although the JWK key format supports multiple keys phpseclib does not');
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php
index 6c9a65006..2211a8747 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php
@@ -361,7 +361,9 @@ protected static function load($key, $password = '')
if (!$temp) {
throw new \RuntimeException('Unable to decode BER');
}
- extract(ASN1::asn1map($temp[0], Maps\PBEParameter::MAP));
+ $map = ASN1::asn1map($temp[0], Maps\PBEParameter::MAP);
+ $salt = $map['salt'];
+ $iterationCount = $map['iterationCount'];
$iterationCount = (int) $iterationCount->toString();
$cipher->setPassword($password, $kdf, $hash, $salt, $iterationCount);
$key = $cipher->decrypt($decrypted['encryptedData']);
@@ -379,7 +381,8 @@ protected static function load($key, $password = '')
throw new \RuntimeException('Unable to decode BER');
}
$temp = ASN1::asn1map($temp[0], Maps\PBES2params::MAP);
- extract($temp);
+ $keyDerivationFunc = $temp['keyDerivationFunc'];
+ $encryptionScheme = $temp['encryptionScheme'];
$cipher = self::getPBES2EncryptionObject($encryptionScheme['algorithm']);
$meta['meta']['cipher'] = $encryptionScheme['algorithm'];
@@ -389,7 +392,8 @@ protected static function load($key, $password = '')
throw new \RuntimeException('Unable to decode BER');
}
$temp = ASN1::asn1map($temp[0], Maps\PBES2params::MAP);
- extract($temp);
+ $keyDerivationFunc = $temp['keyDerivationFunc'];
+ $encryptionScheme = $temp['encryptionScheme'];
if (!$cipher instanceof RC2) {
$cipher->setIV($encryptionScheme['parameters']['octetString']);
@@ -398,7 +402,9 @@ protected static function load($key, $password = '')
if (!$temp) {
throw new \RuntimeException('Unable to decode BER');
}
- extract(ASN1::asn1map($temp[0], Maps\RC2CBCParameter::MAP));
+ $map = ASN1::asn1map($temp[0], Maps\RC2CBCParameter::MAP);
+ $rc2ParametersVersion = $map['rc2ParametersVersion'];
+ $iv = $map['iv'];
$effectiveKeyLength = (int) $rc2ParametersVersion->toString();
switch ($effectiveKeyLength) {
case 160:
@@ -423,9 +429,13 @@ protected static function load($key, $password = '')
if (!$temp) {
throw new \RuntimeException('Unable to decode BER');
}
- $prf = ['algorithm' => 'id-hmacWithSHA1'];
$params = ASN1::asn1map($temp[0], Maps\PBKDF2params::MAP);
- extract($params);
+ if (empty($params['prf'])) {
+ $params['prf'] = ['algorithm' => 'id-hmacWithSHA1'];
+ }
+ $salt = $params['salt'];
+ $iterationCount = $params['iterationCount'];
+ $prf = $params['prf'];
$meta['meta']['prf'] = $prf['algorithm'];
$hash = str_replace('-', '/', substr($prf['algorithm'], 11));
$params = [
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PuTTY.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PuTTY.php
index 85da83a73..ff4a95a82 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PuTTY.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PuTTY.php
@@ -199,7 +199,7 @@ public static function load($key, $password)
$source = Strings::packSSH2('ssss', $type, $encryption, $components['comment'], $public);
- extract(unpack('Nlength', Strings::shift($public, 4)));
+ $length = unpack('Nlength', Strings::shift($public, 4))['length'];
$newtype = Strings::shift($public, $length);
if ($newtype != $type) {
throw new \RuntimeException('The binary type does not match the human readable type field');
@@ -227,7 +227,10 @@ public static function load($key, $password)
$parallelism = trim(preg_replace('#Argon2-Parallelism: (\d+)#', '$1', $key[$offset++]));
$salt = Strings::hex2bin(trim(preg_replace('#Argon2-Salt: ([0-9a-f]+)#', '$1', $key[$offset++])));
- extract(self::generateV3Key($password, $flavour, $memory, $passes, $salt));
+ $v3key = self::generateV3Key($password, $flavour, $memory, $passes, $salt);
+ $symkey = $v3key['symkey'];
+ $symiv = $v3key['symiv'];
+ $hashkey = $v3key['hashkey'];
break;
case 2:
@@ -323,7 +326,10 @@ protected static function wrapPrivateKey($public, $private, $type, $password, ar
$key .= "Argon2-Passes: 13\r\n";
$key .= "Argon2-Parallelism: 1\r\n";
$key .= "Argon2-Salt: " . Strings::bin2hex($salt) . "\r\n";
- extract(self::generateV3Key($password, 'Argon2id', 8192, 13, $salt));
+ $v3key = self::generateV3Key($password, 'Argon2id', 8192, 13, $salt);
+ $symkey = $v3key['symkey'];
+ $symiv = $v3key['symiv'];
+ $hashkey = $v3key['hashkey'];
$hash = new Hash('sha256');
$hash->setKey($hashkey);
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/StreamCipher.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/StreamCipher.php
index 0d9690822..c7c080f4e 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/StreamCipher.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/StreamCipher.php
@@ -26,7 +26,7 @@ abstract class StreamCipher extends SymmetricKey
*
* Stream ciphers do not have a block size
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::block_size
+ * @see SymmetricKey::block_size
* @var int
*/
protected $block_size = 0;
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php
index 3b0383000..93d7ad2ed 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php
@@ -68,7 +68,7 @@ class DES extends BlockCipher
/**
* Block Length of the cipher
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::block_size
+ * @see Common\SymmetricKey::block_size
* @var int
*/
protected $block_size = 8;
@@ -76,7 +76,7 @@ class DES extends BlockCipher
/**
* Key Length (in bytes)
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setKeyLength()
+ * @see Common\SymmetricKey::setKeyLength()
* @var int
*/
protected $key_length = 8;
@@ -84,7 +84,7 @@ class DES extends BlockCipher
/**
* The mcrypt specific name of the cipher
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
+ * @see Common\SymmetricKey::cipher_name_mcrypt
* @var string
*/
protected $cipher_name_mcrypt = 'des';
@@ -92,7 +92,7 @@ class DES extends BlockCipher
/**
* The OpenSSL names of the cipher / modes
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::openssl_mode_names
+ * @see Common\SymmetricKey::openssl_mode_names
* @var array
*/
protected $openssl_mode_names = [
@@ -106,7 +106,7 @@ class DES extends BlockCipher
/**
* Optimizing value while CFB-encrypting
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len
+ * @see Common\SymmetricKey::cfb_init_len
* @var int
*/
protected $cfb_init_len = 500;
@@ -586,7 +586,7 @@ public function __construct($mode)
*
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
+ * @see Common\SymmetricKey::isValidEngine()
* @param int $engine
* @return bool
*/
@@ -615,7 +615,7 @@ protected function isValidEngineHelper($engine)
*
* DES also requires that every eighth bit be a parity bit, however, we'll ignore that.
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setKey()
+ * @see Common\SymmetricKey::setKey()
* @param string $key
*/
public function setKey($key)
@@ -631,8 +631,8 @@ public function setKey($key)
/**
* Encrypts a block
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::encryptBlock()
- * @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt()
+ * @see Common\SymmetricKey::encryptBlock()
+ * @see Common\SymmetricKey::encrypt()
* @see self::encrypt()
* @param string $in
* @return string
@@ -645,8 +645,8 @@ protected function encryptBlock($in)
/**
* Decrypts a block
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::decryptBlock()
- * @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt()
+ * @see Common\SymmetricKey::decryptBlock()
+ * @see Common\SymmetricKey::decrypt()
* @see self::decrypt()
* @param string $in
* @return string
@@ -747,7 +747,7 @@ private function processBlock($block, $mode)
/**
* Creates the key schedule
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setupKey()
+ * @see Common\SymmetricKey::setupKey()
*/
protected function setupKey()
{
@@ -1281,7 +1281,7 @@ protected function setupKey()
/**
* Setup the performance-optimized function for de/encrypt()
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setupInlineCrypt()
+ * @see Common\SymmetricKey::setupInlineCrypt()
*/
protected function setupInlineCrypt()
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PuTTY.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PuTTY.php
index f6177f462..8549a2ec7 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PuTTY.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PuTTY.php
@@ -56,7 +56,10 @@ public static function load($key, $password = '')
if (!isset($components['private'])) {
return $components;
}
- extract($components);
+ $type = $components['type'];
+ $comment = $components['comment'];
+ $public = $components['public'];
+ $private = $components['private'];
unset($components['public'], $components['private']);
list($p, $q, $g, $y) = Strings::unpackSSH2('iiii', $public);
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php
index 87cd77a7a..90252139d 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php
@@ -88,7 +88,9 @@ public function sign($message)
return $signature;
}
- extract(ASN1Signature::load($signature));
+ $loaded = ASN1Signature::load($signature);
+ $r = $loaded['r'];
+ $s = $loaded['s'];
return $format::save($r, $s);
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PublicKey.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PublicKey.php
index c14ffbdf5..3e16762b8 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PublicKey.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PublicKey.php
@@ -40,7 +40,8 @@ public function verify($message, $signature)
if ($params === false || count($params) != 2) {
return false;
}
- extract($params);
+ $r = $params['r'];
+ $s = $params['s'];
if (self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods())) {
$sig = $format != 'ASN1' ? ASN1Signature::save($r, $s) : $signature;
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Montgomery.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Montgomery.php
index b792e161d..431f9575c 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Montgomery.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Montgomery.php
@@ -246,7 +246,7 @@ public function multiplyPoint(array $p, BigInteger $d)
*
* x=X/Z
*
- * @return \phpseclib3\Math\PrimeField\Integer[]
+ * @return PrimeInteger[]
*/
public function convertToInternal(array $p)
{
@@ -266,7 +266,7 @@ public function convertToInternal(array $p)
/**
* Returns the affine point
*
- * @return \phpseclib3\Math\PrimeField\Integer[]
+ * @return PrimeInteger[]
*/
public function convertToAffine(array $p)
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Prime.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Prime.php
index 620040170..b1970557f 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Prime.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Prime.php
@@ -751,7 +751,7 @@ private static function getJSFPoints(Integer $k1, Integer $k2)
* To convert a Jacobian Coordinate to an Affine Point
* you do (x / z^2, y / z^3)
*
- * @return \phpseclib3\Math\PrimeField\Integer[]
+ * @return PrimeInteger[]
*/
public function convertToAffine(array $p)
{
@@ -770,7 +770,7 @@ public function convertToAffine(array $p)
/**
* Converts an affine point to a jacobian coordinate
*
- * @return \phpseclib3\Math\PrimeField\Integer[]
+ * @return PrimeInteger[]
*/
public function convertToInternal(array $p)
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php
index 004406acf..99aa38b20 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php
@@ -171,7 +171,7 @@ public function getBasePoint()
/**
* Returns the affine point
*
- * @return PrimeField\Integer[]
+ * @return PrimeInteger[]
*/
public function convertToAffine(array $p)
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/XML.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/XML.php
index b0cb12650..7f6cf6345 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/XML.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/XML.php
@@ -71,6 +71,10 @@ public static function load($key, $password = '')
$use_errors = libxml_use_internal_errors(true);
+ if (substr($key, 0, 5) != '' . $key . '';
+ }
+
$temp = self::isolateNamespace($key, 'http://www.w3.org/2009/xmldsig11#');
if ($temp) {
$key = $temp;
@@ -82,9 +86,6 @@ public static function load($key, $password = '')
}
$dom = new \DOMDocument();
- if (substr($key, 0, 5) != '' . $key . '';
- }
if (!$dom->loadXML($key)) {
libxml_use_internal_errors($use_errors);
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PrivateKey.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PrivateKey.php
index 91253b8fd..9947bb7d5 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PrivateKey.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PrivateKey.php
@@ -157,7 +157,10 @@ public function sign($message)
return $signature;
}
- extract(ASN1Signature::load($signature));
+ $loaded = ASN1Signature::load($signature);
+ $r = $loaded['r'];
+ $s = $loaded['s'];
+
return $this->formatSignature($r, $s);
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PublicKey.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PublicKey.php
index 4558ce34d..d34c6c4dd 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PublicKey.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PublicKey.php
@@ -115,7 +115,8 @@ public function verify($message, $signature)
if ($params === false || count($params) != 2) {
return false;
}
- extract($params);
+ $r = $params['r'];
+ $s = $params['s'];
if (self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods())) {
$sig = $format != 'ASN1' ? ASN1Signature::save($r, $s) : $signature;
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php
index 09e48f960..cc5b42c08 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php
@@ -194,6 +194,15 @@ class Hash
private static $maxwordrange128;
/**#@-*/
+ /**#@+
+ * AES_CMAC variables
+ *
+ * @var string
+ */
+ private $k1;
+ private $k2;
+ /**#@-*/
+
/**
* Default Constructor.
*
@@ -299,6 +308,14 @@ public function setHash($hash)
$this->length = abs(substr($hash, -3)) >> 3;
$this->algo = 'umac';
return;
+ case 'aes_cmac':
+ if ($oldHash != $this->hashParam) {
+ $this->recomputeAESKey = true;
+ }
+ $this->blockSize = 128;
+ $this->length = 16;
+ $this->algo = 'aes_cmac';
+ return;
case 'md2-96':
case 'md5-96':
case 'sha1-96':
@@ -977,6 +994,69 @@ private static function L3Hash($k1, $k2, $m)
public function hash($text)
{
$algo = $this->algo;
+ // https://www.rfc-editor.org/rfc/rfc4493.html
+ // https://en.wikipedia.org/wiki/One-key_MAC
+ if ($algo == 'aes_cmac') {
+ $constZero = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
+ if ($this->recomputeAESKey) {
+ if (!is_string($this->key)) {
+ throw new InsufficientSetupException('No key has been set');
+ }
+ if (strlen($this->key) != 16) {
+ throw new \LengthException('Key must be 16 bytes long');
+ }
+ // Algorithm Generate_Subkey
+ $constRb = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87";
+ $this->c = new AES('ecb');
+ $this->c->setKey($this->key);
+ $this->c->disablePadding();
+ $l = $this->c->encrypt($constZero);
+ $msb = ($l & "\x80") == "\x80";
+ $l = new BigInteger($l, 256);
+ $l->setPrecision(128);
+ $l = $l->bitwise_leftShift(1)->toBytes();
+ // make it constant time
+ $k1 = $msb ? $l ^ $constRb : $l | $constZero;
+
+ $msb = ($k1 & "\x80") == "\x80";
+ $k2 = new BigInteger($k1, 256);
+ $k2->setPrecision(128);
+ $k2 = $k2->bitwise_leftShift(1)->toBytes();
+ // make it constant time
+ $k2 = $msb ? $k2 ^ $constRb : $k2 | $constZero;
+
+ $this->k1 = $k1;
+ $this->k2 = $k2;
+ }
+
+ $len = strlen($text);
+ $const_Bsize = 16;
+ $M = strlen($text) ? str_split($text, $const_Bsize) : [''];
+
+ // Step 2
+ $n = ceil($len / $const_Bsize);
+ // Step 3
+ if ($n == 0) {
+ $n = 1;
+ $flag = false;
+ } else {
+ $flag = $len % $const_Bsize == 0;
+ }
+ // Step 4
+ $M_last = $flag ?
+ $M[$n - 1] ^ $k1 :
+ self::OMAC_padding($M[$n - 1], $const_Bsize) ^ $k2;
+ // Step 5
+ $x = $constZero;
+ // Step 6
+ $c = &$this->c;
+ for ($i = 0; $i < $n - 1; $i++) {
+ $y = $x ^ $M[$i];
+ $x = $c->encrypt($y);
+ }
+ $y = $M_last ^ $x;
+ return $c->encrypt($y);
+ }
if ($algo == 'umac') {
if ($this->recomputeAESKey) {
if (!is_string($this->nonce)) {
@@ -1790,6 +1870,17 @@ private static function sha512_64($m, $hash)
return pack('J*', ...$hash);
}
+ /**
+ * OMAC Padding
+ *
+ * @link https://www.rfc-editor.org/rfc/rfc4493.html#section-2.4
+ */
+ private static function OMAC_padding($m, $length)
+ {
+ $count = $length - strlen($m) - 1;
+ return "$m\x80" . str_repeat("\0", $count);
+ }
+
/**
* __toString() magic method
*/
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php
index 61afbaeb6..36264080c 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php
@@ -32,6 +32,7 @@ abstract class PublicKeyLoader
* @return AsymmetricKey
* @param string|array $key
* @param string $password optional
+ * @throws NoKeyLoadedException if key is not valid
*/
public static function load($key, $password = false)
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php
index 654c90642..175c52e7b 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php
@@ -45,7 +45,7 @@ class RC2 extends BlockCipher
/**
* Block Length of the cipher
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::block_size
+ * @see Common\SymmetricKey::block_size
* @var int
*/
protected $block_size = 8;
@@ -53,7 +53,7 @@ class RC2 extends BlockCipher
/**
* The Key
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::key
+ * @see Common\SymmetricKey::key
* @see self::setKey()
* @var string
*/
@@ -62,7 +62,7 @@ class RC2 extends BlockCipher
/**
* The Original (unpadded) Key
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::key
+ * @see Common\SymmetricKey::key
* @see self::setKey()
* @see self::encrypt()
* @see self::decrypt()
@@ -81,7 +81,7 @@ class RC2 extends BlockCipher
/**
* The mcrypt specific name of the cipher
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
+ * @see Common\SymmetricKey::cipher_name_mcrypt
* @var string
*/
protected $cipher_name_mcrypt = 'rc2';
@@ -89,7 +89,7 @@ class RC2 extends BlockCipher
/**
* Optimizing value while CFB-encrypting
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len
+ * @see Common\SymmetricKey::cfb_init_len
* @var int
*/
protected $cfb_init_len = 500;
@@ -261,7 +261,7 @@ public function __construct($mode)
*
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
+ * @see Common\SymmetricKey::__construct()
* @param int $engine
* @return bool
*/
@@ -323,7 +323,7 @@ public function getKeyLength()
* has more then 128 bytes in it, and set $key to a single null byte if
* it is empty.
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setKey()
+ * @see Common\SymmetricKey::setKey()
* @param string $key
* @param int|boolean $t1 optional Effective key length in bits.
* @throws \LengthException if the key length isn't supported
@@ -426,8 +426,8 @@ public function decrypt($ciphertext)
/**
* Encrypts a block
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::encryptBlock()
- * @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt()
+ * @see Common\SymmetricKey::encryptBlock()
+ * @see Common\SymmetricKey::encrypt()
* @param string $in
* @return string
*/
@@ -470,8 +470,8 @@ protected function encryptBlock($in)
/**
* Decrypts a block
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::decryptBlock()
- * @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt()
+ * @see Common\SymmetricKey::decryptBlock()
+ * @see Common\SymmetricKey::decrypt()
* @param string $in
* @return string
*/
@@ -514,7 +514,7 @@ protected function decryptBlock($in)
/**
* Creates the key schedule
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setupKey()
+ * @see Common\SymmetricKey::setupKey()
*/
protected function setupKey()
{
@@ -534,7 +534,7 @@ protected function setupKey()
/**
* Setup the performance-optimized function for de/encrypt()
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setupInlineCrypt()
+ * @see Common\SymmetricKey::setupInlineCrypt()
*/
protected function setupInlineCrypt()
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php
index 5f3bff2c0..98cf01165 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php
@@ -72,7 +72,7 @@ class RC4 extends StreamCipher
/**
* The mcrypt specific name of the cipher
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
+ * @see Common\SymmetricKey::cipher_name_mcrypt
* @var string
*/
protected $cipher_name_mcrypt = 'arcfour';
@@ -98,7 +98,7 @@ class RC4 extends StreamCipher
*
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
+ * @see Common\SymmetricKey::__construct()
* @param int $engine
* @return bool
*/
@@ -159,7 +159,7 @@ public function setKey($key)
/**
* Encrypts a message.
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt()
+ * @see Common\SymmetricKey::decrypt()
* @see self::crypt()
* @param string $plaintext
* @return string $ciphertext
@@ -178,7 +178,7 @@ public function encrypt($plaintext)
* $this->decrypt($this->encrypt($plaintext)) == $this->encrypt($this->encrypt($plaintext)).
* At least if the continuous buffer is disabled.
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt()
+ * @see Common\SymmetricKey::encrypt()
* @see self::crypt()
* @param string $ciphertext
* @return string $plaintext
@@ -214,7 +214,7 @@ protected function decryptBlock($in)
/**
* Setup the key (expansion)
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupKey()
+ * @see Common\SymmetricKey::_setupKey()
*/
protected function setupKey()
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
index 9cbe6bfc7..0a11957b0 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
@@ -357,10 +357,9 @@ public static function createKey($bits = 2048)
if ($i != $num_primes) {
$primes[$i] = BigInteger::randomPrime($regSize);
} else {
- extract(BigInteger::minMaxBits($bits));
- /** @var BigInteger $min
- * @var BigInteger $max
- */
+ $minMax = BigInteger::minMaxBits($bits);
+ $min = $minMax['min'];
+ $max = $minMax['max'];
list($min) = $min->divide($n);
$min = $min->add(self::$one);
list($max) = $max->divide($n);
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php
index b60e48ea5..035fc8c38 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php
@@ -88,13 +88,11 @@ public static function load($key, $password = '')
// PUBLICKEYSTRUC publickeystruc
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa387453(v=vs.85).aspx
- extract(unpack('atype/aversion/vreserved/Valgo', Strings::shift($key, 8)));
- /**
- * @var string $type
- * @var string $version
- * @var integer $reserved
- * @var integer $algo
- */
+ $unpacked = unpack('atype/aversion/vreserved/Valgo', Strings::shift($key, 8));
+ $type = $unpacked['type'];
+ $version = $unpacked['version'];
+ $reserved = $unpacked['reserved'];
+ $algo = $unpacked['algo'];
switch (ord($type)) {
case self::PUBLICKEYBLOB:
case self::PUBLICKEYBLOBEX:
@@ -121,12 +119,10 @@ public static function load($key, $password = '')
// RSAPUBKEY rsapubkey
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa387685(v=vs.85).aspx
// could do V for pubexp but that's unsigned 32-bit whereas some PHP installs only do signed 32-bit
- extract(unpack('Vmagic/Vbitlen/a4pubexp', Strings::shift($key, 12)));
- /**
- * @var integer $magic
- * @var integer $bitlen
- * @var string $pubexp
- */
+ $unpacked = unpack('Vmagic/Vbitlen/a4pubexp', Strings::shift($key, 12));
+ $magic = $unpacked['magic'];
+ $bitlen = $unpacked['bitlen'];
+ $pubexp = $unpacked['pubexp'];
switch ($magic) {
case self::RSA2:
$components['isPublicKey'] = false;
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php
index 76335567f..68d92701e 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php
@@ -96,6 +96,20 @@ public static function load($key, $password = '')
$components['isPublicKey'] = true;
}
+ $components = $components + $key;
+ foreach ($components as &$val) {
+ if ($val instanceof BigInteger) {
+ $val = self::makePositive($val);
+ }
+ if (is_array($val)) {
+ foreach ($val as &$subval) {
+ if ($subval instanceof BigInteger) {
+ $subval = self::makePositive($subval);
+ }
+ }
+ }
+ }
+
return $components + $key;
}
@@ -157,4 +171,17 @@ public static function savePublicKey(BigInteger $n, BigInteger $e)
return self::wrapPublicKey($key, 'RSA');
}
+
+ /**
+ * Negative numbers make no sense in RSA so convert them to positive
+ *
+ * @param BigInteger $x
+ * @return string
+ */
+ private static function makePositive(BigInteger $x)
+ {
+ return $x->isNegative() ?
+ new BigInteger($x->toBytes(true), 256) :
+ $x;
+ }
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php
index 293903cef..8416758c2 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php
@@ -56,7 +56,10 @@ public static function load($key, $password = '')
if (!isset($components['private'])) {
return $components;
}
- extract($components);
+ $type = $components['type'];
+ $comment = $components['comment'];
+ $public = $components['public'];
+ $private = $components['private'];
unset($components['public'], $components['private']);
$isPublicKey = false;
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php
index ff31f9c88..5ba7cf7fe 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php
@@ -74,8 +74,8 @@ class Rijndael extends BlockCipher
* or not for the current $block_size/$key_length.
* In case of, $cipher_name_mcrypt will be set dynamically at run time accordingly.
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
- * @see \phpseclib3\Crypt\Common\SymmetricKey::engine
+ * @see Common\SymmetricKey::cipher_name_mcrypt
+ * @see Common\SymmetricKey::engine
* @see self::isValidEngine()
* @var string
*/
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php
index 1ff5ed02b..932b7c611 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php
@@ -66,8 +66,8 @@ class TripleDES extends DES
/**
* The mcrypt specific name of the cipher
*
- * @see \phpseclib3\Crypt\DES::cipher_name_mcrypt
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
+ * @see DES::cipher_name_mcrypt
+ * @see Common\SymmetricKey::cipher_name_mcrypt
* @var string
*/
protected $cipher_name_mcrypt = 'tripledes';
@@ -75,7 +75,7 @@ class TripleDES extends DES
/**
* Optimizing value while CFB-encrypting
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len
+ * @see Common\SymmetricKey::cfb_init_len
* @var int
*/
protected $cfb_init_len = 750;
@@ -84,7 +84,7 @@ class TripleDES extends DES
* max possible size of $key
*
* @see self::setKey()
- * @see \phpseclib3\Crypt\DES::setKey()
+ * @see DES::setKey()
* @var string
*/
protected $key_length_max = 24;
@@ -126,8 +126,8 @@ class TripleDES extends DES
*
* - cbc3 (same as cbc)
*
- * @see \phpseclib3\Crypt\DES::__construct()
- * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
+ * @see Crypt\DES::__construct()
+ * @see Common\SymmetricKey::__construct()
* @param string $mode
*/
public function __construct($mode)
@@ -169,7 +169,7 @@ public function __construct($mode)
*
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
+ * @see Common\SymmetricKey::__construct()
* @param int $engine
* @return bool
*/
@@ -189,7 +189,7 @@ protected function isValidEngineHelper($engine)
*
* SetIV is not required when \phpseclib3\Crypt\Common\SymmetricKey::MODE_ECB is being used.
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setIV()
+ * @see Common\SymmetricKey::setIV()
* @param string $iv
*/
public function setIV($iv)
@@ -209,7 +209,7 @@ public function setIV($iv)
*
* If you want to use a 64-bit key use DES.php
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey:setKeyLength()
+ * @see Common\SymmetricKey:setKeyLength()
* @throws \LengthException if the key length is invalid
* @param int $length
*/
@@ -233,8 +233,8 @@ public function setKeyLength($length)
*
* DES also requires that every eighth bit be a parity bit, however, we'll ignore that.
*
- * @see \phpseclib3\Crypt\DES::setKey()
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setKey()
+ * @see DES::setKey()
+ * @see Common\SymmetricKey::setKey()
* @throws \LengthException if the key length is invalid
* @param string $key
*/
@@ -270,7 +270,7 @@ public function setKey($key)
/**
* Encrypts a message.
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt()
+ * @see Common\SymmetricKey::encrypt()
* @param string $plaintext
* @return string $cipertext
*/
@@ -296,7 +296,7 @@ public function encrypt($plaintext)
/**
* Decrypts a message.
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt()
+ * @see Common\SymmetricKey::decrypt()
* @param string $ciphertext
* @return string $plaintext
*/
@@ -351,7 +351,7 @@ public function decrypt($ciphertext)
* continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them),
* however, they are also less intuitive and more likely to cause you problems.
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::enableContinuousBuffer()
+ * @see Common\SymmetricKey::enableContinuousBuffer()
* @see self::disableContinuousBuffer()
*/
public function enableContinuousBuffer()
@@ -369,7 +369,7 @@ public function enableContinuousBuffer()
*
* The default behavior.
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::disableContinuousBuffer()
+ * @see Common\SymmetricKey::disableContinuousBuffer()
* @see self::enableContinuousBuffer()
*/
public function disableContinuousBuffer()
@@ -385,8 +385,8 @@ public function disableContinuousBuffer()
/**
* Creates the key schedule
*
- * @see \phpseclib3\Crypt\DES::setupKey()
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setupKey()
+ * @see DES::setupKey()
+ * @see Common\SymmetricKey::setupKey()
*/
protected function setupKey()
{
@@ -419,8 +419,8 @@ protected function setupKey()
/**
* Sets the internal crypt engine
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
- * @see \phpseclib3\Crypt\Common\SymmetricKey::setPreferredEngine()
+ * @see Common\SymmetricKey::__construct()
+ * @see Common\SymmetricKey::setPreferredEngine()
* @param int $engine
*/
public function setPreferredEngine($engine)
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php
index bf765632a..141ad0141 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php
@@ -49,7 +49,7 @@ class Twofish extends BlockCipher
/**
* The mcrypt specific name of the cipher
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
+ * @see Common\SymmetricKey::cipher_name_mcrypt
* @var string
*/
protected $cipher_name_mcrypt = 'twofish';
@@ -57,7 +57,7 @@ class Twofish extends BlockCipher
/**
* Optimizing value while CFB-encrypting
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len
+ * @see Common\SymmetricKey::cfb_init_len
* @var int
*/
protected $cfb_init_len = 800;
@@ -431,7 +431,7 @@ public function setKey($key)
/**
* Setup the key (expansion)
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupKey()
+ * @see Common\SymmetricKey::_setupKey()
*/
protected function setupKey()
{
@@ -700,7 +700,7 @@ protected function decryptBlock($in)
/**
* Setup the performance-optimized function for de/encrypt()
*
- * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupInlineCrypt()
+ * @see Common\SymmetricKey::_setupInlineCrypt()
*/
protected function setupInlineCrypt()
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php
index c4b06a560..685a7cde0 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php
@@ -273,8 +273,7 @@ private static function decode_ber($encoded, $start = 0, $encoded_pos = 0)
// tags of indefinte length don't really have a header length; this length includes the tag
$current += ['headerlength' => $length + 2];
$start += $length;
- extract(unpack('Nlength', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4)));
- /** @var integer $length */
+ $length = unpack('Nlength', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4))['length'];
} else {
$current += ['headerlength' => 2];
}
@@ -793,7 +792,11 @@ public static function asn1map(array $decoded, $mapping, $special = [])
$temp = new BigInteger($decoded['content'], -256);
}
if (isset($mapping['mapping'])) {
- $temp = (int) $temp->toString();
+ $temp = $temp->toString();
+ if (strlen($temp) > 1) {
+ return false;
+ }
+ $temp = (int) $temp;
return isset($mapping['mapping'][$temp]) ?
$mapping['mapping'][$temp] :
false;
@@ -931,7 +934,19 @@ private static function encode_der($source, array $mapping, $idx = null, array $
an untagged "DummyReference" (see ITU-T Rec. X.683 | ISO/IEC 8824-4, 8.3)."
*/
if (isset($child['explicit']) || $child['type'] == self::TYPE_CHOICE) {
- $subtag = chr((self::CLASS_CONTEXT_SPECIFIC << 6) | 0x20 | $child['constant']);
+ if ($child['constant'] <= 30) {
+ $subtag = chr((self::CLASS_CONTEXT_SPECIFIC << 6) | 0x20 | $child['constant']);
+ } else {
+ $constant = $child['constant'];
+ $subtag = '';
+ while ($constant > 0) {
+ $subtagvalue = $constant & 0x7F;
+ $subtag = (chr(0x80 | $subtagvalue)) . $subtag;
+ $constant = $constant >> 7;
+ }
+ $subtag[strlen($subtag) - 1] = $subtag[strlen($subtag) - 1] & chr(0x7F);
+ $subtag = chr((self::CLASS_CONTEXT_SPECIFIC << 6) | 0x20 | 0x1f) . $subtag;
+ }
$temp = $subtag . self::encodeLength(strlen($temp)) . $temp;
} else {
$subtag = chr((self::CLASS_CONTEXT_SPECIFIC << 6) | (ord($temp[0]) & 0x20) | $child['constant']);
@@ -1140,6 +1155,8 @@ private static function encode_der($source, array $mapping, $idx = null, array $
*/
public static function decodeOID($content)
{
+ // BigInteger's are used because of OIDs like 2.25.329800735698586629295641978511506172918
+ // https://healthcaresecprivacy.blogspot.com/2011/02/creating-and-using-unique-id-uuid-oid.html elaborates.
static $eighty;
if (!$eighty) {
$eighty = new BigInteger(80);
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/X509.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/X509.php
index 00504f15d..80e0bab10 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/X509.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/X509.php
@@ -626,7 +626,9 @@ private function mapOutExtensions(array &$root, $path)
$extensions = &$this->subArray($root, $path, !empty($this->extensionValues));
foreach ($this->extensionValues as $id => $data) {
- extract($data);
+ $critical = $data['critical'];
+ $replace = $data['replace'];
+ $value = $data['value'];
$newext = [
'extnId' => $id,
'extnValue' => $value,
@@ -1858,7 +1860,7 @@ public function getDN($format = self::DN_ARRAY, $dn = null)
$dn = $this->getDN(self::DN_CANON, $dn);
$hash = new Hash('sha1');
$hash = $hash->hash($dn);
- extract(unpack('Vhash', $hash));
+ $hash = unpack('Vhash', $hash)['hash'];
return strtolower(Strings::bin2hex(pack('N', $hash)));
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php
index 2a9cc0b43..a1ea0aebd 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php
@@ -143,6 +143,11 @@ private static function initialize_static_variables()
['PHP64', ['DefaultEngine']],
['PHP32', ['DefaultEngine']]
];
+ // per https://phpseclib.com/docs/speed PHP 8.4.0+ _significantly_ sped up BCMath
+ if (version_compare(PHP_VERSION, '8.4.0') >= 0) {
+ $engines[1][0] = 'BCMath';
+ $engines[2][0] = 'PHP64';
+ }
foreach ($engines as $engine) {
try {
@@ -333,12 +338,10 @@ public function modInverse(BigInteger $n)
*/
public function extendedGCD(BigInteger $n)
{
- extract($this->value->extendedGCD($n->value));
- /**
- * @var BigInteger $gcd
- * @var BigInteger $x
- * @var BigInteger $y
- */
+ $extended = $this->value->extendedGCD($n->value);
+ $gcd = $extended['gcd'];
+ $x = $extended['x'];
+ $y = $extended['y'];
return [
'gcd' => new static($gcd),
'x' => new static($x),
@@ -399,7 +402,7 @@ public function getPrecision()
*
* Will be called, automatically, when serialize() is called on a BigInteger object.
*
- * __sleep() / __wakeup() have been around since PHP 4.0
+ * __sleep() / __wakeup() have been around since PHP 4.0 but were deprecated in PHP 8.5
*
* \Serializable was introduced in PHP 5.1 and deprecated in PHP 8.1:
* https://wiki.php.net/rfc/phase_out_serializable
@@ -434,6 +437,38 @@ public function __wakeup()
}
}
+ /**
+ * __serialize() magic method
+ *
+ * @see self::__unserialize()
+ * @return array
+ * @access public
+ */
+ public function __serialize()
+ {
+ $result = ['hex' => $this->toHex(true)];
+ if ($this->getPrecision() > 0) {
+ $result['precision'] = $this->getPrecision();
+ }
+ return $result;
+ }
+
+ /**
+ * __unserialize() magic method
+ *
+ * @see self::__serialize()
+ * @access public
+ */
+ public function __unserialize(array $data)
+ {
+ $temp = new static($data['hex'], -16);
+ $this->value = $temp->value;
+ if (isset($data['precision']) && $data['precision'] > 0) {
+ // recalculate $this->bitmask
+ $this->setPrecision($data['precision']);
+ }
+ }
+
/**
* JSON Serialize
*
@@ -617,10 +652,9 @@ public static function minMaxBits($bits)
self::initialize_static_variables();
$class = self::$mainEngine;
- extract($class::minMaxBits($bits));
- /** @var BigInteger $min
- * @var BigInteger $max
- */
+ $minMax = $class::minMaxBits($bits);
+ $min = $minMax['min'];
+ $max = $minMax['max'];
return [
'min' => new static($min),
'max' => new static($max)
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath.php
index e3a49906b..7b6283002 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath.php
@@ -38,6 +38,11 @@ class BCMath extends Engine
*/
const ENGINE_DIR = 'BCMath';
+ /**
+ * Test to see if bcmod() accepts 2 or 3 parameters
+ */
+ const BCMOD_THREE_PARAMS = PHP_VERSION_ID >= 72000;
+
/**
* Test for engine validity
*
@@ -148,7 +153,7 @@ public function toBytes($twos_compliment = false)
}
while (bccomp($current, '0', 0) > 0) {
- $temp = bcmod($current, '16777216');
+ $temp = self::BCMOD_THREE_PARAMS ? bcmod($current, '16777216', 0) : bcmod($current, '16777216');
$value = chr($temp >> 16) . chr($temp >> 8) . chr($temp) . $value;
$current = bcdiv($current, '16777216', 0);
}
@@ -167,7 +172,7 @@ public function toBytes($twos_compliment = false)
public function add(BCMath $y)
{
$temp = new self();
- $temp->value = bcadd($this->value, $y->value);
+ $temp->value = bcadd($this->value, $y->value, 0);
return $this->normalize($temp);
}
@@ -181,7 +186,7 @@ public function add(BCMath $y)
public function subtract(BCMath $y)
{
$temp = new self();
- $temp->value = bcsub($this->value, $y->value);
+ $temp->value = bcsub($this->value, $y->value, 0);
return $this->normalize($temp);
}
@@ -195,7 +200,7 @@ public function subtract(BCMath $y)
public function multiply(BCMath $x)
{
$temp = new self();
- $temp->value = bcmul($this->value, $x->value);
+ $temp->value = bcmul($this->value, $x->value, 0);
return $this->normalize($temp);
}
@@ -217,7 +222,7 @@ public function divide(BCMath $y)
$remainder = new self();
$quotient->value = bcdiv($this->value, $y->value, 0);
- $remainder->value = bcmod($this->value, $y->value);
+ $remainder->value = self::BCMOD_THREE_PARAMS ? bcmod($this->value, $y->value, 0) : bcmod($this->value, $y->value);
if ($remainder->value[0] == '-') {
$remainder->value = bcadd($remainder->value, $y->value[0] == '-' ? substr($y->value, 1) : $y->value, 0);
@@ -297,8 +302,7 @@ public function extendedGCD(BCMath $n)
*/
public function gcd(BCMath $n)
{
- extract($this->extendedGCD($n));
- /** @var BCMath $gcd */
+ $gcd = $this->extendedGCD($n)['gcd'];
return $gcd;
}
@@ -475,7 +479,7 @@ protected function normalize(BCMath $result)
$result->bitmask = $this->bitmask;
if ($result->bitmask !== false) {
- $result->value = bcmod($result->value, $result->bitmask->value);
+ $result->value = self::BCMOD_THREE_PARAMS ? bcmod($result->value, $result->bitmask->value, 0) : bcmod($result->value, $result->bitmask->value);
}
return $result;
@@ -523,7 +527,7 @@ public static function randomRange(BCMath $min, BCMath $max)
protected function make_odd()
{
if (!$this->isOdd()) {
- $this->value = bcadd($this->value, '1');
+ $this->value = bcadd($this->value, '1', 0);
}
}
@@ -547,7 +551,7 @@ protected function testSmallPrimes()
$value = $this->value;
foreach (self::PRIMES as $prime) {
- $r = bcmod($this->value, $prime);
+ $r = self::BCMOD_THREE_PARAMS ? bcmod($this->value, $prime, 0) : bcmod($this->value, $prime);
if ($r == '0') {
return $this->value == $prime;
}
@@ -587,7 +591,7 @@ public static function scan1divide(BCMath $r)
public function pow(BCMath $n)
{
$temp = new self();
- $temp->value = bcpow($this->value, $n->value);
+ $temp->value = bcpow($this->value, $n->value, 0);
return $this->normalize($temp);
}
@@ -656,8 +660,9 @@ public function isOdd()
*/
public function testBit($x)
{
+ $divisor = bcpow('2', $x + 1, 0);
return bccomp(
- bcmod($this->value, bcpow('2', $x + 1, 0)),
+ self::BCMOD_THREE_PARAMS ? bcmod($this->value, $divisor, 0) : bcmod($this->value, $divisor),
bcpow('2', $x, 0),
0
) >= 0;
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Base.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Base.php
index fe21e0411..88cd93e94 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Base.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Base.php
@@ -91,7 +91,7 @@ protected static function prepareReduce($x, $n, $class)
*/
protected static function multiplyReduce($x, $y, $n, $class)
{
- return static::reduce(bcmul($x, $y), $n);
+ return static::reduce(bcmul($x, $y, 0), $n);
}
/**
@@ -105,6 +105,6 @@ protected static function multiplyReduce($x, $y, $n, $class)
*/
protected static function squareReduce($x, $n, $class)
{
- return static::reduce(bcmul($x, $x), $n);
+ return static::reduce(bcmul($x, $x, 0), $n);
}
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php
index b7ca8a2c6..f8bbcfa27 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php
@@ -33,7 +33,7 @@ abstract class BuiltIn extends BCMath
protected static function powModHelper(BCMath $x, BCMath $e, BCMath $n)
{
$temp = new BCMath();
- $temp->value = bcpowmod($x->value, $e->value, $n->value);
+ $temp->value = bcpowmod($x->value, $e->value, $n->value, 0);
return $x->normalize($temp);
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/Barrett.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/Barrett.php
index 9e01bf005..1bec0a11f 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/Barrett.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/Barrett.php
@@ -67,7 +67,7 @@ protected static function reduce($n, $m)
$m_length = strlen($m);
if (strlen($n) > 2 * $m_length) {
- return bcmod($n, $m);
+ return self::BCMOD_THREE_PARAMS ? bcmod($n, $m, 0) : bcmod($n, $m);
}
// if (m.length >> 1) + 2 <= m.length then m is too small and n can't be reduced
@@ -89,14 +89,16 @@ protected static function reduce($n, $m)
$lhs = '1' . str_repeat('0', $m_length + ($m_length >> 1));
$u = bcdiv($lhs, $m, 0);
- $m1 = bcsub($lhs, bcmul($u, $m));
+ $m1 = bcsub($lhs, bcmul($u, $m, 0), 0);
$cache[self::DATA][] = [
'u' => $u, // m.length >> 1 (technically (m.length >> 1) + 1)
'm1' => $m1 // m.length
];
} else {
- extract($cache[self::DATA][$key]);
+ $cacheValues = $cache[self::DATA][$key];
+ $u = $cacheValues['u'];
+ $m1 = $cacheValues['m1'];
}
$cutoff = $m_length + ($m_length >> 1);
@@ -104,8 +106,8 @@ protected static function reduce($n, $m)
$lsd = substr($n, -$cutoff);
$msd = substr($n, 0, -$cutoff);
- $temp = bcmul($msd, $m1); // m.length + (m.length >> 1)
- $n = bcadd($lsd, $temp); // m.length + (m.length >> 1) + 1 (so basically we're adding two same length numbers)
+ $temp = bcmul($msd, $m1, 0); // m.length + (m.length >> 1)
+ $n = bcadd($lsd, $temp, 0); // m.length + (m.length >> 1) + 1 (so basically we're adding two same length numbers)
//if ($m_length & 1) {
// return self::regularBarrett($n, $m);
//}
@@ -114,31 +116,31 @@ protected static function reduce($n, $m)
$temp = substr($n, 0, -$m_length + 1);
// if even: ((m.length >> 1) + 2) + (m.length >> 1) == m.length + 2
// if odd: ((m.length >> 1) + 2) + (m.length >> 1) == (m.length - 1) + 2 == m.length + 1
- $temp = bcmul($temp, $u);
+ $temp = bcmul($temp, $u, 0);
// if even: (m.length + 2) - ((m.length >> 1) + 1) = m.length - (m.length >> 1) + 1
// if odd: (m.length + 1) - ((m.length >> 1) + 1) = m.length - (m.length >> 1)
$temp = substr($temp, 0, -($m_length >> 1) - 1);
// if even: (m.length - (m.length >> 1) + 1) + m.length = 2 * m.length - (m.length >> 1) + 1
// if odd: (m.length - (m.length >> 1)) + m.length = 2 * m.length - (m.length >> 1)
- $temp = bcmul($temp, $m);
+ $temp = bcmul($temp, $m, 0);
// at this point, if m had an odd number of digits, we'd be subtracting a 2 * m.length - (m.length >> 1) digit
// number from a m.length + (m.length >> 1) + 1 digit number. ie. there'd be an extra digit and the while loop
// following this comment would loop a lot (hence our calling _regularBarrett() in that situation).
- $result = bcsub($n, $temp);
+ $result = bcsub($n, $temp, 0);
//if (bccomp($result, '0') < 0) {
if ($result[0] == '-') {
$temp = '1' . str_repeat('0', $m_length + 1);
- $result = bcadd($result, $temp);
+ $result = bcadd($result, $temp, 0);
}
- while (bccomp($result, $m) >= 0) {
- $result = bcsub($result, $m);
+ while (bccomp($result, $m, 0) >= 0) {
+ $result = bcsub($result, $m, 0);
}
- return $correctionNeeded ? substr($result, 0, -1) : $result;
+ return $correctionNeeded && $result != '0' ? substr($result, 0, -1) : $result;
}
/**
@@ -161,7 +163,7 @@ private static function regularBarrett($x, $n)
$n_length = strlen($n);
if (strlen($x) > 2 * $n_length) {
- return bcmod($x, $n);
+ return self::BCMOD_THREE_PARAMS ? bcmod($x, $n, 0) : bcmod($x, $n);
}
if (($key = array_search($n, $cache[self::VARIABLE])) === false) {
@@ -172,21 +174,21 @@ private static function regularBarrett($x, $n)
}
$temp = substr($x, 0, -$n_length + 1);
- $temp = bcmul($temp, $cache[self::DATA][$key]);
+ $temp = bcmul($temp, $cache[self::DATA][$key], 0);
$temp = substr($temp, 0, -$n_length - 1);
$r1 = substr($x, -$n_length - 1);
- $r2 = substr(bcmul($temp, $n), -$n_length - 1);
+ $r2 = substr(bcmul($temp, $n, 0), -$n_length - 1);
$result = bcsub($r1, $r2);
//if (bccomp($result, '0') < 0) {
if ($result[0] == '-') {
$q = '1' . str_repeat('0', $n_length + 1);
- $result = bcadd($result, $q);
+ $result = bcadd($result, $q, 0);
}
- while (bccomp($result, $n) >= 0) {
- $result = bcsub($result, $n);
+ while (bccomp($result, $n, 0) >= 0) {
+ $result = bcsub($result, $n, 0);
}
return $result;
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/EvalBarrett.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/EvalBarrett.php
index e033ba575..040d7b5a7 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/EvalBarrett.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/EvalBarrett.php
@@ -58,7 +58,7 @@ protected static function generateCustomReduction(BCMath $m, $class)
$m_length = strlen($m);
if ($m_length < 5) {
- $code = 'return bcmod($x, $n);';
+ $code = 'return self::BCMOD_THREE_PARAMS ? bcmod($x, $n, 0) : bcmod($x, $n);';
eval('$func = function ($n) { ' . $code . '};');
self::$custom_reduction = $func;
return;
@@ -66,7 +66,7 @@ protected static function generateCustomReduction(BCMath $m, $class)
$lhs = '1' . str_repeat('0', $m_length + ($m_length >> 1));
$u = bcdiv($lhs, $m, 0);
- $m1 = bcsub($lhs, bcmul($u, $m));
+ $m1 = bcsub($lhs, bcmul($u, $m, 0), 0);
$cutoff = $m_length + ($m_length >> 1);
@@ -78,23 +78,23 @@ protected static function generateCustomReduction(BCMath $m, $class)
$lsd = substr($n, -' . $cutoff . ');
$msd = substr($n, 0, -' . $cutoff . ');
- $temp = bcmul($msd, ' . $m1 . ');
- $n = bcadd($lsd, $temp);
+ $temp = bcmul($msd, ' . $m1 . ', 0);
+ $n = bcadd($lsd, $temp, 0);
$temp = substr($n, 0, ' . (-$m_length + 1) . ');
- $temp = bcmul($temp, ' . $u . ');
+ $temp = bcmul($temp, ' . $u . ', 0);
$temp = substr($temp, 0, ' . (-($m_length >> 1) - 1) . ');
- $temp = bcmul($temp, ' . $m . ');
+ $temp = bcmul($temp, ' . $m . ', 0);
- $result = bcsub($n, $temp);
+ $result = bcsub($n, $temp, 0);
if ($result[0] == \'-\') {
$temp = \'1' . str_repeat('0', $m_length + 1) . '\';
- $result = bcadd($result, $temp);
+ $result = bcadd($result, $temp, 0);
}
while (bccomp($result, ' . $m . ') >= 0) {
- $result = bcsub($result, ' . $m . ');
+ $result = bcsub($result, ' . $m . ', 0);
}
return $result;';
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php
index 474abe105..ef3dcac9a 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php
@@ -316,11 +316,9 @@ protected function modInverseHelper(Engine $n)
return $this->normalize($n->subtract($temp));
}
- extract($this->extendedGCD($n));
- /**
- * @var Engine $gcd
- * @var Engine $x
- */
+ $extended = $this->extendedGCD($n);
+ $gcd = $extended['gcd'];
+ $x = $extended['x'];
if (!$gcd->equals(static::$one[static::class])) {
return false;
@@ -366,6 +364,44 @@ public function __wakeup()
}
}
+ /**
+ * __serialize() magic method
+ *
+ * __sleep / __wakeup were depreciated in PHP 8.5
+ * Will be called, automatically, when serialize() is called on a Math_BigInteger object.
+ *
+ * @see self::__unserialize()
+ * @access public
+ */
+ public function __serialize()
+ {
+ $result = ['hex' => $this->toHex(true)];
+ if ($this->precision > 0) {
+ $result['precision'] = $this->precision;
+ }
+ return $result;
+ }
+
+ /**
+ * __unserialize() magic method
+ *
+ * __sleep / __wakeup were depreciated in PHP 8.5
+ * Will be called, automatically, when unserialize() is called on a Math_BigInteger object.
+ *
+ * @see self::__serialize()
+ * @access public
+ */
+ public function __unserialize(array $data)
+ {
+ $temp = new static($data['hex'], -16);
+ $this->value = $temp->value;
+ $this->is_negative = $temp->is_negative;
+ if (isset($data['precision']) && $data['precision'] > 0) {
+ // recalculate $this->bitmask
+ $this->setPrecision($data['precision']);
+ }
+ }
+
/**
* JSON Serialize
*
@@ -644,7 +680,7 @@ protected function powModOuter(Engine $e, Engine $n)
return $this->normalize($temp->powModInner($e, $n));
}
- if ($this->compare($n) > 0) {
+ if ($this->compare($n) > 0 || $this->isNegative()) {
list(, $temp) = $this->divide($n);
return $temp->powModInner($e, $n);
}
@@ -740,11 +776,9 @@ protected static function slidingWindow(Engine $x, Engine $e, Engine $n, $class)
*/
public static function random($size)
{
- extract(static::minMaxBits($size));
- /**
- * @var BigInteger $min
- * @var BigInteger $max
- */
+ $minMax = static::minMaxBits($size);
+ $min = $minMax['min'];
+ $max = $minMax['max'];
return static::randomRange($min, $max);
}
@@ -758,11 +792,9 @@ public static function random($size)
*/
public static function randomPrime($size)
{
- extract(static::minMaxBits($size));
- /**
- * @var static $min
- * @var static $max
- */
+ $minMax = static::minMaxBits($size);
+ $min = $minMax['min'];
+ $max = $minMax['max'];
return static::randomRangePrime($min, $max);
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php
index f61636297..0db43ae63 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php
@@ -296,7 +296,10 @@ public function modInverse(GMP $n)
*/
public function extendedGCD(GMP $n)
{
- extract(gmp_gcdext($this->value, $n->value));
+ $extended = gmp_gcdext($this->value, $n->value);
+ $g = $extended['g'];
+ $s = $extended['s'];
+ $t = $extended['t'];
return [
'gcd' => $this->normalize(new self($g)),
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php
index 2d8959522..de556a3b2 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php
@@ -533,6 +533,9 @@ protected function divideHelper(PHP $y)
$quotient = new static();
$remainder = new static();
$quotient->value = $q;
+ if ($this->is_negative) {
+ $r = $y->value[0] - $r;
+ }
$remainder->value = [$r];
$quotient->is_negative = $this->is_negative != $y->is_negative;
return [$this->normalize($quotient), $this->normalize($remainder)];
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php
index 886896618..e624f3cad 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php
@@ -98,7 +98,9 @@ protected static function reduce(array $n, array $m, $class)
'm1' => $m1 // m.length
];
} else {
- extract($cache[self::DATA][$key]);
+ $cacheValues = $cache[self::DATA][$key];
+ $u = $cacheValues['u'];
+ $m1 = $cacheValues['m1'];
}
$cutoff = $m_length + ($m_length >> 1);
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php
index 15eb99c7d..1ebb2f5d7 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php
@@ -54,10 +54,24 @@ class Integer extends Base
/**
* Zero
*
- * @var BigInteger
+ * @var BigInteger[]
*/
protected static $zero;
+ /**
+ * One
+ *
+ * @var BigInteger[]
+ */
+ protected static $one;
+
+ /**
+ * Two
+ *
+ * @var BigInteger[]
+ */
+ protected static $two;
+
/**
* Default constructor
*
@@ -68,7 +82,7 @@ public function __construct($instanceID, $num = null)
{
$this->instanceID = $instanceID;
if (!isset($num)) {
- $this->value = clone static::$zero[static::class];
+ $this->value = clone static::$zero[$instanceID];
} else {
$reduce = static::$reduce[$instanceID];
$this->value = $reduce($num);
@@ -95,8 +109,8 @@ public static function setModulo($instanceID, BigInteger $modulo)
public static function setRecurringModuloFunction($instanceID, callable $function)
{
static::$reduce[$instanceID] = $function;
- if (!isset(static::$zero[static::class])) {
- static::$zero[static::class] = new BigInteger();
+ if (!isset(static::$zero[$instanceID])) {
+ static::$zero[$instanceID] = new BigInteger();
}
}
@@ -107,6 +121,9 @@ public static function cleanupCache($instanceID)
{
unset(static::$modulo[$instanceID]);
unset(static::$reduce[$instanceID]);
+ unset(static::$zero[$instanceID]);
+ unset(static::$one[$instanceID]);
+ unset(static::$two[$instanceID]);
}
/**
@@ -240,32 +257,35 @@ public function pow(BigInteger $x)
*/
public function squareRoot()
{
- static $one, $two;
- if (!isset($one)) {
- $one = new BigInteger(1);
- $two = new BigInteger(2);
+ if (!isset(static::$one[$this->instanceID])) {
+ static::$one[$this->instanceID] = new BigInteger(1);
+ static::$two[$this->instanceID] = new BigInteger(2);
}
- $reduce = static::$reduce[$this->instanceID];
- $p_1 = static::$modulo[$this->instanceID]->subtract($one);
+ $one = &static::$one[$this->instanceID];
+ $two = &static::$two[$this->instanceID];
+ $modulo = &static::$modulo[$this->instanceID];
+ $reduce = &static::$reduce[$this->instanceID];
+
+ $p_1 = $modulo->subtract($one);
$q = clone $p_1;
$s = BigInteger::scan1divide($q);
list($pow) = $p_1->divide($two);
- for ($z = $one; !$z->equals(static::$modulo[$this->instanceID]); $z = $z->add($one)) {
- $temp = $z->powMod($pow, static::$modulo[$this->instanceID]);
+ for ($z = $one; !$z->equals($modulo); $z = $z->add($one)) {
+ $temp = $z->powMod($pow, $modulo);
if ($temp->equals($p_1)) {
break;
}
}
$m = new BigInteger($s);
- $c = $z->powMod($q, static::$modulo[$this->instanceID]);
- $t = $this->value->powMod($q, static::$modulo[$this->instanceID]);
+ $c = $z->powMod($q, $modulo);
+ $t = $this->value->powMod($q, $modulo);
list($temp) = $q->add($one)->divide($two);
- $r = $this->value->powMod($temp, static::$modulo[$this->instanceID]);
+ $r = $this->value->powMod($temp, $modulo);
while (!$t->equals($one)) {
for ($i = clone $one; $i->compare($m) < 0; $i = $i->add($one)) {
- if ($t->powMod($two->pow($i), static::$modulo[$this->instanceID])->equals($one)) {
+ if ($t->powMod($two->pow($i), $modulo)->equals($one)) {
break;
}
}
@@ -273,7 +293,7 @@ public function squareRoot()
if ($i->compare($m) == 0) {
return false;
}
- $b = $c->powMod($two->pow($m->subtract($i)->subtract($one)), static::$modulo[$this->instanceID]);
+ $b = $c->powMod($two->pow($m->subtract($i)->subtract($one)), $modulo);
$m = $i;
$c = $reduce($b->multiply($b));
$t = $reduce($t->multiply($c));
@@ -356,6 +376,8 @@ public function getNAF($w = 1)
{
$w++;
+ $zero = &static::$zero[$this->instanceID];
+
$mask = new BigInteger((1 << $w) - 1);
$sub = new BigInteger(1 << $w);
//$sub = new BigInteger(1 << ($w - 1));
@@ -363,7 +385,7 @@ public function getNAF($w = 1)
$d_i = [];
$i = 0;
- while ($d->compare(static::$zero[static::class]) > 0) {
+ while ($d->compare($zero) > 0) {
if ($d->isOdd()) {
// start mods
@@ -377,7 +399,7 @@ public function getNAF($w = 1)
} else {
$d_i[$i] = 0;
}
- $shift = !$d->equals(static::$zero[static::class]) && $d->bitwise_and($mask)->equals(static::$zero[static::class]) ? $w : 1; // $w or $w + 1?
+ $shift = !$d->equals($zero) && $d->bitwise_and($mask)->equals($zero) ? $w : 1; // $w or $w + 1?
$d = $d->bitwise_rightShift($shift);
while (--$shift > 0) {
$d_i[++$i] = 0;
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php
index 47dac48f9..9d385ad75 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php
@@ -836,6 +836,8 @@ public function realpath($path)
return false;
}
+ $path = (string) $path;
+
if (!$this->canonicalize_paths) {
if ($this->pwd === true) {
return '.';
@@ -923,6 +925,8 @@ public function chdir($dir)
return false;
}
+ $dir = (string) $dir;
+
// assume current dir if $dir is empty
if ($dir === '') {
$dir = './';
@@ -932,6 +936,9 @@ public function chdir($dir)
}
$dir = $this->realpath($dir);
+ if ($dir === false) {
+ return false;
+ }
// confirm that $dir is, in fact, a valid directory
if ($this->use_stat_cache && is_array($this->query_stat_cache($dir))) {
@@ -3355,8 +3362,7 @@ private function get_sftp_packet($request_id = null)
if (strlen($this->packet_buffer) < 4) {
throw new \RuntimeException('Packet is too small');
}
- extract(unpack('Nlength', Strings::shift($this->packet_buffer, 4)));
- /** @var integer $length */
+ $length = unpack('Nlength', Strings::shift($this->packet_buffer, 4))['length'];
$tempLength = $length;
$tempLength -= strlen($this->packet_buffer);
@@ -3386,7 +3392,7 @@ private function get_sftp_packet($request_id = null)
$this->packet_type = ord(Strings::shift($this->packet_buffer));
if ($this->use_request_id) {
- extract(unpack('Npacket_id', Strings::shift($this->packet_buffer, 4))); // remove the request id
+ $packet_id = unpack('Npacket_id', Strings::shift($this->packet_buffer, 4))['packet_id']; // remove the request id
$length -= 5; // account for the request id and the packet type
} else {
$length -= 1; // account for the packet type
@@ -3559,7 +3565,6 @@ protected function disconnect_helper($reason)
/**
* Enable Date Preservation
- *
*/
public function enableDatePreservation()
{
@@ -3568,13 +3573,101 @@ public function enableDatePreservation()
/**
* Disable Date Preservation
- *
*/
public function disableDatePreservation()
{
$this->preserveTime = false;
}
+ /**
+ * Copy
+ *
+ * This method (currently) only works if the copy-data extension is available
+ *
+ * @param string $oldname
+ * @param string $newname
+ * @return bool
+ */
+ public function copy($oldname, $newname)
+ {
+ if (!$this->precheck()) {
+ return false;
+ }
+
+ $oldname = $this->realpath($oldname);
+ $newname = $this->realpath($newname);
+ if ($oldname === false || $newname === false) {
+ return false;
+ }
+
+ if (!isset($this->extensions['copy-data']) || $this->extensions['copy-data'] !== '1') {
+ throw new \RuntimeException(
+ "Extension 'copy-data' is not supported by the server. " .
+ "Call getSupportedVersions() to see a list of supported extension"
+ );
+ }
+
+ $size = $this->filesize($oldname);
+
+ $packet = Strings::packSSH2('s', $oldname);
+ $packet .= $this->version >= 5 ?
+ pack('N3', 0, NET_SFTP_OPEN_OPEN_EXISTING, 0) :
+ pack('N2', NET_SFTP_OPEN_READ, 0);
+ $this->send_sftp_packet(NET_SFTP_OPEN, $packet);
+
+ $response = $this->get_sftp_packet();
+ switch ($this->packet_type) {
+ case NET_SFTP_HANDLE:
+ $oldhandle = substr($response, 4);
+ break;
+ case NET_SFTP_STATUS: // presumably SSH_FX_NO_SUCH_FILE or SSH_FX_PERMISSION_DENIED
+ $this->logError($response);
+ return false;
+ default:
+ throw new \UnexpectedValueException('Expected NET_SFTP_HANDLE or NET_SFTP_STATUS. '
+ . 'Got packet type: ' . $this->packet_type);
+ }
+
+ if ($this->version >= 5) {
+ $flags = NET_SFTP_OPEN_OPEN_OR_CREATE;
+ } else {
+ $flags = NET_SFTP_OPEN_WRITE | NET_SFTP_OPEN_CREATE;
+ }
+
+ $packet = Strings::packSSH2('s', $newname);
+ $packet .= $this->version >= 5 ?
+ pack('N3', 0, $flags, 0) :
+ pack('N2', $flags, 0);
+ $this->send_sftp_packet(NET_SFTP_OPEN, $packet);
+
+ $response = $this->get_sftp_packet();
+ switch ($this->packet_type) {
+ case NET_SFTP_HANDLE:
+ $newhandle = substr($response, 4);
+ break;
+ case NET_SFTP_STATUS:
+ $this->logError($response);
+ return false;
+ default:
+ throw new \UnexpectedValueException('Expected NET_SFTP_HANDLE or NET_SFTP_STATUS. '
+ . 'Got packet type: ' . $this->packet_type);
+ }
+
+ $packet = Strings::packSSH2('ssQQsQ', 'copy-data', $oldhandle, 0, $size, $newhandle, 0);
+ $this->send_sftp_packet(NET_SFTP_EXTENDED, $packet);
+
+ $response = $this->get_sftp_packet();
+ if ($this->packet_type != NET_SFTP_STATUS) {
+ throw new \UnexpectedValueException('Expected NET_SFTP_STATUS. '
+ . 'Got packet type: ' . $this->packet_type);
+ }
+
+ $this->close_handle($oldhandle);
+ $this->close_handle($newhandle);
+
+ return true;
+ }
+
/**
* POSIX Rename
*
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php
index 24047b4b0..a1f2fa245 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php
@@ -139,7 +139,15 @@ public function __construct()
protected function parse_path($path)
{
$orig = $path;
- extract(parse_url($path) + ['port' => 22]);
+ $url = parse_url($path) + ['port' => 22];
+
+ $keys = ['scheme', 'host', 'port', 'user', 'pass', 'path', 'query', 'fragment'];
+ foreach ($keys as $key) {
+ if (isset($url[$key])) {
+ $$key = $url[$key];
+ }
+ }
+
if (isset($query)) {
$path .= '?' . $query;
} elseif (preg_match('/(\?|\?#)$/', $orig)) {
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php
index ac44eaacd..1c8a0e265 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php
@@ -1477,7 +1477,7 @@ private function connect()
}
if (defined('NET_SSH2_LOGGING')) {
- $this->append_log('<- (network: ' . round($totalElapsed, 4) . ')', $line);
+ $this->append_log('<- (network: ' . round($totalElapsed, 4) . ')', $data);
}
if (feof($this->fsock)) {
@@ -1487,7 +1487,13 @@ private function connect()
$extra = $matches[1];
- $this->server_identifier = trim($data, "\r\n");
+ // earlier the SSH specs were quoted.
+ // "The server MAY send other lines of data before sending the version string." they said.
+ // the implication of this is that the lines of data before the server string are *not* a part of it
+ // getting this right is important because the correct server identifier needs to be fed into the
+ // exchange hash for the shared keys to be calculated correctly
+ $data = explode("\r\n", trim($data, "\r\n"));
+ $this->server_identifier = $data[count($data) - 1];
if (strlen($extra)) {
$this->errors[] = $data;
}
@@ -1677,7 +1683,6 @@ private function key_exchange($kexinit_payload_server = false)
case NET_SSH2_MSG_DISCONNECT:
return $this->handleDisconnect($kexinit_payload_server);
}
-
$this->kex_buffer[] = $kexinit_payload_server;
}
@@ -2977,7 +2982,7 @@ public function getOpenChannelCount()
*/
protected function open_channel($channel, $skip_extended = false)
{
- if (isset($this->channel_status[$channel]) && $this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_CLOSE) {
+ if (isset($this->channel_status[$channel])) {
throw new \RuntimeException('Please close the channel (' . $channel . ') before trying to open it again');
}
@@ -3346,6 +3351,27 @@ public function reset($channel = null)
}
}
+ /**
+ * Send EOF on a channel
+ *
+ * Sends an EOF to the stream; this is typically used to close standard
+ * input, while keeping output and error alive.
+ *
+ * @param int|null $channel Channel id returned by self::getInteractiveChannelId()
+ * @return void
+ */
+ public function sendEOF($channel = null)
+ {
+ if ($channel === null) {
+ $channel = $this->get_interactive_channel();
+ }
+
+ $excludeStatuses = [NET_SSH2_MSG_CHANNEL_EOF, NET_SSH2_MSG_CHANNEL_CLOSE];
+ if (isset($this->channel_status[$channel]) && !in_array($this->channel_status[$channel], $excludeStatuses)) {
+ $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$channel]));
+ }
+ }
+
/**
* Is timeout?
*
@@ -3722,7 +3748,7 @@ private function get_binary_packet()
}
$padding_length = 0;
$payload = $packet->plain;
- extract(unpack('Cpadding_length', Strings::shift($payload, 1)));
+ $padding_length = unpack('Cpadding_length', Strings::shift($payload, 1))['padding_length'];
if ($padding_length > 0) {
Strings::pop($payload, $padding_length);
}
@@ -3788,8 +3814,7 @@ private function get_binary_packet()
$this->key_exchange();
}
- // don't filter if we're in the middle of a key exchange (since _filter might send out packets)
- return $this->keyExchangeInProgress ? $payload : $this->filter($payload);
+ return $this->filter($payload);
}
/**
@@ -3809,13 +3834,13 @@ private function get_binary_packet_size(&$packet)
switch ($this->decryptName) {
case 'aes128-gcm@openssh.com':
case 'aes256-gcm@openssh.com':
- extract(unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size)));
+ $packet_length = unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size))['packet_length'];
$packet->size = $packet_length_header_size + $packet_length + $this->decrypt_block_size; // expect tag
break;
case 'chacha20-poly1305@openssh.com':
$this->lengthDecrypt->setNonce(pack('N2', 0, $this->get_seq_no));
$packet_length_header = $this->lengthDecrypt->decrypt(substr($packet->raw, 0, $packet_length_header_size));
- extract(unpack('Npacket_length', $packet_length_header));
+ $packet_length = unpack('Npacket_length', $packet_length_header)['packet_length'];
$packet->size = $packet_length_header_size + $packet_length + 16; // expect tag
break;
default:
@@ -3824,17 +3849,17 @@ private function get_binary_packet_size(&$packet)
return;
}
$packet->plain = $this->decrypt->decrypt(substr($packet->raw, 0, $this->decrypt_block_size));
- extract(unpack('Npacket_length', Strings::shift($packet->plain, $packet_length_header_size)));
+ $packet_length = unpack('Npacket_length', Strings::shift($packet->plain, $packet_length_header_size))['packet_length'];
$packet->size = $packet_length_header_size + $packet_length;
$added_validation_length = $packet_length_header_size;
} else {
- extract(unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size)));
+ $packet_length = unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size))['packet_length'];
$packet->size = $packet_length_header_size + $packet_length;
}
break;
}
} else {
- extract(unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size)));
+ $packet_length = unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size))['packet_length'];
$packet->size = $packet_length_header_size + $packet_length;
$added_validation_length = $packet_length_header_size;
}
@@ -3884,9 +3909,15 @@ private function handleDisconnect($payload)
*/
private function filter($payload)
{
+ if (ord($payload[0]) == NET_SSH2_MSG_DISCONNECT) {
+ return $this->handleDisconnect($payload);
+ }
+
+ if ($this->session_id === false && $this->keyExchangeInProgress) {
+ return $payload;
+ }
+
switch (ord($payload[0])) {
- case NET_SSH2_MSG_DISCONNECT:
- return $this->handleDisconnect($payload);
case NET_SSH2_MSG_IGNORE:
$payload = $this->get_binary_packet();
break;
@@ -3900,7 +3931,7 @@ private function filter($payload)
break; // return payload
case NET_SSH2_MSG_KEXINIT:
// this is here for server initiated key re-exchanges after the initial key exchange
- if ($this->session_id !== false) {
+ if (!$this->keyExchangeInProgress && $this->session_id !== false) {
if (!$this->key_exchange($payload)) {
$this->disconnect_helper(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED);
throw new ConnectionClosedException('Key exchange failed');
@@ -3920,6 +3951,26 @@ private function filter($payload)
$payload = $this->get_binary_packet();
}
+ /*
+ Once a party has sent a SSH_MSG_KEXINIT message for key exchange or
+ re-exchange, until it has sent a SSH_MSG_NEWKEYS message (Section
+ 7.3), it MUST NOT send any messages other than:
+
+ o Transport layer generic messages (1 to 19) (but
+ SSH_MSG_SERVICE_REQUEST and SSH_MSG_SERVICE_ACCEPT MUST NOT be
+ sent);
+
+ o Algorithm negotiation messages (20 to 29) (but further
+ SSH_MSG_KEXINIT messages MUST NOT be sent);
+
+ o Specific key exchange method messages (30 to 49).
+
+ -- https://www.rfc-editor.org/rfc/rfc4253#section-7.1
+ */
+ if ($this->keyExchangeInProgress) {
+ return $payload;
+ }
+
// see http://tools.ietf.org/html/rfc4252#section-5.4; only called when the encryption has been activated and when we haven't already logged in
if (($this->bitmap & self::MASK_CONNECTED) && !$this->isAuthenticated() && ord($payload[0]) == NET_SSH2_MSG_USERAUTH_BANNER) {
Strings::shift($payload, 1);
@@ -3932,7 +3983,10 @@ private function filter($payload)
switch (ord($payload[0])) {
case NET_SSH2_MSG_CHANNEL_REQUEST:
if (strlen($payload) == 31) {
- extract(unpack('cpacket_type/Nchannel/Nlength', $payload));
+ $unpacked = unpack('cpacket_type/Nchannel/Nlength', $payload);
+ $packet_type = $unpacked['packet_type'];
+ $channel = $unpacked['channel'];
+ $length = $unpacked['length'];
if (substr($payload, 9, $length) == 'keepalive@openssh.com' && isset($this->server_channels[$channel])) {
if (ord(substr($payload, 9 + $length))) { // want reply
$this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_SUCCESS, $this->server_channels[$channel]));
@@ -4096,7 +4150,8 @@ public function isPTYEnabled()
protected function get_channel_packet($client_channel, $skip_extended = false)
{
if (!empty($this->channel_buffers[$client_channel])) {
- switch ($this->channel_status[$client_channel]) {
+ // in phpseclib 4.0 this should be changed to $this->channel_status[$client_channel] ?? null
+ switch (isset($this->channel_status[$client_channel]) ? $this->channel_status[$client_channel] : null) {
case NET_SSH2_MSG_CHANNEL_REQUEST:
foreach ($this->channel_buffers[$client_channel] as $i => $packet) {
switch (ord($packet[0])) {
@@ -4164,7 +4219,7 @@ protected function get_channel_packet($client_channel, $skip_extended = false)
continue 2;
case NET_SSH2_MSG_CHANNEL_REQUEST:
- if ($this->channel_status[$channel] == NET_SSH2_MSG_CHANNEL_CLOSE) {
+ if (!isset($this->channel_status[$channel])) {
continue 2;
}
list($value) = Strings::unpackSSH2('s', $response);
@@ -4182,10 +4237,14 @@ protected function get_channel_packet($client_channel, $skip_extended = false)
$this->errors[count($this->errors) - 1] .= "\r\n$error_message";
}
- $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$client_channel]));
- $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel]));
+ if (isset($this->channel_status[$channel]) && $this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_CLOSE) {
+ if ($this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_EOF) {
+ $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$channel]));
+ }
+ $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel]));
- $this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_EOF;
+ $this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
+ }
continue 3;
case 'exit-status':
@@ -4286,11 +4345,11 @@ protected function get_channel_packet($client_channel, $skip_extended = false)
$this->close_channel_bitmap($channel);
- if ($this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_EOF) {
+ if ($this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_CLOSE) {
$this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel]));
}
- $this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
+ unset($this->channel_status[$channel]);
$this->channelCount--;
if ($client_channel == $channel) {
@@ -4515,7 +4574,7 @@ private function append_log($message_number, $message)
protected function append_log_helper($constant, $message_number, $message, array &$message_number_log, array &$message_log, &$log_size, &$realtime_log_file, &$realtime_log_wrap, &$realtime_log_size)
{
// remove the byte identifying the message type from all but the first two messages (ie. the identification strings)
- if (strlen($message_number) > 2) {
+ if (!in_array(substr($message_number, 0, 4), ['<- (', '-> (']) && strlen($message_number) > 2) {
Strings::shift($message);
}
@@ -4655,27 +4714,24 @@ protected function send_channel_packet($client_channel, $data)
* @param bool $want_reply
* @return void
*/
- private function close_channel($client_channel, $want_reply = false)
+ private function close_channel($client_channel)
{
// see http://tools.ietf.org/html/rfc4254#section-5.3
- $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$client_channel]));
-
- if (!$want_reply) {
- $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel]));
+ if ($this->channel_status[$client_channel] != NET_SSH2_MSG_CHANNEL_EOF) {
+ $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$client_channel]));
}
+ $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel]));
$this->channel_status[$client_channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
+
$this->channelCount--;
$this->curTimeout = 5;
-
while (!is_bool($this->get_channel_packet($client_channel))) {
}
- if ($want_reply) {
- $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel]));
- }
+ unset($this->channel_status[$client_channel]);
$this->close_channel_bitmap($client_channel);
}
diff --git a/lib/Google/vendor/psr/log/Psr/Log/AbstractLogger.php b/lib/Google/vendor/psr/log/Psr/Log/AbstractLogger.php
deleted file mode 100644
index e02f9daf3..000000000
--- a/lib/Google/vendor/psr/log/Psr/Log/AbstractLogger.php
+++ /dev/null
@@ -1,128 +0,0 @@
-log(LogLevel::EMERGENCY, $message, $context);
- }
-
- /**
- * Action must be taken immediately.
- *
- * Example: Entire website down, database unavailable, etc. This should
- * trigger the SMS alerts and wake you up.
- *
- * @param string $message
- * @param mixed[] $context
- *
- * @return void
- */
- public function alert($message, array $context = array())
- {
- $this->log(LogLevel::ALERT, $message, $context);
- }
-
- /**
- * Critical conditions.
- *
- * Example: Application component unavailable, unexpected exception.
- *
- * @param string $message
- * @param mixed[] $context
- *
- * @return void
- */
- public function critical($message, array $context = array())
- {
- $this->log(LogLevel::CRITICAL, $message, $context);
- }
-
- /**
- * Runtime errors that do not require immediate action but should typically
- * be logged and monitored.
- *
- * @param string $message
- * @param mixed[] $context
- *
- * @return void
- */
- public function error($message, array $context = array())
- {
- $this->log(LogLevel::ERROR, $message, $context);
- }
-
- /**
- * Exceptional occurrences that are not errors.
- *
- * Example: Use of deprecated APIs, poor use of an API, undesirable things
- * that are not necessarily wrong.
- *
- * @param string $message
- * @param mixed[] $context
- *
- * @return void
- */
- public function warning($message, array $context = array())
- {
- $this->log(LogLevel::WARNING, $message, $context);
- }
-
- /**
- * Normal but significant events.
- *
- * @param string $message
- * @param mixed[] $context
- *
- * @return void
- */
- public function notice($message, array $context = array())
- {
- $this->log(LogLevel::NOTICE, $message, $context);
- }
-
- /**
- * Interesting events.
- *
- * Example: User logs in, SQL logs.
- *
- * @param string $message
- * @param mixed[] $context
- *
- * @return void
- */
- public function info($message, array $context = array())
- {
- $this->log(LogLevel::INFO, $message, $context);
- }
-
- /**
- * Detailed debug information.
- *
- * @param string $message
- * @param mixed[] $context
- *
- * @return void
- */
- public function debug($message, array $context = array())
- {
- $this->log(LogLevel::DEBUG, $message, $context);
- }
-}
diff --git a/lib/Google/vendor/psr/log/Psr/Log/Test/DummyTest.php b/lib/Google/vendor/psr/log/Psr/Log/Test/DummyTest.php
deleted file mode 100644
index 9638c1101..000000000
--- a/lib/Google/vendor/psr/log/Psr/Log/Test/DummyTest.php
+++ /dev/null
@@ -1,18 +0,0 @@
- ".
- *
- * Example ->error('Foo') would yield "error Foo".
- *
- * @return string[]
- */
- abstract public function getLogs();
-
- public function testImplements()
- {
- $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger());
- }
-
- /**
- * @dataProvider provideLevelsAndMessages
- */
- public function testLogsAtAllLevels($level, $message)
- {
- $logger = $this->getLogger();
- $logger->{$level}($message, array('user' => 'Bob'));
- $logger->log($level, $message, array('user' => 'Bob'));
-
- $expected = array(
- $level.' message of level '.$level.' with context: Bob',
- $level.' message of level '.$level.' with context: Bob',
- );
- $this->assertEquals($expected, $this->getLogs());
- }
-
- public function provideLevelsAndMessages()
- {
- return array(
- LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'),
- LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'),
- LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'),
- LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'),
- LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'),
- LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'),
- LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'),
- LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'),
- );
- }
-
- /**
- * @expectedException \Psr\Log\InvalidArgumentException
- */
- public function testThrowsOnInvalidLevel()
- {
- $logger = $this->getLogger();
- $logger->log('invalid level', 'Foo');
- }
-
- public function testContextReplacement()
- {
- $logger = $this->getLogger();
- $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar'));
-
- $expected = array('info {Message {nothing} Bob Bar a}');
- $this->assertEquals($expected, $this->getLogs());
- }
-
- public function testObjectCastToString()
- {
- if (method_exists($this, 'createPartialMock')) {
- $dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString'));
- } else {
- $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString'));
- }
- $dummy->expects($this->once())
- ->method('__toString')
- ->will($this->returnValue('DUMMY'));
-
- $this->getLogger()->warning($dummy);
-
- $expected = array('warning DUMMY');
- $this->assertEquals($expected, $this->getLogs());
- }
-
- public function testContextCanContainAnything()
- {
- $closed = fopen('php://memory', 'r');
- fclose($closed);
-
- $context = array(
- 'bool' => true,
- 'null' => null,
- 'string' => 'Foo',
- 'int' => 0,
- 'float' => 0.5,
- 'nested' => array('with object' => new DummyTest),
- 'object' => new \DateTime,
- 'resource' => fopen('php://memory', 'r'),
- 'closed' => $closed,
- );
-
- $this->getLogger()->warning('Crazy context data', $context);
-
- $expected = array('warning Crazy context data');
- $this->assertEquals($expected, $this->getLogs());
- }
-
- public function testContextExceptionKeyCanBeExceptionOrOtherValues()
- {
- $logger = $this->getLogger();
- $logger->warning('Random message', array('exception' => 'oops'));
- $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail')));
-
- $expected = array(
- 'warning Random message',
- 'critical Uncaught Exception!'
- );
- $this->assertEquals($expected, $this->getLogs());
- }
-}
diff --git a/lib/Google/vendor/psr/log/Psr/Log/Test/TestLogger.php b/lib/Google/vendor/psr/log/Psr/Log/Test/TestLogger.php
deleted file mode 100644
index 1be323049..000000000
--- a/lib/Google/vendor/psr/log/Psr/Log/Test/TestLogger.php
+++ /dev/null
@@ -1,147 +0,0 @@
- $level,
- 'message' => $message,
- 'context' => $context,
- ];
-
- $this->recordsByLevel[$record['level']][] = $record;
- $this->records[] = $record;
- }
-
- public function hasRecords($level)
- {
- return isset($this->recordsByLevel[$level]);
- }
-
- public function hasRecord($record, $level)
- {
- if (is_string($record)) {
- $record = ['message' => $record];
- }
- return $this->hasRecordThatPasses(function ($rec) use ($record) {
- if ($rec['message'] !== $record['message']) {
- return false;
- }
- if (isset($record['context']) && $rec['context'] !== $record['context']) {
- return false;
- }
- return true;
- }, $level);
- }
-
- public function hasRecordThatContains($message, $level)
- {
- return $this->hasRecordThatPasses(function ($rec) use ($message) {
- return strpos($rec['message'], $message) !== false;
- }, $level);
- }
-
- public function hasRecordThatMatches($regex, $level)
- {
- return $this->hasRecordThatPasses(function ($rec) use ($regex) {
- return preg_match($regex, $rec['message']) > 0;
- }, $level);
- }
-
- public function hasRecordThatPasses(callable $predicate, $level)
- {
- if (!isset($this->recordsByLevel[$level])) {
- return false;
- }
- foreach ($this->recordsByLevel[$level] as $i => $rec) {
- if (call_user_func($predicate, $rec, $i)) {
- return true;
- }
- }
- return false;
- }
-
- public function __call($method, $args)
- {
- if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) {
- $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3];
- $level = strtolower($matches[2]);
- if (method_exists($this, $genericMethod)) {
- $args[] = $level;
- return call_user_func_array([$this, $genericMethod], $args);
- }
- }
- throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()');
- }
-
- public function reset()
- {
- $this->records = [];
- $this->recordsByLevel = [];
- }
-}
diff --git a/lib/Google/vendor/psr/log/composer.json b/lib/Google/vendor/psr/log/composer.json
index ca0569537..879fc6f53 100644
--- a/lib/Google/vendor/psr/log/composer.json
+++ b/lib/Google/vendor/psr/log/composer.json
@@ -11,16 +11,16 @@
}
],
"require": {
- "php": ">=5.3.0"
+ "php": ">=8.0.0"
},
"autoload": {
"psr-4": {
- "Psr\\Log\\": "Psr/Log/"
+ "Psr\\Log\\": "src"
}
},
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "3.x-dev"
}
}
}
diff --git a/lib/Google/vendor/psr/log/src/AbstractLogger.php b/lib/Google/vendor/psr/log/src/AbstractLogger.php
new file mode 100644
index 000000000..d60a091af
--- /dev/null
+++ b/lib/Google/vendor/psr/log/src/AbstractLogger.php
@@ -0,0 +1,15 @@
+logger = $logger;
}
diff --git a/lib/Google/vendor/psr/log/Psr/Log/LoggerInterface.php b/lib/Google/vendor/psr/log/src/LoggerInterface.php
similarity index 63%
rename from lib/Google/vendor/psr/log/Psr/Log/LoggerInterface.php
rename to lib/Google/vendor/psr/log/src/LoggerInterface.php
index 2206cfde4..cb4cf648b 100644
--- a/lib/Google/vendor/psr/log/Psr/Log/LoggerInterface.php
+++ b/lib/Google/vendor/psr/log/src/LoggerInterface.php
@@ -22,12 +22,9 @@ interface LoggerInterface
/**
* System is unusable.
*
- * @param string $message
* @param mixed[] $context
- *
- * @return void
*/
- public function emergency($message, array $context = array());
+ public function emergency(string|\Stringable $message, array $context = []): void;
/**
* Action must be taken immediately.
@@ -35,35 +32,26 @@ public function emergency($message, array $context = array());
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
- * @param string $message
* @param mixed[] $context
- *
- * @return void
*/
- public function alert($message, array $context = array());
+ public function alert(string|\Stringable $message, array $context = []): void;
/**
* Critical conditions.
*
* Example: Application component unavailable, unexpected exception.
*
- * @param string $message
* @param mixed[] $context
- *
- * @return void
*/
- public function critical($message, array $context = array());
+ public function critical(string|\Stringable $message, array $context = []): void;
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
- * @param string $message
* @param mixed[] $context
- *
- * @return void
*/
- public function error($message, array $context = array());
+ public function error(string|\Stringable $message, array $context = []): void;
/**
* Exceptional occurrences that are not errors.
@@ -71,55 +59,40 @@ public function error($message, array $context = array());
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
- * @param string $message
* @param mixed[] $context
- *
- * @return void
*/
- public function warning($message, array $context = array());
+ public function warning(string|\Stringable $message, array $context = []): void;
/**
* Normal but significant events.
*
- * @param string $message
* @param mixed[] $context
- *
- * @return void
*/
- public function notice($message, array $context = array());
+ public function notice(string|\Stringable $message, array $context = []): void;
/**
* Interesting events.
*
* Example: User logs in, SQL logs.
*
- * @param string $message
* @param mixed[] $context
- *
- * @return void
*/
- public function info($message, array $context = array());
+ public function info(string|\Stringable $message, array $context = []): void;
/**
* Detailed debug information.
*
- * @param string $message
* @param mixed[] $context
- *
- * @return void
*/
- public function debug($message, array $context = array());
+ public function debug(string|\Stringable $message, array $context = []): void;
/**
* Logs with an arbitrary level.
*
- * @param mixed $level
- * @param string $message
+ * @param mixed $level
* @param mixed[] $context
*
- * @return void
- *
* @throws \Psr\Log\InvalidArgumentException
*/
- public function log($level, $message, array $context = array());
+ public function log($level, string|\Stringable $message, array $context = []): void;
}
diff --git a/lib/Google/vendor/psr/log/Psr/Log/LoggerTrait.php b/lib/Google/vendor/psr/log/src/LoggerTrait.php
similarity index 57%
rename from lib/Google/vendor/psr/log/Psr/Log/LoggerTrait.php
rename to lib/Google/vendor/psr/log/src/LoggerTrait.php
index e392fef0a..a5d9980b6 100644
--- a/lib/Google/vendor/psr/log/Psr/Log/LoggerTrait.php
+++ b/lib/Google/vendor/psr/log/src/LoggerTrait.php
@@ -14,13 +14,8 @@ trait LoggerTrait
{
/**
* System is unusable.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
*/
- public function emergency($message, array $context = array())
+ public function emergency(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::EMERGENCY, $message, $context);
}
@@ -30,13 +25,8 @@ public function emergency($message, array $context = array())
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
*/
- public function alert($message, array $context = array())
+ public function alert(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::ALERT, $message, $context);
}
@@ -45,13 +35,8 @@ public function alert($message, array $context = array())
* Critical conditions.
*
* Example: Application component unavailable, unexpected exception.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
*/
- public function critical($message, array $context = array())
+ public function critical(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::CRITICAL, $message, $context);
}
@@ -59,13 +44,8 @@ public function critical($message, array $context = array())
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
*/
- public function error($message, array $context = array())
+ public function error(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::ERROR, $message, $context);
}
@@ -75,26 +55,16 @@ public function error($message, array $context = array())
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
*/
- public function warning($message, array $context = array())
+ public function warning(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::WARNING, $message, $context);
}
/**
* Normal but significant events.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
*/
- public function notice($message, array $context = array())
+ public function notice(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::NOTICE, $message, $context);
}
@@ -103,26 +73,16 @@ public function notice($message, array $context = array())
* Interesting events.
*
* Example: User logs in, SQL logs.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
*/
- public function info($message, array $context = array())
+ public function info(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::INFO, $message, $context);
}
/**
* Detailed debug information.
- *
- * @param string $message
- * @param array $context
- *
- * @return void
*/
- public function debug($message, array $context = array())
+ public function debug(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::DEBUG, $message, $context);
}
@@ -130,13 +90,9 @@ public function debug($message, array $context = array())
/**
* Logs with an arbitrary level.
*
- * @param mixed $level
- * @param string $message
- * @param array $context
- *
- * @return void
+ * @param mixed $level
*
* @throws \Psr\Log\InvalidArgumentException
*/
- abstract public function log($level, $message, array $context = array());
+ abstract public function log($level, string|\Stringable $message, array $context = []): void;
}
diff --git a/lib/Google/vendor/psr/log/Psr/Log/NullLogger.php b/lib/Google/vendor/psr/log/src/NullLogger.php
similarity index 74%
rename from lib/Google/vendor/psr/log/Psr/Log/NullLogger.php
rename to lib/Google/vendor/psr/log/src/NullLogger.php
index c8f7293b1..de0561e2a 100644
--- a/lib/Google/vendor/psr/log/Psr/Log/NullLogger.php
+++ b/lib/Google/vendor/psr/log/src/NullLogger.php
@@ -15,15 +15,11 @@ class NullLogger extends AbstractLogger
/**
* Logs with an arbitrary level.
*
- * @param mixed $level
- * @param string $message
- * @param array $context
- *
- * @return void
+ * @param mixed[] $context
*
* @throws \Psr\Log\InvalidArgumentException
*/
- public function log($level, $message, array $context = array())
+ public function log($level, string|\Stringable $message, array $context = []): void
{
// noop
}
diff --git a/lib/Google/vendor/ramsey/uuid/composer.json b/lib/Google/vendor/ramsey/uuid/composer.json
index db4429217..b34d9b108 100644
--- a/lib/Google/vendor/ramsey/uuid/composer.json
+++ b/lib/Google/vendor/ramsey/uuid/composer.json
@@ -10,7 +10,7 @@
],
"require": {
"php": "^8.0",
- "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13",
+ "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14",
"ramsey/collection": "^1.2 || ^2.0"
},
"require-dev": {
diff --git a/lib/Google/vendor/ramsey/uuid/src/Generator/UnixTimeGenerator.php b/lib/Google/vendor/ramsey/uuid/src/Generator/UnixTimeGenerator.php
index 024ed51e1..a2615f1a3 100644
--- a/lib/Google/vendor/ramsey/uuid/src/Generator/UnixTimeGenerator.php
+++ b/lib/Google/vendor/ramsey/uuid/src/Generator/UnixTimeGenerator.php
@@ -15,7 +15,6 @@
namespace Ramsey\Uuid\Generator;
use Brick\Math\BigInteger;
-use DateTimeImmutable;
use DateTimeInterface;
use Ramsey\Uuid\Type\Hexadecimal;
@@ -68,7 +67,12 @@ public function __construct(
*/
public function generate($node = null, ?int $clockSeq = null, ?DateTimeInterface $dateTime = null): string
{
- $time = ($dateTime ?? new DateTimeImmutable('now'))->format('Uv');
+ if ($dateTime === null) {
+ $time = microtime(false);
+ $time = substr($time, 11) . substr($time, 2, 3);
+ } else {
+ $time = $dateTime->format('Uv');
+ }
if ($time > self::$time || ($dateTime !== null && $time !== self::$time)) {
$this->randomize($time);
diff --git a/lib/Google/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php b/lib/Google/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php
index 869835e9c..649f58039 100644
--- a/lib/Google/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php
+++ b/lib/Google/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php
@@ -49,10 +49,10 @@ public function add(NumberInterface $augend, NumberInterface ...$addends): Numbe
$sum = BigInteger::of($augend->toString());
foreach ($addends as $addend) {
- $sum = $sum->plus($addend->toString()); /** @phpstan-ignore possiblyImpure.methodCall */
+ $sum = $sum->plus($addend->toString());
}
- /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.new */
+ /** @phpstan-ignore possiblyImpure.new */
return new IntegerObject((string) $sum);
}
@@ -61,10 +61,10 @@ public function subtract(NumberInterface $minuend, NumberInterface ...$subtrahen
$difference = BigInteger::of($minuend->toString());
foreach ($subtrahends as $subtrahend) {
- $difference = $difference->minus($subtrahend->toString()); /** @phpstan-ignore possiblyImpure.methodCall */
+ $difference = $difference->minus($subtrahend->toString());
}
- /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.new */
+ /** @phpstan-ignore possiblyImpure.new */
return new IntegerObject((string) $difference);
}
@@ -73,11 +73,10 @@ public function multiply(NumberInterface $multiplicand, NumberInterface ...$mult
$product = BigInteger::of($multiplicand->toString());
foreach ($multipliers as $multiplier) {
- /** @phpstan-ignore possiblyImpure.methodCall */
$product = $product->multipliedBy($multiplier->toString());
}
- /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.new */
+ /** @phpstan-ignore possiblyImpure.new */
return new IntegerObject((string) $product);
}
@@ -93,23 +92,22 @@ public function divide(
$quotient = BigDecimal::of($dividend->toString());
foreach ($divisors as $divisor) {
- /** @phpstan-ignore possiblyImpure.methodCall */
$quotient = $quotient->dividedBy($divisor->toString(), $scale, $brickRounding);
}
if ($scale === 0) {
- /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.methodCall, possiblyImpure.new */
+ /** @phpstan-ignore possiblyImpure.new */
return new IntegerObject((string) $quotient->toBigInteger());
}
- /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.new */
+ /** @phpstan-ignore possiblyImpure.new */
return new Decimal((string) $quotient);
}
public function fromBase(string $value, int $base): IntegerObject
{
try {
- /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.new */
+ /** @phpstan-ignore possiblyImpure.new */
return new IntegerObject((string) BigInteger::fromBase($value, $base));
} catch (MathException | \InvalidArgumentException $exception) {
throw new InvalidArgumentException(
@@ -123,7 +121,6 @@ public function fromBase(string $value, int $base): IntegerObject
public function toBase(IntegerObject $value, int $base): string
{
try {
- /** @phpstan-ignore possiblyImpure.methodCall */
return BigInteger::of($value->toString())->toBase($base);
} catch (MathException | \InvalidArgumentException $exception) {
throw new InvalidArgumentException(
diff --git a/lib/classes/class-module.php b/lib/classes/class-module.php
index 8d7653247..1078dd9d8 100644
--- a/lib/classes/class-module.php
+++ b/lib/classes/class-module.php
@@ -45,11 +45,6 @@ public function __construct() {
*/
new ShortPixel();
- /**
- * Support for Simple Local Avatars
- */
- new SimpleLocalAvatars();
-
/**
* Support for The Events Calendar
*/
diff --git a/lib/classes/compatibility/simple-local-avatars.php b/lib/classes/compatibility/simple-local-avatars.php
deleted file mode 100644
index e85edc397..000000000
--- a/lib/classes/compatibility/simple-local-avatars.php
+++ /dev/null
@@ -1,81 +0,0 @@
-get_gs_host();
- $bucketLink = apply_filters('wp_stateless_bucket_link', $image_host);
- $upload = wp_get_upload_dir();
-
- // Replace local urls with corresponding GCS urls
- if (!empty($user_meta[0]) && is_array($user_meta[0])) {
- foreach ($user_meta[0] as $key => &$value) {
- if (is_numeric($key)) {
- $value = trailingslashit($bucketLink) . apply_filters('wp_stateless_file_name', str_replace($upload['baseurl'], '', $value), true);
- }
- }
- }
-
- // Return filtered data back
- return $user_meta;
- }
- }
- }
-}
diff --git a/readme.md b/readme.md
index fd4612678..15d51e5db 100644
--- a/readme.md
+++ b/readme.md
@@ -47,6 +47,7 @@ New to Google Cloud? Google is offering you a [$300 credit](https://console.clou
* [BuddyPress Addon](https://wordpress.org/plugin/wp-stateless-buddypress-addon/)
* [BuddyBoss Platform Addon](https://wordpress.org/plugins/wp-stateless-buddyboss-platform-addon/)
* [Polylang Pro Addon](https://wordpress.org/plugins/wp-stateless-polylang-pro-addon/)
+* [Simple Local Avatars](https://wordpress.org/plugins/wp-stateless-simple-local-avatars-addon/)
### Support, Feedback, & Contribute
We welcome community involvement via the [GitHub repository](https://github.com/udx/wp-stateless).
diff --git a/readme.txt b/readme.txt
index bf4751400..6e4ebd446 100644
--- a/readme.txt
+++ b/readme.txt
@@ -6,7 +6,7 @@ License: GPLv2 or later
Requires PHP: 8.0
Requires at least: 5.0
Tested up to: 6.8
-Stable tag: 4.2.1
+Stable tag: 4.3.0
Upload and serve your WordPress media files from Google Cloud Storage.
@@ -57,6 +57,7 @@ New to Google Cloud? Google is offering you a [$300 credit](https://console.clou
* [BuddyPress Addon](https://wordpress.org/plugin/wp-stateless-buddypress-addon/)
* [BuddyBoss Platform Addon](https://wordpress.org/plugins/wp-stateless-buddyboss-platform-addon/)
* [Polylang Pro Addon](https://wordpress.org/plugins/wp-stateless-polylang-pro-addon/)
+* [Simple Local Avatars](https://wordpress.org/plugins/wp-stateless-simple-local-avatars-addon/)
= Support, Feedback, & Contribute =
We welcome community involvement via the [GitHub repository](https://github.com/udx/wp-stateless).
@@ -135,6 +136,10 @@ Before upgrading to WP-Stateless 3.2.0, please, make sure you use PHP 7.2 or abo
Before upgrading to WP-Stateless 3.0, please, make sure you tested it on your development environment.
== Changelog ==
+= 4.3.0 =
+* ENHANCEMENT - update dependencies for Google APIs Client Library.
+* COMPATIBILITY - Simple Local Avatars Compatibility replaced with [WP-Stateless - Simple Local Avatars Addon](https://wordpress.org/plugins/wp-stateless-simple-local-avatars-addon/).
+
= 4.2.1 =
* ENHANCEMENT - updated `wpmetabox/meta-box` library from 5.10.11 to 5.10.15.
* FIX - correctly loads text domain to prevent PHP notices.
diff --git a/static/data/addons.php b/static/data/addons.php
index 648299884..f81f1f7e1 100644
--- a/static/data/addons.php
+++ b/static/data/addons.php
@@ -157,4 +157,14 @@
'hubspot_id' => '151478250876',
],
+ 'simple-local-avatars' => [
+ 'title' => 'Simple Local Avatars',
+ 'plugin_files' => ['simple-local-avatars/simple-local-avatars.php'],
+ 'addon_file' => 'wp-stateless-simple-local-avatars-addon/wp-stateless-simple-local-avatars-addon.php',
+ 'icon' => 'https://ps.w.org/simple-local-avatars/assets/icon.svg',
+ 'repo' => 'udx/wp-stateless-simple-local-avatars-addon',
+ 'wp' => 'https://wordpress.org/plugins/wp-stateless-simple-local-avatars-addon/',
+ 'hubspot_id' => '151480507697',
+ ],
+
];
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index e5103e860..5cd38fca7 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -6,7 +6,115 @@
$baseDir = dirname($vendorDir);
return array(
+ 'ChromePhp' => $vendorDir . '/ccampbell/chromephp/ChromePhp.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
+ 'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
+ 'Composer\\Installers\\AkauntingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AkauntingInstaller.php',
+ 'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
+ 'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
+ 'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
+ 'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
+ 'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
+ 'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
+ 'Composer\\Installers\\BotbleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BotbleInstaller.php',
+ 'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
+ 'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
+ 'Composer\\Installers\\CiviCrmInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
+ 'Composer\\Installers\\ClanCatsFrameworkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
+ 'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
+ 'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
+ 'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
+ 'Composer\\Installers\\ConcreteCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php',
+ 'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
+ 'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
+ 'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
+ 'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
+ 'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
+ 'Composer\\Installers\\DrupalInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
+ 'Composer\\Installers\\ElggInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
+ 'Composer\\Installers\\EliasisInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
+ 'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
+ 'Composer\\Installers\\EzPlatformInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
+ 'Composer\\Installers\\ForkCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ForkCMSInstaller.php',
+ 'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
+ 'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
+ 'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php',
+ 'Composer\\Installers\\HuradInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
+ 'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
+ 'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php',
+ 'Composer\\Installers\\ItopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
+ 'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
+ 'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
+ 'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
+ 'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
+ 'Composer\\Installers\\LanManagementSystemInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
+ 'Composer\\Installers\\LaravelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
+ 'Composer\\Installers\\LavaLiteInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
+ 'Composer\\Installers\\LithiumInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
+ 'Composer\\Installers\\MODULEWorkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
+ 'Composer\\Installers\\MODXEvoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
+ 'Composer\\Installers\\MagentoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
+ 'Composer\\Installers\\MajimaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
+ 'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
+ 'Composer\\Installers\\MantisBTInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
+ 'Composer\\Installers\\MatomoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MatomoInstaller.php',
+ 'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
+ 'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
+ 'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
+ 'Composer\\Installers\\MiaoxingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MiaoxingInstaller.php',
+ 'Composer\\Installers\\MicroweberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
+ 'Composer\\Installers\\ModxInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ModxInstaller.php',
+ 'Composer\\Installers\\MoodleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
+ 'Composer\\Installers\\OctoberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
+ 'Composer\\Installers\\OntoWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
+ 'Composer\\Installers\\OsclassInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
+ 'Composer\\Installers\\OxidInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
+ 'Composer\\Installers\\PPIInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
+ 'Composer\\Installers\\PantheonInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PantheonInstaller.php',
+ 'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
+ 'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
+ 'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
+ 'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
+ 'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php',
+ 'Composer\\Installers\\PortoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
+ 'Composer\\Installers\\PrestashopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
+ 'Composer\\Installers\\ProcessWireInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php',
+ 'Composer\\Installers\\PuppetInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
+ 'Composer\\Installers\\PxcmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
+ 'Composer\\Installers\\RadPHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
+ 'Composer\\Installers\\ReIndexInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
+ 'Composer\\Installers\\Redaxo5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
+ 'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
+ 'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
+ 'Composer\\Installers\\SMFInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
+ 'Composer\\Installers\\ShopwareInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
+ 'Composer\\Installers\\SilverStripeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
+ 'Composer\\Installers\\SiteDirectInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
+ 'Composer\\Installers\\StarbugInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
+ 'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
+ 'Composer\\Installers\\SyliusInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
+ 'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
+ 'Composer\\Installers\\TastyIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php',
+ 'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
+ 'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
+ 'Composer\\Installers\\UserFrostingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
+ 'Composer\\Installers\\VanillaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
+ 'Composer\\Installers\\VgmcpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
+ 'Composer\\Installers\\WHMCSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
+ 'Composer\\Installers\\WinterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WinterInstaller.php',
+ 'Composer\\Installers\\WolfCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
+ 'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
+ 'Composer\\Installers\\YawikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
+ 'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
+ 'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
+ 'Firebase\\JWT\\BeforeValidException' => $vendorDir . '/firebase/php-jwt/src/BeforeValidException.php',
+ 'Firebase\\JWT\\CachedKeySet' => $vendorDir . '/firebase/php-jwt/src/CachedKeySet.php',
+ 'Firebase\\JWT\\ExpiredException' => $vendorDir . '/firebase/php-jwt/src/ExpiredException.php',
+ 'Firebase\\JWT\\JWK' => $vendorDir . '/firebase/php-jwt/src/JWK.php',
+ 'Firebase\\JWT\\JWT' => $vendorDir . '/firebase/php-jwt/src/JWT.php',
+ 'Firebase\\JWT\\JWTExceptionWithPayloadInterface' => $vendorDir . '/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php',
+ 'Firebase\\JWT\\Key' => $vendorDir . '/firebase/php-jwt/src/Key.php',
+ 'Firebase\\JWT\\SignatureInvalidException' => $vendorDir . '/firebase/php-jwt/src/SignatureInvalidException.php',
'UDX\\Settings' => $baseDir . '/lib/includes/class-settings.php',
'UDX\\Utility' => $baseDir . '/lib/includes/class-utility.php',
'UsabilityDynamics\\UD_API\\API' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-api.php',
@@ -55,7 +163,6 @@
'wpCloud\\StatelessMedia\\Module' => $baseDir . '/lib/classes/class-module.php',
'wpCloud\\StatelessMedia\\Settings' => $baseDir . '/lib/classes/class-settings.php',
'wpCloud\\StatelessMedia\\ShortPixel' => $baseDir . '/lib/classes/compatibility/shortpixel.php',
- 'wpCloud\\StatelessMedia\\SimpleLocalAvatars' => $baseDir . '/lib/classes/compatibility/simple-local-avatars.php',
'wpCloud\\StatelessMedia\\Singleton' => $baseDir . '/lib/classes/trait-singleton.php',
'wpCloud\\StatelessMedia\\Status' => $baseDir . '/lib/classes/class-status.php',
'wpCloud\\StatelessMedia\\Status\\GoogleCloudInfo' => $baseDir . '/lib/classes/status/class-info-google_cloud.php',
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 651e66862..3820710ef 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -39,7 +39,115 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
);
public static $classMap = array (
+ 'ChromePhp' => __DIR__ . '/..' . '/ccampbell/chromephp/ChromePhp.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
+ 'Composer\\Installers\\AglInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AglInstaller.php',
+ 'Composer\\Installers\\AkauntingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AkauntingInstaller.php',
+ 'Composer\\Installers\\AnnotateCmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
+ 'Composer\\Installers\\AsgardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
+ 'Composer\\Installers\\AttogramInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
+ 'Composer\\Installers\\BaseInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
+ 'Composer\\Installers\\BitrixInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
+ 'Composer\\Installers\\BonefishInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
+ 'Composer\\Installers\\BotbleInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BotbleInstaller.php',
+ 'Composer\\Installers\\CakePHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
+ 'Composer\\Installers\\ChefInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
+ 'Composer\\Installers\\CiviCrmInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
+ 'Composer\\Installers\\ClanCatsFrameworkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
+ 'Composer\\Installers\\CockpitInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
+ 'Composer\\Installers\\CodeIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
+ 'Composer\\Installers\\Concrete5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
+ 'Composer\\Installers\\ConcreteCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php',
+ 'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
+ 'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
+ 'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
+ 'Composer\\Installers\\DokuWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
+ 'Composer\\Installers\\DolibarrInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
+ 'Composer\\Installers\\DrupalInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
+ 'Composer\\Installers\\ElggInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
+ 'Composer\\Installers\\EliasisInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
+ 'Composer\\Installers\\ExpressionEngineInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
+ 'Composer\\Installers\\EzPlatformInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
+ 'Composer\\Installers\\ForkCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ForkCMSInstaller.php',
+ 'Composer\\Installers\\FuelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
+ 'Composer\\Installers\\FuelphpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
+ 'Composer\\Installers\\GravInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/GravInstaller.php',
+ 'Composer\\Installers\\HuradInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
+ 'Composer\\Installers\\ImageCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
+ 'Composer\\Installers\\Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Installer.php',
+ 'Composer\\Installers\\ItopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
+ 'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
+ 'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
+ 'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
+ 'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
+ 'Composer\\Installers\\LanManagementSystemInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
+ 'Composer\\Installers\\LaravelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
+ 'Composer\\Installers\\LavaLiteInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
+ 'Composer\\Installers\\LithiumInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
+ 'Composer\\Installers\\MODULEWorkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
+ 'Composer\\Installers\\MODXEvoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
+ 'Composer\\Installers\\MagentoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
+ 'Composer\\Installers\\MajimaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
+ 'Composer\\Installers\\MakoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
+ 'Composer\\Installers\\MantisBTInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
+ 'Composer\\Installers\\MatomoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MatomoInstaller.php',
+ 'Composer\\Installers\\MauticInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
+ 'Composer\\Installers\\MayaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
+ 'Composer\\Installers\\MediaWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
+ 'Composer\\Installers\\MiaoxingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MiaoxingInstaller.php',
+ 'Composer\\Installers\\MicroweberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
+ 'Composer\\Installers\\ModxInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ModxInstaller.php',
+ 'Composer\\Installers\\MoodleInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
+ 'Composer\\Installers\\OctoberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
+ 'Composer\\Installers\\OntoWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
+ 'Composer\\Installers\\OsclassInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
+ 'Composer\\Installers\\OxidInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
+ 'Composer\\Installers\\PPIInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
+ 'Composer\\Installers\\PantheonInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PantheonInstaller.php',
+ 'Composer\\Installers\\PhiftyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
+ 'Composer\\Installers\\PhpBBInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
+ 'Composer\\Installers\\PiwikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
+ 'Composer\\Installers\\PlentymarketsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
+ 'Composer\\Installers\\Plugin' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Plugin.php',
+ 'Composer\\Installers\\PortoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
+ 'Composer\\Installers\\PrestashopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
+ 'Composer\\Installers\\ProcessWireInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php',
+ 'Composer\\Installers\\PuppetInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
+ 'Composer\\Installers\\PxcmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
+ 'Composer\\Installers\\RadPHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
+ 'Composer\\Installers\\ReIndexInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
+ 'Composer\\Installers\\Redaxo5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
+ 'Composer\\Installers\\RedaxoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
+ 'Composer\\Installers\\RoundcubeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
+ 'Composer\\Installers\\SMFInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
+ 'Composer\\Installers\\ShopwareInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
+ 'Composer\\Installers\\SilverStripeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
+ 'Composer\\Installers\\SiteDirectInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
+ 'Composer\\Installers\\StarbugInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
+ 'Composer\\Installers\\SyDESInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
+ 'Composer\\Installers\\SyliusInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
+ 'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
+ 'Composer\\Installers\\TastyIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php',
+ 'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
+ 'Composer\\Installers\\TuskInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
+ 'Composer\\Installers\\UserFrostingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
+ 'Composer\\Installers\\VanillaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
+ 'Composer\\Installers\\VgmcpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
+ 'Composer\\Installers\\WHMCSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
+ 'Composer\\Installers\\WinterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WinterInstaller.php',
+ 'Composer\\Installers\\WolfCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
+ 'Composer\\Installers\\WordPressInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
+ 'Composer\\Installers\\YawikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
+ 'Composer\\Installers\\ZendInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
+ 'Composer\\Installers\\ZikulaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
+ 'Firebase\\JWT\\BeforeValidException' => __DIR__ . '/..' . '/firebase/php-jwt/src/BeforeValidException.php',
+ 'Firebase\\JWT\\CachedKeySet' => __DIR__ . '/..' . '/firebase/php-jwt/src/CachedKeySet.php',
+ 'Firebase\\JWT\\ExpiredException' => __DIR__ . '/..' . '/firebase/php-jwt/src/ExpiredException.php',
+ 'Firebase\\JWT\\JWK' => __DIR__ . '/..' . '/firebase/php-jwt/src/JWK.php',
+ 'Firebase\\JWT\\JWT' => __DIR__ . '/..' . '/firebase/php-jwt/src/JWT.php',
+ 'Firebase\\JWT\\JWTExceptionWithPayloadInterface' => __DIR__ . '/..' . '/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php',
+ 'Firebase\\JWT\\Key' => __DIR__ . '/..' . '/firebase/php-jwt/src/Key.php',
+ 'Firebase\\JWT\\SignatureInvalidException' => __DIR__ . '/..' . '/firebase/php-jwt/src/SignatureInvalidException.php',
'UDX\\Settings' => __DIR__ . '/../..' . '/lib/includes/class-settings.php',
'UDX\\Utility' => __DIR__ . '/../..' . '/lib/includes/class-utility.php',
'UsabilityDynamics\\UD_API\\API' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-api.php',
@@ -88,7 +196,6 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
'wpCloud\\StatelessMedia\\Module' => __DIR__ . '/../..' . '/lib/classes/class-module.php',
'wpCloud\\StatelessMedia\\Settings' => __DIR__ . '/../..' . '/lib/classes/class-settings.php',
'wpCloud\\StatelessMedia\\ShortPixel' => __DIR__ . '/../..' . '/lib/classes/compatibility/shortpixel.php',
- 'wpCloud\\StatelessMedia\\SimpleLocalAvatars' => __DIR__ . '/../..' . '/lib/classes/compatibility/simple-local-avatars.php',
'wpCloud\\StatelessMedia\\Singleton' => __DIR__ . '/../..' . '/lib/classes/trait-singleton.php',
'wpCloud\\StatelessMedia\\Status' => __DIR__ . '/../..' . '/lib/classes/class-status.php',
'wpCloud\\StatelessMedia\\Status\\GoogleCloudInfo' => __DIR__ . '/../..' . '/lib/classes/status/class-info-google_cloud.php',
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 390e393a9..3a037f258 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'wpcloud/wp-stateless',
'pretty_version' => 'dev-latest',
'version' => 'dev-latest',
- 'reference' => 'e87ce7a5a22978757737b6a23716cb2b015c5809',
+ 'reference' => 'a217f19a168588b1f86671abb2f1ac8a6f99814c',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -67,7 +67,7 @@
'wpcloud/wp-stateless' => array(
'pretty_version' => 'dev-latest',
'version' => 'dev-latest',
- 'reference' => 'e87ce7a5a22978757737b6a23716cb2b015c5809',
+ 'reference' => 'a217f19a168588b1f86671abb2f1ac8a6f99814c',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
diff --git a/wp-stateless-media.php b/wp-stateless-media.php
index e13abb05b..93cc1d859 100644
--- a/wp-stateless-media.php
+++ b/wp-stateless-media.php
@@ -4,7 +4,7 @@
* Plugin URI: https://stateless.udx.io/
* Description: Upload and serve your WordPress media files from Google Cloud Storage.
* Author: UDX
- * Version: 4.2.1
+ * Version: 4.3.0
* Text Domain: stateless-media
* Author URI: https://udx.io
* License: GPLv2 or later