From ff269d507780453121af219991845aa431945cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gamez?= Date: Sun, 12 Oct 2025 22:57:11 +0200 Subject: [PATCH 1/2] Remove the `keyFile` option from the Google Cloud config array --- src/Firebase/Factory.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Firebase/Factory.php b/src/Firebase/Factory.php index 7f48442dc..3e5a41fcf 100644 --- a/src/Firebase/Factory.php +++ b/src/Firebase/Factory.php @@ -638,11 +638,6 @@ private function googleCloudClientConfig(): array $config['credentialsFetcher'] = $credentials; } - $serviceAccount = $this->getServiceAccount(); - if ($serviceAccount !== null) { - $config['keyFile'] = $this->normalizeServiceAccount($serviceAccount); - } - return $config; } From 8537b3f588f696e9e49634673858f4116c60edda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gamez?= Date: Sat, 1 Nov 2025 17:43:01 +0100 Subject: [PATCH 2/2] Ignore deprecated method error The deprecation error has been introduced with the changes in https://github.com/googleapis/google-cloud-php/pull/8617. Until/Unless https://github.com/googleapis/google-cloud-php/pull/8689 or something similar is implemented, we need to ignore the error here. --- src/Firebase/Factory.php | 2 +- src/Firebase/Firestore.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Firebase/Factory.php b/src/Firebase/Factory.php index 3e5a41fcf..aa649513a 100644 --- a/src/Firebase/Factory.php +++ b/src/Firebase/Factory.php @@ -524,7 +524,7 @@ public function createFirestore(?string $databaseName = null): Contract\Firestor public function createStorage(): Contract\Storage { try { - $storageClient = new StorageClient($this->googleCloudClientConfig()); + $storageClient = new StorageClient($this->googleCloudClientConfig()); // @phpstan-ignore method.deprecated } catch (Throwable $e) { throw new RuntimeException('Unable to create a StorageClient: '.$e->getMessage(), $e->getCode(), $e); } diff --git a/src/Firebase/Firestore.php b/src/Firebase/Firestore.php index 88a89e1e6..0cd39bfe0 100644 --- a/src/Firebase/Firestore.php +++ b/src/Firebase/Firestore.php @@ -23,7 +23,7 @@ private function __construct(private readonly FirestoreClient $client) public static function fromConfig(array $config): Contract\Firestore { try { - return new self(new FirestoreClient($config)); + return new self(new FirestoreClient($config)); // @phpstan-ignore method.deprecated } catch (Throwable $e) { throw new RuntimeException('Unable to create a FirestoreClient: '.$e->getMessage(), $e->getCode(), $e); }