Skip to content

Commit

Permalink
fix: Add compatibility for PHP 8.4 (#7914)
Browse files Browse the repository at this point in the history
docs: Add documentation for logger client option
PiperOrigin-RevId: 704769822
Source-Link: googleapis/googleapis@68e7762
Source-Link: googleapis/googleapis-gen@724f6fc
Copy-Tag: eyJwIjoiUGFyYWxsZWxzdG9yZS8uT3dsQm90LnlhbWwiLCJoIjoiNzI0ZjZmYzJlZmQ0NTk3ZDJlMWMxNDcwOWEwNjg2YWUwNzAyODBlYSJ9
Copy-Tag: eyJwIjoiUG9saWN5U2ltdWxhdG9yLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0=
Copy-Tag: eyJwIjoiUG9saWN5VHJvdWJsZXNob290ZXIvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ==
Copy-Tag: eyJwIjoiUG9saWN5VHJvdWJsZXNob290ZXJJYW0vLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ==
Copy-Tag: eyJwIjoiUHJpdmF0ZUNhdGFsb2cvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ==
Copy-Tag: eyJwIjoiUHJpdmlsZWdlZEFjY2Vzc01hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ==
Copy-Tag: eyJwIjoiUHJvZmlsZXIvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ==
Copy-Tag: eyJwIjoiUHViU3ViLy5Pd2xCb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4MGVhIn0=
Copy-Tag: eyJwIjoiUmVzb3VyY2VTZXR0aW5ncy8uT3dsQm90LnlhbWwiLCJoIjoiNzI0ZjZmYzJlZmQ0NTk3ZDJlMWMxNDcwOWEwNjg2YWUwNzAyODBlYSJ9
Copy-Tag: eyJwIjoiUmV0YWlsLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0=
Copy-Tag: eyJwIjoiUnVuLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0=
Copy-Tag: eyJwIjoiU2NoZWR1bGVyLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0=
  • Loading branch information
gcf-owl-bot[bot] authored Dec 11, 2024
1 parent 0c7ea5d commit 67ed03a
Show file tree
Hide file tree
Showing 48 changed files with 324 additions and 132 deletions.
10 changes: 7 additions & 3 deletions Parallelstore/src/V1/Client/ParallelstoreClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
use Google\LongRunning\Client\OperationsClient;
use Google\LongRunning\Operation;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Service describing handlers for resources
Expand Down Expand Up @@ -287,14 +288,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);
}
Expand Down Expand Up @@ -349,6 +350,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
Expand Down
10 changes: 7 additions & 3 deletions Parallelstore/src/V1beta/Client/ParallelstoreClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
use Google\LongRunning\Client\OperationsClient;
use Google\LongRunning\Operation;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Service describing handlers for resources
Expand Down Expand Up @@ -305,16 +306,16 @@ 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.
*
* @experimental
*/
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);
}
Expand Down Expand Up @@ -369,6 +370,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
Expand Down
10 changes: 7 additions & 3 deletions PolicySimulator/src/V1/Client/SimulatorClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
use Google\LongRunning\Client\OperationsClient;
use Google\LongRunning\Operation;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Policy Simulator API service.
Expand Down Expand Up @@ -260,14 +261,14 @@ public static function replayName(string $project, string $location, string $rep
* 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);
}
Expand Down Expand Up @@ -322,6 +323,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
Expand Down
4 changes: 4 additions & 0 deletions PolicyTroubleshooter/src/V1/Client/IamCheckerClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Google\Cloud\PolicyTroubleshooter\V1\TroubleshootIamPolicyRequest;
use Google\Cloud\PolicyTroubleshooter\V1\TroubleshootIamPolicyResponse;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: IAM Policy Troubleshooter service.
Expand Down Expand Up @@ -140,6 +141,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Google\Cloud\PolicyTroubleshooter\Iam\V3\TroubleshootIamPolicyRequest;
use Google\Cloud\PolicyTroubleshooter\Iam\V3\TroubleshootIamPolicyResponse;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: IAM Policy Troubleshooter service.
Expand Down Expand Up @@ -140,6 +141,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
Expand Down
4 changes: 4 additions & 0 deletions PrivateCatalog/src/V1beta1/Client/PrivateCatalogClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use Google\Cloud\PrivateCatalog\V1beta1\SearchProductsRequest;
use Google\Cloud\PrivateCatalog\V1beta1\SearchVersionsRequest;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: `PrivateCatalog` allows catalog consumers to retrieve `Catalog`, `Product`
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
use Google\LongRunning\Client\OperationsClient;
use Google\LongRunning\Operation;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: This API allows customers to manage temporary, request based privileged
Expand Down Expand Up @@ -455,14 +456,14 @@ public static function projectLocationEntitlementGrantName(
* 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);
}
Expand Down Expand Up @@ -517,6 +518,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
Expand Down
10 changes: 7 additions & 3 deletions Profiler/src/V2/Client/ExportServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
use Google\Auth\FetchAuthTokenInterface;
use Google\Cloud\Profiler\V2\ListProfilesRequest;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Service allows existing Cloud Profiler customers to export their profile data
Expand Down Expand Up @@ -127,14 +128,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);
}
Expand Down Expand Up @@ -189,6 +190,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
Expand Down
10 changes: 7 additions & 3 deletions Profiler/src/V2/Client/ProfilerServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use Google\Cloud\Profiler\V2\Profile;
use Google\Cloud\Profiler\V2\UpdateProfileRequest;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Manage the collection of continuous profiling data provided by profiling
Expand Down Expand Up @@ -152,14 +153,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);
}
Expand Down Expand Up @@ -214,6 +215,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
Expand Down
10 changes: 7 additions & 3 deletions PubSub/src/V1/Client/PublisherClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
use Google\Cloud\PubSub\V1\Topic;
use Google\Cloud\PubSub\V1\UpdateTopicRequest;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: The service that an application uses to manipulate topics, and to send
Expand Down Expand Up @@ -236,14 +237,14 @@ public static function topicName(string $project, string $topic): 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);
}
Expand Down Expand Up @@ -298,6 +299,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
Expand Down
10 changes: 7 additions & 3 deletions PubSub/src/V1/Client/SchemaServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
use Google\Cloud\PubSub\V1\ValidateSchemaRequest;
use Google\Cloud\PubSub\V1\ValidateSchemaResponse;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Service for doing schema-related operations.
Expand Down Expand Up @@ -172,14 +173,14 @@ public static function schemaName(string $project, string $schema): 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);
}
Expand Down Expand Up @@ -234,6 +235,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
Expand Down
10 changes: 7 additions & 3 deletions PubSub/src/V1/Client/SubscriberClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
use Google\Cloud\PubSub\V1\UpdateSnapshotRequest;
use Google\Cloud\PubSub\V1\UpdateSubscriptionRequest;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: The service that an application uses to manipulate subscriptions and to
Expand Down Expand Up @@ -251,14 +252,14 @@ public static function topicName(string $project, string $topic): 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);
}
Expand Down Expand Up @@ -313,6 +314,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
Expand Down
Loading

0 comments on commit 67ed03a

Please sign in to comment.