These samples show how to use the Datastore API from PHP.
The code is using Google Cloud Client Library for PHP.
To run the tests do the following:
- Enable billing.
- Enable the Cloud Datastore API.
- Create a service account at the Service account section in the Cloud Console
- Download the json key file of the service account.
- Set GOOGLE_APPLICATION_CREDENTIALS environment variable pointing to that file.
- Install dependencies via Composer.
Run
php composer.phar install(if composer is installed locally) orcomposer install(if composer is installed globally). - Create Datastore indexes by running
gcloud datastore indexes create index.yaml - Check the Indexes page to verify the indexes have been created.
- Run
phpunit
