How to install Google API PHP Client with Composer? (to use with php-gds lib and Google App Engine)
<p>I'm trying to install the Google API PHP Client using Composer <a href="https://github.com/google/google-api-php-client#composer" rel="nofollow">https://github.com/google/google-api-php-client#composer</a>
I've never used Composer before, but I've downloaded and installed it (on Win 7).</p>

<p>I wasn't sure what to do next or what to put where, if anything.
Without downloading the Google API Client, I just went into my PHP project's folder on the command line and entered:</p>

<pre><code>composer require google/apiclient:^2.0.0@RC
</code></pre>

<p>which did some stuff and then threw back:</p>

<pre><code>Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package google/apiclient could not be found in any version,
there may be a typo in the package name.
</code></pre>

<p>I also tried manually downloading the API Client package (latest 2.0RC6 release), unpacking it into my PHP project dir, CD into that and doing the same composer command again. Got same error.</p>

<p>I'm building a PHP project on Google App Engine using the excellent <a href="https://github.com/tomwalder/php-gds" rel="nofollow">PHP-GDS</a> library to access Cloud Datastore and need the API Client to use the Gateway JSON API interface working (so I can try projection queries). Without that I'm getting the error <code>Fatal error: Class 'Google_Client' not found in GDS\Gateway\GoogleAPIClient.php on line 87</code></p>

<p>I haven't used Composer to install php-gds. My understanding is that Composer will only bring the needed .php files from a lib into my project so unneeded ones are not uploaded to App Engine or included at run-time?</p>

<p>Anyway, any help much appreciated! (especially explicit steps of what to do!)</p>

<p>Many thanks.</p>