Undefined constant Google\ApiCore\Call::LONGRUNNING_CALL
li-linfeng opened this issue · 1 comments
li-linfeng commented
when using google/cloud-vision, this error happend
Undefined constant Google\ApiCore\Call::LONGRUNNING_CALL
$client = new ImageAnnotatorClient();
Undefined constant Google\ApiCore\Call::LONGRUNNING_CALL
at D:\dev\100\api\vendor\google\cloud-vision\src\V1\resources\image_annotator_descriptor_config.php:15
11▕ 'pollDelayMultiplier' => '1.5',
12▕ 'maxPollDelayMillis' => '5000',
13▕ 'totalPollTimeoutMillis' => '300000',
14▕ ],
➜ 15▕ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
16▕ 'headerParams' => [
17▕ [
18▕ 'keyName' => 'parent',
19▕ 'fieldAccessors' => [
1 D:\dev\100\api\vendor\google\gax\src\GapicClientTrait.php:398
require()
2 D:\dev\100\api\vendor\google\cloud-vision\src\V1\Gapic\ImageAnnotatorGapicClient.php:335
Google\Cloud\Vision\V1\Gapic\ImageAnnotatorGapicClient::setClientOptions()
and in Google\ApiCore\Call , it doesn't exist the const LONGRUNNING_CALL
bshaffer commented
The Google\ApiCore\Call::LONGRUNNING_CALL
constant was introduced in google/gax
version v1.17.0. The most recent version of google/cloud-vision
(v1.7.3) requires google/gax v1.19.1 and above.
I'm not sure which version you're on, but if you upgrade your version of google/cloud-vison
(or just upgrade the google/gax
dependency to v1.17 or above) this issue will be resolved.