Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [Many APIs] Add compatibility for PHP 8.4 #7908

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions AccessApproval/src/V1/Client/AccessApprovalClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
use Google\Cloud\AccessApproval\V1\ListApprovalRequestsMessage;
use Google\Cloud\AccessApproval\V1\UpdateAccessApprovalSettingsMessage;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: This API allows a customer to manage accesses to cloud resources by
Expand Down Expand Up @@ -341,14 +342,14 @@ public static function projectApprovalRequestName(string $project, string $appro
* 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 @@ -403,6 +404,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
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
use Google\LongRunning\Client\OperationsClient;
use Google\LongRunning\Operation;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: API for setting [access levels]
Expand Down Expand Up @@ -315,14 +316,14 @@ public static function servicePerimeterName(string $accessPolicy, string $servic
* 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 @@ -377,6 +378,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 AdsAdManager/src/V1/Client/AdUnitServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides methods for handling AdUnit objects.
Expand Down Expand Up @@ -157,14 +158,14 @@ public static function networkName(string $networkCode): 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 @@ -216,6 +217,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 AdsAdManager/src/V1/Client/CompanyServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides methods for handling `Company` objects.
Expand Down Expand Up @@ -155,14 +156,14 @@ public static function networkName(string $networkCode): 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 AdsAdManager/src/V1/Client/CustomFieldServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides methods for handling `CustomField` objects.
Expand Down Expand Up @@ -155,14 +156,14 @@ public static function networkName(string $networkCode): 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 AdsAdManager/src/V1/Client/CustomTargetingKeyServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides methods for handling `CustomTargetingKey` objects.
Expand Down Expand Up @@ -156,14 +157,14 @@ public static function networkName(string $networkCode): 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 @@ -215,6 +216,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
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides methods for handling `CustomTargetingValue` objects.
Expand Down Expand Up @@ -163,14 +164,14 @@ public static function customTargetingValueName(
* 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 @@ -222,6 +223,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
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides methods for handling `EntitySignalsMapping` objects.
Expand Down Expand Up @@ -166,14 +167,14 @@ public static function networkName(string $networkCode): 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 @@ -225,6 +226,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 AdsAdManager/src/V1/Client/NetworkServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides methods for handling Network objects.
Expand Down Expand Up @@ -137,14 +138,14 @@ public static function networkName(string $networkCode): 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 @@ -196,6 +197,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 AdsAdManager/src/V1/Client/OrderServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides methods for handling `Order` objects.
Expand Down Expand Up @@ -155,14 +156,14 @@ public static function orderName(string $networkCode, string $order): 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 AdsAdManager/src/V1/Client/PlacementServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides methods for handling `Placement` objects.
Expand Down Expand Up @@ -155,14 +156,14 @@ public static function placementName(string $networkCode, string $placement): 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);
}
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
Loading
Loading