From f808fc5dac93940d0be1020ba63e1337f71ce4bc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 09:50:39 -0800 Subject: [PATCH] fix: Add compatibility for PHP 8.4 (#7912) docs: Add documentation for logger client option PiperOrigin-RevId: 704769822 Source-Link: https://github.com/googleapis/googleapis/commit/68e77625374a91c46fe47980209fedd108c756e8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/724f6fc2efd4597d2e1c14709a0686ae070280ea Copy-Tag: eyJwIjoiRXZlbnRhcmNQdWJsaXNoaW5nLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiRmlsZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiRmlyZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiRnVuY3Rpb25zLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiR1N1aXRlQWRkT25zLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiR2tlQmFja3VwLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiR2tlQ29ubmVjdEdhdGV3YXkvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== Copy-Tag: eyJwIjoiR2tlSHViLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiR2tlTXVsdGlDbG91ZC8uT3dsQm90LnlhbWwiLCJoIjoiNzI0ZjZmYzJlZmQ0NTk3ZDJlMWMxNDcwOWEwNjg2YWUwNzAyODBlYSJ9 Copy-Tag: eyJwIjoiR3JhZmVhcy8uT3dsQm90LnlhbWwiLCJoIjoiNzI0ZjZmYzJlZmQ0NTk3ZDJlMWMxNDcwOWEwNjg2YWUwNzAyODBlYSJ9 Copy-Tag: eyJwIjoiSWFtLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiSWFtQ3JlZGVudGlhbHMvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== Copy-Tag: eyJwIjoiSWFwLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiSWRzLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiS21zLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiS21zSW52ZW50b3J5Ly5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiTGFuZ3VhZ2UvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== Copy-Tag: eyJwIjoiTGlmZVNjaWVuY2VzLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiTG9nZ2luZy8uT3dsQm90LnlhbWwiLCJoIjoiNzI0ZjZmYzJlZmQ0NTk3ZDJlMWMxNDcwOWEwNjg2YWUwNzAyODBlYSJ9 Copy-Tag: eyJwIjoiTG9uZ1J1bm5pbmcvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== --- EventarcPublishing/src/V1/Client/PublisherClient.php | 4 ++++ .../src/V1/Client/CloudFilestoreManagerClient.php | 10 +++++++--- Firestore/src/Admin/V1/Client/FirestoreAdminClient.php | 10 +++++++--- Firestore/src/V1/Client/FirestoreClient.php | 4 ++++ Functions/src/V2/Client/FunctionServiceClient.php | 10 +++++++--- GSuiteAddOns/src/V1/Client/GSuiteAddOnsClient.php | 10 +++++++--- GkeBackup/src/V1/Client/BackupForGKEClient.php | 10 +++++++--- .../src/V1/Client/GatewayControlClient.php | 4 ++++ .../src/V1beta1/Client/GatewayControlClient.php | 4 ++++ GkeHub/src/V1/Client/GkeHubClient.php | 10 +++++++--- GkeMultiCloud/src/V1/Client/AttachedClustersClient.php | 10 +++++++--- GkeMultiCloud/src/V1/Client/AwsClustersClient.php | 10 +++++++--- GkeMultiCloud/src/V1/Client/AzureClustersClient.php | 10 +++++++--- Grafeas/src/V1/Client/GrafeasClient.php | 10 +++++++--- Iam/src/V2/Client/PoliciesClient.php | 4 ++++ IamCredentials/src/V1/Client/IAMCredentialsClient.php | 10 +++++++--- .../V1/Client/IdentityAwareProxyAdminServiceClient.php | 10 +++++++--- .../V1/Client/IdentityAwareProxyOAuthServiceClient.php | 4 ++++ Ids/src/V1/Client/IDSClient.php | 10 +++++++--- Kms/src/V1/Client/AutokeyAdminClient.php | 10 +++++++--- Kms/src/V1/Client/AutokeyClient.php | 10 +++++++--- Kms/src/V1/Client/EkmServiceClient.php | 10 +++++++--- Kms/src/V1/Client/KeyManagementServiceClient.php | 10 +++++++--- .../src/V1/Client/KeyDashboardServiceClient.php | 10 +++++++--- .../src/V1/Client/KeyTrackingServiceClient.php | 10 +++++++--- Language/src/V1/Client/LanguageServiceClient.php | 4 ++++ Language/src/V2/Client/LanguageServiceClient.php | 4 ++++ .../src/V2beta/Client/WorkflowsServiceV2BetaClient.php | 4 ++++ Logging/src/V2/Client/ConfigServiceV2Client.php | 10 +++++++--- Logging/src/V2/Client/LoggingServiceV2Client.php | 10 +++++++--- Logging/src/V2/Client/MetricsServiceV2Client.php | 10 +++++++--- .../src/LongRunning/Client/OperationsClient.php | 4 ++++ 32 files changed, 194 insertions(+), 66 deletions(-) diff --git a/EventarcPublishing/src/V1/Client/PublisherClient.php b/EventarcPublishing/src/V1/Client/PublisherClient.php index 08b94a2150dc..41bd5240f863 100644 --- a/EventarcPublishing/src/V1/Client/PublisherClient.php +++ b/EventarcPublishing/src/V1/Client/PublisherClient.php @@ -39,6 +39,7 @@ use Google\Cloud\Eventarc\Publishing\V1\PublishResponse; use Google\Protobuf\Any; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Eventarc processes events generated by an event provider and delivers them to @@ -168,6 +169,9 @@ private static function getClientDefaults() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Filestore/src/V1/Client/CloudFilestoreManagerClient.php b/Filestore/src/V1/Client/CloudFilestoreManagerClient.php index 0b16c2797297..f31e9e53f663 100644 --- a/Filestore/src/V1/Client/CloudFilestoreManagerClient.php +++ b/Filestore/src/V1/Client/CloudFilestoreManagerClient.php @@ -57,6 +57,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Configures and manages Filestore resources. @@ -294,14 +295,14 @@ public static function snapshotName(string $project, string $location, string $i * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -356,6 +357,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php b/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php index 93557144d22f..810ab21ebe42 100644 --- a/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php +++ b/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php @@ -72,6 +72,7 @@ use Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The Cloud Firestore Admin API. @@ -403,14 +404,14 @@ public static function projectName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -465,6 +466,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Firestore/src/V1/Client/FirestoreClient.php b/Firestore/src/V1/Client/FirestoreClient.php index 7d0cacc33b8e..d01224d6120d 100644 --- a/Firestore/src/V1/Client/FirestoreClient.php +++ b/Firestore/src/V1/Client/FirestoreClient.php @@ -54,6 +54,7 @@ use Google\Cloud\Firestore\V1\UpdateDocumentRequest; use Google\Cloud\Firestore\V1\Write; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The Cloud Firestore service. @@ -178,6 +179,9 @@ private static function getClientDefaults() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Functions/src/V2/Client/FunctionServiceClient.php b/Functions/src/V2/Client/FunctionServiceClient.php index 503d78f08142..c0d91c5767f6 100644 --- a/Functions/src/V2/Client/FunctionServiceClient.php +++ b/Functions/src/V2/Client/FunctionServiceClient.php @@ -55,6 +55,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Google Cloud Functions is used to deploy functions that are executed by @@ -412,14 +413,14 @@ public static function workerPoolName(string $project, string $location, string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -474,6 +475,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/GSuiteAddOns/src/V1/Client/GSuiteAddOnsClient.php b/GSuiteAddOns/src/V1/Client/GSuiteAddOnsClient.php index c62f07c0921d..1f671ec86585 100644 --- a/GSuiteAddOns/src/V1/Client/GSuiteAddOnsClient.php +++ b/GSuiteAddOns/src/V1/Client/GSuiteAddOnsClient.php @@ -46,6 +46,7 @@ use Google\Cloud\GSuiteAddOns\V1\ReplaceDeploymentRequest; use Google\Cloud\GSuiteAddOns\V1\UninstallDeploymentRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: A service for managing Google Workspace Add-ons deployments. @@ -220,14 +221,14 @@ public static function projectName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -282,6 +283,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/GkeBackup/src/V1/Client/BackupForGKEClient.php b/GkeBackup/src/V1/Client/BackupForGKEClient.php index 4f63f25e443e..14f729833b8e 100644 --- a/GkeBackup/src/V1/Client/BackupForGKEClient.php +++ b/GkeBackup/src/V1/Client/BackupForGKEClient.php @@ -77,6 +77,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: BackupForGKE allows Kubernetes administrators to configure, execute, and @@ -432,14 +433,14 @@ public static function volumeRestoreName( * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -494,6 +495,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/GkeConnectGateway/src/V1/Client/GatewayControlClient.php b/GkeConnectGateway/src/V1/Client/GatewayControlClient.php index 54a61010a7da..6ac0651528f7 100644 --- a/GkeConnectGateway/src/V1/Client/GatewayControlClient.php +++ b/GkeConnectGateway/src/V1/Client/GatewayControlClient.php @@ -34,6 +34,7 @@ use Google\Cloud\GkeConnect\Gateway\V1\GenerateCredentialsRequest; use Google\Cloud\GkeConnect\Gateway\V1\GenerateCredentialsResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: GatewayControl is the control plane API for Connect Gateway. @@ -151,6 +152,9 @@ private static function supportedTransports() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/GkeConnectGateway/src/V1beta1/Client/GatewayControlClient.php b/GkeConnectGateway/src/V1beta1/Client/GatewayControlClient.php index 5987844c13a9..6234da984ceb 100644 --- a/GkeConnectGateway/src/V1beta1/Client/GatewayControlClient.php +++ b/GkeConnectGateway/src/V1beta1/Client/GatewayControlClient.php @@ -36,6 +36,7 @@ use Google\Cloud\GkeConnect\Gateway\V1beta1\GenerateCredentialsRequest; use Google\Cloud\GkeConnect\Gateway\V1beta1\GenerateCredentialsResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: GatewayControl is the control plane API for Connect Gateway. @@ -155,6 +156,9 @@ private static function supportedTransports() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/GkeHub/src/V1/Client/GkeHubClient.php b/GkeHub/src/V1/Client/GkeHubClient.php index 322bf25b0819..37dd76e56d46 100644 --- a/GkeHub/src/V1/Client/GkeHubClient.php +++ b/GkeHub/src/V1/Client/GkeHubClient.php @@ -51,6 +51,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The GKE Hub service handles the registration of many Kubernetes clusters to @@ -258,14 +259,14 @@ public static function membershipName(string $project, string $location, string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -320,6 +321,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php b/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php index f36160558dbd..4504036fdf2d 100644 --- a/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php +++ b/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php @@ -50,6 +50,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The AttachedClusters API provides a single centrally managed service @@ -239,14 +240,14 @@ public static function locationName(string $project, string $location): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -301,6 +302,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/GkeMultiCloud/src/V1/Client/AwsClustersClient.php b/GkeMultiCloud/src/V1/Client/AwsClustersClient.php index 31631c08b49d..106616a1f96c 100644 --- a/GkeMultiCloud/src/V1/Client/AwsClustersClient.php +++ b/GkeMultiCloud/src/V1/Client/AwsClustersClient.php @@ -60,6 +60,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The AwsClusters API provides a single centrally managed service @@ -281,14 +282,14 @@ public static function locationName(string $project, string $location): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -343,6 +344,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/GkeMultiCloud/src/V1/Client/AzureClustersClient.php b/GkeMultiCloud/src/V1/Client/AzureClustersClient.php index 3d33c75e4705..8f058a1e5af8 100644 --- a/GkeMultiCloud/src/V1/Client/AzureClustersClient.php +++ b/GkeMultiCloud/src/V1/Client/AzureClustersClient.php @@ -64,6 +64,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The AzureClusters API provides a single centrally managed service @@ -308,14 +309,14 @@ public static function locationName(string $project, string $location): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -370,6 +371,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Grafeas/src/V1/Client/GrafeasClient.php b/Grafeas/src/V1/Client/GrafeasClient.php index 9373677f819e..c308aa71ce77 100644 --- a/Grafeas/src/V1/Client/GrafeasClient.php +++ b/Grafeas/src/V1/Client/GrafeasClient.php @@ -52,6 +52,7 @@ use Grafeas\V1\UpdateNoteRequest; use Grafeas\V1\UpdateOccurrenceRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: [Grafeas](https://grafeas.io) API. @@ -201,14 +202,14 @@ public static function projectName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -263,6 +264,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Iam/src/V2/Client/PoliciesClient.php b/Iam/src/V2/Client/PoliciesClient.php index 24297fc04026..2dbefd5a46c4 100644 --- a/Iam/src/V2/Client/PoliciesClient.php +++ b/Iam/src/V2/Client/PoliciesClient.php @@ -42,6 +42,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: An interface for managing Identity and Access Management (IAM) policies. @@ -202,6 +203,9 @@ private function createOperationsClient(array $options) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/IamCredentials/src/V1/Client/IAMCredentialsClient.php b/IamCredentials/src/V1/Client/IAMCredentialsClient.php index f4ea4fbd637d..6027f0e75e18 100644 --- a/IamCredentials/src/V1/Client/IAMCredentialsClient.php +++ b/IamCredentials/src/V1/Client/IAMCredentialsClient.php @@ -41,6 +41,7 @@ use Google\Cloud\Iam\Credentials\V1\SignJwtRequest; use Google\Cloud\Iam\Credentials\V1\SignJwtResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: A service account is a special type of Google account that belongs to your @@ -141,14 +142,14 @@ public static function serviceAccountName(string $project, string $serviceAccoun * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -203,6 +204,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Iap/src/V1/Client/IdentityAwareProxyAdminServiceClient.php b/Iap/src/V1/Client/IdentityAwareProxyAdminServiceClient.php index bb3922da0569..9f74898e5fdf 100644 --- a/Iap/src/V1/Client/IdentityAwareProxyAdminServiceClient.php +++ b/Iap/src/V1/Client/IdentityAwareProxyAdminServiceClient.php @@ -48,6 +48,7 @@ use Google\Cloud\Iap\V1\UpdateIapSettingsRequest; use Google\Cloud\Iap\V1\UpdateTunnelDestGroupRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: APIs for Identity-Aware Proxy Admin configurations. @@ -168,14 +169,14 @@ public static function tunnelLocationName(string $project, string $location): st * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -230,6 +231,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Iap/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php b/Iap/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php index c16b9e5590da..11cc1b249b92 100644 --- a/Iap/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php +++ b/Iap/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php @@ -44,6 +44,7 @@ use Google\Cloud\Iap\V1\ListIdentityAwareProxyClientsRequest; use Google\Cloud\Iap\V1\ResetIdentityAwareProxyClientSecretRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: API to programmatically create, list and retrieve Identity Aware Proxy (IAP) @@ -159,6 +160,9 @@ private static function getClientDefaults() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Ids/src/V1/Client/IDSClient.php b/Ids/src/V1/Client/IDSClient.php index 55bb0b19957d..c1fc8aefea03 100644 --- a/Ids/src/V1/Client/IDSClient.php +++ b/Ids/src/V1/Client/IDSClient.php @@ -42,6 +42,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The IDS Service @@ -206,14 +207,14 @@ public static function locationName(string $project, string $location): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -268,6 +269,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Kms/src/V1/Client/AutokeyAdminClient.php b/Kms/src/V1/Client/AutokeyAdminClient.php index 6909717f73ce..503a03fdf21d 100644 --- a/Kms/src/V1/Client/AutokeyAdminClient.php +++ b/Kms/src/V1/Client/AutokeyAdminClient.php @@ -47,6 +47,7 @@ use Google\Cloud\Location\ListLocationsRequest; use Google\Cloud\Location\Location; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides interfaces for managing [Cloud KMS @@ -167,14 +168,14 @@ public static function projectName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -229,6 +230,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Kms/src/V1/Client/AutokeyClient.php b/Kms/src/V1/Client/AutokeyClient.php index 61e914cf9132..d14d3377255c 100644 --- a/Kms/src/V1/Client/AutokeyClient.php +++ b/Kms/src/V1/Client/AutokeyClient.php @@ -49,6 +49,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides interfaces for using [Cloud KMS @@ -259,14 +260,14 @@ public static function locationName(string $project, string $location): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -321,6 +322,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Kms/src/V1/Client/EkmServiceClient.php b/Kms/src/V1/Client/EkmServiceClient.php index d926157f8c31..224114af6dfd 100644 --- a/Kms/src/V1/Client/EkmServiceClient.php +++ b/Kms/src/V1/Client/EkmServiceClient.php @@ -52,6 +52,7 @@ use Google\Cloud\Location\ListLocationsRequest; use Google\Cloud\Location\Location; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Google Cloud Key Management EKM Service @@ -219,14 +220,14 @@ public static function serviceName(string $project, string $location, string $na * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -281,6 +282,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Kms/src/V1/Client/KeyManagementServiceClient.php b/Kms/src/V1/Client/KeyManagementServiceClient.php index 1a3f40e60d09..77ae0e9dcca7 100644 --- a/Kms/src/V1/Client/KeyManagementServiceClient.php +++ b/Kms/src/V1/Client/KeyManagementServiceClient.php @@ -84,6 +84,7 @@ use Google\Cloud\Location\ListLocationsRequest; use Google\Cloud\Location\Location; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Google Cloud Key Management Service @@ -312,14 +313,14 @@ public static function locationName(string $project, string $location): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -374,6 +375,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/KmsInventory/src/V1/Client/KeyDashboardServiceClient.php b/KmsInventory/src/V1/Client/KeyDashboardServiceClient.php index 624254c73990..d7f1763a331a 100644 --- a/KmsInventory/src/V1/Client/KeyDashboardServiceClient.php +++ b/KmsInventory/src/V1/Client/KeyDashboardServiceClient.php @@ -35,6 +35,7 @@ use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\Kms\Inventory\V1\ListCryptoKeysRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides a cross-region view of all Cloud KMS keys in a given Cloud project. @@ -122,14 +123,14 @@ public static function projectName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -184,6 +185,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/KmsInventory/src/V1/Client/KeyTrackingServiceClient.php b/KmsInventory/src/V1/Client/KeyTrackingServiceClient.php index f9c2d67300ef..2a824a92b269 100644 --- a/KmsInventory/src/V1/Client/KeyTrackingServiceClient.php +++ b/KmsInventory/src/V1/Client/KeyTrackingServiceClient.php @@ -37,6 +37,7 @@ use Google\Cloud\Kms\Inventory\V1\ProtectedResourcesSummary; use Google\Cloud\Kms\Inventory\V1\SearchProtectedResourcesRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Returns information about the resources in an org that are protected by a @@ -210,14 +211,14 @@ public static function protectedResourcesSummaryName( * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -272,6 +273,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Language/src/V1/Client/LanguageServiceClient.php b/Language/src/V1/Client/LanguageServiceClient.php index 16b7bf1935f2..ae0c1f66ec5e 100644 --- a/Language/src/V1/Client/LanguageServiceClient.php +++ b/Language/src/V1/Client/LanguageServiceClient.php @@ -46,6 +46,7 @@ use Google\Cloud\Language\V1\ModerateTextRequest; use Google\Cloud\Language\V1\ModerateTextResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides text analysis operations such as sentiment analysis and entity @@ -160,6 +161,9 @@ private static function getClientDefaults() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Language/src/V2/Client/LanguageServiceClient.php b/Language/src/V2/Client/LanguageServiceClient.php index 72c51e9835c1..c980b4502c1a 100644 --- a/Language/src/V2/Client/LanguageServiceClient.php +++ b/Language/src/V2/Client/LanguageServiceClient.php @@ -42,6 +42,7 @@ use Google\Cloud\Language\V2\ModerateTextRequest; use Google\Cloud\Language\V2\ModerateTextResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides text analysis operations such as sentiment analysis and entity @@ -154,6 +155,9 @@ private static function getClientDefaults() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/LifeSciences/src/V2beta/Client/WorkflowsServiceV2BetaClient.php b/LifeSciences/src/V2beta/Client/WorkflowsServiceV2BetaClient.php index e5406b35ed64..eb9346946c1b 100644 --- a/LifeSciences/src/V2beta/Client/WorkflowsServiceV2BetaClient.php +++ b/LifeSciences/src/V2beta/Client/WorkflowsServiceV2BetaClient.php @@ -44,6 +44,7 @@ use Google\Cloud\Location\Location; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: A service for running workflows, such as pipelines consisting of Docker @@ -190,6 +191,9 @@ public function resumeOperation($operationName, $methodName = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Logging/src/V2/Client/ConfigServiceV2Client.php b/Logging/src/V2/Client/ConfigServiceV2Client.php index 3a3d8d103770..d1f92bdff4cc 100644 --- a/Logging/src/V2/Client/ConfigServiceV2Client.php +++ b/Logging/src/V2/Client/ConfigServiceV2Client.php @@ -74,6 +74,7 @@ use Google\Cloud\Logging\V2\UpdateViewRequest; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Service for configuring sinks used to route log entries. @@ -1008,14 +1009,14 @@ public static function settingsName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -1070,6 +1071,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Logging/src/V2/Client/LoggingServiceV2Client.php b/Logging/src/V2/Client/LoggingServiceV2Client.php index 580f47194275..550acd73b0ea 100644 --- a/Logging/src/V2/Client/LoggingServiceV2Client.php +++ b/Logging/src/V2/Client/LoggingServiceV2Client.php @@ -41,6 +41,7 @@ use Google\Cloud\Logging\V2\WriteLogEntriesRequest; use Google\Cloud\Logging\V2\WriteLogEntriesResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Service for ingesting and querying logs. @@ -276,14 +277,14 @@ public static function projectLogName(string $project, string $log): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -338,6 +339,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Logging/src/V2/Client/MetricsServiceV2Client.php b/Logging/src/V2/Client/MetricsServiceV2Client.php index 375766ac34e8..ecfc1055593f 100644 --- a/Logging/src/V2/Client/MetricsServiceV2Client.php +++ b/Logging/src/V2/Client/MetricsServiceV2Client.php @@ -40,6 +40,7 @@ use Google\Cloud\Logging\V2\LogMetric; use Google\Cloud\Logging\V2\UpdateLogMetricRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Service for configuring logs-based metrics. @@ -155,14 +156,14 @@ public static function projectName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -217,6 +218,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/LongRunning/src/LongRunning/Client/OperationsClient.php b/LongRunning/src/LongRunning/Client/OperationsClient.php index 2443891b00cc..e275b18af789 100644 --- a/LongRunning/src/LongRunning/Client/OperationsClient.php +++ b/LongRunning/src/LongRunning/Client/OperationsClient.php @@ -39,6 +39,7 @@ use Google\LongRunning\Operation; use Google\LongRunning\WaitOperationRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Manages long-running operations with an API service. @@ -155,6 +156,9 @@ private static function getClientDefaults() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException