i've received an email which says that one of my api's (Google Calendar API), i was using an old version library of google-api-php-client, now i upgraded my library to the latest version (v2.5.0)
my question is :
is this enough to avoid the shutdown my app? or do i have to do something else
thanks in advance
Hi @nasari123
Can you tell us exactly what the email said? Please be sure to remove any sensitive information that's in there, such as your personal information or your project ID.
Does it seem like the email you received is related to the Global HTTP Batch turndown? If so, follow the steps for migrating in the link I provided.
hello @bshaffer , thanks for replaying,
this is the email

and yes it concerns this blog https://developers.googleblog.com/2018/03/discontinuing-support-for-json-rpc-and.html
mayday
@nasari123 Are you seeing any errors? If so, then check to see how you're instantiating your Batch objects.
Buried in the blog post is this bit, in the Java docs:
Please ensure you are creating your BatchRequest (i.e) com.google.api.client.googleapis.batch.BatchRequest instance via your service client.
This also applies to PHP. If you're instantiating the Batch object yourself, like so:
$batch = new Google_Http_Batch;
Then you should change to creating the batch from the Service class:
$service = new Google_Service_Directory($client);
$batch = $service->createBatch(); // this method will create a Google_Http_Batch with the proper service endpoint
Then you can $batch->add() and $batch->execute() just like normal.
Not sure if this is helpful, but it's something I just came across in some old code and had to dig to fix.
I'm running into this issue as well.
@mattlibera Your suggestion is actually how my code is structured yet I'm still receiving errors.
The blog post says to use a different endpoint: www.googleapis.com/batch/compute/v1
However, I'm not exactly sure how to do this. Any guidance would be appreciated.
@stecca21 Hm, not sure. I haven't used the Compute service myself. What's the error you're seeing?
I'm looking at the Compute.php service class and at least to my eyes it seems properly configured for the endpoint you listed:
$this->batchPath = 'batch/compute/v1'; // line 134
So in theory the code below should result in a proper endpoint config for your $batch object:
$service = new Google_Service_Compute($client);
$batch = $service->createBatch();
$batchPath is a public property - can you inspect its value after you instantiate it to verify the correct value?
@mattlibera forgive me...had an old version of the php client running. I've updated to the latest release and no longer have an issue.
@stecca21 no worries. Glad it's working now!
@nasari123 Are you seeing any errors? If so, then check to see how you're instantiating your Batch objects.
Buried in the blog post is this bit, in the Java docs:
Please ensure you are creating your BatchRequest (i.e) com.google.api.client.googleapis.batch.BatchRequest instance via your service client.
This also applies to PHP. If you're instantiating the Batch object yourself, like so:
$batch = new Google_Http_Batch;Then you should change to creating the batch from the Service class:
$service = new Google_Service_Directory($client); $batch = $service->createBatch(); // this method will create a Google_Http_Batch with the proper service endpointThen you can
$batch->add()and$batch->execute()just like normal.Not sure if this is helpful, but it's something I just came across in some old code and had to dig to fix.
@nasari123 Is Your issue resolved with this solution?
The correct solution is to update to the latest version of google/apiclient-services (currently ^0.140) and change any instances of $batch = new Google_Http_Batch to $batch = $service->createBatch() instead.
Most helpful comment
@nasari123 Are you seeing any errors? If so, then check to see how you're instantiating your Batch objects.
Buried in the blog post is this bit, in the Java docs:
This also applies to PHP. If you're instantiating the Batch object yourself, like so:
Then you should change to creating the batch from the Service class:
Then you can
$batch->add()and$batch->execute()just like normal.Not sure if this is helpful, but it's something I just came across in some old code and had to dig to fix.