Google API Core for PHP (gax-php) is a set of modules which aids the development
of APIs for clients based on gRPC and Google API conventions.
Application code will rarely need to use most of the classes within this library
directly, but code generated automatically from the API definition files in
Google APIs can use services such as page streaming and retry to provide a
more convenient and idiomatic API surface to callers.
PHP Versions
gax-php currently requires PHP 8.0 or higher.
Contributing
Contributions to this library are always welcome and highly encouraged.
See the CONTRIBUTING documentation for more information on how to get
started.
This library is considered GA (generally available). As such, it will not
introduce backwards-incompatible changes in any minor or patch releases. We will
address issues and requests with the highest priority.
Repository Structure
All code lives under the src/ directory. Handwritten code lives in the
src/ApiCore directory and is contained in the Google\ApiCore namespace.
Generated classes for protobuf common types and LongRunning client live under
the src/ directory, in the appropriate directory and namespace.
Code in the metadata/ directory is provided to support generated protobuf
classes, and should not be used directly.
Development Set-Up
These steps describe the dependencies to install for Linux, and equivalents can
be found for Mac or Windows.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [1.36.1 (latest)](/php/docs/reference/gax/latest)\n- [1.36.0](/php/docs/reference/gax/1.36.0)\n- [1.35.1](/php/docs/reference/gax/1.35.1) \n\nGoogle API Core for PHP\n=======================\n\n- [Documentation](https://cloud.google.com/php/docs/reference/gax/latest)\n\nGoogle API Core for PHP (gax-php) is a set of modules which aids the development\nof APIs for clients based on [gRPC](http://grpc.io) and Google API conventions.\n\nApplication code will rarely need to use most of the classes within this library\ndirectly, but code generated automatically from the API definition files in\n[Google APIs](https://github.com/googleapis/googleapis/) can use services such as page streaming and retry to provide a\nmore convenient and idiomatic API surface to callers.\n\nPHP Versions\n------------\n\ngax-php currently requires PHP 8.0 or higher.\n\nContributing\n------------\n\nContributions to this library are always welcome and highly encouraged.\n\nSee the [CONTRIBUTING](https://github.com/googleapis/gax-php/blob/main/.github/CONTRIBUTING.md) documentation for more information on how to get\nstarted.\n\nVersioning\n----------\n\nThis library follows [Semantic Versioning](http://semver.org/).\n\nThis library is considered GA (generally available). As such, it will not\nintroduce backwards-incompatible changes in any minor or patch releases. We will\naddress issues and requests with the highest priority.\n\nRepository Structure\n--------------------\n\nAll code lives under the src/ directory. Handwritten code lives in the\nsrc/ApiCore directory and is contained in the `Google\\ApiCore` namespace.\n\nGenerated classes for protobuf common types and LongRunning client live under\nthe src/ directory, in the appropriate directory and namespace.\n\nCode in the metadata/ directory is provided to support generated protobuf\nclasses, and should not be used directly.\n\nDevelopment Set-Up\n------------------\n\nThese steps describe the dependencies to install for Linux, and equivalents can\nbe found for Mac or Windows.\n\n1. Install dependencies.\n\n \u003e cd ~/\n \u003e sudo apt-get install php php-dev libcurl3-openssl-dev php-pear php-bcmath php-xml\n \u003e curl -sS https://getcomposer.org/installer | php\n \u003e sudo pecl install protobuf\n\n2. Set up this repo.\n\n \u003e cd /path/to/gax-php\n \u003e composer install\n\n3. Run tests.\n\n \u003e composer test\n\n4. Updating dependencies after changing `composer.json`:\n\n \u003e composer update\n `\n\n5. Formatting source:\n\n \u003e composer cs-lint\n \u003e composer cs-fix\n\nLicense\n-------\n\nBSD - See [LICENSE](https://github.com/googleapis/gax-php/blob/main/LICENSE) for more information."]]