Skip to content

Commit 4f9cae3

Browse files
committed
updates from main
1 parent 66c8a7c commit 4f9cae3

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

Core/src/ApiHelperTrait.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ protected function constructGapic($gapicName, array $config)
243243
*/
244244
private function convertDataToProtos(array $input, array $map): array
245245
{
246+
if (!isset($this->serializer)) {
247+
throw new \LogicException('Serializer must be set to use this function');
248+
}
246249
foreach ($map as $key => $className) {
247250
if (isset($input[$key])) {
248251
$input[$key] = $this->serializer->decodeMessage(new $className(), $input[$key]);

Datastore/src/Operation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
use Google\ApiCore\Options\CallOptions;
2121
use Google\Cloud\Core\ApiHelperTrait;
22+
use Google\Cloud\Core\OptionsValidator;
2223
use Google\Cloud\Core\Timestamp;
2324
use Google\Cloud\Core\TimestampTrait;
2425
use Google\Cloud\Core\ValidateTrait;
@@ -117,6 +118,7 @@ public function __construct(
117118
$this->databaseId = $databaseId;
118119
$this->entityMapper = $entityMapper;
119120
$this->serializer = new Serializer();
121+
$this->optionsValidator = new OptionsValidator($this->serializer);
120122
}
121123

122124
/**

0 commit comments

Comments
 (0)