From 8a82ff420b847e14cea33893de3a6d1e5ebc14e0 Mon Sep 17 00:00:00 2001 From: rootkiller6788 Date: Wed, 23 Sep 2026 00:14:28 +0800 Subject: [PATCH] test(Firestore): stop warnings in the update-paths conformance test The 'update-paths: no paths' conformance case has no fieldPaths key, so the foreach in testUpdatePaths() warned twice on every run. Pass an empty list instead, which also means update() actually gets called with no data - the case expects a client-side error there. --- Firestore/tests/Unit/ConformanceTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Firestore/tests/Unit/ConformanceTest.php b/Firestore/tests/Unit/ConformanceTest.php index 2f91202debc9..d29d5d86d844 100644 --- a/Firestore/tests/Unit/ConformanceTest.php +++ b/Firestore/tests/Unit/ConformanceTest.php @@ -190,7 +190,8 @@ public function testUpdatePaths($test) $this->executeAndHandleError($test, function ($test) { $fields = []; - foreach ($test['fieldPaths'] as $key => $val) { + // "update-paths: no paths" has no fieldPaths and expects update([]) to error. + foreach ($test['fieldPaths'] ?? [] as $key => $val) { $fields[] = [ 'path' => new FieldPath($val['field']), 'value' => $this->injectSentinel(