From 06b9b650f3fdc7f98a594f9ddd3567b2d03fa288 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 23 Dec 2024 08:53:20 -0800 Subject: [PATCH 1/2] fix: [Firestore] deprecation from autoloading deprecated class --- Firestore/src/DocumentReference.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firestore/src/DocumentReference.php b/Firestore/src/DocumentReference.php index 843e73916ee6..79e824d3df62 100644 --- a/Firestore/src/DocumentReference.php +++ b/Firestore/src/DocumentReference.php @@ -418,7 +418,7 @@ function ($collectionId) { */ protected function batchFactory() { - if (!class_exists(WriteBatch::class)) { + if (!class_exists(WriteBatch::class, false)) { class_alias(BulkWriter::class, WriteBatch::class); } return new BulkWriter( From fd331f7ec34398d528f4547d682146ab6bc2ab93 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 23 Dec 2024 12:41:53 -0800 Subject: [PATCH 2/2] apply fix to FirestoreClient::batch as well --- Firestore/src/FirestoreClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firestore/src/FirestoreClient.php b/Firestore/src/FirestoreClient.php index 39db0de53ede..23e93c095394 100644 --- a/Firestore/src/FirestoreClient.php +++ b/Firestore/src/FirestoreClient.php @@ -178,7 +178,7 @@ public function __construct(array $config = []) */ public function batch() { - if (!class_exists(WriteBatch::class)) { + if (!class_exists(WriteBatch::class, false)) { class_alias(BulkWriter::class, WriteBatch::class); } return new BulkWriter(