From 36a2454bcd8e79ac61020a8cceb32eb234ca9ceb Mon Sep 17 00:00:00 2001 From: Yash Sahu <54198301+yash30201@users.noreply.github.com> Date: Thu, 18 Jan 2024 03:44:55 +0530 Subject: [PATCH 1/5] chore: increase minimum supported version for guzzle psr7 (#2554) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 981421845..867674e5e 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "monolog/monolog": "^2.9||^3.0", "phpseclib/phpseclib": "^3.0.34", "guzzlehttp/guzzle": "^6.5.8||^7.4.5", - "guzzlehttp/psr7": "^1.8.4||^2.2.1" + "guzzlehttp/psr7": "^1.9.1||^2.2.1" }, "require-dev": { "squizlabs/php_codesniffer": "^3.8", From ab9bfc33eda876968a45ef6c56e906c79469a56c Mon Sep 17 00:00:00 2001 From: Yash Sahu <54198301+yash30201@users.noreply.github.com> Date: Thu, 18 Jan 2024 03:47:03 +0530 Subject: [PATCH 2/5] chore: update minimum composer version (#2553) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 867674e5e..8d8aa95fc 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "symfony/css-selector": "~2.1", "cache/filesystem-adapter": "^1.1", "phpcompatibility/php-compatibility": "^9.2", - "composer/composer": "^1.10.22", + "composer/composer": "^1.10.23", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5" }, From 9a5fa994273c7b59207f47a954dada0c7d9f4c1c Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Fri, 23 Feb 2024 17:53:27 -0600 Subject: [PATCH 3/5] chore: fix client phpdoc (#2568) --- src/Client.php | 99 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 39 deletions(-) diff --git a/src/Client.php b/src/Client.php index 31b3f1d5f..046670551 100644 --- a/src/Client.php +++ b/src/Client.php @@ -105,47 +105,84 @@ class Client /** * Construct the Google Client. * - * @param array $config + * @param array $config { + * An array of required and optional arguments. + * + * @type string $application_name + * The name of your application + * @type string $base_path + * The base URL for the service. This is only accounted for when calling + * {@see Client::authorize()} directly. + * @type string $client_id + * Your Google Cloud client ID found in https://developers.google.com/console + * @type string $client_secret + * Your Google Cloud client secret found in https://developers.google.com/console + * @type string|array|CredentialsLoader $credentials + * Can be a path to JSON credentials or an array representing those + * credentials (@see Google\Client::setAuthConfig), or an instance of + * {@see CredentialsLoader}. + * @type string|array $scopes + * {@see Google\Client::setScopes} + * @type string $quota_project + * Sets X-Goog-User-Project, which specifies a user project to bill + * for access charges associated with the request. + * @type string $redirect_uri + * @type string $state + * @type string $developer_key + * Simple API access key, also from the API console. Ensure you get + * a Server key, and not a Browser key. + * @type bool $use_application_default_credentials + * For use with Google Cloud Platform + * fetch the ApplicationDefaultCredentials, if applicable + * {@see https://developers.google.com/identity/protocols/application-default-credentials} + * @type string $signing_key + * @type string $signing_algorithm + * @type string $subject + * @type string $hd + * @type string $prompt + * @type string $openid + * @type bool $include_granted_scopes + * @type string $login_hint + * @type string $request_visible_actions + * @type string $access_type + * @type string $approval_prompt + * @type array $retry + * Task Runner retry configuration + * {@see \Google\Task\Runner} + * @type array $retry_map + * @type CacheItemPoolInterface $cache + * Cache class implementing {@see CacheItemPoolInterface}. Defaults + * to {@see MemoryCacheItemPool}. + * @type array $cache_config + * Cache config for downstream auth caching. + * @type callable $token_callback + * Function to be called when an access token is fetched. Follows + * the signature `function (string $cacheKey, string $accessToken)`. + * @type \Firebase\JWT $jwt + * Service class used in {@see Client::verifyIdToken()}. Explicitly + * pass this in to avoid setting {@see \Firebase\JWT::$leeway} + * @type bool $api_format_v2 + * Setting api_format_v2 will return more detailed error messages + * from certain APIs. + * } */ public function __construct(array $config = []) { $this->config = array_merge([ 'application_name' => '', - - // Don't change these unless you're working against a special development - // or testing environment. 'base_path' => self::API_BASE_PATH, - - // https://developers.google.com/console 'client_id' => '', 'client_secret' => '', - - // Can be a path to JSON credentials or an array representing those - // credentials (@see Google\Client::setAuthConfig), or an instance of - // Google\Auth\CredentialsLoader. 'credentials' => null, - // @see Google\Client::setScopes 'scopes' => null, - // Sets X-Goog-User-Project, which specifies a user project to bill - // for access charges associated with the request 'quota_project' => null, - 'redirect_uri' => null, 'state' => null, - - // Simple API access key, also from the API console. Ensure you get - // a Server key, and not a Browser key. 'developer_key' => '', - - // For use with Google Cloud Platform - // fetch the ApplicationDefaultCredentials, if applicable - // @see https://developers.google.com/identity/protocols/application-default-credentials 'use_application_default_credentials' => false, 'signing_key' => null, 'signing_algorithm' => null, 'subject' => null, - - // Other OAuth2 parameters. 'hd' => '', 'prompt' => '', 'openid.realm' => '', @@ -154,28 +191,12 @@ public function __construct(array $config = []) 'request_visible_actions' => '', 'access_type' => 'online', 'approval_prompt' => 'auto', - - // Task Runner retry configuration - // @see Google\Task\Runner 'retry' => [], 'retry_map' => null, - - // Cache class implementing Psr\Cache\CacheItemPoolInterface. - // Defaults to Google\Auth\Cache\MemoryCacheItemPool. 'cache' => null, - // cache config for downstream auth caching 'cache_config' => [], - - // function to be called when an access token is fetched - // follows the signature function ($cacheKey, $accessToken) 'token_callback' => null, - - // Service class used in Google\Client::verifyIdToken. - // Explicitly pass this in to avoid setting JWT::$leeway 'jwt' => null, - - // Setting api_format_v2 will return more detailed error messages - // from certain APIs. 'api_format_v2' => false ], $config); From 633d41f1b65fdb71a83bf747f7a3ad9857f6d02a Mon Sep 17 00:00:00 2001 From: Yoeri Boven Date: Wed, 6 Mar 2024 08:18:29 +0100 Subject: [PATCH 4/5] fix: updates phpseclib because of a security issue (#2574) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8d8aa95fc..8cb8b941d 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "google/apiclient-services": "~0.200", "firebase/php-jwt": "~6.0", "monolog/monolog": "^2.9||^3.0", - "phpseclib/phpseclib": "^3.0.34", + "phpseclib/phpseclib": "^3.0.36", "guzzlehttp/guzzle": "^6.5.8||^7.4.5", "guzzlehttp/psr7": "^1.9.1||^2.2.1" }, From 73fa9cf8d8886db7269bcda0457d0a251a02cfd9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:56:12 -0700 Subject: [PATCH 5/5] chore(main): release 2.15.4 (#2576) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7813e2ba4..e8f4dccc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.15.4](https://github.com/googleapis/google-api-php-client/compare/v2.15.3...v2.15.4) (2024-03-06) + + +### Bug Fixes + +* Updates phpseclib because of a security issue ([#2574](https://github.com/googleapis/google-api-php-client/issues/2574)) ([633d41f](https://github.com/googleapis/google-api-php-client/commit/633d41f1b65fdb71a83bf747f7a3ad9857f6d02a)) + ## [2.15.3](https://github.com/googleapis/google-api-php-client/compare/v2.15.2...v2.15.3) (2024-01-04)