The FirestoreClient you use is download from Google Cloud by composer, which actually is wrapper around gRPC. This API is designed to face the customers, with some gRPC parameters unseen by the user.
However, we want to test the gRPC features with this tests, which means the Client should be pure gRPC Client generated directly from proto files. The only thing needed to be downloaded by composer is auth API..
There are 2 ways to changing your current wrapper Client to pure gRPC Client, which I recommend 2:
-
use the FirestoreClient under vendor/google/proto-client/src/Google/Cloud/Firestore/V1beta1/FirestoreGrpcClient.php
-
Generate FirestoreClient by your own.
For example, my way to generate pb files:
git clone git@github.com:googleapis/googleapis.git
cd googleapis
make LANGUAGE=php OUTPUT=~/grpc-gcp-php/firestore/examples/end2end/src
Then change your current Client to the one in ~/grpc-gcp-php/firestore/examples/end2end/src/Google/Cloud/Firestore/V1beta1/FirestoreClient.php,
and then set the credentials with it.
I also have a related example of creating pure Logging gRPC client for you as reference.
The FirestoreClient you use is download from Google Cloud by composer, which actually is wrapper around gRPC. This API is designed to face the customers, with some gRPC parameters unseen by the user.
However, we want to test the gRPC features with this tests, which means the Client should be pure gRPC Client generated directly from proto files. The only thing needed to be downloaded by composer is auth API..
There are 2 ways to changing your current wrapper Client to pure gRPC Client, which I recommend 2:
use the FirestoreClient under
vendor/google/proto-client/src/Google/Cloud/Firestore/V1beta1/FirestoreGrpcClient.phpGenerate FirestoreClient by your own.
For example, my way to generate pb files:
Then change your current Client to the one in
~/grpc-gcp-php/firestore/examples/end2end/src/Google/Cloud/Firestore/V1beta1/FirestoreClient.php,and then set the credentials with it.
I also have a related example of creating pure Logging gRPC client for you as reference.