Skip to content

Commit

Permalink
fix: Add compatibility for PHP 8.4 (#7905)
Browse files Browse the repository at this point in the history
* docs: correct SearchVehiclesRequest.ordered_by description
PiperOrigin-RevId: 704403622
Source-Link: googleapis/googleapis@4e78e68
Source-Link: googleapis/googleapis-gen@1574331
Copy-Tag: eyJwIjoiTWFwc0ZsZWV0RW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiIxNTc0MzMxMjZiM2M2NTQ2MjU0ZDlmOGMzNzg1YjBhZjE5YjlkN2JjIn0=

* fix: Add compatibility for PHP 8.4
docs: Add documentation for logger client option
PiperOrigin-RevId: 704769822
Source-Link: googleapis/googleapis@68e7762
Source-Link: googleapis/googleapis-gen@724f6fc
Copy-Tag: eyJwIjoiTWFwc0ZsZWV0RW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0=
  • Loading branch information
gcf-owl-bot[bot] authored Dec 11, 2024
1 parent f9e1bd0 commit 0d6fe10
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 26 deletions.
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.

0 comments on commit 0d6fe10

Please sign in to comment.