Skip to content

Commit 4035a9c

Browse files
committed
1 parent 3d14230 commit 4035a9c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/Integration/Factory/FirestoreTest.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,29 @@
1414
*/
1515
final class FirestoreTest extends IntegrationTestCase
1616
{
17+
private string|false $zendMaxAllowedStackSize;
18+
19+
protected function setUp(): void
20+
{
21+
parent::setUp();
22+
23+
// @see https://github.com/grpc/grpc/issues/38184
24+
// @see https://github.com/googleapis/gax-php/issues/584
25+
// @see https://www.php.net/manual/en/info.configuration.php#ini.zend.reserved-stack-size
26+
$this->zendMaxAllowedStackSize = ini_get('zend.max_allowed_stack_size');
27+
28+
if (PHP_VERSION_ID >= 80300 && $this->zendMaxAllowedStackSize >= 0) {
29+
ini_set('zend.max_allowed_stack_size', -1);
30+
}
31+
}
32+
33+
protected function tearDown(): void
34+
{
35+
ini_set('zend.max_allowed_stack_size', $this->zendMaxAllowedStackSize);
36+
37+
parent::tearDown();
38+
}
39+
1740
/**
1841
* If we write a document into the instance created without an explicit database name,
1942
* we should be able to read it from the instance created with an explicit database name.

0 commit comments

Comments
 (0)