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: [MapsFleetEngine] Add compatibility for PHP 8.4 #7905

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 MapsFleetEngine/src/V1/Client/TripServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
use Google\Maps\FleetEngine\V1\Trip;
use Google\Maps\FleetEngine\V1\UpdateTripRequest;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Trip management service.
Expand Down Expand Up @@ -133,14 +134,14 @@ public static function tripName(string $provider, string $trip): 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 @@ -195,6 +196,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 MapsFleetEngine/src/V1/Client/VehicleServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
use Google\Maps\FleetEngine\V1\Vehicle;
use Google\Maps\FleetEngine\V1\Vehicle\VehicleType;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Vehicle management service.
Expand Down Expand Up @@ -138,14 +139,14 @@ public static function vehicleName(string $provider, string $vehicle): 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 @@ -200,6 +201,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
36 changes: 16 additions & 20 deletions MapsFleetEngine/src/V1/VehicleMatch.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading