Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/run-package-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ for DIR in ${DIRS}; do
cp "${DIR}/composer.json" "${DIR}/composer-local.json"
# Update composer to use local packages
PACKAGE_DEPENDENCIES=(
"Gax,gax"
"CommonProtos,common-protos,4.100"
"BigQuery,cloud-bigquery"
"Core,cloud-core"
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/conformance-tests-gax-showcase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run GAX Conformance Tests With Showcase
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
gapic-showcase:
runs-on: ubuntu-latest
env:
GAPIC_SHOWCASE_VERSION: 0.36.2
OS: linux
ARCH: amd64
name: GAPIC Showcase Conformance Tests
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: grpc

- name: Install and run GAPIC Showcase
run: |
curl -L https://github.com/googleapis/gapic-showcase/releases/download/v${GAPIC_SHOWCASE_VERSION}/gapic-showcase-${GAPIC_SHOWCASE_VERSION}-${OS}-${ARCH}.tar.gz | tar -zx
./gapic-showcase run &

- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-suggest -d Gax/

- name: Run PHPUnit
run: Gax/vendor/bin/phpunit -c Gax/phpunit-conformance.xml.dist

12 changes: 8 additions & 4 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ jobs:
matrix:
platform: [ubuntu-latest, windows-latest]
php: [ "8.1", "8.2", "8.3", "8.4", "8.5" ]
extensions: ["grpc-1.54.0"]
extensions: ["grpc-1.78.0"]
type: ["Unit Test"]
include:
- platform: "ubuntu-latest"
php: "8.1"
extensions: "protobuf,grpc-1.54.0"
extensions: "protobuf,grpc"
type: "Unit Test + protobuf extension"
- platform: "ubuntu-latest"
php: "8.1"
extensions: ""
type: "Unit Test (no gRPC)"
name: PHP ${{ matrix.php }} ${{ matrix.type }} (${{ matrix.platform }})
runs-on: ${{ matrix.platform }}
continue-on-error: true
Expand All @@ -30,7 +34,7 @@ jobs:
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: sodium,${{ matrix.extensions }}
extensions: sodium,sysvshm,${{ matrix.extensions }}
key: cache-key-1 # increment to bust the cache
- name: Cache extensions
uses: actions/cache@v5
Expand All @@ -42,7 +46,7 @@ jobs:
uses: shivammathur/setup-php@verbose
with:
php-version: ${{ matrix.php }}
extensions: sodium,${{ matrix.extensions }}
extensions: sodium,sysvshm,${{ matrix.extensions }}
- name: Install Dependencies
uses: nick-invision/retry@v4
with:
Expand Down
9 changes: 0 additions & 9 deletions .kokoro/docs/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ do
$VERBOSITY_FLAG
done

# Add GAX repo
GAX_DIR=$PROJECT_DIR/dev/vendor/google/gax
$PROJECT_DIR/dev/google-cloud docfx \
--path $GAX_DIR \
--out gax-out \
--metadata-version $(cat $GAX_DIR/VERSION) \
$STAGING_FLAG \
$VERBOSITY_FLAG

# Add Auth repo
AUTH_DIR=$PROJECT_DIR/dev/vendor/google/auth
$PROJECT_DIR/dev/google-cloud docfx \
Expand Down
8 changes: 8 additions & 0 deletions .repo-metadata-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,14 @@
"library_type": "GAPIC_AUTO",
"api_shortname": "cloudfunctions"
},
"Gax": {
"language": "php",
"distribution_name": "google/gax",
"release_level": "stable",
"client_documentation": "https://cloud.google.com/php/docs/reference/gax/latest",
"library_type": "CORE",
"api_shortname": ""
},
"GSuiteAddOns": {
"language": "php",
"distribution_name": "google/cloud-gsuite-addons",
Expand Down
7 changes: 0 additions & 7 deletions CommonProtos/renovate.json

This file was deleted.

2 changes: 2 additions & 0 deletions Core/src/Testing/Snippet/SnippetTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
namespace Google\Cloud\Core\Testing\Snippet;

use Google\Cloud\Core\Testing\CheckForClassTrait;
use Google\Cloud\Core\Testing\GrpcTestTrait;
use Google\Cloud\Core\Testing\Snippet\Container;
use Google\Cloud\Core\Testing\Snippet\Parser\Snippet;
use PHPUnit\Framework\TestCase;
Expand All @@ -35,6 +36,7 @@ class SnippetTestCase extends TestCase
const PROJECT = 'my-awesome-project';

use CheckForClassTrait;
use GrpcTestTrait;

private static $coverage;
private static $parser;
Expand Down
1 change: 1 addition & 0 deletions Core/tests/Snippet/Iam/IamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function testClass()
$this->checkAndSkipTest([
SpannerClient::class,
]);
$this->checkAndSkipGrpcTests();
$res = $snippet->invoke('iam');

$this->assertInstanceOf(IamManager::class, $res->returnVal());
Expand Down
8 changes: 8 additions & 0 deletions Gax/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.gitattributes export-ignore
.gitignore export-ignore
.github export-ignore
dev export-ignore
tests export-ignore
codecov.yml export-ignore
ruleset.xml export-ignore
.travis.yml export-ignore
24 changes: 24 additions & 0 deletions Gax/.github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**PLEASE READ THIS ENTIRE MESSAGE**

Hello, and thank you for your contribution! Please note that this repository is
a read-only split of `googleapis/google-cloud-php`. As such, we are
unable to accept pull requests to this repository.

We welcome your pull request and would be happy to consider it for inclusion in
our library if you follow these steps:

* Clone the parent client library repository:

```sh
$ git clone git@github.com:googleapis/google-cloud-php.git
```

* Move your changes into the correct location in that library. Library code
belongs in `Grafeas/src`, and tests in `Grafeas/tests`.

* Push the changes in a new branch to a fork, and open a new pull request
[here](https://github.com/googleapis/google-cloud-php).

Thanks again, and we look forward to seeing your proposed change!

The Google Cloud PHP team
43 changes: 43 additions & 0 deletions Gax/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test Suite
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ "8.1", "8.2", "8.3", "8.4" ]
extensions: [""]
tools: [""]
composerflags: [""]
include:
- php: "8.1"
extensions: "protobuf,grpc"
tools: "pecl"
- php: "8.4"
extensions: "protobuf,grpc"
tools: "pecl"
- php: "8.1"
composerflags: "--prefer-lowest"
name: "PHP ${{ matrix.php }} Unit Test ${{ matrix.extensions }}${{ matrix.composerflags }}"
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: ${{ matrix.tools }}
extensions: bcmath,${{ matrix.extensions }}
- name: Install composer dependencies
uses: nick-invision/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: composer update ${{ matrix.composerflags }}
- name: Run script
run: vendor/bin/phpunit
22 changes: 22 additions & 0 deletions Gax/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.DS_Store
phpunit.xml
composer.phar
doctum.phar
composer.lock
composer-test.lock
vendor/
build/artifacts/
artifacts/
.idea
.metadata
.phpunit.result.cache
coverage.xml
src/Jison/Parser.js
*.iml

# Vim
*.sw*
*.vim

# VS Code
.vscode
1 change: 1 addition & 0 deletions Gax/.php-cs-fixer.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"php":"8.1.34","version":"3.93.1:v3.93.1#b3546ab487c0762c39f308dc1ec0ea2c461fc21a","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces_position":{"allow_single_line_anonymous_functions":false},"class_definition":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":{"closure_fn_spacing":"one"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"after_heredoc":false,"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"modifier_keywords":{"elements":["method","property"]},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"single_space_around_construct":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"concat_space":{"spacing":"one"},"new_with_parentheses":true,"no_unused_imports":true,"ordered_imports":true,"return_type_declaration":{"space_before":"none"},"single_quote":true,"cast_spaces":true,"whitespace_after_comma_in_array":true,"no_whitespace_in_blank_line":true,"binary_operator_spaces":{"default":"at_least_single_space"},"no_extra_blank_lines":true,"nullable_type_declaration_for_default_null_value":true},"ruleCustomisationPolicyVersion":"null-policy","hashes":{"src\/Serializer.php":"4fa9973f8b299147054921c41481ac94","src\/Middleware\/RequestAutoPopulationMiddleware.php":"ef1665f98d178c5a53cf2b8bd2188f6e","src\/Middleware\/OptionsFilterMiddleware.php":"6c9f54dd6977318b60aeb0ca75a1f5ff","src\/Middleware\/MiddlewareInterface.php":"e7c0cacbb192c15be0f6ee051756ae76","src\/Middleware\/OperationsMiddleware.php":"322cb37874ffbf254b3496af5b30fef7","src\/Middleware\/ResponseMetadataMiddleware.php":"92dbc8ee03c5a4fe679d2b152fffdc1b","src\/Middleware\/TransportCallMiddleware.php":"61627b99fb8318ee4182aabdd56c609d","src\/Middleware\/CredentialsWrapperMiddleware.php":"1d8e5dc253b7e568604fb77fe9b02cb6","src\/Middleware\/RetryMiddleware.php":"94cd80b28d43637a0fe94f79d1c13240","src\/Middleware\/PagedMiddleware.php":"aeed36993b035b13dfa0d04d4e30eefb","src\/Middleware\/FixedHeaderMiddleware.php":"3718ecf055d8b7c2232b3d9135757454","src\/Options\/TransportOptions\/RestTransportOptions.php":"90145a73ca8ca9b5c795f9381a821cf0","src\/Options\/TransportOptions\/GrpcTransportOptions.php":"ecb68b51eafa53d3e8d1ce1ce842498b","src\/Options\/TransportOptions\/GrpcFallbackTransportOptions.php":"8603033f1d9f1c9605aa9f3f924403ce","src\/Options\/ClientOptions.php":"4346d49e9bcb9654c4346433292ec56d","src\/Options\/CallOptions.php":"c2e68aabd01c55d400f4d7c71d0c30fe","src\/Options\/OptionsInterface.php":"6ff36b26d16042e3a2b2563a466c7fc5","src\/Options\/OptionsTrait.php":"7d9fc3a500b693e81036f005ebc5f0c7","src\/Options\/TransportOptions.php":"054d286f195906ff5415803a414b44f2","src\/ServerStreamingCallInterface.php":"3423c03f796eb841fad926b8365ba7cc","src\/GapicClientTrait.php":"d4c62f47c8a7a49622087395b3065008","src\/UriTrait.php":"d3f45f17ef641dd53b90ad503b10208d","src\/ClientStream.php":"fd8a0a85cc33990d18a9c9fe0c72ae73","src\/Transport\/TransportInterface.php":"c0e7dec8a9fe54258651f7b650f60de1","src\/Transport\/RestTransport.php":"bec96cdb662974b60230381a8d5806d9","src\/Transport\/GrpcTransport.php":"646d4799753df2617544896c71abfeb7","src\/Transport\/Grpc\/ForwardingUnaryCall.php":"c493c8f8978fae1e19d35f169b3e05e4","src\/Transport\/Grpc\/ForwardingCall.php":"8ff1fa74ee1998da538fa1e14a0b9ea7","src\/Transport\/Grpc\/UnaryInterceptorInterface.php":"4661cef3479cd8ce6ded3821dad200f6","src\/Transport\/Grpc\/ServerStreamingCallWrapper.php":"07e773c7857d462be84bca50dbc15102","src\/Transport\/Grpc\/ForwardingServerStreamingCall.php":"d78e44cde284dd15a262ffa74a2f7feb","src\/Transport\/GrpcFallbackTransport.php":"26cf71fae8766fc689a7f755bb701da6","src\/Transport\/HttpUnaryTransportTrait.php":"78fbfe5fc1de4e452bc30c6b374d79d7","src\/Transport\/Rest\/JsonStreamDecoder.php":"ae04ca22ae03a55d38f5a1ed01f7821c","src\/Transport\/Rest\/RestServerStreamingCall.php":"067ae6acb20fc4aa9d78ecf9d4c05d6d","src\/AgentHeader.php":"85000f95d8873162df4e12ab4b83908d","src\/ArrayTrait.php":"0c520595d0aa799d1fb6ed15f0055417","src\/PageStreamingDescriptor.php":"dfaab31b799839863b9b1ac9cca4fcde","src\/GPBType.php":"56034406c12308b8f660dbda3e679502","src\/FixedSizeCollection.php":"4d15cdb87a85effc178c52a1b7d25b7e","src\/RetrySettings.php":"d938b09a13eb46ffc6c325889828878f","src\/ResourceTemplate\/Segment.php":"5dc7d3f73d768a84db37a00a7360ad76","src\/ResourceTemplate\/Parser.php":"65376edaf13bcfa620f34e16f35a19f6","src\/ResourceTemplate\/ResourceTemplateInterface.php":"09598e10967eb8b967481b48cdbe2d83","src\/ResourceTemplate\/AbsoluteResourceTemplate.php":"53f6c4ffc39308c56b06984b1c43dad4","src\/ResourceTemplate\/RelativeResourceTemplate.php":"fb29d25f7e6ddf9270b8abae291d6f96","src\/PagedListResponse.php":"f0344c017ffc23fd1de1d1d93d908989","src\/ApiKeyHeaderCredentials.php":"027aa68218ed4b55f16247dc374661ef","src\/OperationResponse.php":"34bed3a387486da63c79c2acf6cc8ea4","src\/ResourceHelperTrait.php":"6d63ac9fe3734809086c633068f8ac94","src\/PathTemplate.php":"97d31591ba1fd7feb2c7d7b41602be02","src\/Testing\/MockClientStreamingCall.php":"f3e6f7ac104df825f4b0e8e902cd8dc8","src\/Testing\/MessageAwareArrayComparator.php":"2786c2f5ed689468d9176eaad3674de9","src\/Testing\/MessageAwareExporter.php":"24fafea2aad4a2cb907481eae5845e25","src\/Testing\/MockStatus.php":"dc7fc1f83feb8ffef0a97a13b78458fa","src\/Testing\/MockTransport.php":"8f5c55ecd305685cb6b7faad114e961f","src\/Testing\/MockResponse.php":"f07de318dcadb36a0f69d1fd57dbf673","src\/Testing\/MockBidiStreamingCall.php":"67eddf951ae8e0056de3059e80936c12","src\/Testing\/ProtobufMessageComparator.php":"f7adbbb842a79408198291103d637741","src\/Testing\/ProtobufGPBEmptyComparator.php":"34de0c00c7b9229fbed4d16161a73825","src\/Testing\/MockServerStreamingCall.php":"a49f19eea45c1bbc8b2945190a7d5e20","src\/Testing\/MockRequest.php":"8950022a0af6b4b5ece38fe1b0acdac1","src\/Testing\/GeneratedTest.php":"70811c343971de74a8a039e53871402d","src\/Testing\/MockGrpcTransport.php":"5cff7b1c62ba07f19ef952220d4fb054","src\/Testing\/MockRequestBody.php":"0e7bcfba70d89d0fe1b53cc6c941da9d","src\/Testing\/SerializationTrait.php":"10a7bc945b994dad90799da5feda5354","src\/Testing\/MockStubTrait.php":"db524dc9d25c6b8f955c5f5bd2f0d0ad","src\/Testing\/MockUnaryCall.php":"4dd1a61ffa4ae21357f6031f061420ca","src\/Testing\/ReceivedRequest.php":"112c3808832cdf2c1007abd1c2fdd9f7","src\/InsecureRequestBuilder.php":"734ac824a7c14493cb4557f0a62f8a5c","src\/ValidationException.php":"a9e4b81b41f373b4eeaaaede287c656c","src\/ApiException.php":"79fae796067d60334e01364c4d72382d","src\/GPBLabel.php":"fe5dd68d55df44596727fd56cfaed437","src\/RequestBuilder.php":"6e156ad536b9cb8236d34c07bdd498bf","src\/ValidationTrait.php":"fdb5f26062976059a9d7636114078ebf","src\/Version.php":"917ecf244bcff088b39d4aa52da20ab7","src\/CredentialsWrapper.php":"fb4dc0b7c43a4ddfebadf64b91f29142","src\/PollingTrait.php":"6b17a6295d029080b72ec4fc61752051","src\/InsecureCredentialsWrapper.php":"67b785509ed11d536186014a44d57662","src\/KnownTypes.php":"e7b677ea5db340f2b5b38a5f0bbc6eaa","src\/Call.php":"931b0e4e9748ac80b59fdd14fbcf4a21","src\/Page.php":"a359f9f1c4c9ef20b76edf0ff4d131c8","src\/ServerStream.php":"88faa82373635ad3d756975225f79539","src\/ServiceAddressTrait.php":"b8d6727ceb444184f85af59cf7fde7f0","src\/RequestParamsHeaderDescriptor.php":"75ad97744c135e149bf89cb5b7afe1be","src\/ApiStatus.php":"cef0047eb7170d746f670e809951cc69","src\/ClientOptionsTrait.php":"35f9524e1c2db3b987de6bea1b0625a1","src\/GrpcSupportTrait.php":"3c999c31b879650fc23b2f1ff4fa1c51","src\/BidiStream.php":"c53825f61eeeaf83a8439bc5c1f06ef3","src\/HeaderCredentialsInterface.php":"02fe972ca60d9b950804f83c2c0a422e"}}
Loading
Loading