Skip to content

Commit

Permalink
feat: fix emulator config for datastore, firestore, and pubsub (#5250)
Browse files Browse the repository at this point in the history
* feat: fix emulator config for datastore, firestore, and pubsub

* revert datastore so tests dont fail
  • Loading branch information
bshaffer committed May 3, 2022
1 parent 9548180 commit 6c7650c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Firestore/src/Connection/Grpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ public function __construct(array $config = [])
$config += ['emulatorHost' => null];
if ((bool) $config['emulatorHost']) {
$this->isUsingEmulator = true;
$grpcConfig += $this->emulatorGapicConfig($config['emulatorHost']);
$grpcConfig = array_merge(
$grpcConfig,
$this->emulatorGapicConfig($config['emulatorHost'])
);
}
//@codeCoverageIgnoreEnd

Expand Down
5 changes: 4 additions & 1 deletion PubSub/src/Connection/Grpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ public function __construct(array $config = [])
}

if ((bool) $config['emulatorHost']) {
$grpcConfig += $this->emulatorGapicConfig($config['emulatorHost']);
$grpcConfig = array_merge(
$grpcConfig,
$this->emulatorGapicConfig($config['emulatorHost'])
);
}
//@codeCoverageIgnoreEnd

Expand Down

0 comments on commit 6c7650c

Please sign in to comment.