diff --git a/tests/go.mod b/tests/go.mod
index c1e709a..f96f0de 100644
--- a/tests/go.mod
+++ b/tests/go.mod
@@ -3,12 +3,12 @@ module tests
go 1.22.5
require (
- github.com/roadrunner-server/config/v5 v5.0.1
+ github.com/roadrunner-server/config/v5 v5.0.2
github.com/roadrunner-server/endure/v2 v2.4.6
github.com/roadrunner-server/gzip/v5 v5.0.0-00010101000000-000000000000
- github.com/roadrunner-server/http/v5 v5.0.1
- github.com/roadrunner-server/logger/v5 v5.0.1
- github.com/roadrunner-server/server/v5 v5.0.1
+ github.com/roadrunner-server/http/v5 v5.0.2
+ github.com/roadrunner-server/logger/v5 v5.0.2
+ github.com/roadrunner-server/server/v5 v5.0.2
github.com/stretchr/testify v1.9.0
go.uber.org/zap v1.27.0
)
@@ -29,7 +29,7 @@ require (
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/goccy/go-json v0.10.3 // indirect
- github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8 // indirect
+ github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/joho/godotenv v1.5.1 // indirect
@@ -44,7 +44,7 @@ require (
github.com/miekg/dns v1.1.61 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
- github.com/onsi/ginkgo/v2 v2.19.0 // indirect
+ github.com/onsi/ginkgo/v2 v2.19.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
diff --git a/tests/go.sum b/tests/go.sum
index 10a27f4..ed18f79 100644
--- a/tests/go.sum
+++ b/tests/go.sum
@@ -32,8 +32,8 @@ github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8 h1:ssNFCCVmib/GQSzx3uCWyfMgOamLGWuGqlMS77Y1m3Y=
-github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
+github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k=
+github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
@@ -68,10 +68,10 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
-github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
-github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
-github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
-github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
+github.com/onsi/ginkgo/v2 v2.19.1 h1:QXgq3Z8Crl5EL1WBAC98A5sEBHARrAJNzAmMxzLcRF0=
+github.com/onsi/ginkgo/v2 v2.19.1/go.mod h1:O3DtEWQkPa/F7fBMgmZQKKsluAy8pd3rEQdrjkPb9zA=
+github.com/onsi/gomega v1.34.0 h1:eSSPsPNp6ZpsG8X1OVmOTxig+CblTc4AxpPBykhe2Os=
+github.com/onsi/gomega v1.34.0/go.mod h1:MIKI8c+f+QLWk+hxbePD4i0LMJSExPaZOVfkoex4cAo=
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -91,8 +91,8 @@ github.com/quic-go/quic-go v0.45.1 h1:tPfeYCk+uZHjmDRwHHQmvHRYL2t44ROTujLeFVBmjC
github.com/quic-go/quic-go v0.45.1/go.mod h1:1dLehS7TIR64+vxGR70GDcatWTOtMX2PUtnKsjbTurI=
github.com/roadrunner-server/api/v4 v4.16.0 h1:UaaKWHelc7bZC4cRdTD802gyIrJFRFTPEk7Bt3U01qI=
github.com/roadrunner-server/api/v4 v4.16.0/go.mod h1:qTC9Fy+zF4jtoPdZEceGqtrj+8eUB2IsLm51JxKxbV4=
-github.com/roadrunner-server/config/v5 v5.0.1 h1:pEZwS/Ngyo4Ygscwhqo1axuAbI0mPDMYIxNqjK2Ao6Y=
-github.com/roadrunner-server/config/v5 v5.0.1/go.mod h1:FA4Q9sKoVnnOJlM104dikxG9oO/0DcIT1DE0IFn73pA=
+github.com/roadrunner-server/config/v5 v5.0.2 h1:rt3CQ0+Nw9NHzP5bQr58eBBBGeJBmKshFJASQB29vJI=
+github.com/roadrunner-server/config/v5 v5.0.2/go.mod h1:FA4Q9sKoVnnOJlM104dikxG9oO/0DcIT1DE0IFn73pA=
github.com/roadrunner-server/context v1.0.1 h1:6onQ5L1ZsjZFNkPyY7Kd0Lx3+aRTfbbh4OryfrRuknU=
github.com/roadrunner-server/context v1.0.1/go.mod h1:rgQ4mT7HrDZG+KhU6trFBGPHHpjTOxHGRk/sPKLVwrg=
github.com/roadrunner-server/endure/v2 v2.4.6 h1:5qihRHjJVMwbyDMdyjrqc5h2hXLg4z1kDEw/zFIXIE8=
@@ -103,14 +103,14 @@ github.com/roadrunner-server/events v1.0.1 h1:waCkKhxhzdK3VcI1xG22l+h+0J+Nfdpxjh
github.com/roadrunner-server/events v1.0.1/go.mod h1:WZRqoEVaFm209t52EuoT7ISUtvX6BrCi6bI/7pjkVC0=
github.com/roadrunner-server/goridge/v3 v3.8.3 h1:XmjrOFnI6ZbQTPaP39DEk8KwLUNTgjluK3pcZaW6ixQ=
github.com/roadrunner-server/goridge/v3 v3.8.3/go.mod h1:4TZU8zgkKIZCsH51qwGMpvyXCT59u/8z6q8sCe4ZGAQ=
-github.com/roadrunner-server/http/v5 v5.0.1 h1:Xr8Y8mCRyKCAdZ8S+yDCgPCYT5UJJgtZeGzsVxUlCp0=
-github.com/roadrunner-server/http/v5 v5.0.1/go.mod h1:6Wga/0F1q8rMDyy668YjC2vaWdc6s6kKNavDHRP6Jb4=
-github.com/roadrunner-server/logger/v5 v5.0.1 h1:J3DPOs73OgDs2dIh+HBe4dd4fj11u+1H6Q22GsGabis=
-github.com/roadrunner-server/logger/v5 v5.0.1/go.mod h1:sFMe8uyQ0t0rJ3GCLifq+2qYzw1/A6DcKH0O6BObmgU=
+github.com/roadrunner-server/http/v5 v5.0.2 h1:0Ruk0dinDRpiSrE29WriiRbR22P1ueukEMsYNfKM1o8=
+github.com/roadrunner-server/http/v5 v5.0.2/go.mod h1:6Wga/0F1q8rMDyy668YjC2vaWdc6s6kKNavDHRP6Jb4=
+github.com/roadrunner-server/logger/v5 v5.0.2 h1:qAYYOSizfADvOa2oQnYlZBzDjFg+IvpRbtDvzKmWZLY=
+github.com/roadrunner-server/logger/v5 v5.0.2/go.mod h1:sFMe8uyQ0t0rJ3GCLifq+2qYzw1/A6DcKH0O6BObmgU=
github.com/roadrunner-server/pool v1.0.1 h1:biseQtnu1I/s0m2QolPQwH/9FhWIb2UgBy1OlOR+IrU=
github.com/roadrunner-server/pool v1.0.1/go.mod h1:4/fbpcesO2+W9oBbE0CRTE55FUdi8zZA28GvG1F1PWE=
-github.com/roadrunner-server/server/v5 v5.0.1 h1:IxJXoYH0q//7TBG+GGsKw+EU32Xf4tXWpxonDif9my8=
-github.com/roadrunner-server/server/v5 v5.0.1/go.mod h1:pB2DwMsMElTw63KYH82kFTC7Vwcmy+PP8XfUcmBEcR4=
+github.com/roadrunner-server/server/v5 v5.0.2 h1:HNvd7rYLgM2s6fEBG7XFnygtEfIIJRgW27+afmbGfrU=
+github.com/roadrunner-server/server/v5 v5.0.2/go.mod h1:pB2DwMsMElTw63KYH82kFTC7Vwcmy+PP8XfUcmBEcR4=
github.com/roadrunner-server/tcplisten v1.5.1 h1:CESLjVtnL0LEVaazzwEKUyQx84IcAgOQkdomA2+YHnY=
github.com/roadrunner-server/tcplisten v1.5.1/go.mod h1:OrIW/gDTitYAQaDOtmyweYfXQGJ23J+wji0SIjk16Q0=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
diff --git a/tests/php_test_files/vendor/autoload.php b/tests/php_test_files/vendor/autoload.php
new file mode 100644
index 0000000..fce869a
--- /dev/null
+++ b/tests/php_test_files/vendor/autoload.php
@@ -0,0 +1,25 @@
+*
+- `MathException` now extends `Exception` instead of `RuntimeException`
+
+* You may now run into type errors if you were passing `Stringable` objects to `of()` or any of the methods
+internally calling `of()`, with `strict_types` enabled. You can fix this by casting `Stringable` objects to `string`
+first.
+
+## [0.10.2](https://github.com/brick/math/releases/tag/0.10.2) - 2022-08-11
+
+๐ **Improvements**
+
+- `BigRational::toFloat()` now simplifies the fraction before performing division (#73) thanks to @olsavmic
+
+## [0.10.1](https://github.com/brick/math/releases/tag/0.10.1) - 2022-08-02
+
+โจ **New features**
+
+- `BigInteger::gcdMultiple()` returns the GCD of multiple `BigInteger` numbers
+
+## [0.10.0](https://github.com/brick/math/releases/tag/0.10.0) - 2022-06-18
+
+๐ฅ **Breaking changes**
+
+- Minimum PHP version is now 7.4
+
+## [0.9.3](https://github.com/brick/math/releases/tag/0.9.3) - 2021-08-15
+
+๐ **Compatibility with PHP 8.1**
+
+- Support for custom object serialization; this removes a warning on PHP 8.1 due to the `Serializable` interface being deprecated (#60) thanks @TRowbotham
+
+## [0.9.2](https://github.com/brick/math/releases/tag/0.9.2) - 2021-01-20
+
+๐ **Bug fix**
+
+- Incorrect results could be returned when using the BCMath calculator, with a default scale set with `bcscale()`, on PHP >= 7.2 (#55).
+
+## [0.9.1](https://github.com/brick/math/releases/tag/0.9.1) - 2020-08-19
+
+โจ **New features**
+
+- `BigInteger::not()` returns the bitwise `NOT` value
+
+๐ **Bug fixes**
+
+- `BigInteger::toBytes()` could return an incorrect binary representation for some numbers
+- The bitwise operations `and()`, `or()`, `xor()` on `BigInteger` could return an incorrect result when the GMP extension is not available
+
+## [0.9.0](https://github.com/brick/math/releases/tag/0.9.0) - 2020-08-18
+
+๐ **Improvements**
+
+- `BigNumber::of()` now accepts `.123` and `123.` formats, both of which return a `BigDecimal`
+
+๐ฅ **Breaking changes**
+
+- Deprecated method `BigInteger::powerMod()` has been removed - use `modPow()` instead
+- Deprecated method `BigInteger::parse()` has been removed - use `fromBase()` instead
+
+## [0.8.17](https://github.com/brick/math/releases/tag/0.8.17) - 2020-08-19
+
+๐ **Bug fix**
+
+- `BigInteger::toBytes()` could return an incorrect binary representation for some numbers
+- The bitwise operations `and()`, `or()`, `xor()` on `BigInteger` could return an incorrect result when the GMP extension is not available
+
+## [0.8.16](https://github.com/brick/math/releases/tag/0.8.16) - 2020-08-18
+
+๐ **Critical fix**
+
+- This version reintroduces the deprecated `BigInteger::parse()` method, that has been removed by mistake in version `0.8.9` and should have lasted for the whole `0.8` release cycle.
+
+โจ **New features**
+
+- `BigInteger::modInverse()` calculates a modular multiplicative inverse
+- `BigInteger::fromBytes()` creates a `BigInteger` from a byte string
+- `BigInteger::toBytes()` converts a `BigInteger` to a byte string
+- `BigInteger::randomBits()` creates a pseudo-random `BigInteger` of a given bit length
+- `BigInteger::randomRange()` creates a pseudo-random `BigInteger` between two bounds
+
+๐ฉ **Deprecations**
+
+- `BigInteger::powerMod()` is now deprecated in favour of `modPow()`
+
+## [0.8.15](https://github.com/brick/math/releases/tag/0.8.15) - 2020-04-15
+
+๐ **Fixes**
+
+- added missing `ext-json` requirement, due to `BigNumber` implementing `JsonSerializable`
+
+โก๏ธ **Optimizations**
+
+- additional optimization in `BigInteger::remainder()`
+
+## [0.8.14](https://github.com/brick/math/releases/tag/0.8.14) - 2020-02-18
+
+โจ **New features**
+
+- `BigInteger::getLowestSetBit()` returns the index of the rightmost one bit
+
+## [0.8.13](https://github.com/brick/math/releases/tag/0.8.13) - 2020-02-16
+
+โจ **New features**
+
+- `BigInteger::isEven()` tests whether the number is even
+- `BigInteger::isOdd()` tests whether the number is odd
+- `BigInteger::testBit()` tests if a bit is set
+- `BigInteger::getBitLength()` returns the number of bits in the minimal representation of the number
+
+## [0.8.12](https://github.com/brick/math/releases/tag/0.8.12) - 2020-02-03
+
+๐ ๏ธ **Maintenance release**
+
+Classes are now annotated for better static analysis with [psalm](https://psalm.dev/).
+
+This is a maintenance release: no bug fixes, no new features, no breaking changes.
+
+## [0.8.11](https://github.com/brick/math/releases/tag/0.8.11) - 2020-01-23
+
+โจ **New feature**
+
+`BigInteger::powerMod()` performs a power-with-modulo operation. Useful for crypto.
+
+## [0.8.10](https://github.com/brick/math/releases/tag/0.8.10) - 2020-01-21
+
+โจ **New feature**
+
+`BigInteger::mod()` returns the **modulo** of two numbers. The *modulo* differs from the *remainder* when the signs of the operands are different.
+
+## [0.8.9](https://github.com/brick/math/releases/tag/0.8.9) - 2020-01-08
+
+โก๏ธ **Performance improvements**
+
+A few additional optimizations in `BigInteger` and `BigDecimal` when one of the operands can be returned as is. Thanks to @tomtomsen in #24.
+
+## [0.8.8](https://github.com/brick/math/releases/tag/0.8.8) - 2019-04-25
+
+๐ **Bug fixes**
+
+- `BigInteger::toBase()` could return an empty string for zero values (BCMath & Native calculators only, GMP calculator unaffected)
+
+โจ **New features**
+
+- `BigInteger::toArbitraryBase()` converts a number to an arbitrary base, using a custom alphabet
+- `BigInteger::fromArbitraryBase()` converts a string in an arbitrary base, using a custom alphabet, back to a number
+
+These methods can be used as the foundation to convert strings between different bases/alphabets, using BigInteger as an intermediate representation.
+
+๐ฉ **Deprecations**
+
+- `BigInteger::parse()` is now deprecated in favour of `fromBase()`
+
+`BigInteger::fromBase()` works the same way as `parse()`, with 2 minor differences:
+
+- the `$base` parameter is required, it does not default to `10`
+- it throws a `NumberFormatException` instead of an `InvalidArgumentException` when the number is malformed
+
+## [0.8.7](https://github.com/brick/math/releases/tag/0.8.7) - 2019-04-20
+
+**Improvements**
+
+- Safer conversion from `float` when using custom locales
+- **Much faster** `NativeCalculator` implementation ๐
+
+You can expect **at least a 3x performance improvement** for common arithmetic operations when using the library on systems without GMP or BCMath; it gets exponentially faster on multiplications with a high number of digits. This is due to calculations now being performed on whole blocks of digits (the block size depending on the platform, 32-bit or 64-bit) instead of digit-by-digit as before.
+
+## [0.8.6](https://github.com/brick/math/releases/tag/0.8.6) - 2019-04-11
+
+**New method**
+
+`BigNumber::sum()` returns the sum of one or more numbers.
+
+## [0.8.5](https://github.com/brick/math/releases/tag/0.8.5) - 2019-02-12
+
+**Bug fix**: `of()` factory methods could fail when passing a `float` in environments using a `LC_NUMERIC` locale with a decimal separator other than `'.'` (#20).
+
+Thanks @manowark ๐
+
+## [0.8.4](https://github.com/brick/math/releases/tag/0.8.4) - 2018-12-07
+
+**New method**
+
+`BigDecimal::sqrt()` calculates the square root of a decimal number, to a given scale.
+
+## [0.8.3](https://github.com/brick/math/releases/tag/0.8.3) - 2018-12-06
+
+**New method**
+
+`BigInteger::sqrt()` calculates the square root of a number (thanks @peter279k).
+
+**New exception**
+
+`NegativeNumberException` is thrown when calling `sqrt()` on a negative number.
+
+## [0.8.2](https://github.com/brick/math/releases/tag/0.8.2) - 2018-11-08
+
+**Performance update**
+
+- Further improvement of `toInt()` performance
+- `NativeCalculator` can now perform some multiplications more efficiently
+
+## [0.8.1](https://github.com/brick/math/releases/tag/0.8.1) - 2018-11-07
+
+Performance optimization of `toInt()` methods.
+
+## [0.8.0](https://github.com/brick/math/releases/tag/0.8.0) - 2018-10-13
+
+**Breaking changes**
+
+The following deprecated methods have been removed. Use the new method name instead:
+
+| Method removed | Replacement method |
+| --- | --- |
+| `BigDecimal::getIntegral()` | `BigDecimal::getIntegralPart()` |
+| `BigDecimal::getFraction()` | `BigDecimal::getFractionalPart()` |
+
+---
+
+**New features**
+
+`BigInteger` has been augmented with 5 new methods for bitwise operations:
+
+| New method | Description |
+| --- | --- |
+| `and()` | performs a bitwise `AND` operation on two numbers |
+| `or()` | performs a bitwise `OR` operation on two numbers |
+| `xor()` | performs a bitwise `XOR` operation on two numbers |
+| `shiftedLeft()` | returns the number shifted left by a number of bits |
+| `shiftedRight()` | returns the number shifted right by a number of bits |
+
+Thanks to @DASPRiD ๐
+
+## [0.7.3](https://github.com/brick/math/releases/tag/0.7.3) - 2018-08-20
+
+**New method:** `BigDecimal::hasNonZeroFractionalPart()`
+
+**Renamed/deprecated methods:**
+
+- `BigDecimal::getIntegral()` has been renamed to `getIntegralPart()` and is now deprecated
+- `BigDecimal::getFraction()` has been renamed to `getFractionalPart()` and is now deprecated
+
+## [0.7.2](https://github.com/brick/math/releases/tag/0.7.2) - 2018-07-21
+
+**Performance update**
+
+`BigInteger::parse()` and `toBase()` now use GMP's built-in base conversion features when available.
+
+## [0.7.1](https://github.com/brick/math/releases/tag/0.7.1) - 2018-03-01
+
+This is a maintenance release, no code has been changed.
+
+- When installed with `--no-dev`, the autoloader does not autoload tests anymore
+- Tests and other files unnecessary for production are excluded from the dist package
+
+This will help make installations more compact.
+
+## [0.7.0](https://github.com/brick/math/releases/tag/0.7.0) - 2017-10-02
+
+Methods renamed:
+
+- `BigNumber:sign()` has been renamed to `getSign()`
+- `BigDecimal::unscaledValue()` has been renamed to `getUnscaledValue()`
+- `BigDecimal::scale()` has been renamed to `getScale()`
+- `BigDecimal::integral()` has been renamed to `getIntegral()`
+- `BigDecimal::fraction()` has been renamed to `getFraction()`
+- `BigRational::numerator()` has been renamed to `getNumerator()`
+- `BigRational::denominator()` has been renamed to `getDenominator()`
+
+Classes renamed:
+
+- `ArithmeticException` has been renamed to `MathException`
+
+## [0.6.2](https://github.com/brick/math/releases/tag/0.6.2) - 2017-10-02
+
+The base class for all exceptions is now `MathException`.
+`ArithmeticException` has been deprecated, and will be removed in 0.7.0.
+
+## [0.6.1](https://github.com/brick/math/releases/tag/0.6.1) - 2017-10-02
+
+A number of methods have been renamed:
+
+- `BigNumber:sign()` is deprecated; use `getSign()` instead
+- `BigDecimal::unscaledValue()` is deprecated; use `getUnscaledValue()` instead
+- `BigDecimal::scale()` is deprecated; use `getScale()` instead
+- `BigDecimal::integral()` is deprecated; use `getIntegral()` instead
+- `BigDecimal::fraction()` is deprecated; use `getFraction()` instead
+- `BigRational::numerator()` is deprecated; use `getNumerator()` instead
+- `BigRational::denominator()` is deprecated; use `getDenominator()` instead
+
+The old methods will be removed in version 0.7.0.
+
+## [0.6.0](https://github.com/brick/math/releases/tag/0.6.0) - 2017-08-25
+
+- Minimum PHP version is now [7.1](https://gophp71.org/); for PHP 5.6 and PHP 7.0 support, use version `0.5`
+- Deprecated method `BigDecimal::withScale()` has been removed; use `toScale()` instead
+- Method `BigNumber::toInteger()` has been renamed to `toInt()`
+
+## [0.5.4](https://github.com/brick/math/releases/tag/0.5.4) - 2016-10-17
+
+`BigNumber` classes now implement [JsonSerializable](http://php.net/manual/en/class.jsonserializable.php).
+The JSON output is always a string.
+
+## [0.5.3](https://github.com/brick/math/releases/tag/0.5.3) - 2016-03-31
+
+This is a bugfix release. Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6.
+
+## [0.5.2](https://github.com/brick/math/releases/tag/0.5.2) - 2015-08-06
+
+The `$scale` parameter of `BigDecimal::dividedBy()` is now optional again.
+
+## [0.5.1](https://github.com/brick/math/releases/tag/0.5.1) - 2015-07-05
+
+**New method: `BigNumber::toScale()`**
+
+This allows to convert any `BigNumber` to a `BigDecimal` with a given scale, using rounding if necessary.
+
+## [0.5.0](https://github.com/brick/math/releases/tag/0.5.0) - 2015-07-04
+
+**New features**
+- Common `BigNumber` interface for all classes, with the following methods:
+ - `sign()` and derived methods (`isZero()`, `isPositive()`, ...)
+ - `compareTo()` and derived methods (`isEqualTo()`, `isGreaterThan()`, ...) that work across different `BigNumber` types
+ - `toBigInteger()`, `toBigDecimal()`, `toBigRational`() conversion methods
+ - `toInteger()` and `toFloat()` conversion methods to native types
+- Unified `of()` behaviour: every class now accepts any type of number, provided that it can be safely converted to the current type
+- New method: `BigDecimal::exactlyDividedBy()`; this method automatically computes the scale of the result, provided that the division yields a finite number of digits
+- New methods: `BigRational::quotient()` and `remainder()`
+- Fine-grained exceptions: `DivisionByZeroException`, `RoundingNecessaryException`, `NumberFormatException`
+- Factory methods `zero()`, `one()` and `ten()` available in all classes
+- Rounding mode reintroduced in `BigInteger::dividedBy()`
+
+This release also comes with many performance improvements.
+
+---
+
+**Breaking changes**
+- `BigInteger`:
+ - `getSign()` is renamed to `sign()`
+ - `toString()` is renamed to `toBase()`
+ - `BigInteger::dividedBy()` now throws an exception by default if the remainder is not zero; use `quotient()` to get the previous behaviour
+- `BigDecimal`:
+ - `getSign()` is renamed to `sign()`
+ - `getUnscaledValue()` is renamed to `unscaledValue()`
+ - `getScale()` is renamed to `scale()`
+ - `getIntegral()` is renamed to `integral()`
+ - `getFraction()` is renamed to `fraction()`
+ - `divideAndRemainder()` is renamed to `quotientAndRemainder()`
+ - `dividedBy()` now takes a **mandatory** `$scale` parameter **before** the rounding mode
+ - `toBigInteger()` does not accept a `$roundingMode` parameter anymore
+ - `toBigRational()` does not simplify the fraction anymore; explicitly add `->simplified()` to get the previous behaviour
+- `BigRational`:
+ - `getSign()` is renamed to `sign()`
+ - `getNumerator()` is renamed to `numerator()`
+ - `getDenominator()` is renamed to `denominator()`
+ - `of()` is renamed to `nd()`, while `parse()` is renamed to `of()`
+- Miscellaneous:
+ - `ArithmeticException` is moved to an `Exception\` sub-namespace
+ - `of()` factory methods now throw `NumberFormatException` instead of `InvalidArgumentException`
+
+## [0.4.3](https://github.com/brick/math/releases/tag/0.4.3) - 2016-03-31
+
+Backport of two bug fixes from the 0.5 branch:
+- `BigInteger::parse()` did not always throw `InvalidArgumentException` as expected
+- Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6.
+
+## [0.4.2](https://github.com/brick/math/releases/tag/0.4.2) - 2015-06-16
+
+New method: `BigDecimal::stripTrailingZeros()`
+
+## [0.4.1](https://github.com/brick/math/releases/tag/0.4.1) - 2015-06-12
+
+Introducing a `BigRational` class, to perform calculations on fractions of any size.
+
+## [0.4.0](https://github.com/brick/math/releases/tag/0.4.0) - 2015-06-12
+
+Rounding modes have been removed from `BigInteger`, and are now a concept specific to `BigDecimal`.
+
+`BigInteger::dividedBy()` now always returns the quotient of the division.
+
+## [0.3.5](https://github.com/brick/math/releases/tag/0.3.5) - 2016-03-31
+
+Backport of two bug fixes from the 0.5 branch:
+
+- `BigInteger::parse()` did not always throw `InvalidArgumentException` as expected
+- Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6.
+
+## [0.3.4](https://github.com/brick/math/releases/tag/0.3.4) - 2015-06-11
+
+New methods:
+- `BigInteger::remainder()` returns the remainder of a division only
+- `BigInteger::gcd()` returns the greatest common divisor of two numbers
+
+## [0.3.3](https://github.com/brick/math/releases/tag/0.3.3) - 2015-06-07
+
+Fix `toString()` not handling negative numbers.
+
+## [0.3.2](https://github.com/brick/math/releases/tag/0.3.2) - 2015-06-07
+
+`BigInteger` and `BigDecimal` now have a `getSign()` method that returns:
+- `-1` if the number is negative
+- `0` if the number is zero
+- `1` if the number is positive
+
+## [0.3.1](https://github.com/brick/math/releases/tag/0.3.1) - 2015-06-05
+
+Minor performance improvements
+
+## [0.3.0](https://github.com/brick/math/releases/tag/0.3.0) - 2015-06-04
+
+The `$roundingMode` and `$scale` parameters have been swapped in `BigDecimal::dividedBy()`.
+
+## [0.2.2](https://github.com/brick/math/releases/tag/0.2.2) - 2015-06-04
+
+Stronger immutability guarantee for `BigInteger` and `BigDecimal`.
+
+So far, it would have been possible to break immutability of these classes by calling the `unserialize()` internal function. This release fixes that.
+
+## [0.2.1](https://github.com/brick/math/releases/tag/0.2.1) - 2015-06-02
+
+Added `BigDecimal::divideAndRemainder()`
+
+## [0.2.0](https://github.com/brick/math/releases/tag/0.2.0) - 2015-05-22
+
+- `min()` and `max()` do not accept an `array` anymore, but a variable number of parameters
+- **minimum PHP version is now 5.6**
+- continuous integration with PHP 7
+
+## [0.1.1](https://github.com/brick/math/releases/tag/0.1.1) - 2014-09-01
+
+- Added `BigInteger::power()`
+- Added HHVM support
+
+## [0.1.0](https://github.com/brick/math/releases/tag/0.1.0) - 2014-08-31
+
+First beta release.
+
diff --git a/tests/php_test_files/vendor/brick/math/LICENSE b/tests/php_test_files/vendor/brick/math/LICENSE
new file mode 100644
index 0000000..f9b724f
--- /dev/null
+++ b/tests/php_test_files/vendor/brick/math/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2013-present Benjamin Morel
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/php_test_files/vendor/brick/math/composer.json b/tests/php_test_files/vendor/brick/math/composer.json
new file mode 100644
index 0000000..bd67343
--- /dev/null
+++ b/tests/php_test_files/vendor/brick/math/composer.json
@@ -0,0 +1,39 @@
+{
+ "name": "brick/math",
+ "description": "Arbitrary-precision arithmetic library",
+ "type": "library",
+ "keywords": [
+ "Brick",
+ "Math",
+ "Mathematics",
+ "Arbitrary-precision",
+ "Arithmetic",
+ "BigInteger",
+ "BigDecimal",
+ "BigRational",
+ "BigNumber",
+ "Bignum",
+ "Decimal",
+ "Rational",
+ "Integer"
+ ],
+ "license": "MIT",
+ "require": {
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^10.1",
+ "php-coveralls/php-coveralls": "^2.2",
+ "vimeo/psalm": "5.16.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Brick\\Math\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Brick\\Math\\Tests\\": "tests/"
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/brick/math/src/BigDecimal.php b/tests/php_test_files/vendor/brick/math/src/BigDecimal.php
new file mode 100644
index 0000000..31d22ab
--- /dev/null
+++ b/tests/php_test_files/vendor/brick/math/src/BigDecimal.php
@@ -0,0 +1,754 @@
+value = $value;
+ $this->scale = $scale;
+ }
+
+ /**
+ * @psalm-pure
+ */
+ protected static function from(BigNumber $number): static
+ {
+ return $number->toBigDecimal();
+ }
+
+ /**
+ * Creates a BigDecimal from an unscaled value and a scale.
+ *
+ * Example: `(12345, 3)` will result in the BigDecimal `12.345`.
+ *
+ * @param BigNumber|int|float|string $value The unscaled value. Must be convertible to a BigInteger.
+ * @param int $scale The scale of the number, positive or zero.
+ *
+ * @throws \InvalidArgumentException If the scale is negative.
+ *
+ * @psalm-pure
+ */
+ public static function ofUnscaledValue(BigNumber|int|float|string $value, int $scale = 0) : BigDecimal
+ {
+ if ($scale < 0) {
+ throw new \InvalidArgumentException('The scale cannot be negative.');
+ }
+
+ return new BigDecimal((string) BigInteger::of($value), $scale);
+ }
+
+ /**
+ * Returns a BigDecimal representing zero, with a scale of zero.
+ *
+ * @psalm-pure
+ */
+ public static function zero() : BigDecimal
+ {
+ /**
+ * @psalm-suppress ImpureStaticVariable
+ * @var BigDecimal|null $zero
+ */
+ static $zero;
+
+ if ($zero === null) {
+ $zero = new BigDecimal('0');
+ }
+
+ return $zero;
+ }
+
+ /**
+ * Returns a BigDecimal representing one, with a scale of zero.
+ *
+ * @psalm-pure
+ */
+ public static function one() : BigDecimal
+ {
+ /**
+ * @psalm-suppress ImpureStaticVariable
+ * @var BigDecimal|null $one
+ */
+ static $one;
+
+ if ($one === null) {
+ $one = new BigDecimal('1');
+ }
+
+ return $one;
+ }
+
+ /**
+ * Returns a BigDecimal representing ten, with a scale of zero.
+ *
+ * @psalm-pure
+ */
+ public static function ten() : BigDecimal
+ {
+ /**
+ * @psalm-suppress ImpureStaticVariable
+ * @var BigDecimal|null $ten
+ */
+ static $ten;
+
+ if ($ten === null) {
+ $ten = new BigDecimal('10');
+ }
+
+ return $ten;
+ }
+
+ /**
+ * Returns the sum of this number and the given one.
+ *
+ * The result has a scale of `max($this->scale, $that->scale)`.
+ *
+ * @param BigNumber|int|float|string $that The number to add. Must be convertible to a BigDecimal.
+ *
+ * @throws MathException If the number is not valid, or is not convertible to a BigDecimal.
+ */
+ public function plus(BigNumber|int|float|string $that) : BigDecimal
+ {
+ $that = BigDecimal::of($that);
+
+ if ($that->value === '0' && $that->scale <= $this->scale) {
+ return $this;
+ }
+
+ if ($this->value === '0' && $this->scale <= $that->scale) {
+ return $that;
+ }
+
+ [$a, $b] = $this->scaleValues($this, $that);
+
+ $value = Calculator::get()->add($a, $b);
+ $scale = $this->scale > $that->scale ? $this->scale : $that->scale;
+
+ return new BigDecimal($value, $scale);
+ }
+
+ /**
+ * Returns the difference of this number and the given one.
+ *
+ * The result has a scale of `max($this->scale, $that->scale)`.
+ *
+ * @param BigNumber|int|float|string $that The number to subtract. Must be convertible to a BigDecimal.
+ *
+ * @throws MathException If the number is not valid, or is not convertible to a BigDecimal.
+ */
+ public function minus(BigNumber|int|float|string $that) : BigDecimal
+ {
+ $that = BigDecimal::of($that);
+
+ if ($that->value === '0' && $that->scale <= $this->scale) {
+ return $this;
+ }
+
+ [$a, $b] = $this->scaleValues($this, $that);
+
+ $value = Calculator::get()->sub($a, $b);
+ $scale = $this->scale > $that->scale ? $this->scale : $that->scale;
+
+ return new BigDecimal($value, $scale);
+ }
+
+ /**
+ * Returns the product of this number and the given one.
+ *
+ * The result has a scale of `$this->scale + $that->scale`.
+ *
+ * @param BigNumber|int|float|string $that The multiplier. Must be convertible to a BigDecimal.
+ *
+ * @throws MathException If the multiplier is not a valid number, or is not convertible to a BigDecimal.
+ */
+ public function multipliedBy(BigNumber|int|float|string $that) : BigDecimal
+ {
+ $that = BigDecimal::of($that);
+
+ if ($that->value === '1' && $that->scale === 0) {
+ return $this;
+ }
+
+ if ($this->value === '1' && $this->scale === 0) {
+ return $that;
+ }
+
+ $value = Calculator::get()->mul($this->value, $that->value);
+ $scale = $this->scale + $that->scale;
+
+ return new BigDecimal($value, $scale);
+ }
+
+ /**
+ * Returns the result of the division of this number by the given one, at the given scale.
+ *
+ * @param BigNumber|int|float|string $that The divisor.
+ * @param int|null $scale The desired scale, or null to use the scale of this number.
+ * @param RoundingMode $roundingMode An optional rounding mode, defaults to UNNECESSARY.
+ *
+ * @throws \InvalidArgumentException If the scale or rounding mode is invalid.
+ * @throws MathException If the number is invalid, is zero, or rounding was necessary.
+ */
+ public function dividedBy(BigNumber|int|float|string $that, ?int $scale = null, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal
+ {
+ $that = BigDecimal::of($that);
+
+ if ($that->isZero()) {
+ throw DivisionByZeroException::divisionByZero();
+ }
+
+ if ($scale === null) {
+ $scale = $this->scale;
+ } elseif ($scale < 0) {
+ throw new \InvalidArgumentException('Scale cannot be negative.');
+ }
+
+ if ($that->value === '1' && $that->scale === 0 && $scale === $this->scale) {
+ return $this;
+ }
+
+ $p = $this->valueWithMinScale($that->scale + $scale);
+ $q = $that->valueWithMinScale($this->scale - $scale);
+
+ $result = Calculator::get()->divRound($p, $q, $roundingMode);
+
+ return new BigDecimal($result, $scale);
+ }
+
+ /**
+ * Returns the exact result of the division of this number by the given one.
+ *
+ * The scale of the result is automatically calculated to fit all the fraction digits.
+ *
+ * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal.
+ *
+ * @throws MathException If the divisor is not a valid number, is not convertible to a BigDecimal, is zero,
+ * or the result yields an infinite number of digits.
+ */
+ public function exactlyDividedBy(BigNumber|int|float|string $that) : BigDecimal
+ {
+ $that = BigDecimal::of($that);
+
+ if ($that->value === '0') {
+ throw DivisionByZeroException::divisionByZero();
+ }
+
+ [, $b] = $this->scaleValues($this, $that);
+
+ $d = \rtrim($b, '0');
+ $scale = \strlen($b) - \strlen($d);
+
+ $calculator = Calculator::get();
+
+ foreach ([5, 2] as $prime) {
+ for (;;) {
+ $lastDigit = (int) $d[-1];
+
+ if ($lastDigit % $prime !== 0) {
+ break;
+ }
+
+ $d = $calculator->divQ($d, (string) $prime);
+ $scale++;
+ }
+ }
+
+ return $this->dividedBy($that, $scale)->stripTrailingZeros();
+ }
+
+ /**
+ * Returns this number exponentiated to the given value.
+ *
+ * The result has a scale of `$this->scale * $exponent`.
+ *
+ * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000.
+ */
+ public function power(int $exponent) : BigDecimal
+ {
+ if ($exponent === 0) {
+ return BigDecimal::one();
+ }
+
+ if ($exponent === 1) {
+ return $this;
+ }
+
+ if ($exponent < 0 || $exponent > Calculator::MAX_POWER) {
+ throw new \InvalidArgumentException(\sprintf(
+ 'The exponent %d is not in the range 0 to %d.',
+ $exponent,
+ Calculator::MAX_POWER
+ ));
+ }
+
+ return new BigDecimal(Calculator::get()->pow($this->value, $exponent), $this->scale * $exponent);
+ }
+
+ /**
+ * Returns the quotient of the division of this number by the given one.
+ *
+ * The quotient has a scale of `0`.
+ *
+ * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal.
+ *
+ * @throws MathException If the divisor is not a valid decimal number, or is zero.
+ */
+ public function quotient(BigNumber|int|float|string $that) : BigDecimal
+ {
+ $that = BigDecimal::of($that);
+
+ if ($that->isZero()) {
+ throw DivisionByZeroException::divisionByZero();
+ }
+
+ $p = $this->valueWithMinScale($that->scale);
+ $q = $that->valueWithMinScale($this->scale);
+
+ $quotient = Calculator::get()->divQ($p, $q);
+
+ return new BigDecimal($quotient, 0);
+ }
+
+ /**
+ * Returns the remainder of the division of this number by the given one.
+ *
+ * The remainder has a scale of `max($this->scale, $that->scale)`.
+ *
+ * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal.
+ *
+ * @throws MathException If the divisor is not a valid decimal number, or is zero.
+ */
+ public function remainder(BigNumber|int|float|string $that) : BigDecimal
+ {
+ $that = BigDecimal::of($that);
+
+ if ($that->isZero()) {
+ throw DivisionByZeroException::divisionByZero();
+ }
+
+ $p = $this->valueWithMinScale($that->scale);
+ $q = $that->valueWithMinScale($this->scale);
+
+ $remainder = Calculator::get()->divR($p, $q);
+
+ $scale = $this->scale > $that->scale ? $this->scale : $that->scale;
+
+ return new BigDecimal($remainder, $scale);
+ }
+
+ /**
+ * Returns the quotient and remainder of the division of this number by the given one.
+ *
+ * The quotient has a scale of `0`, and the remainder has a scale of `max($this->scale, $that->scale)`.
+ *
+ * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal.
+ *
+ * @return BigDecimal[] An array containing the quotient and the remainder.
+ *
+ * @psalm-return array{BigDecimal, BigDecimal}
+ *
+ * @throws MathException If the divisor is not a valid decimal number, or is zero.
+ */
+ public function quotientAndRemainder(BigNumber|int|float|string $that) : array
+ {
+ $that = BigDecimal::of($that);
+
+ if ($that->isZero()) {
+ throw DivisionByZeroException::divisionByZero();
+ }
+
+ $p = $this->valueWithMinScale($that->scale);
+ $q = $that->valueWithMinScale($this->scale);
+
+ [$quotient, $remainder] = Calculator::get()->divQR($p, $q);
+
+ $scale = $this->scale > $that->scale ? $this->scale : $that->scale;
+
+ $quotient = new BigDecimal($quotient, 0);
+ $remainder = new BigDecimal($remainder, $scale);
+
+ return [$quotient, $remainder];
+ }
+
+ /**
+ * Returns the square root of this number, rounded down to the given number of decimals.
+ *
+ * @throws \InvalidArgumentException If the scale is negative.
+ * @throws NegativeNumberException If this number is negative.
+ */
+ public function sqrt(int $scale) : BigDecimal
+ {
+ if ($scale < 0) {
+ throw new \InvalidArgumentException('Scale cannot be negative.');
+ }
+
+ if ($this->value === '0') {
+ return new BigDecimal('0', $scale);
+ }
+
+ if ($this->value[0] === '-') {
+ throw new NegativeNumberException('Cannot calculate the square root of a negative number.');
+ }
+
+ $value = $this->value;
+ $addDigits = 2 * $scale - $this->scale;
+
+ if ($addDigits > 0) {
+ // add zeros
+ $value .= \str_repeat('0', $addDigits);
+ } elseif ($addDigits < 0) {
+ // trim digits
+ if (-$addDigits >= \strlen($this->value)) {
+ // requesting a scale too low, will always yield a zero result
+ return new BigDecimal('0', $scale);
+ }
+
+ $value = \substr($value, 0, $addDigits);
+ }
+
+ $value = Calculator::get()->sqrt($value);
+
+ return new BigDecimal($value, $scale);
+ }
+
+ /**
+ * Returns a copy of this BigDecimal with the decimal point moved $n places to the left.
+ */
+ public function withPointMovedLeft(int $n) : BigDecimal
+ {
+ if ($n === 0) {
+ return $this;
+ }
+
+ if ($n < 0) {
+ return $this->withPointMovedRight(-$n);
+ }
+
+ return new BigDecimal($this->value, $this->scale + $n);
+ }
+
+ /**
+ * Returns a copy of this BigDecimal with the decimal point moved $n places to the right.
+ */
+ public function withPointMovedRight(int $n) : BigDecimal
+ {
+ if ($n === 0) {
+ return $this;
+ }
+
+ if ($n < 0) {
+ return $this->withPointMovedLeft(-$n);
+ }
+
+ $value = $this->value;
+ $scale = $this->scale - $n;
+
+ if ($scale < 0) {
+ if ($value !== '0') {
+ $value .= \str_repeat('0', -$scale);
+ }
+ $scale = 0;
+ }
+
+ return new BigDecimal($value, $scale);
+ }
+
+ /**
+ * Returns a copy of this BigDecimal with any trailing zeros removed from the fractional part.
+ */
+ public function stripTrailingZeros() : BigDecimal
+ {
+ if ($this->scale === 0) {
+ return $this;
+ }
+
+ $trimmedValue = \rtrim($this->value, '0');
+
+ if ($trimmedValue === '') {
+ return BigDecimal::zero();
+ }
+
+ $trimmableZeros = \strlen($this->value) - \strlen($trimmedValue);
+
+ if ($trimmableZeros === 0) {
+ return $this;
+ }
+
+ if ($trimmableZeros > $this->scale) {
+ $trimmableZeros = $this->scale;
+ }
+
+ $value = \substr($this->value, 0, -$trimmableZeros);
+ $scale = $this->scale - $trimmableZeros;
+
+ return new BigDecimal($value, $scale);
+ }
+
+ /**
+ * Returns the absolute value of this number.
+ */
+ public function abs() : BigDecimal
+ {
+ return $this->isNegative() ? $this->negated() : $this;
+ }
+
+ /**
+ * Returns the negated value of this number.
+ */
+ public function negated() : BigDecimal
+ {
+ return new BigDecimal(Calculator::get()->neg($this->value), $this->scale);
+ }
+
+ public function compareTo(BigNumber|int|float|string $that) : int
+ {
+ $that = BigNumber::of($that);
+
+ if ($that instanceof BigInteger) {
+ $that = $that->toBigDecimal();
+ }
+
+ if ($that instanceof BigDecimal) {
+ [$a, $b] = $this->scaleValues($this, $that);
+
+ return Calculator::get()->cmp($a, $b);
+ }
+
+ return - $that->compareTo($this);
+ }
+
+ public function getSign() : int
+ {
+ return ($this->value === '0') ? 0 : (($this->value[0] === '-') ? -1 : 1);
+ }
+
+ public function getUnscaledValue() : BigInteger
+ {
+ return self::newBigInteger($this->value);
+ }
+
+ public function getScale() : int
+ {
+ return $this->scale;
+ }
+
+ /**
+ * Returns a string representing the integral part of this decimal number.
+ *
+ * Example: `-123.456` => `-123`.
+ */
+ public function getIntegralPart() : string
+ {
+ if ($this->scale === 0) {
+ return $this->value;
+ }
+
+ $value = $this->getUnscaledValueWithLeadingZeros();
+
+ return \substr($value, 0, -$this->scale);
+ }
+
+ /**
+ * Returns a string representing the fractional part of this decimal number.
+ *
+ * If the scale is zero, an empty string is returned.
+ *
+ * Examples: `-123.456` => '456', `123` => ''.
+ */
+ public function getFractionalPart() : string
+ {
+ if ($this->scale === 0) {
+ return '';
+ }
+
+ $value = $this->getUnscaledValueWithLeadingZeros();
+
+ return \substr($value, -$this->scale);
+ }
+
+ /**
+ * Returns whether this decimal number has a non-zero fractional part.
+ */
+ public function hasNonZeroFractionalPart() : bool
+ {
+ return $this->getFractionalPart() !== \str_repeat('0', $this->scale);
+ }
+
+ public function toBigInteger() : BigInteger
+ {
+ $zeroScaleDecimal = $this->scale === 0 ? $this : $this->dividedBy(1, 0);
+
+ return self::newBigInteger($zeroScaleDecimal->value);
+ }
+
+ public function toBigDecimal() : BigDecimal
+ {
+ return $this;
+ }
+
+ public function toBigRational() : BigRational
+ {
+ $numerator = self::newBigInteger($this->value);
+ $denominator = self::newBigInteger('1' . \str_repeat('0', $this->scale));
+
+ return self::newBigRational($numerator, $denominator, false);
+ }
+
+ public function toScale(int $scale, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal
+ {
+ if ($scale === $this->scale) {
+ return $this;
+ }
+
+ return $this->dividedBy(BigDecimal::one(), $scale, $roundingMode);
+ }
+
+ public function toInt() : int
+ {
+ return $this->toBigInteger()->toInt();
+ }
+
+ public function toFloat() : float
+ {
+ return (float) (string) $this;
+ }
+
+ public function __toString() : string
+ {
+ if ($this->scale === 0) {
+ return $this->value;
+ }
+
+ $value = $this->getUnscaledValueWithLeadingZeros();
+
+ return \substr($value, 0, -$this->scale) . '.' . \substr($value, -$this->scale);
+ }
+
+ /**
+ * This method is required for serializing the object and SHOULD NOT be accessed directly.
+ *
+ * @internal
+ *
+ * @return array{value: string, scale: int}
+ */
+ public function __serialize(): array
+ {
+ return ['value' => $this->value, 'scale' => $this->scale];
+ }
+
+ /**
+ * This method is only here to allow unserializing the object and cannot be accessed directly.
+ *
+ * @internal
+ * @psalm-suppress RedundantPropertyInitializationCheck
+ *
+ * @param array{value: string, scale: int} $data
+ *
+ * @throws \LogicException
+ */
+ public function __unserialize(array $data): void
+ {
+ if (isset($this->value)) {
+ throw new \LogicException('__unserialize() is an internal function, it must not be called directly.');
+ }
+
+ $this->value = $data['value'];
+ $this->scale = $data['scale'];
+ }
+
+ /**
+ * Puts the internal values of the given decimal numbers on the same scale.
+ *
+ * @return array{string, string} The scaled integer values of $x and $y.
+ */
+ private function scaleValues(BigDecimal $x, BigDecimal $y) : array
+ {
+ $a = $x->value;
+ $b = $y->value;
+
+ if ($b !== '0' && $x->scale > $y->scale) {
+ $b .= \str_repeat('0', $x->scale - $y->scale);
+ } elseif ($a !== '0' && $x->scale < $y->scale) {
+ $a .= \str_repeat('0', $y->scale - $x->scale);
+ }
+
+ return [$a, $b];
+ }
+
+ private function valueWithMinScale(int $scale) : string
+ {
+ $value = $this->value;
+
+ if ($this->value !== '0' && $scale > $this->scale) {
+ $value .= \str_repeat('0', $scale - $this->scale);
+ }
+
+ return $value;
+ }
+
+ /**
+ * Adds leading zeros if necessary to the unscaled value to represent the full decimal number.
+ */
+ private function getUnscaledValueWithLeadingZeros() : string
+ {
+ $value = $this->value;
+ $targetLength = $this->scale + 1;
+ $negative = ($value[0] === '-');
+ $length = \strlen($value);
+
+ if ($negative) {
+ $length--;
+ }
+
+ if ($length >= $targetLength) {
+ return $this->value;
+ }
+
+ if ($negative) {
+ $value = \substr($value, 1);
+ }
+
+ $value = \str_pad($value, $targetLength, '0', STR_PAD_LEFT);
+
+ if ($negative) {
+ $value = '-' . $value;
+ }
+
+ return $value;
+ }
+}
diff --git a/tests/php_test_files/vendor/brick/math/src/BigInteger.php b/tests/php_test_files/vendor/brick/math/src/BigInteger.php
new file mode 100644
index 0000000..73dcc89
--- /dev/null
+++ b/tests/php_test_files/vendor/brick/math/src/BigInteger.php
@@ -0,0 +1,1051 @@
+value = $value;
+ }
+
+ /**
+ * @psalm-pure
+ */
+ protected static function from(BigNumber $number): static
+ {
+ return $number->toBigInteger();
+ }
+
+ /**
+ * Creates a number from a string in a given base.
+ *
+ * The string can optionally be prefixed with the `+` or `-` sign.
+ *
+ * Bases greater than 36 are not supported by this method, as there is no clear consensus on which of the lowercase
+ * or uppercase characters should come first. Instead, this method accepts any base up to 36, and does not
+ * differentiate lowercase and uppercase characters, which are considered equal.
+ *
+ * For bases greater than 36, and/or custom alphabets, use the fromArbitraryBase() method.
+ *
+ * @param string $number The number to convert, in the given base.
+ * @param int $base The base of the number, between 2 and 36.
+ *
+ * @throws NumberFormatException If the number is empty, or contains invalid chars for the given base.
+ * @throws \InvalidArgumentException If the base is out of range.
+ *
+ * @psalm-pure
+ */
+ public static function fromBase(string $number, int $base) : BigInteger
+ {
+ if ($number === '') {
+ throw new NumberFormatException('The number cannot be empty.');
+ }
+
+ if ($base < 2 || $base > 36) {
+ throw new \InvalidArgumentException(\sprintf('Base %d is not in range 2 to 36.', $base));
+ }
+
+ if ($number[0] === '-') {
+ $sign = '-';
+ $number = \substr($number, 1);
+ } elseif ($number[0] === '+') {
+ $sign = '';
+ $number = \substr($number, 1);
+ } else {
+ $sign = '';
+ }
+
+ if ($number === '') {
+ throw new NumberFormatException('The number cannot be empty.');
+ }
+
+ $number = \ltrim($number, '0');
+
+ if ($number === '') {
+ // The result will be the same in any base, avoid further calculation.
+ return BigInteger::zero();
+ }
+
+ if ($number === '1') {
+ // The result will be the same in any base, avoid further calculation.
+ return new BigInteger($sign . '1');
+ }
+
+ $pattern = '/[^' . \substr(Calculator::ALPHABET, 0, $base) . ']/';
+
+ if (\preg_match($pattern, \strtolower($number), $matches) === 1) {
+ throw new NumberFormatException(\sprintf('"%s" is not a valid character in base %d.', $matches[0], $base));
+ }
+
+ if ($base === 10) {
+ // The number is usable as is, avoid further calculation.
+ return new BigInteger($sign . $number);
+ }
+
+ $result = Calculator::get()->fromBase($number, $base);
+
+ return new BigInteger($sign . $result);
+ }
+
+ /**
+ * Parses a string containing an integer in an arbitrary base, using a custom alphabet.
+ *
+ * Because this method accepts an alphabet with any character, including dash, it does not handle negative numbers.
+ *
+ * @param string $number The number to parse.
+ * @param string $alphabet The alphabet, for example '01' for base 2, or '01234567' for base 8.
+ *
+ * @throws NumberFormatException If the given number is empty or contains invalid chars for the given alphabet.
+ * @throws \InvalidArgumentException If the alphabet does not contain at least 2 chars.
+ *
+ * @psalm-pure
+ */
+ public static function fromArbitraryBase(string $number, string $alphabet) : BigInteger
+ {
+ if ($number === '') {
+ throw new NumberFormatException('The number cannot be empty.');
+ }
+
+ $base = \strlen($alphabet);
+
+ if ($base < 2) {
+ throw new \InvalidArgumentException('The alphabet must contain at least 2 chars.');
+ }
+
+ $pattern = '/[^' . \preg_quote($alphabet, '/') . ']/';
+
+ if (\preg_match($pattern, $number, $matches) === 1) {
+ throw NumberFormatException::charNotInAlphabet($matches[0]);
+ }
+
+ $number = Calculator::get()->fromArbitraryBase($number, $alphabet, $base);
+
+ return new BigInteger($number);
+ }
+
+ /**
+ * Translates a string of bytes containing the binary representation of a BigInteger into a BigInteger.
+ *
+ * The input string is assumed to be in big-endian byte-order: the most significant byte is in the zeroth element.
+ *
+ * If `$signed` is true, the input is assumed to be in two's-complement representation, and the leading bit is
+ * interpreted as a sign bit. If `$signed` is false, the input is interpreted as an unsigned number, and the
+ * resulting BigInteger will always be positive or zero.
+ *
+ * This method can be used to retrieve a number exported by `toBytes()`, as long as the `$signed` flags match.
+ *
+ * @param string $value The byte string.
+ * @param bool $signed Whether to interpret as a signed number in two's-complement representation with a leading
+ * sign bit.
+ *
+ * @throws NumberFormatException If the string is empty.
+ */
+ public static function fromBytes(string $value, bool $signed = true) : BigInteger
+ {
+ if ($value === '') {
+ throw new NumberFormatException('The byte string must not be empty.');
+ }
+
+ $twosComplement = false;
+
+ if ($signed) {
+ $x = \ord($value[0]);
+
+ if (($twosComplement = ($x >= 0x80))) {
+ $value = ~$value;
+ }
+ }
+
+ $number = self::fromBase(\bin2hex($value), 16);
+
+ if ($twosComplement) {
+ return $number->plus(1)->negated();
+ }
+
+ return $number;
+ }
+
+ /**
+ * Generates a pseudo-random number in the range 0 to 2^numBits - 1.
+ *
+ * Using the default random bytes generator, this method is suitable for cryptographic use.
+ *
+ * @psalm-param (callable(int): string)|null $randomBytesGenerator
+ *
+ * @param int $numBits The number of bits.
+ * @param callable|null $randomBytesGenerator A function that accepts a number of bytes as an integer, and returns a
+ * string of random bytes of the given length. Defaults to the
+ * `random_bytes()` function.
+ *
+ * @throws \InvalidArgumentException If $numBits is negative.
+ */
+ public static function randomBits(int $numBits, ?callable $randomBytesGenerator = null) : BigInteger
+ {
+ if ($numBits < 0) {
+ throw new \InvalidArgumentException('The number of bits cannot be negative.');
+ }
+
+ if ($numBits === 0) {
+ return BigInteger::zero();
+ }
+
+ if ($randomBytesGenerator === null) {
+ $randomBytesGenerator = random_bytes(...);
+ }
+
+ /** @var int<1, max> $byteLength */
+ $byteLength = \intdiv($numBits - 1, 8) + 1;
+
+ $extraBits = ($byteLength * 8 - $numBits);
+ $bitmask = \chr(0xFF >> $extraBits);
+
+ $randomBytes = $randomBytesGenerator($byteLength);
+ $randomBytes[0] = $randomBytes[0] & $bitmask;
+
+ return self::fromBytes($randomBytes, false);
+ }
+
+ /**
+ * Generates a pseudo-random number between `$min` and `$max`.
+ *
+ * Using the default random bytes generator, this method is suitable for cryptographic use.
+ *
+ * @psalm-param (callable(int): string)|null $randomBytesGenerator
+ *
+ * @param BigNumber|int|float|string $min The lower bound. Must be convertible to a BigInteger.
+ * @param BigNumber|int|float|string $max The upper bound. Must be convertible to a BigInteger.
+ * @param callable|null $randomBytesGenerator A function that accepts a number of bytes as an integer,
+ * and returns a string of random bytes of the given length.
+ * Defaults to the `random_bytes()` function.
+ *
+ * @throws MathException If one of the parameters cannot be converted to a BigInteger,
+ * or `$min` is greater than `$max`.
+ */
+ public static function randomRange(
+ BigNumber|int|float|string $min,
+ BigNumber|int|float|string $max,
+ ?callable $randomBytesGenerator = null
+ ) : BigInteger {
+ $min = BigInteger::of($min);
+ $max = BigInteger::of($max);
+
+ if ($min->isGreaterThan($max)) {
+ throw new MathException('$min cannot be greater than $max.');
+ }
+
+ if ($min->isEqualTo($max)) {
+ return $min;
+ }
+
+ $diff = $max->minus($min);
+ $bitLength = $diff->getBitLength();
+
+ // try until the number is in range (50% to 100% chance of success)
+ do {
+ $randomNumber = self::randomBits($bitLength, $randomBytesGenerator);
+ } while ($randomNumber->isGreaterThan($diff));
+
+ return $randomNumber->plus($min);
+ }
+
+ /**
+ * Returns a BigInteger representing zero.
+ *
+ * @psalm-pure
+ */
+ public static function zero() : BigInteger
+ {
+ /**
+ * @psalm-suppress ImpureStaticVariable
+ * @var BigInteger|null $zero
+ */
+ static $zero;
+
+ if ($zero === null) {
+ $zero = new BigInteger('0');
+ }
+
+ return $zero;
+ }
+
+ /**
+ * Returns a BigInteger representing one.
+ *
+ * @psalm-pure
+ */
+ public static function one() : BigInteger
+ {
+ /**
+ * @psalm-suppress ImpureStaticVariable
+ * @var BigInteger|null $one
+ */
+ static $one;
+
+ if ($one === null) {
+ $one = new BigInteger('1');
+ }
+
+ return $one;
+ }
+
+ /**
+ * Returns a BigInteger representing ten.
+ *
+ * @psalm-pure
+ */
+ public static function ten() : BigInteger
+ {
+ /**
+ * @psalm-suppress ImpureStaticVariable
+ * @var BigInteger|null $ten
+ */
+ static $ten;
+
+ if ($ten === null) {
+ $ten = new BigInteger('10');
+ }
+
+ return $ten;
+ }
+
+ public static function gcdMultiple(BigInteger $a, BigInteger ...$n): BigInteger
+ {
+ $result = $a;
+
+ foreach ($n as $next) {
+ $result = $result->gcd($next);
+
+ if ($result->isEqualTo(1)) {
+ return $result;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Returns the sum of this number and the given one.
+ *
+ * @param BigNumber|int|float|string $that The number to add. Must be convertible to a BigInteger.
+ *
+ * @throws MathException If the number is not valid, or is not convertible to a BigInteger.
+ */
+ public function plus(BigNumber|int|float|string $that) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ if ($that->value === '0') {
+ return $this;
+ }
+
+ if ($this->value === '0') {
+ return $that;
+ }
+
+ $value = Calculator::get()->add($this->value, $that->value);
+
+ return new BigInteger($value);
+ }
+
+ /**
+ * Returns the difference of this number and the given one.
+ *
+ * @param BigNumber|int|float|string $that The number to subtract. Must be convertible to a BigInteger.
+ *
+ * @throws MathException If the number is not valid, or is not convertible to a BigInteger.
+ */
+ public function minus(BigNumber|int|float|string $that) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ if ($that->value === '0') {
+ return $this;
+ }
+
+ $value = Calculator::get()->sub($this->value, $that->value);
+
+ return new BigInteger($value);
+ }
+
+ /**
+ * Returns the product of this number and the given one.
+ *
+ * @param BigNumber|int|float|string $that The multiplier. Must be convertible to a BigInteger.
+ *
+ * @throws MathException If the multiplier is not a valid number, or is not convertible to a BigInteger.
+ */
+ public function multipliedBy(BigNumber|int|float|string $that) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ if ($that->value === '1') {
+ return $this;
+ }
+
+ if ($this->value === '1') {
+ return $that;
+ }
+
+ $value = Calculator::get()->mul($this->value, $that->value);
+
+ return new BigInteger($value);
+ }
+
+ /**
+ * Returns the result of the division of this number by the given one.
+ *
+ * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger.
+ * @param RoundingMode $roundingMode An optional rounding mode, defaults to UNNECESSARY.
+ *
+ * @throws MathException If the divisor is not a valid number, is not convertible to a BigInteger, is zero,
+ * or RoundingMode::UNNECESSARY is used and the remainder is not zero.
+ */
+ public function dividedBy(BigNumber|int|float|string $that, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ if ($that->value === '1') {
+ return $this;
+ }
+
+ if ($that->value === '0') {
+ throw DivisionByZeroException::divisionByZero();
+ }
+
+ $result = Calculator::get()->divRound($this->value, $that->value, $roundingMode);
+
+ return new BigInteger($result);
+ }
+
+ /**
+ * Returns this number exponentiated to the given value.
+ *
+ * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000.
+ */
+ public function power(int $exponent) : BigInteger
+ {
+ if ($exponent === 0) {
+ return BigInteger::one();
+ }
+
+ if ($exponent === 1) {
+ return $this;
+ }
+
+ if ($exponent < 0 || $exponent > Calculator::MAX_POWER) {
+ throw new \InvalidArgumentException(\sprintf(
+ 'The exponent %d is not in the range 0 to %d.',
+ $exponent,
+ Calculator::MAX_POWER
+ ));
+ }
+
+ return new BigInteger(Calculator::get()->pow($this->value, $exponent));
+ }
+
+ /**
+ * Returns the quotient of the division of this number by the given one.
+ *
+ * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger.
+ *
+ * @throws DivisionByZeroException If the divisor is zero.
+ */
+ public function quotient(BigNumber|int|float|string $that) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ if ($that->value === '1') {
+ return $this;
+ }
+
+ if ($that->value === '0') {
+ throw DivisionByZeroException::divisionByZero();
+ }
+
+ $quotient = Calculator::get()->divQ($this->value, $that->value);
+
+ return new BigInteger($quotient);
+ }
+
+ /**
+ * Returns the remainder of the division of this number by the given one.
+ *
+ * The remainder, when non-zero, has the same sign as the dividend.
+ *
+ * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger.
+ *
+ * @throws DivisionByZeroException If the divisor is zero.
+ */
+ public function remainder(BigNumber|int|float|string $that) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ if ($that->value === '1') {
+ return BigInteger::zero();
+ }
+
+ if ($that->value === '0') {
+ throw DivisionByZeroException::divisionByZero();
+ }
+
+ $remainder = Calculator::get()->divR($this->value, $that->value);
+
+ return new BigInteger($remainder);
+ }
+
+ /**
+ * Returns the quotient and remainder of the division of this number by the given one.
+ *
+ * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger.
+ *
+ * @return BigInteger[] An array containing the quotient and the remainder.
+ *
+ * @psalm-return array{BigInteger, BigInteger}
+ *
+ * @throws DivisionByZeroException If the divisor is zero.
+ */
+ public function quotientAndRemainder(BigNumber|int|float|string $that) : array
+ {
+ $that = BigInteger::of($that);
+
+ if ($that->value === '0') {
+ throw DivisionByZeroException::divisionByZero();
+ }
+
+ [$quotient, $remainder] = Calculator::get()->divQR($this->value, $that->value);
+
+ return [
+ new BigInteger($quotient),
+ new BigInteger($remainder)
+ ];
+ }
+
+ /**
+ * Returns the modulo of this number and the given one.
+ *
+ * The modulo operation yields the same result as the remainder operation when both operands are of the same sign,
+ * and may differ when signs are different.
+ *
+ * The result of the modulo operation, when non-zero, has the same sign as the divisor.
+ *
+ * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger.
+ *
+ * @throws DivisionByZeroException If the divisor is zero.
+ */
+ public function mod(BigNumber|int|float|string $that) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ if ($that->value === '0') {
+ throw DivisionByZeroException::modulusMustNotBeZero();
+ }
+
+ $value = Calculator::get()->mod($this->value, $that->value);
+
+ return new BigInteger($value);
+ }
+
+ /**
+ * Returns the modular multiplicative inverse of this BigInteger modulo $m.
+ *
+ * @throws DivisionByZeroException If $m is zero.
+ * @throws NegativeNumberException If $m is negative.
+ * @throws MathException If this BigInteger has no multiplicative inverse mod m (that is, this BigInteger
+ * is not relatively prime to m).
+ */
+ public function modInverse(BigInteger $m) : BigInteger
+ {
+ if ($m->value === '0') {
+ throw DivisionByZeroException::modulusMustNotBeZero();
+ }
+
+ if ($m->isNegative()) {
+ throw new NegativeNumberException('Modulus must not be negative.');
+ }
+
+ if ($m->value === '1') {
+ return BigInteger::zero();
+ }
+
+ $value = Calculator::get()->modInverse($this->value, $m->value);
+
+ if ($value === null) {
+ throw new MathException('Unable to compute the modInverse for the given modulus.');
+ }
+
+ return new BigInteger($value);
+ }
+
+ /**
+ * Returns this number raised into power with modulo.
+ *
+ * This operation only works on positive numbers.
+ *
+ * @param BigNumber|int|float|string $exp The exponent. Must be positive or zero.
+ * @param BigNumber|int|float|string $mod The modulus. Must be strictly positive.
+ *
+ * @throws NegativeNumberException If any of the operands is negative.
+ * @throws DivisionByZeroException If the modulus is zero.
+ */
+ public function modPow(BigNumber|int|float|string $exp, BigNumber|int|float|string $mod) : BigInteger
+ {
+ $exp = BigInteger::of($exp);
+ $mod = BigInteger::of($mod);
+
+ if ($this->isNegative() || $exp->isNegative() || $mod->isNegative()) {
+ throw new NegativeNumberException('The operands cannot be negative.');
+ }
+
+ if ($mod->isZero()) {
+ throw DivisionByZeroException::modulusMustNotBeZero();
+ }
+
+ $result = Calculator::get()->modPow($this->value, $exp->value, $mod->value);
+
+ return new BigInteger($result);
+ }
+
+ /**
+ * Returns the greatest common divisor of this number and the given one.
+ *
+ * The GCD is always positive, unless both operands are zero, in which case it is zero.
+ *
+ * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number.
+ */
+ public function gcd(BigNumber|int|float|string $that) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ if ($that->value === '0' && $this->value[0] !== '-') {
+ return $this;
+ }
+
+ if ($this->value === '0' && $that->value[0] !== '-') {
+ return $that;
+ }
+
+ $value = Calculator::get()->gcd($this->value, $that->value);
+
+ return new BigInteger($value);
+ }
+
+ /**
+ * Returns the integer square root number of this number, rounded down.
+ *
+ * The result is the largest x such that xยฒ โค n.
+ *
+ * @throws NegativeNumberException If this number is negative.
+ */
+ public function sqrt() : BigInteger
+ {
+ if ($this->value[0] === '-') {
+ throw new NegativeNumberException('Cannot calculate the square root of a negative number.');
+ }
+
+ $value = Calculator::get()->sqrt($this->value);
+
+ return new BigInteger($value);
+ }
+
+ /**
+ * Returns the absolute value of this number.
+ */
+ public function abs() : BigInteger
+ {
+ return $this->isNegative() ? $this->negated() : $this;
+ }
+
+ /**
+ * Returns the inverse of this number.
+ */
+ public function negated() : BigInteger
+ {
+ return new BigInteger(Calculator::get()->neg($this->value));
+ }
+
+ /**
+ * Returns the integer bitwise-and combined with another integer.
+ *
+ * This method returns a negative BigInteger if and only if both operands are negative.
+ *
+ * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number.
+ */
+ public function and(BigNumber|int|float|string $that) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ return new BigInteger(Calculator::get()->and($this->value, $that->value));
+ }
+
+ /**
+ * Returns the integer bitwise-or combined with another integer.
+ *
+ * This method returns a negative BigInteger if and only if either of the operands is negative.
+ *
+ * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number.
+ */
+ public function or(BigNumber|int|float|string $that) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ return new BigInteger(Calculator::get()->or($this->value, $that->value));
+ }
+
+ /**
+ * Returns the integer bitwise-xor combined with another integer.
+ *
+ * This method returns a negative BigInteger if and only if exactly one of the operands is negative.
+ *
+ * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number.
+ */
+ public function xor(BigNumber|int|float|string $that) : BigInteger
+ {
+ $that = BigInteger::of($that);
+
+ return new BigInteger(Calculator::get()->xor($this->value, $that->value));
+ }
+
+ /**
+ * Returns the bitwise-not of this BigInteger.
+ */
+ public function not() : BigInteger
+ {
+ return $this->negated()->minus(1);
+ }
+
+ /**
+ * Returns the integer left shifted by a given number of bits.
+ */
+ public function shiftedLeft(int $distance) : BigInteger
+ {
+ if ($distance === 0) {
+ return $this;
+ }
+
+ if ($distance < 0) {
+ return $this->shiftedRight(- $distance);
+ }
+
+ return $this->multipliedBy(BigInteger::of(2)->power($distance));
+ }
+
+ /**
+ * Returns the integer right shifted by a given number of bits.
+ */
+ public function shiftedRight(int $distance) : BigInteger
+ {
+ if ($distance === 0) {
+ return $this;
+ }
+
+ if ($distance < 0) {
+ return $this->shiftedLeft(- $distance);
+ }
+
+ $operand = BigInteger::of(2)->power($distance);
+
+ if ($this->isPositiveOrZero()) {
+ return $this->quotient($operand);
+ }
+
+ return $this->dividedBy($operand, RoundingMode::UP);
+ }
+
+ /**
+ * Returns the number of bits in the minimal two's-complement representation of this BigInteger, excluding a sign bit.
+ *
+ * For positive BigIntegers, this is equivalent to the number of bits in the ordinary binary representation.
+ * Computes (ceil(log2(this < 0 ? -this : this+1))).
+ */
+ public function getBitLength() : int
+ {
+ if ($this->value === '0') {
+ return 0;
+ }
+
+ if ($this->isNegative()) {
+ return $this->abs()->minus(1)->getBitLength();
+ }
+
+ return \strlen($this->toBase(2));
+ }
+
+ /**
+ * Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
+ *
+ * Returns -1 if this BigInteger contains no one bits.
+ */
+ public function getLowestSetBit() : int
+ {
+ $n = $this;
+ $bitLength = $this->getBitLength();
+
+ for ($i = 0; $i <= $bitLength; $i++) {
+ if ($n->isOdd()) {
+ return $i;
+ }
+
+ $n = $n->shiftedRight(1);
+ }
+
+ return -1;
+ }
+
+ /**
+ * Returns whether this number is even.
+ */
+ public function isEven() : bool
+ {
+ return \in_array($this->value[-1], ['0', '2', '4', '6', '8'], true);
+ }
+
+ /**
+ * Returns whether this number is odd.
+ */
+ public function isOdd() : bool
+ {
+ return \in_array($this->value[-1], ['1', '3', '5', '7', '9'], true);
+ }
+
+ /**
+ * Returns true if and only if the designated bit is set.
+ *
+ * Computes ((this & (1<shiftedRight($n)->isOdd();
+ }
+
+ public function compareTo(BigNumber|int|float|string $that) : int
+ {
+ $that = BigNumber::of($that);
+
+ if ($that instanceof BigInteger) {
+ return Calculator::get()->cmp($this->value, $that->value);
+ }
+
+ return - $that->compareTo($this);
+ }
+
+ public function getSign() : int
+ {
+ return ($this->value === '0') ? 0 : (($this->value[0] === '-') ? -1 : 1);
+ }
+
+ public function toBigInteger() : BigInteger
+ {
+ return $this;
+ }
+
+ public function toBigDecimal() : BigDecimal
+ {
+ return self::newBigDecimal($this->value);
+ }
+
+ public function toBigRational() : BigRational
+ {
+ return self::newBigRational($this, BigInteger::one(), false);
+ }
+
+ public function toScale(int $scale, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal
+ {
+ return $this->toBigDecimal()->toScale($scale, $roundingMode);
+ }
+
+ public function toInt() : int
+ {
+ $intValue = (int) $this->value;
+
+ if ($this->value !== (string) $intValue) {
+ throw IntegerOverflowException::toIntOverflow($this);
+ }
+
+ return $intValue;
+ }
+
+ public function toFloat() : float
+ {
+ return (float) $this->value;
+ }
+
+ /**
+ * Returns a string representation of this number in the given base.
+ *
+ * The output will always be lowercase for bases greater than 10.
+ *
+ * @throws \InvalidArgumentException If the base is out of range.
+ */
+ public function toBase(int $base) : string
+ {
+ if ($base === 10) {
+ return $this->value;
+ }
+
+ if ($base < 2 || $base > 36) {
+ throw new \InvalidArgumentException(\sprintf('Base %d is out of range [2, 36]', $base));
+ }
+
+ return Calculator::get()->toBase($this->value, $base);
+ }
+
+ /**
+ * Returns a string representation of this number in an arbitrary base with a custom alphabet.
+ *
+ * Because this method accepts an alphabet with any character, including dash, it does not handle negative numbers;
+ * a NegativeNumberException will be thrown when attempting to call this method on a negative number.
+ *
+ * @param string $alphabet The alphabet, for example '01' for base 2, or '01234567' for base 8.
+ *
+ * @throws NegativeNumberException If this number is negative.
+ * @throws \InvalidArgumentException If the given alphabet does not contain at least 2 chars.
+ */
+ public function toArbitraryBase(string $alphabet) : string
+ {
+ $base = \strlen($alphabet);
+
+ if ($base < 2) {
+ throw new \InvalidArgumentException('The alphabet must contain at least 2 chars.');
+ }
+
+ if ($this->value[0] === '-') {
+ throw new NegativeNumberException(__FUNCTION__ . '() does not support negative numbers.');
+ }
+
+ return Calculator::get()->toArbitraryBase($this->value, $alphabet, $base);
+ }
+
+ /**
+ * Returns a string of bytes containing the binary representation of this BigInteger.
+ *
+ * The string is in big-endian byte-order: the most significant byte is in the zeroth element.
+ *
+ * If `$signed` is true, the output will be in two's-complement representation, and a sign bit will be prepended to
+ * the output. If `$signed` is false, no sign bit will be prepended, and this method will throw an exception if the
+ * number is negative.
+ *
+ * The string will contain the minimum number of bytes required to represent this BigInteger, including a sign bit
+ * if `$signed` is true.
+ *
+ * This representation is compatible with the `fromBytes()` factory method, as long as the `$signed` flags match.
+ *
+ * @param bool $signed Whether to output a signed number in two's-complement representation with a leading sign bit.
+ *
+ * @throws NegativeNumberException If $signed is false, and the number is negative.
+ */
+ public function toBytes(bool $signed = true) : string
+ {
+ if (! $signed && $this->isNegative()) {
+ throw new NegativeNumberException('Cannot convert a negative number to a byte string when $signed is false.');
+ }
+
+ $hex = $this->abs()->toBase(16);
+
+ if (\strlen($hex) % 2 !== 0) {
+ $hex = '0' . $hex;
+ }
+
+ $baseHexLength = \strlen($hex);
+
+ if ($signed) {
+ if ($this->isNegative()) {
+ $bin = \hex2bin($hex);
+ assert($bin !== false);
+
+ $hex = \bin2hex(~$bin);
+ $hex = self::fromBase($hex, 16)->plus(1)->toBase(16);
+
+ $hexLength = \strlen($hex);
+
+ if ($hexLength < $baseHexLength) {
+ $hex = \str_repeat('0', $baseHexLength - $hexLength) . $hex;
+ }
+
+ if ($hex[0] < '8') {
+ $hex = 'FF' . $hex;
+ }
+ } else {
+ if ($hex[0] >= '8') {
+ $hex = '00' . $hex;
+ }
+ }
+ }
+
+ return \hex2bin($hex);
+ }
+
+ public function __toString() : string
+ {
+ return $this->value;
+ }
+
+ /**
+ * This method is required for serializing the object and SHOULD NOT be accessed directly.
+ *
+ * @internal
+ *
+ * @return array{value: string}
+ */
+ public function __serialize(): array
+ {
+ return ['value' => $this->value];
+ }
+
+ /**
+ * This method is only here to allow unserializing the object and cannot be accessed directly.
+ *
+ * @internal
+ * @psalm-suppress RedundantPropertyInitializationCheck
+ *
+ * @param array{value: string} $data
+ *
+ * @throws \LogicException
+ */
+ public function __unserialize(array $data): void
+ {
+ if (isset($this->value)) {
+ throw new \LogicException('__unserialize() is an internal function, it must not be called directly.');
+ }
+
+ $this->value = $data['value'];
+ }
+}
diff --git a/tests/php_test_files/vendor/brick/math/src/BigNumber.php b/tests/php_test_files/vendor/brick/math/src/BigNumber.php
new file mode 100644
index 0000000..5a0df78
--- /dev/null
+++ b/tests/php_test_files/vendor/brick/math/src/BigNumber.php
@@ -0,0 +1,509 @@
+[\-\+])?' .
+ '(?[0-9]+)?' .
+ '(?\.)?' .
+ '(?[0-9]+)?' .
+ '(?:[eE](?[\-\+]?[0-9]+))?' .
+ '$/';
+
+ /**
+ * The regular expression used to parse rational numbers.
+ */
+ private const PARSE_REGEXP_RATIONAL =
+ '/^' .
+ '(?[\-\+])?' .
+ '(?[0-9]+)' .
+ '\/?' .
+ '(?[0-9]+)' .
+ '$/';
+
+ /**
+ * Creates a BigNumber of the given value.
+ *
+ * The concrete return type is dependent on the given value, with the following rules:
+ *
+ * - BigNumber instances are returned as is
+ * - integer numbers are returned as BigInteger
+ * - floating point numbers are converted to a string then parsed as such
+ * - strings containing a `/` character are returned as BigRational
+ * - strings containing a `.` character or using an exponential notation are returned as BigDecimal
+ * - strings containing only digits with an optional leading `+` or `-` sign are returned as BigInteger
+ *
+ * @throws NumberFormatException If the format of the number is not valid.
+ * @throws DivisionByZeroException If the value represents a rational number with a denominator of zero.
+ *
+ * @psalm-pure
+ */
+ final public static function of(BigNumber|int|float|string $value) : static
+ {
+ $value = self::_of($value);
+
+ if (static::class === BigNumber::class) {
+ // https://github.com/vimeo/psalm/issues/10309
+ assert($value instanceof static);
+
+ return $value;
+ }
+
+ return static::from($value);
+ }
+
+ /**
+ * @psalm-pure
+ */
+ private static function _of(BigNumber|int|float|string $value) : BigNumber
+ {
+ if ($value instanceof BigNumber) {
+ return $value;
+ }
+
+ if (\is_int($value)) {
+ return new BigInteger((string) $value);
+ }
+
+ if (is_float($value)) {
+ $value = (string) $value;
+ }
+
+ if (str_contains($value, '/')) {
+ // Rational number
+ if (\preg_match(self::PARSE_REGEXP_RATIONAL, $value, $matches, PREG_UNMATCHED_AS_NULL) !== 1) {
+ throw NumberFormatException::invalidFormat($value);
+ }
+
+ $sign = $matches['sign'];
+ $numerator = $matches['numerator'];
+ $denominator = $matches['denominator'];
+
+ assert($numerator !== null);
+ assert($denominator !== null);
+
+ $numerator = self::cleanUp($sign, $numerator);
+ $denominator = self::cleanUp(null, $denominator);
+
+ if ($denominator === '0') {
+ throw DivisionByZeroException::denominatorMustNotBeZero();
+ }
+
+ return new BigRational(
+ new BigInteger($numerator),
+ new BigInteger($denominator),
+ false
+ );
+ } else {
+ // Integer or decimal number
+ if (\preg_match(self::PARSE_REGEXP_NUMERICAL, $value, $matches, PREG_UNMATCHED_AS_NULL) !== 1) {
+ throw NumberFormatException::invalidFormat($value);
+ }
+
+ $sign = $matches['sign'];
+ $point = $matches['point'];
+ $integral = $matches['integral'];
+ $fractional = $matches['fractional'];
+ $exponent = $matches['exponent'];
+
+ if ($integral === null && $fractional === null) {
+ throw NumberFormatException::invalidFormat($value);
+ }
+
+ if ($integral === null) {
+ $integral = '0';
+ }
+
+ if ($point !== null || $exponent !== null) {
+ $fractional = ($fractional ?? '');
+ $exponent = ($exponent !== null) ? (int)$exponent : 0;
+
+ if ($exponent === PHP_INT_MIN || $exponent === PHP_INT_MAX) {
+ throw new NumberFormatException('Exponent too large.');
+ }
+
+ $unscaledValue = self::cleanUp($sign, $integral . $fractional);
+
+ $scale = \strlen($fractional) - $exponent;
+
+ if ($scale < 0) {
+ if ($unscaledValue !== '0') {
+ $unscaledValue .= \str_repeat('0', -$scale);
+ }
+ $scale = 0;
+ }
+
+ return new BigDecimal($unscaledValue, $scale);
+ }
+
+ $integral = self::cleanUp($sign, $integral);
+
+ return new BigInteger($integral);
+ }
+ }
+
+ /**
+ * Overridden by subclasses to convert a BigNumber to an instance of the subclass.
+ *
+ * @throws MathException If the value cannot be converted.
+ *
+ * @psalm-pure
+ */
+ abstract protected static function from(BigNumber $number): static;
+
+ /**
+ * Proxy method to access BigInteger's protected constructor from sibling classes.
+ *
+ * @internal
+ * @psalm-pure
+ */
+ final protected function newBigInteger(string $value) : BigInteger
+ {
+ return new BigInteger($value);
+ }
+
+ /**
+ * Proxy method to access BigDecimal's protected constructor from sibling classes.
+ *
+ * @internal
+ * @psalm-pure
+ */
+ final protected function newBigDecimal(string $value, int $scale = 0) : BigDecimal
+ {
+ return new BigDecimal($value, $scale);
+ }
+
+ /**
+ * Proxy method to access BigRational's protected constructor from sibling classes.
+ *
+ * @internal
+ * @psalm-pure
+ */
+ final protected function newBigRational(BigInteger $numerator, BigInteger $denominator, bool $checkDenominator) : BigRational
+ {
+ return new BigRational($numerator, $denominator, $checkDenominator);
+ }
+
+ /**
+ * Returns the minimum of the given values.
+ *
+ * @param BigNumber|int|float|string ...$values The numbers to compare. All the numbers need to be convertible
+ * to an instance of the class this method is called on.
+ *
+ * @throws \InvalidArgumentException If no values are given.
+ * @throws MathException If an argument is not valid.
+ *
+ * @psalm-pure
+ */
+ final public static function min(BigNumber|int|float|string ...$values) : static
+ {
+ $min = null;
+
+ foreach ($values as $value) {
+ $value = static::of($value);
+
+ if ($min === null || $value->isLessThan($min)) {
+ $min = $value;
+ }
+ }
+
+ if ($min === null) {
+ throw new \InvalidArgumentException(__METHOD__ . '() expects at least one value.');
+ }
+
+ return $min;
+ }
+
+ /**
+ * Returns the maximum of the given values.
+ *
+ * @param BigNumber|int|float|string ...$values The numbers to compare. All the numbers need to be convertible
+ * to an instance of the class this method is called on.
+ *
+ * @throws \InvalidArgumentException If no values are given.
+ * @throws MathException If an argument is not valid.
+ *
+ * @psalm-pure
+ */
+ final public static function max(BigNumber|int|float|string ...$values) : static
+ {
+ $max = null;
+
+ foreach ($values as $value) {
+ $value = static::of($value);
+
+ if ($max === null || $value->isGreaterThan($max)) {
+ $max = $value;
+ }
+ }
+
+ if ($max === null) {
+ throw new \InvalidArgumentException(__METHOD__ . '() expects at least one value.');
+ }
+
+ return $max;
+ }
+
+ /**
+ * Returns the sum of the given values.
+ *
+ * @param BigNumber|int|float|string ...$values The numbers to add. All the numbers need to be convertible
+ * to an instance of the class this method is called on.
+ *
+ * @throws \InvalidArgumentException If no values are given.
+ * @throws MathException If an argument is not valid.
+ *
+ * @psalm-pure
+ */
+ final public static function sum(BigNumber|int|float|string ...$values) : static
+ {
+ /** @var static|null $sum */
+ $sum = null;
+
+ foreach ($values as $value) {
+ $value = static::of($value);
+
+ $sum = $sum === null ? $value : self::add($sum, $value);
+ }
+
+ if ($sum === null) {
+ throw new \InvalidArgumentException(__METHOD__ . '() expects at least one value.');
+ }
+
+ return $sum;
+ }
+
+ /**
+ * Adds two BigNumber instances in the correct order to avoid a RoundingNecessaryException.
+ *
+ * @todo This could be better resolved by creating an abstract protected method in BigNumber, and leaving to
+ * concrete classes the responsibility to perform the addition themselves or delegate it to the given number,
+ * depending on their ability to perform the operation. This will also require a version bump because we're
+ * potentially breaking custom BigNumber implementations (if any...)
+ *
+ * @psalm-pure
+ */
+ private static function add(BigNumber $a, BigNumber $b) : BigNumber
+ {
+ if ($a instanceof BigRational) {
+ return $a->plus($b);
+ }
+
+ if ($b instanceof BigRational) {
+ return $b->plus($a);
+ }
+
+ if ($a instanceof BigDecimal) {
+ return $a->plus($b);
+ }
+
+ if ($b instanceof BigDecimal) {
+ return $b->plus($a);
+ }
+
+ /** @var BigInteger $a */
+
+ return $a->plus($b);
+ }
+
+ /**
+ * Removes optional leading zeros and applies sign.
+ *
+ * @param string|null $sign The sign, '+' or '-', optional. Null is allowed for convenience and treated as '+'.
+ * @param string $number The number, validated as a non-empty string of digits.
+ *
+ * @psalm-pure
+ */
+ private static function cleanUp(string|null $sign, string $number) : string
+ {
+ $number = \ltrim($number, '0');
+
+ if ($number === '') {
+ return '0';
+ }
+
+ return $sign === '-' ? '-' . $number : $number;
+ }
+
+ /**
+ * Checks if this number is equal to the given one.
+ */
+ final public function isEqualTo(BigNumber|int|float|string $that) : bool
+ {
+ return $this->compareTo($that) === 0;
+ }
+
+ /**
+ * Checks if this number is strictly lower than the given one.
+ */
+ final public function isLessThan(BigNumber|int|float|string $that) : bool
+ {
+ return $this->compareTo($that) < 0;
+ }
+
+ /**
+ * Checks if this number is lower than or equal to the given one.
+ */
+ final public function isLessThanOrEqualTo(BigNumber|int|float|string $that) : bool
+ {
+ return $this->compareTo($that) <= 0;
+ }
+
+ /**
+ * Checks if this number is strictly greater than the given one.
+ */
+ final public function isGreaterThan(BigNumber|int|float|string $that) : bool
+ {
+ return $this->compareTo($that) > 0;
+ }
+
+ /**
+ * Checks if this number is greater than or equal to the given one.
+ */
+ final public function isGreaterThanOrEqualTo(BigNumber|int|float|string $that) : bool
+ {
+ return $this->compareTo($that) >= 0;
+ }
+
+ /**
+ * Checks if this number equals zero.
+ */
+ final public function isZero() : bool
+ {
+ return $this->getSign() === 0;
+ }
+
+ /**
+ * Checks if this number is strictly negative.
+ */
+ final public function isNegative() : bool
+ {
+ return $this->getSign() < 0;
+ }
+
+ /**
+ * Checks if this number is negative or zero.
+ */
+ final public function isNegativeOrZero() : bool
+ {
+ return $this->getSign() <= 0;
+ }
+
+ /**
+ * Checks if this number is strictly positive.
+ */
+ final public function isPositive() : bool
+ {
+ return $this->getSign() > 0;
+ }
+
+ /**
+ * Checks if this number is positive or zero.
+ */
+ final public function isPositiveOrZero() : bool
+ {
+ return $this->getSign() >= 0;
+ }
+
+ /**
+ * Returns the sign of this number.
+ *
+ * @psalm-return -1|0|1
+ *
+ * @return int -1 if the number is negative, 0 if zero, 1 if positive.
+ */
+ abstract public function getSign() : int;
+
+ /**
+ * Compares this number to the given one.
+ *
+ * @psalm-return -1|0|1
+ *
+ * @return int -1 if `$this` is lower than, 0 if equal to, 1 if greater than `$that`.
+ *
+ * @throws MathException If the number is not valid.
+ */
+ abstract public function compareTo(BigNumber|int|float|string $that) : int;
+
+ /**
+ * Converts this number to a BigInteger.
+ *
+ * @throws RoundingNecessaryException If this number cannot be converted to a BigInteger without rounding.
+ */
+ abstract public function toBigInteger() : BigInteger;
+
+ /**
+ * Converts this number to a BigDecimal.
+ *
+ * @throws RoundingNecessaryException If this number cannot be converted to a BigDecimal without rounding.
+ */
+ abstract public function toBigDecimal() : BigDecimal;
+
+ /**
+ * Converts this number to a BigRational.
+ */
+ abstract public function toBigRational() : BigRational;
+
+ /**
+ * Converts this number to a BigDecimal with the given scale, using rounding if necessary.
+ *
+ * @param int $scale The scale of the resulting `BigDecimal`.
+ * @param RoundingMode $roundingMode An optional rounding mode, defaults to UNNECESSARY.
+ *
+ * @throws RoundingNecessaryException If this number cannot be converted to the given scale without rounding.
+ * This only applies when RoundingMode::UNNECESSARY is used.
+ */
+ abstract public function toScale(int $scale, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal;
+
+ /**
+ * Returns the exact value of this number as a native integer.
+ *
+ * If this number cannot be converted to a native integer without losing precision, an exception is thrown.
+ * Note that the acceptable range for an integer depends on the platform and differs for 32-bit and 64-bit.
+ *
+ * @throws MathException If this number cannot be exactly converted to a native integer.
+ */
+ abstract public function toInt() : int;
+
+ /**
+ * Returns an approximation of this number as a floating-point value.
+ *
+ * Note that this method can discard information as the precision of a floating-point value
+ * is inherently limited.
+ *
+ * If the number is greater than the largest representable floating point number, positive infinity is returned.
+ * If the number is less than the smallest representable floating point number, negative infinity is returned.
+ */
+ abstract public function toFloat() : float;
+
+ /**
+ * Returns a string representation of this number.
+ *
+ * The output of this method can be parsed by the `of()` factory method;
+ * this will yield an object equal to this one, without any information loss.
+ */
+ abstract public function __toString() : string;
+
+ final public function jsonSerialize() : string
+ {
+ return $this->__toString();
+ }
+}
diff --git a/tests/php_test_files/vendor/brick/math/src/BigRational.php b/tests/php_test_files/vendor/brick/math/src/BigRational.php
new file mode 100644
index 0000000..fc3060e
--- /dev/null
+++ b/tests/php_test_files/vendor/brick/math/src/BigRational.php
@@ -0,0 +1,413 @@
+isZero()) {
+ throw DivisionByZeroException::denominatorMustNotBeZero();
+ }
+
+ if ($denominator->isNegative()) {
+ $numerator = $numerator->negated();
+ $denominator = $denominator->negated();
+ }
+ }
+
+ $this->numerator = $numerator;
+ $this->denominator = $denominator;
+ }
+
+ /**
+ * @psalm-pure
+ */
+ protected static function from(BigNumber $number): static
+ {
+ return $number->toBigRational();
+ }
+
+ /**
+ * Creates a BigRational out of a numerator and a denominator.
+ *
+ * If the denominator is negative, the signs of both the numerator and the denominator
+ * will be inverted to ensure that the denominator is always positive.
+ *
+ * @param BigNumber|int|float|string $numerator The numerator. Must be convertible to a BigInteger.
+ * @param BigNumber|int|float|string $denominator The denominator. Must be convertible to a BigInteger.
+ *
+ * @throws NumberFormatException If an argument does not represent a valid number.
+ * @throws RoundingNecessaryException If an argument represents a non-integer number.
+ * @throws DivisionByZeroException If the denominator is zero.
+ *
+ * @psalm-pure
+ */
+ public static function nd(
+ BigNumber|int|float|string $numerator,
+ BigNumber|int|float|string $denominator,
+ ) : BigRational {
+ $numerator = BigInteger::of($numerator);
+ $denominator = BigInteger::of($denominator);
+
+ return new BigRational($numerator, $denominator, true);
+ }
+
+ /**
+ * Returns a BigRational representing zero.
+ *
+ * @psalm-pure
+ */
+ public static function zero() : BigRational
+ {
+ /**
+ * @psalm-suppress ImpureStaticVariable
+ * @var BigRational|null $zero
+ */
+ static $zero;
+
+ if ($zero === null) {
+ $zero = new BigRational(BigInteger::zero(), BigInteger::one(), false);
+ }
+
+ return $zero;
+ }
+
+ /**
+ * Returns a BigRational representing one.
+ *
+ * @psalm-pure
+ */
+ public static function one() : BigRational
+ {
+ /**
+ * @psalm-suppress ImpureStaticVariable
+ * @var BigRational|null $one
+ */
+ static $one;
+
+ if ($one === null) {
+ $one = new BigRational(BigInteger::one(), BigInteger::one(), false);
+ }
+
+ return $one;
+ }
+
+ /**
+ * Returns a BigRational representing ten.
+ *
+ * @psalm-pure
+ */
+ public static function ten() : BigRational
+ {
+ /**
+ * @psalm-suppress ImpureStaticVariable
+ * @var BigRational|null $ten
+ */
+ static $ten;
+
+ if ($ten === null) {
+ $ten = new BigRational(BigInteger::ten(), BigInteger::one(), false);
+ }
+
+ return $ten;
+ }
+
+ public function getNumerator() : BigInteger
+ {
+ return $this->numerator;
+ }
+
+ public function getDenominator() : BigInteger
+ {
+ return $this->denominator;
+ }
+
+ /**
+ * Returns the quotient of the division of the numerator by the denominator.
+ */
+ public function quotient() : BigInteger
+ {
+ return $this->numerator->quotient($this->denominator);
+ }
+
+ /**
+ * Returns the remainder of the division of the numerator by the denominator.
+ */
+ public function remainder() : BigInteger
+ {
+ return $this->numerator->remainder($this->denominator);
+ }
+
+ /**
+ * Returns the quotient and remainder of the division of the numerator by the denominator.
+ *
+ * @return BigInteger[]
+ *
+ * @psalm-return array{BigInteger, BigInteger}
+ */
+ public function quotientAndRemainder() : array
+ {
+ return $this->numerator->quotientAndRemainder($this->denominator);
+ }
+
+ /**
+ * Returns the sum of this number and the given one.
+ *
+ * @param BigNumber|int|float|string $that The number to add.
+ *
+ * @throws MathException If the number is not valid.
+ */
+ public function plus(BigNumber|int|float|string $that) : BigRational
+ {
+ $that = BigRational::of($that);
+
+ $numerator = $this->numerator->multipliedBy($that->denominator);
+ $numerator = $numerator->plus($that->numerator->multipliedBy($this->denominator));
+ $denominator = $this->denominator->multipliedBy($that->denominator);
+
+ return new BigRational($numerator, $denominator, false);
+ }
+
+ /**
+ * Returns the difference of this number and the given one.
+ *
+ * @param BigNumber|int|float|string $that The number to subtract.
+ *
+ * @throws MathException If the number is not valid.
+ */
+ public function minus(BigNumber|int|float|string $that) : BigRational
+ {
+ $that = BigRational::of($that);
+
+ $numerator = $this->numerator->multipliedBy($that->denominator);
+ $numerator = $numerator->minus($that->numerator->multipliedBy($this->denominator));
+ $denominator = $this->denominator->multipliedBy($that->denominator);
+
+ return new BigRational($numerator, $denominator, false);
+ }
+
+ /**
+ * Returns the product of this number and the given one.
+ *
+ * @param BigNumber|int|float|string $that The multiplier.
+ *
+ * @throws MathException If the multiplier is not a valid number.
+ */
+ public function multipliedBy(BigNumber|int|float|string $that) : BigRational
+ {
+ $that = BigRational::of($that);
+
+ $numerator = $this->numerator->multipliedBy($that->numerator);
+ $denominator = $this->denominator->multipliedBy($that->denominator);
+
+ return new BigRational($numerator, $denominator, false);
+ }
+
+ /**
+ * Returns the result of the division of this number by the given one.
+ *
+ * @param BigNumber|int|float|string $that The divisor.
+ *
+ * @throws MathException If the divisor is not a valid number, or is zero.
+ */
+ public function dividedBy(BigNumber|int|float|string $that) : BigRational
+ {
+ $that = BigRational::of($that);
+
+ $numerator = $this->numerator->multipliedBy($that->denominator);
+ $denominator = $this->denominator->multipliedBy($that->numerator);
+
+ return new BigRational($numerator, $denominator, true);
+ }
+
+ /**
+ * Returns this number exponentiated to the given value.
+ *
+ * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000.
+ */
+ public function power(int $exponent) : BigRational
+ {
+ if ($exponent === 0) {
+ $one = BigInteger::one();
+
+ return new BigRational($one, $one, false);
+ }
+
+ if ($exponent === 1) {
+ return $this;
+ }
+
+ return new BigRational(
+ $this->numerator->power($exponent),
+ $this->denominator->power($exponent),
+ false
+ );
+ }
+
+ /**
+ * Returns the reciprocal of this BigRational.
+ *
+ * The reciprocal has the numerator and denominator swapped.
+ *
+ * @throws DivisionByZeroException If the numerator is zero.
+ */
+ public function reciprocal() : BigRational
+ {
+ return new BigRational($this->denominator, $this->numerator, true);
+ }
+
+ /**
+ * Returns the absolute value of this BigRational.
+ */
+ public function abs() : BigRational
+ {
+ return new BigRational($this->numerator->abs(), $this->denominator, false);
+ }
+
+ /**
+ * Returns the negated value of this BigRational.
+ */
+ public function negated() : BigRational
+ {
+ return new BigRational($this->numerator->negated(), $this->denominator, false);
+ }
+
+ /**
+ * Returns the simplified value of this BigRational.
+ */
+ public function simplified() : BigRational
+ {
+ $gcd = $this->numerator->gcd($this->denominator);
+
+ $numerator = $this->numerator->quotient($gcd);
+ $denominator = $this->denominator->quotient($gcd);
+
+ return new BigRational($numerator, $denominator, false);
+ }
+
+ public function compareTo(BigNumber|int|float|string $that) : int
+ {
+ return $this->minus($that)->getSign();
+ }
+
+ public function getSign() : int
+ {
+ return $this->numerator->getSign();
+ }
+
+ public function toBigInteger() : BigInteger
+ {
+ $simplified = $this->simplified();
+
+ if (! $simplified->denominator->isEqualTo(1)) {
+ throw new RoundingNecessaryException('This rational number cannot be represented as an integer value without rounding.');
+ }
+
+ return $simplified->numerator;
+ }
+
+ public function toBigDecimal() : BigDecimal
+ {
+ return $this->numerator->toBigDecimal()->exactlyDividedBy($this->denominator);
+ }
+
+ public function toBigRational() : BigRational
+ {
+ return $this;
+ }
+
+ public function toScale(int $scale, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal
+ {
+ return $this->numerator->toBigDecimal()->dividedBy($this->denominator, $scale, $roundingMode);
+ }
+
+ public function toInt() : int
+ {
+ return $this->toBigInteger()->toInt();
+ }
+
+ public function toFloat() : float
+ {
+ $simplified = $this->simplified();
+ return $simplified->numerator->toFloat() / $simplified->denominator->toFloat();
+ }
+
+ public function __toString() : string
+ {
+ $numerator = (string) $this->numerator;
+ $denominator = (string) $this->denominator;
+
+ if ($denominator === '1') {
+ return $numerator;
+ }
+
+ return $this->numerator . '/' . $this->denominator;
+ }
+
+ /**
+ * This method is required for serializing the object and SHOULD NOT be accessed directly.
+ *
+ * @internal
+ *
+ * @return array{numerator: BigInteger, denominator: BigInteger}
+ */
+ public function __serialize(): array
+ {
+ return ['numerator' => $this->numerator, 'denominator' => $this->denominator];
+ }
+
+ /**
+ * This method is only here to allow unserializing the object and cannot be accessed directly.
+ *
+ * @internal
+ * @psalm-suppress RedundantPropertyInitializationCheck
+ *
+ * @param array{numerator: BigInteger, denominator: BigInteger} $data
+ *
+ * @throws \LogicException
+ */
+ public function __unserialize(array $data): void
+ {
+ if (isset($this->numerator)) {
+ throw new \LogicException('__unserialize() is an internal function, it must not be called directly.');
+ }
+
+ $this->numerator = $data['numerator'];
+ $this->denominator = $data['denominator'];
+ }
+}
diff --git a/tests/php_test_files/vendor/brick/math/src/Exception/DivisionByZeroException.php b/tests/php_test_files/vendor/brick/math/src/Exception/DivisionByZeroException.php
new file mode 100644
index 0000000..ce7769a
--- /dev/null
+++ b/tests/php_test_files/vendor/brick/math/src/Exception/DivisionByZeroException.php
@@ -0,0 +1,35 @@
+ 126) {
+ $char = \strtoupper(\dechex($ord));
+
+ if ($ord < 10) {
+ $char = '0' . $char;
+ }
+ } else {
+ $char = '"' . $char . '"';
+ }
+
+ return new self(\sprintf('Char %s is not a valid character in the given alphabet.', $char));
+ }
+}
diff --git a/tests/php_test_files/vendor/brick/math/src/Exception/RoundingNecessaryException.php b/tests/php_test_files/vendor/brick/math/src/Exception/RoundingNecessaryException.php
new file mode 100644
index 0000000..57bfcd8
--- /dev/null
+++ b/tests/php_test_files/vendor/brick/math/src/Exception/RoundingNecessaryException.php
@@ -0,0 +1,19 @@
+init($a, $b);
+
+ if ($aNeg && ! $bNeg) {
+ return -1;
+ }
+
+ if ($bNeg && ! $aNeg) {
+ return 1;
+ }
+
+ $aLen = \strlen($aDig);
+ $bLen = \strlen($bDig);
+
+ if ($aLen < $bLen) {
+ $result = -1;
+ } elseif ($aLen > $bLen) {
+ $result = 1;
+ } else {
+ $result = $aDig <=> $bDig;
+ }
+
+ return $aNeg ? -$result : $result;
+ }
+
+ /**
+ * Adds two numbers.
+ */
+ abstract public function add(string $a, string $b) : string;
+
+ /**
+ * Subtracts two numbers.
+ */
+ abstract public function sub(string $a, string $b) : string;
+
+ /**
+ * Multiplies two numbers.
+ */
+ abstract public function mul(string $a, string $b) : string;
+
+ /**
+ * Returns the quotient of the division of two numbers.
+ *
+ * @param string $a The dividend.
+ * @param string $b The divisor, must not be zero.
+ *
+ * @return string The quotient.
+ */
+ abstract public function divQ(string $a, string $b) : string;
+
+ /**
+ * Returns the remainder of the division of two numbers.
+ *
+ * @param string $a The dividend.
+ * @param string $b The divisor, must not be zero.
+ *
+ * @return string The remainder.
+ */
+ abstract public function divR(string $a, string $b) : string;
+
+ /**
+ * Returns the quotient and remainder of the division of two numbers.
+ *
+ * @param string $a The dividend.
+ * @param string $b The divisor, must not be zero.
+ *
+ * @return array{string, string} An array containing the quotient and remainder.
+ */
+ abstract public function divQR(string $a, string $b) : array;
+
+ /**
+ * Exponentiates a number.
+ *
+ * @param string $a The base number.
+ * @param int $e The exponent, validated as an integer between 0 and MAX_POWER.
+ *
+ * @return string The power.
+ */
+ abstract public function pow(string $a, int $e) : string;
+
+ /**
+ * @param string $b The modulus; must not be zero.
+ */
+ public function mod(string $a, string $b) : string
+ {
+ return $this->divR($this->add($this->divR($a, $b), $b), $b);
+ }
+
+ /**
+ * Returns the modular multiplicative inverse of $x modulo $m.
+ *
+ * If $x has no multiplicative inverse mod m, this method must return null.
+ *
+ * This method can be overridden by the concrete implementation if the underlying library has built-in support.
+ *
+ * @param string $m The modulus; must not be negative or zero.
+ */
+ public function modInverse(string $x, string $m) : ?string
+ {
+ if ($m === '1') {
+ return '0';
+ }
+
+ $modVal = $x;
+
+ if ($x[0] === '-' || ($this->cmp($this->abs($x), $m) >= 0)) {
+ $modVal = $this->mod($x, $m);
+ }
+
+ [$g, $x] = $this->gcdExtended($modVal, $m);
+
+ if ($g !== '1') {
+ return null;
+ }
+
+ return $this->mod($this->add($this->mod($x, $m), $m), $m);
+ }
+
+ /**
+ * Raises a number into power with modulo.
+ *
+ * @param string $base The base number; must be positive or zero.
+ * @param string $exp The exponent; must be positive or zero.
+ * @param string $mod The modulus; must be strictly positive.
+ */
+ abstract public function modPow(string $base, string $exp, string $mod) : string;
+
+ /**
+ * Returns the greatest common divisor of the two numbers.
+ *
+ * This method can be overridden by the concrete implementation if the underlying library
+ * has built-in support for GCD calculations.
+ *
+ * @return string The GCD, always positive, or zero if both arguments are zero.
+ */
+ public function gcd(string $a, string $b) : string
+ {
+ if ($a === '0') {
+ return $this->abs($b);
+ }
+
+ if ($b === '0') {
+ return $this->abs($a);
+ }
+
+ return $this->gcd($b, $this->divR($a, $b));
+ }
+
+ /**
+ * @return array{string, string, string} GCD, X, Y
+ */
+ private function gcdExtended(string $a, string $b) : array
+ {
+ if ($a === '0') {
+ return [$b, '0', '1'];
+ }
+
+ [$gcd, $x1, $y1] = $this->gcdExtended($this->mod($b, $a), $a);
+
+ $x = $this->sub($y1, $this->mul($this->divQ($b, $a), $x1));
+ $y = $x1;
+
+ return [$gcd, $x, $y];
+ }
+
+ /**
+ * Returns the square root of the given number, rounded down.
+ *
+ * The result is the largest x such that xยฒ โค n.
+ * The input MUST NOT be negative.
+ */
+ abstract public function sqrt(string $n) : string;
+
+ /**
+ * Converts a number from an arbitrary base.
+ *
+ * This method can be overridden by the concrete implementation if the underlying library
+ * has built-in support for base conversion.
+ *
+ * @param string $number The number, positive or zero, non-empty, case-insensitively validated for the given base.
+ * @param int $base The base of the number, validated from 2 to 36.
+ *
+ * @return string The converted number, following the Calculator conventions.
+ */
+ public function fromBase(string $number, int $base) : string
+ {
+ return $this->fromArbitraryBase(\strtolower($number), self::ALPHABET, $base);
+ }
+
+ /**
+ * Converts a number to an arbitrary base.
+ *
+ * This method can be overridden by the concrete implementation if the underlying library
+ * has built-in support for base conversion.
+ *
+ * @param string $number The number to convert, following the Calculator conventions.
+ * @param int $base The base to convert to, validated from 2 to 36.
+ *
+ * @return string The converted number, lowercase.
+ */
+ public function toBase(string $number, int $base) : string
+ {
+ $negative = ($number[0] === '-');
+
+ if ($negative) {
+ $number = \substr($number, 1);
+ }
+
+ $number = $this->toArbitraryBase($number, self::ALPHABET, $base);
+
+ if ($negative) {
+ return '-' . $number;
+ }
+
+ return $number;
+ }
+
+ /**
+ * Converts a non-negative number in an arbitrary base using a custom alphabet, to base 10.
+ *
+ * @param string $number The number to convert, validated as a non-empty string,
+ * containing only chars in the given alphabet/base.
+ * @param string $alphabet The alphabet that contains every digit, validated as 2 chars minimum.
+ * @param int $base The base of the number, validated from 2 to alphabet length.
+ *
+ * @return string The number in base 10, following the Calculator conventions.
+ */
+ final public function fromArbitraryBase(string $number, string $alphabet, int $base) : string
+ {
+ // remove leading "zeros"
+ $number = \ltrim($number, $alphabet[0]);
+
+ if ($number === '') {
+ return '0';
+ }
+
+ // optimize for "one"
+ if ($number === $alphabet[1]) {
+ return '1';
+ }
+
+ $result = '0';
+ $power = '1';
+
+ $base = (string) $base;
+
+ for ($i = \strlen($number) - 1; $i >= 0; $i--) {
+ $index = \strpos($alphabet, $number[$i]);
+
+ if ($index !== 0) {
+ $result = $this->add($result, ($index === 1)
+ ? $power
+ : $this->mul($power, (string) $index)
+ );
+ }
+
+ if ($i !== 0) {
+ $power = $this->mul($power, $base);
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Converts a non-negative number to an arbitrary base using a custom alphabet.
+ *
+ * @param string $number The number to convert, positive or zero, following the Calculator conventions.
+ * @param string $alphabet The alphabet that contains every digit, validated as 2 chars minimum.
+ * @param int $base The base to convert to, validated from 2 to alphabet length.
+ *
+ * @return string The converted number in the given alphabet.
+ */
+ final public function toArbitraryBase(string $number, string $alphabet, int $base) : string
+ {
+ if ($number === '0') {
+ return $alphabet[0];
+ }
+
+ $base = (string) $base;
+ $result = '';
+
+ while ($number !== '0') {
+ [$number, $remainder] = $this->divQR($number, $base);
+ $remainder = (int) $remainder;
+
+ $result .= $alphabet[$remainder];
+ }
+
+ return \strrev($result);
+ }
+
+ /**
+ * Performs a rounded division.
+ *
+ * Rounding is performed when the remainder of the division is not zero.
+ *
+ * @param string $a The dividend.
+ * @param string $b The divisor, must not be zero.
+ * @param RoundingMode $roundingMode The rounding mode.
+ *
+ * @throws \InvalidArgumentException If the rounding mode is invalid.
+ * @throws RoundingNecessaryException If RoundingMode::UNNECESSARY is provided but rounding is necessary.
+ *
+ * @psalm-suppress ImpureFunctionCall
+ */
+ final public function divRound(string $a, string $b, RoundingMode $roundingMode) : string
+ {
+ [$quotient, $remainder] = $this->divQR($a, $b);
+
+ $hasDiscardedFraction = ($remainder !== '0');
+ $isPositiveOrZero = ($a[0] === '-') === ($b[0] === '-');
+
+ $discardedFractionSign = function() use ($remainder, $b) : int {
+ $r = $this->abs($this->mul($remainder, '2'));
+ $b = $this->abs($b);
+
+ return $this->cmp($r, $b);
+ };
+
+ $increment = false;
+
+ switch ($roundingMode) {
+ case RoundingMode::UNNECESSARY:
+ if ($hasDiscardedFraction) {
+ throw RoundingNecessaryException::roundingNecessary();
+ }
+ break;
+
+ case RoundingMode::UP:
+ $increment = $hasDiscardedFraction;
+ break;
+
+ case RoundingMode::DOWN:
+ break;
+
+ case RoundingMode::CEILING:
+ $increment = $hasDiscardedFraction && $isPositiveOrZero;
+ break;
+
+ case RoundingMode::FLOOR:
+ $increment = $hasDiscardedFraction && ! $isPositiveOrZero;
+ break;
+
+ case RoundingMode::HALF_UP:
+ $increment = $discardedFractionSign() >= 0;
+ break;
+
+ case RoundingMode::HALF_DOWN:
+ $increment = $discardedFractionSign() > 0;
+ break;
+
+ case RoundingMode::HALF_CEILING:
+ $increment = $isPositiveOrZero ? $discardedFractionSign() >= 0 : $discardedFractionSign() > 0;
+ break;
+
+ case RoundingMode::HALF_FLOOR:
+ $increment = $isPositiveOrZero ? $discardedFractionSign() > 0 : $discardedFractionSign() >= 0;
+ break;
+
+ case RoundingMode::HALF_EVEN:
+ $lastDigit = (int) $quotient[-1];
+ $lastDigitIsEven = ($lastDigit % 2 === 0);
+ $increment = $lastDigitIsEven ? $discardedFractionSign() > 0 : $discardedFractionSign() >= 0;
+ break;
+
+ default:
+ throw new \InvalidArgumentException('Invalid rounding mode.');
+ }
+
+ if ($increment) {
+ return $this->add($quotient, $isPositiveOrZero ? '1' : '-1');
+ }
+
+ return $quotient;
+ }
+
+ /**
+ * Calculates bitwise AND of two numbers.
+ *
+ * This method can be overridden by the concrete implementation if the underlying library
+ * has built-in support for bitwise operations.
+ */
+ public function and(string $a, string $b) : string
+ {
+ return $this->bitwise('and', $a, $b);
+ }
+
+ /**
+ * Calculates bitwise OR of two numbers.
+ *
+ * This method can be overridden by the concrete implementation if the underlying library
+ * has built-in support for bitwise operations.
+ */
+ public function or(string $a, string $b) : string
+ {
+ return $this->bitwise('or', $a, $b);
+ }
+
+ /**
+ * Calculates bitwise XOR of two numbers.
+ *
+ * This method can be overridden by the concrete implementation if the underlying library
+ * has built-in support for bitwise operations.
+ */
+ public function xor(string $a, string $b) : string
+ {
+ return $this->bitwise('xor', $a, $b);
+ }
+
+ /**
+ * Performs a bitwise operation on a decimal number.
+ *
+ * @param 'and'|'or'|'xor' $operator The operator to use.
+ * @param string $a The left operand.
+ * @param string $b The right operand.
+ */
+ private function bitwise(string $operator, string $a, string $b) : string
+ {
+ [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b);
+
+ $aBin = $this->toBinary($aDig);
+ $bBin = $this->toBinary($bDig);
+
+ $aLen = \strlen($aBin);
+ $bLen = \strlen($bBin);
+
+ if ($aLen > $bLen) {
+ $bBin = \str_repeat("\x00", $aLen - $bLen) . $bBin;
+ } elseif ($bLen > $aLen) {
+ $aBin = \str_repeat("\x00", $bLen - $aLen) . $aBin;
+ }
+
+ if ($aNeg) {
+ $aBin = $this->twosComplement($aBin);
+ }
+ if ($bNeg) {
+ $bBin = $this->twosComplement($bBin);
+ }
+
+ $value = match ($operator) {
+ 'and' => $aBin & $bBin,
+ 'or' => $aBin | $bBin,
+ 'xor' => $aBin ^ $bBin,
+ };
+
+ $negative = match ($operator) {
+ 'and' => $aNeg and $bNeg,
+ 'or' => $aNeg or $bNeg,
+ 'xor' => $aNeg xor $bNeg,
+ };
+
+ if ($negative) {
+ $value = $this->twosComplement($value);
+ }
+
+ $result = $this->toDecimal($value);
+
+ return $negative ? $this->neg($result) : $result;
+ }
+
+ /**
+ * @param string $number A positive, binary number.
+ */
+ private function twosComplement(string $number) : string
+ {
+ $xor = \str_repeat("\xff", \strlen($number));
+
+ $number ^= $xor;
+
+ for ($i = \strlen($number) - 1; $i >= 0; $i--) {
+ $byte = \ord($number[$i]);
+
+ if (++$byte !== 256) {
+ $number[$i] = \chr($byte);
+ break;
+ }
+
+ $number[$i] = "\x00";
+
+ if ($i === 0) {
+ $number = "\x01" . $number;
+ }
+ }
+
+ return $number;
+ }
+
+ /**
+ * Converts a decimal number to a binary string.
+ *
+ * @param string $number The number to convert, positive or zero, only digits.
+ */
+ private function toBinary(string $number) : string
+ {
+ $result = '';
+
+ while ($number !== '0') {
+ [$number, $remainder] = $this->divQR($number, '256');
+ $result .= \chr((int) $remainder);
+ }
+
+ return \strrev($result);
+ }
+
+ /**
+ * Returns the positive decimal representation of a binary number.
+ *
+ * @param string $bytes The bytes representing the number.
+ */
+ private function toDecimal(string $bytes) : string
+ {
+ $result = '0';
+ $power = '1';
+
+ for ($i = \strlen($bytes) - 1; $i >= 0; $i--) {
+ $index = \ord($bytes[$i]);
+
+ if ($index !== 0) {
+ $result = $this->add($result, ($index === 1)
+ ? $power
+ : $this->mul($power, (string) $index)
+ );
+ }
+
+ if ($i !== 0) {
+ $power = $this->mul($power, '256');
+ }
+ }
+
+ return $result;
+ }
+}
diff --git a/tests/php_test_files/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php b/tests/php_test_files/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php
new file mode 100644
index 0000000..067085e
--- /dev/null
+++ b/tests/php_test_files/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php
@@ -0,0 +1,65 @@
+maxDigits = match (PHP_INT_SIZE) {
+ 4 => 9,
+ 8 => 18,
+ default => throw new \RuntimeException('The platform is not 32-bit or 64-bit as expected.')
+ };
+ }
+
+ public function add(string $a, string $b) : string
+ {
+ /**
+ * @psalm-var numeric-string $a
+ * @psalm-var numeric-string $b
+ */
+ $result = $a + $b;
+
+ if (is_int($result)) {
+ return (string) $result;
+ }
+
+ if ($a === '0') {
+ return $b;
+ }
+
+ if ($b === '0') {
+ return $a;
+ }
+
+ [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b);
+
+ $result = $aNeg === $bNeg ? $this->doAdd($aDig, $bDig) : $this->doSub($aDig, $bDig);
+
+ if ($aNeg) {
+ $result = $this->neg($result);
+ }
+
+ return $result;
+ }
+
+ public function sub(string $a, string $b) : string
+ {
+ return $this->add($a, $this->neg($b));
+ }
+
+ public function mul(string $a, string $b) : string
+ {
+ /**
+ * @psalm-var numeric-string $a
+ * @psalm-var numeric-string $b
+ */
+ $result = $a * $b;
+
+ if (is_int($result)) {
+ return (string) $result;
+ }
+
+ if ($a === '0' || $b === '0') {
+ return '0';
+ }
+
+ if ($a === '1') {
+ return $b;
+ }
+
+ if ($b === '1') {
+ return $a;
+ }
+
+ if ($a === '-1') {
+ return $this->neg($b);
+ }
+
+ if ($b === '-1') {
+ return $this->neg($a);
+ }
+
+ [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b);
+
+ $result = $this->doMul($aDig, $bDig);
+
+ if ($aNeg !== $bNeg) {
+ $result = $this->neg($result);
+ }
+
+ return $result;
+ }
+
+ public function divQ(string $a, string $b) : string
+ {
+ return $this->divQR($a, $b)[0];
+ }
+
+ public function divR(string $a, string $b): string
+ {
+ return $this->divQR($a, $b)[1];
+ }
+
+ public function divQR(string $a, string $b) : array
+ {
+ if ($a === '0') {
+ return ['0', '0'];
+ }
+
+ if ($a === $b) {
+ return ['1', '0'];
+ }
+
+ if ($b === '1') {
+ return [$a, '0'];
+ }
+
+ if ($b === '-1') {
+ return [$this->neg($a), '0'];
+ }
+
+ /** @psalm-var numeric-string $a */
+ $na = $a * 1; // cast to number
+
+ if (is_int($na)) {
+ /** @psalm-var numeric-string $b */
+ $nb = $b * 1;
+
+ if (is_int($nb)) {
+ // the only division that may overflow is PHP_INT_MIN / -1,
+ // which cannot happen here as we've already handled a divisor of -1 above.
+ $q = intdiv($na, $nb);
+ $r = $na % $nb;
+
+ return [
+ (string) $q,
+ (string) $r
+ ];
+ }
+ }
+
+ [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b);
+
+ [$q, $r] = $this->doDiv($aDig, $bDig);
+
+ if ($aNeg !== $bNeg) {
+ $q = $this->neg($q);
+ }
+
+ if ($aNeg) {
+ $r = $this->neg($r);
+ }
+
+ return [$q, $r];
+ }
+
+ public function pow(string $a, int $e) : string
+ {
+ if ($e === 0) {
+ return '1';
+ }
+
+ if ($e === 1) {
+ return $a;
+ }
+
+ $odd = $e % 2;
+ $e -= $odd;
+
+ $aa = $this->mul($a, $a);
+
+ /** @psalm-suppress PossiblyInvalidArgument We're sure that $e / 2 is an int now */
+ $result = $this->pow($aa, $e / 2);
+
+ if ($odd === 1) {
+ $result = $this->mul($result, $a);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Algorithm from: https://www.geeksforgeeks.org/modular-exponentiation-power-in-modular-arithmetic/
+ */
+ public function modPow(string $base, string $exp, string $mod) : string
+ {
+ // special case: the algorithm below fails with 0 power 0 mod 1 (returns 1 instead of 0)
+ if ($base === '0' && $exp === '0' && $mod === '1') {
+ return '0';
+ }
+
+ // special case: the algorithm below fails with power 0 mod 1 (returns 1 instead of 0)
+ if ($exp === '0' && $mod === '1') {
+ return '0';
+ }
+
+ $x = $base;
+
+ $res = '1';
+
+ // numbers are positive, so we can use remainder instead of modulo
+ $x = $this->divR($x, $mod);
+
+ while ($exp !== '0') {
+ if (in_array($exp[-1], ['1', '3', '5', '7', '9'])) { // odd
+ $res = $this->divR($this->mul($res, $x), $mod);
+ }
+
+ $exp = $this->divQ($exp, '2');
+ $x = $this->divR($this->mul($x, $x), $mod);
+ }
+
+ return $res;
+ }
+
+ /**
+ * Adapted from https://cp-algorithms.com/num_methods/roots_newton.html
+ */
+ public function sqrt(string $n) : string
+ {
+ if ($n === '0') {
+ return '0';
+ }
+
+ // initial approximation
+ $x = \str_repeat('9', \intdiv(\strlen($n), 2) ?: 1);
+
+ $decreased = false;
+
+ for (;;) {
+ $nx = $this->divQ($this->add($x, $this->divQ($n, $x)), '2');
+
+ if ($x === $nx || $this->cmp($nx, $x) > 0 && $decreased) {
+ break;
+ }
+
+ $decreased = $this->cmp($nx, $x) < 0;
+ $x = $nx;
+ }
+
+ return $x;
+ }
+
+ /**
+ * Performs the addition of two non-signed large integers.
+ */
+ private function doAdd(string $a, string $b) : string
+ {
+ [$a, $b, $length] = $this->pad($a, $b);
+
+ $carry = 0;
+ $result = '';
+
+ for ($i = $length - $this->maxDigits;; $i -= $this->maxDigits) {
+ $blockLength = $this->maxDigits;
+
+ if ($i < 0) {
+ $blockLength += $i;
+ /** @psalm-suppress LoopInvalidation */
+ $i = 0;
+ }
+
+ /** @psalm-var numeric-string $blockA */
+ $blockA = \substr($a, $i, $blockLength);
+
+ /** @psalm-var numeric-string $blockB */
+ $blockB = \substr($b, $i, $blockLength);
+
+ $sum = (string) ($blockA + $blockB + $carry);
+ $sumLength = \strlen($sum);
+
+ if ($sumLength > $blockLength) {
+ $sum = \substr($sum, 1);
+ $carry = 1;
+ } else {
+ if ($sumLength < $blockLength) {
+ $sum = \str_repeat('0', $blockLength - $sumLength) . $sum;
+ }
+ $carry = 0;
+ }
+
+ $result = $sum . $result;
+
+ if ($i === 0) {
+ break;
+ }
+ }
+
+ if ($carry === 1) {
+ $result = '1' . $result;
+ }
+
+ return $result;
+ }
+
+ /**
+ * Performs the subtraction of two non-signed large integers.
+ */
+ private function doSub(string $a, string $b) : string
+ {
+ if ($a === $b) {
+ return '0';
+ }
+
+ // Ensure that we always subtract to a positive result: biggest minus smallest.
+ $cmp = $this->doCmp($a, $b);
+
+ $invert = ($cmp === -1);
+
+ if ($invert) {
+ $c = $a;
+ $a = $b;
+ $b = $c;
+ }
+
+ [$a, $b, $length] = $this->pad($a, $b);
+
+ $carry = 0;
+ $result = '';
+
+ $complement = 10 ** $this->maxDigits;
+
+ for ($i = $length - $this->maxDigits;; $i -= $this->maxDigits) {
+ $blockLength = $this->maxDigits;
+
+ if ($i < 0) {
+ $blockLength += $i;
+ /** @psalm-suppress LoopInvalidation */
+ $i = 0;
+ }
+
+ /** @psalm-var numeric-string $blockA */
+ $blockA = \substr($a, $i, $blockLength);
+
+ /** @psalm-var numeric-string $blockB */
+ $blockB = \substr($b, $i, $blockLength);
+
+ $sum = $blockA - $blockB - $carry;
+
+ if ($sum < 0) {
+ $sum += $complement;
+ $carry = 1;
+ } else {
+ $carry = 0;
+ }
+
+ $sum = (string) $sum;
+ $sumLength = \strlen($sum);
+
+ if ($sumLength < $blockLength) {
+ $sum = \str_repeat('0', $blockLength - $sumLength) . $sum;
+ }
+
+ $result = $sum . $result;
+
+ if ($i === 0) {
+ break;
+ }
+ }
+
+ // Carry cannot be 1 when the loop ends, as a > b
+ assert($carry === 0);
+
+ $result = \ltrim($result, '0');
+
+ if ($invert) {
+ $result = $this->neg($result);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Performs the multiplication of two non-signed large integers.
+ */
+ private function doMul(string $a, string $b) : string
+ {
+ $x = \strlen($a);
+ $y = \strlen($b);
+
+ $maxDigits = \intdiv($this->maxDigits, 2);
+ $complement = 10 ** $maxDigits;
+
+ $result = '0';
+
+ for ($i = $x - $maxDigits;; $i -= $maxDigits) {
+ $blockALength = $maxDigits;
+
+ if ($i < 0) {
+ $blockALength += $i;
+ /** @psalm-suppress LoopInvalidation */
+ $i = 0;
+ }
+
+ $blockA = (int) \substr($a, $i, $blockALength);
+
+ $line = '';
+ $carry = 0;
+
+ for ($j = $y - $maxDigits;; $j -= $maxDigits) {
+ $blockBLength = $maxDigits;
+
+ if ($j < 0) {
+ $blockBLength += $j;
+ /** @psalm-suppress LoopInvalidation */
+ $j = 0;
+ }
+
+ $blockB = (int) \substr($b, $j, $blockBLength);
+
+ $mul = $blockA * $blockB + $carry;
+ $value = $mul % $complement;
+ $carry = ($mul - $value) / $complement;
+
+ $value = (string) $value;
+ $value = \str_pad($value, $maxDigits, '0', STR_PAD_LEFT);
+
+ $line = $value . $line;
+
+ if ($j === 0) {
+ break;
+ }
+ }
+
+ if ($carry !== 0) {
+ $line = $carry . $line;
+ }
+
+ $line = \ltrim($line, '0');
+
+ if ($line !== '') {
+ $line .= \str_repeat('0', $x - $blockALength - $i);
+ $result = $this->add($result, $line);
+ }
+
+ if ($i === 0) {
+ break;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Performs the division of two non-signed large integers.
+ *
+ * @return string[] The quotient and remainder.
+ */
+ private function doDiv(string $a, string $b) : array
+ {
+ $cmp = $this->doCmp($a, $b);
+
+ if ($cmp === -1) {
+ return ['0', $a];
+ }
+
+ $x = \strlen($a);
+ $y = \strlen($b);
+
+ // we now know that a >= b && x >= y
+
+ $q = '0'; // quotient
+ $r = $a; // remainder
+ $z = $y; // focus length, always $y or $y+1
+
+ for (;;) {
+ $focus = \substr($a, 0, $z);
+
+ $cmp = $this->doCmp($focus, $b);
+
+ if ($cmp === -1) {
+ if ($z === $x) { // remainder < dividend
+ break;
+ }
+
+ $z++;
+ }
+
+ $zeros = \str_repeat('0', $x - $z);
+
+ $q = $this->add($q, '1' . $zeros);
+ $a = $this->sub($a, $b . $zeros);
+
+ $r = $a;
+
+ if ($r === '0') { // remainder == 0
+ break;
+ }
+
+ $x = \strlen($a);
+
+ if ($x < $y) { // remainder < dividend
+ break;
+ }
+
+ $z = $y;
+ }
+
+ return [$q, $r];
+ }
+
+ /**
+ * Compares two non-signed large numbers.
+ *
+ * @psalm-return -1|0|1
+ */
+ private function doCmp(string $a, string $b) : int
+ {
+ $x = \strlen($a);
+ $y = \strlen($b);
+
+ $cmp = $x <=> $y;
+
+ if ($cmp !== 0) {
+ return $cmp;
+ }
+
+ return \strcmp($a, $b) <=> 0; // enforce -1|0|1
+ }
+
+ /**
+ * Pads the left of one of the given numbers with zeros if necessary to make both numbers the same length.
+ *
+ * The numbers must only consist of digits, without leading minus sign.
+ *
+ * @return array{string, string, int}
+ */
+ private function pad(string $a, string $b) : array
+ {
+ $x = \strlen($a);
+ $y = \strlen($b);
+
+ if ($x > $y) {
+ $b = \str_repeat('0', $x - $y) . $b;
+
+ return [$a, $b, $x];
+ }
+
+ if ($x < $y) {
+ $a = \str_repeat('0', $y - $x) . $a;
+
+ return [$a, $b, $y];
+ }
+
+ return [$a, $b, $x];
+ }
+}
diff --git a/tests/php_test_files/vendor/brick/math/src/RoundingMode.php b/tests/php_test_files/vendor/brick/math/src/RoundingMode.php
new file mode 100644
index 0000000..e8ee6a8
--- /dev/null
+++ b/tests/php_test_files/vendor/brick/math/src/RoundingMode.php
@@ -0,0 +1,98 @@
+= 0.5; otherwise, behaves as for DOWN.
+ * Note that this is the rounding mode commonly taught at school.
+ */
+ case HALF_UP;
+
+ /**
+ * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round down.
+ *
+ * Behaves as for UP if the discarded fraction is > 0.5; otherwise, behaves as for DOWN.
+ */
+ case HALF_DOWN;
+
+ /**
+ * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round towards positive infinity.
+ *
+ * If the result is positive, behaves as for HALF_UP; if negative, behaves as for HALF_DOWN.
+ */
+ case HALF_CEILING;
+
+ /**
+ * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round towards negative infinity.
+ *
+ * If the result is positive, behaves as for HALF_DOWN; if negative, behaves as for HALF_UP.
+ */
+ case HALF_FLOOR;
+
+ /**
+ * Rounds towards the "nearest neighbor" unless both neighbors are equidistant, in which case rounds towards the even neighbor.
+ *
+ * Behaves as for HALF_UP if the digit to the left of the discarded fraction is odd;
+ * behaves as for HALF_DOWN if it's even.
+ *
+ * Note that this is the rounding mode that statistically minimizes
+ * cumulative error when applied repeatedly over a sequence of calculations.
+ * It is sometimes known as "Banker's rounding", and is chiefly used in the USA.
+ */
+ case HALF_EVEN;
+}
diff --git a/tests/php_test_files/vendor/composer/ClassLoader.php b/tests/php_test_files/vendor/composer/ClassLoader.php
new file mode 100644
index 0000000..7824d8f
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/ClassLoader.php
@@ -0,0 +1,579 @@
+
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ * $loader = new \Composer\Autoload\ClassLoader();
+ *
+ * // register classes with namespaces
+ * $loader->add('Symfony\Component', __DIR__.'/component');
+ * $loader->add('Symfony', __DIR__.'/framework');
+ *
+ * // activate the autoloader
+ * $loader->register();
+ *
+ * // to enable searching the include path (eg. for PEAR packages)
+ * $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier
+ * @author Jordi Boggiano
+ * @see https://www.php-fig.org/psr/psr-0/
+ * @see https://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+ /** @var \Closure(string):void */
+ private static $includeFile;
+
+ /** @var string|null */
+ private $vendorDir;
+
+ // PSR-4
+ /**
+ * @var array>
+ */
+ private $prefixLengthsPsr4 = array();
+ /**
+ * @var array>
+ */
+ private $prefixDirsPsr4 = array();
+ /**
+ * @var list
+ */
+ private $fallbackDirsPsr4 = array();
+
+ // PSR-0
+ /**
+ * List of PSR-0 prefixes
+ *
+ * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
+ *
+ * @var array>>
+ */
+ private $prefixesPsr0 = array();
+ /**
+ * @var list
+ */
+ private $fallbackDirsPsr0 = array();
+
+ /** @var bool */
+ private $useIncludePath = false;
+
+ /**
+ * @var array
+ */
+ private $classMap = array();
+
+ /** @var bool */
+ private $classMapAuthoritative = false;
+
+ /**
+ * @var array
+ */
+ private $missingClasses = array();
+
+ /** @var string|null */
+ private $apcuPrefix;
+
+ /**
+ * @var array
+ */
+ private static $registeredLoaders = array();
+
+ /**
+ * @param string|null $vendorDir
+ */
+ public function __construct($vendorDir = null)
+ {
+ $this->vendorDir = $vendorDir;
+ self::initializeIncludeClosure();
+ }
+
+ /**
+ * @return array>
+ */
+ public function getPrefixes()
+ {
+ if (!empty($this->prefixesPsr0)) {
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
+ }
+
+ return array();
+ }
+
+ /**
+ * @return array>
+ */
+ public function getPrefixesPsr4()
+ {
+ return $this->prefixDirsPsr4;
+ }
+
+ /**
+ * @return list
+ */
+ public function getFallbackDirs()
+ {
+ return $this->fallbackDirsPsr0;
+ }
+
+ /**
+ * @return list
+ */
+ public function getFallbackDirsPsr4()
+ {
+ return $this->fallbackDirsPsr4;
+ }
+
+ /**
+ * @return array Array of classname => path
+ */
+ public function getClassMap()
+ {
+ return $this->classMap;
+ }
+
+ /**
+ * @param array $classMap Class to filename map
+ *
+ * @return void
+ */
+ public function addClassMap(array $classMap)
+ {
+ if ($this->classMap) {
+ $this->classMap = array_merge($this->classMap, $classMap);
+ } else {
+ $this->classMap = $classMap;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix, either
+ * appending or prepending to the ones previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param list|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @return void
+ */
+ public function add($prefix, $paths, $prepend = false)
+ {
+ $paths = (array) $paths;
+ if (!$prefix) {
+ if ($prepend) {
+ $this->fallbackDirsPsr0 = array_merge(
+ $paths,
+ $this->fallbackDirsPsr0
+ );
+ } else {
+ $this->fallbackDirsPsr0 = array_merge(
+ $this->fallbackDirsPsr0,
+ $paths
+ );
+ }
+
+ return;
+ }
+
+ $first = $prefix[0];
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
+ $this->prefixesPsr0[$first][$prefix] = $paths;
+
+ return;
+ }
+ if ($prepend) {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $paths,
+ $this->prefixesPsr0[$first][$prefix]
+ );
+ } else {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $this->prefixesPsr0[$first][$prefix],
+ $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace, either
+ * appending or prepending to the ones previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @return void
+ */
+ public function addPsr4($prefix, $paths, $prepend = false)
+ {
+ $paths = (array) $paths;
+ if (!$prefix) {
+ // Register directories for the root namespace.
+ if ($prepend) {
+ $this->fallbackDirsPsr4 = array_merge(
+ $paths,
+ $this->fallbackDirsPsr4
+ );
+ } else {
+ $this->fallbackDirsPsr4 = array_merge(
+ $this->fallbackDirsPsr4,
+ $paths
+ );
+ }
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+ // Register directories for a new namespace.
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = $paths;
+ } elseif ($prepend) {
+ // Prepend directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $paths,
+ $this->prefixDirsPsr4[$prefix]
+ );
+ } else {
+ // Append directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $this->prefixDirsPsr4[$prefix],
+ $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix,
+ * replacing any others previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param list|string $paths The PSR-0 base directories
+ *
+ * @return void
+ */
+ public function set($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr0 = (array) $paths;
+ } else {
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace,
+ * replacing any others previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list|string $paths The PSR-4 base directories
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @return void
+ */
+ public function setPsr4($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr4 = (array) $paths;
+ } else {
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Turns on searching the include path for class files.
+ *
+ * @param bool $useIncludePath
+ *
+ * @return void
+ */
+ public function setUseIncludePath($useIncludePath)
+ {
+ $this->useIncludePath = $useIncludePath;
+ }
+
+ /**
+ * Can be used to check if the autoloader uses the include path to check
+ * for classes.
+ *
+ * @return bool
+ */
+ public function getUseIncludePath()
+ {
+ return $this->useIncludePath;
+ }
+
+ /**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ *
+ * @return void
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
+ *
+ * @param string|null $apcuPrefix
+ *
+ * @return void
+ */
+ public function setApcuPrefix($apcuPrefix)
+ {
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
+ }
+
+ /**
+ * The APCu prefix in use, or null if APCu caching is not enabled.
+ *
+ * @return string|null
+ */
+ public function getApcuPrefix()
+ {
+ return $this->apcuPrefix;
+ }
+
+ /**
+ * Registers this instance as an autoloader.
+ *
+ * @param bool $prepend Whether to prepend the autoloader or not
+ *
+ * @return void
+ */
+ public function register($prepend = false)
+ {
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+
+ if (null === $this->vendorDir) {
+ return;
+ }
+
+ if ($prepend) {
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
+ } else {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ self::$registeredLoaders[$this->vendorDir] = $this;
+ }
+ }
+
+ /**
+ * Unregisters this instance as an autoloader.
+ *
+ * @return void
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+
+ if (null !== $this->vendorDir) {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ }
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $class The name of the class
+ * @return true|null True if loaded, null otherwise
+ */
+ public function loadClass($class)
+ {
+ if ($file = $this->findFile($class)) {
+ $includeFile = self::$includeFile;
+ $includeFile($file);
+
+ return true;
+ }
+
+ return null;
+ }
+
+ /**
+ * Finds the path to the file where the class is defined.
+ *
+ * @param string $class The name of the class
+ *
+ * @return string|false The path if found, false otherwise
+ */
+ public function findFile($class)
+ {
+ // class map lookup
+ if (isset($this->classMap[$class])) {
+ return $this->classMap[$class];
+ }
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
+ return false;
+ }
+ if (null !== $this->apcuPrefix) {
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
+ if ($hit) {
+ return $file;
+ }
+ }
+
+ $file = $this->findFileWithExtension($class, '.php');
+
+ // Search for Hack files if we are running on HHVM
+ if (false === $file && defined('HHVM_VERSION')) {
+ $file = $this->findFileWithExtension($class, '.hh');
+ }
+
+ if (null !== $this->apcuPrefix) {
+ apcu_add($this->apcuPrefix.$class, $file);
+ }
+
+ if (false === $file) {
+ // Remember that this class does not exist.
+ $this->missingClasses[$class] = true;
+ }
+
+ return $file;
+ }
+
+ /**
+ * Returns the currently registered loaders keyed by their corresponding vendor directories.
+ *
+ * @return array
+ */
+ public static function getRegisteredLoaders()
+ {
+ return self::$registeredLoaders;
+ }
+
+ /**
+ * @param string $class
+ * @param string $ext
+ * @return string|false
+ */
+ private function findFileWithExtension($class, $ext)
+ {
+ // PSR-4 lookup
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+ $first = $class[0];
+ if (isset($this->prefixLengthsPsr4[$first])) {
+ $subPath = $class;
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
+ $subPath = substr($subPath, 0, $lastPos);
+ $search = $subPath . '\\';
+ if (isset($this->prefixDirsPsr4[$search])) {
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
+ if (file_exists($file = $dir . $pathEnd)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-4 fallback dirs
+ foreach ($this->fallbackDirsPsr4 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 lookup
+ if (false !== $pos = strrpos($class, '\\')) {
+ // namespaced class name
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+ } else {
+ // PEAR-like class name
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+ }
+
+ if (isset($this->prefixesPsr0[$first])) {
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($dirs as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-0 fallback dirs
+ foreach ($this->fallbackDirsPsr0 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 include paths.
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+ return $file;
+ }
+
+ return false;
+ }
+
+ /**
+ * @return void
+ */
+ private static function initializeIncludeClosure()
+ {
+ if (self::$includeFile !== null) {
+ return;
+ }
+
+ /**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ *
+ * @param string $file
+ * @return void
+ */
+ self::$includeFile = \Closure::bind(static function($file) {
+ include $file;
+ }, null, null);
+ }
+}
diff --git a/tests/php_test_files/vendor/composer/InstalledVersions.php b/tests/php_test_files/vendor/composer/InstalledVersions.php
new file mode 100644
index 0000000..51e734a
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/InstalledVersions.php
@@ -0,0 +1,359 @@
+
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer;
+
+use Composer\Autoload\ClassLoader;
+use Composer\Semver\VersionParser;
+
+/**
+ * This class is copied in every Composer installed project and available to all
+ *
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
+ *
+ * To require its presence, you can require `composer-runtime-api ^2.0`
+ *
+ * @final
+ */
+class InstalledVersions
+{
+ /**
+ * @var mixed[]|null
+ * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null
+ */
+ private static $installed;
+
+ /**
+ * @var bool|null
+ */
+ private static $canGetVendors;
+
+ /**
+ * @var array[]
+ * @psalm-var array}>
+ */
+ private static $installedByVendor = array();
+
+ /**
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
+ *
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackages()
+ {
+ $packages = array();
+ foreach (self::getInstalled() as $installed) {
+ $packages[] = array_keys($installed['versions']);
+ }
+
+ if (1 === \count($packages)) {
+ return $packages[0];
+ }
+
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+ }
+
+ /**
+ * Returns a list of all package names with a specific type e.g. 'library'
+ *
+ * @param string $type
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackagesByType($type)
+ {
+ $packagesByType = array();
+
+ foreach (self::getInstalled() as $installed) {
+ foreach ($installed['versions'] as $name => $package) {
+ if (isset($package['type']) && $package['type'] === $type) {
+ $packagesByType[] = $name;
+ }
+ }
+ }
+
+ return $packagesByType;
+ }
+
+ /**
+ * Checks whether the given package is installed
+ *
+ * This also returns true if the package name is provided or replaced by another package
+ *
+ * @param string $packageName
+ * @param bool $includeDevRequirements
+ * @return bool
+ */
+ public static function isInstalled($packageName, $includeDevRequirements = true)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (isset($installed['versions'][$packageName])) {
+ return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given package satisfies a version constraint
+ *
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
+ *
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
+ *
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
+ * @param string $packageName
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
+ * @return bool
+ */
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
+ {
+ $constraint = $parser->parseConstraints((string) $constraint);
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
+
+ return $provided->matches($constraint);
+ }
+
+ /**
+ * Returns a version constraint representing all the range(s) which are installed for a given package
+ *
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
+ * whether a given version of a package is installed, and not just whether it exists
+ *
+ * @param string $packageName
+ * @return string Version constraint usable with composer/semver
+ */
+ public static function getVersionRanges($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ $ranges = array();
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
+ }
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+ }
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+ }
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+ }
+
+ return implode(' || ', $ranges);
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getPrettyVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['pretty_version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
+ */
+ public static function getReference($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['reference'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['reference'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
+ */
+ public static function getInstallPath($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @return array
+ * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
+ */
+ public static function getRootPackage()
+ {
+ $installed = self::getInstalled();
+
+ return $installed[0]['root'];
+ }
+
+ /**
+ * Returns the raw installed.php data for custom implementations
+ *
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
+ * @return array[]
+ * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}
+ */
+ public static function getRawData()
+ {
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = include __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ return self::$installed;
+ }
+
+ /**
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
+ *
+ * @return array[]
+ * @psalm-return list}>
+ */
+ public static function getAllRawData()
+ {
+ return self::getInstalled();
+ }
+
+ /**
+ * Lets you reload the static array from another file
+ *
+ * This is only useful for complex integrations in which a project needs to use
+ * this class but then also needs to execute another project's autoloader in process,
+ * and wants to ensure both projects have access to their version of installed.php.
+ *
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
+ * the data it needs from this class, then call reload() with
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
+ * the project in which it runs can then also use this class safely, without
+ * interference between PHPUnit's dependencies and the project's dependencies.
+ *
+ * @param array[] $data A vendor/composer/installed.php data set
+ * @return void
+ *
+ * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data
+ */
+ public static function reload($data)
+ {
+ self::$installed = $data;
+ self::$installedByVendor = array();
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return list}>
+ */
+ private static function getInstalled()
+ {
+ if (null === self::$canGetVendors) {
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
+ }
+
+ $installed = array();
+
+ if (self::$canGetVendors) {
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+ if (isset(self::$installedByVendor[$vendorDir])) {
+ $installed[] = self::$installedByVendor[$vendorDir];
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
+ /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */
+ $required = require $vendorDir.'/composer/installed.php';
+ $installed[] = self::$installedByVendor[$vendorDir] = $required;
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+ self::$installed = $installed[count($installed) - 1];
+ }
+ }
+ }
+ }
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */
+ $required = require __DIR__ . '/installed.php';
+ self::$installed = $required;
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ if (self::$installed !== array()) {
+ $installed[] = self::$installed;
+ }
+
+ return $installed;
+ }
+}
diff --git a/tests/php_test_files/vendor/composer/LICENSE b/tests/php_test_files/vendor/composer/LICENSE
new file mode 100644
index 0000000..f27399a
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/LICENSE
@@ -0,0 +1,21 @@
+
+Copyright (c) Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/tests/php_test_files/vendor/composer/autoload_classmap.php b/tests/php_test_files/vendor/composer/autoload_classmap.php
new file mode 100644
index 0000000..883e80a
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/autoload_classmap.php
@@ -0,0 +1,22 @@
+ $vendorDir . '/composer/InstalledVersions.php',
+ 'DateError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateError.php',
+ 'DateException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateException.php',
+ 'DateInvalidOperationException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateInvalidOperationException.php',
+ 'DateInvalidTimeZoneException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateInvalidTimeZoneException.php',
+ 'DateMalformedIntervalStringException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateMalformedIntervalStringException.php',
+ 'DateMalformedPeriodStringException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateMalformedPeriodStringException.php',
+ 'DateMalformedStringException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php',
+ 'DateObjectError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateObjectError.php',
+ 'DateRangeError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateRangeError.php',
+ 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
+ 'Override' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/Override.php',
+ 'SQLite3Exception' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/SQLite3Exception.php',
+);
diff --git a/tests/php_test_files/vendor/composer/autoload_files.php b/tests/php_test_files/vendor/composer/autoload_files.php
new file mode 100644
index 0000000..da33dc6
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/autoload_files.php
@@ -0,0 +1,19 @@
+ $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
+ 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
+ '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
+ 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
+ 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
+ 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
+ '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
+ 'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
+ '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
+ '662a729f963d39afe703c9d9b7ab4a8c' => $vendorDir . '/symfony/polyfill-php83/bootstrap.php',
+);
diff --git a/tests/php_test_files/vendor/composer/autoload_namespaces.php b/tests/php_test_files/vendor/composer/autoload_namespaces.php
new file mode 100644
index 0000000..15a2ff3
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/autoload_namespaces.php
@@ -0,0 +1,9 @@
+ array($vendorDir . '/roadrunner-php/roadrunner-api-dto/generated/Temporal'),
+ 'Symfony\\Polyfill\\Php83\\' => array($vendorDir . '/symfony/polyfill-php83'),
+ 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
+ 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
+ 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
+ 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
+ 'Spiral\\Tokenizer\\' => array($vendorDir . '/spiral/tokenizer/src'),
+ 'Spiral\\RoadRunner\\Tcp\\' => array($vendorDir . '/spiral/roadrunner-tcp/src'),
+ 'Spiral\\RoadRunner\\Services\\' => array($vendorDir . '/spiral/roadrunner-services/src'),
+ 'Spiral\\RoadRunner\\Metrics\\' => array($vendorDir . '/spiral/roadrunner-metrics/src'),
+ 'Spiral\\RoadRunner\\KeyValue\\' => array($vendorDir . '/spiral/roadrunner-kv/src'),
+ 'Spiral\\RoadRunner\\Jobs\\' => array($vendorDir . '/spiral/roadrunner-jobs/src'),
+ 'Spiral\\RoadRunner\\Http\\' => array($vendorDir . '/spiral/roadrunner-http/src'),
+ 'Spiral\\RoadRunner\\GRPC\\' => array($vendorDir . '/spiral/roadrunner-grpc/src'),
+ 'Spiral\\RoadRunner\\' => array($vendorDir . '/spiral/roadrunner-worker/src'),
+ 'Spiral\\Logger\\' => array($vendorDir . '/spiral/logger/src'),
+ 'Spiral\\Goridge\\' => array($vendorDir . '/spiral/goridge/src'),
+ 'Spiral\\Core\\' => array($vendorDir . '/spiral/core/src'),
+ 'RoadRunner\\Logger\\' => array($vendorDir . '/roadrunner-php/app-logger/src'),
+ 'RoadRunner\\Centrifugo\\' => array($vendorDir . '/roadrunner-php/centrifugo/src'),
+ 'RoadRunner\\' => array($vendorDir . '/roadrunner-php/roadrunner-api-dto/generated/RoadRunner'),
+ 'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'),
+ 'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'),
+ 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
+ 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'),
+ 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'),
+ 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
+ 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
+ 'OpenTelemetry\\SemConv\\' => array($vendorDir . '/open-telemetry/sem-conv'),
+ 'OpenTelemetry\\SDK\\' => array($vendorDir . '/open-telemetry/sdk'),
+ 'OpenTelemetry\\Context\\' => array($vendorDir . '/open-telemetry/context'),
+ 'OpenTelemetry\\API\\' => array($vendorDir . '/open-telemetry/api'),
+ 'Nyholm\\Psr7\\' => array($vendorDir . '/nyholm/psr7/src'),
+ 'Nyholm\\Dsn\\' => array($vendorDir . '/nyholm/dsn/src'),
+ 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
+ 'Http\\Promise\\' => array($vendorDir . '/php-http/promise/src'),
+ 'Http\\Message\\' => array($vendorDir . '/php-http/message-factory/src'),
+ 'Http\\Discovery\\' => array($vendorDir . '/php-http/discovery/src'),
+ 'Http\\Client\\' => array($vendorDir . '/php-http/httplug/src'),
+ 'Http\\Adapter\\Guzzle6\\' => array($vendorDir . '/php-http/guzzle6-adapter/src'),
+ 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
+ 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
+ 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
+ 'Google\\Type\\' => array($vendorDir . '/google/common-protos/src/Type'),
+ 'Google\\Rpc\\' => array($vendorDir . '/google/common-protos/src/Rpc'),
+ 'Google\\Protobuf\\' => array($vendorDir . '/google/protobuf/src/Google/Protobuf'),
+ 'Google\\Iam\\' => array($vendorDir . '/google/common-protos/src/Iam'),
+ 'Google\\Cloud\\' => array($vendorDir . '/google/common-protos/src/Cloud'),
+ 'Google\\Api\\' => array($vendorDir . '/google/common-protos/src/Api'),
+ 'GPBMetadata\\Google\\Type\\' => array($vendorDir . '/google/common-protos/metadata/Type'),
+ 'GPBMetadata\\Google\\Rpc\\' => array($vendorDir . '/google/common-protos/metadata/Rpc'),
+ 'GPBMetadata\\Google\\Protobuf\\' => array($vendorDir . '/google/protobuf/src/GPBMetadata/Google/Protobuf'),
+ 'GPBMetadata\\Google\\Logging\\' => array($vendorDir . '/google/common-protos/metadata/Logging'),
+ 'GPBMetadata\\Google\\Iam\\' => array($vendorDir . '/google/common-protos/metadata/Iam'),
+ 'GPBMetadata\\Google\\Cloud\\' => array($vendorDir . '/google/common-protos/metadata/Cloud'),
+ 'GPBMetadata\\Google\\Api\\' => array($vendorDir . '/google/common-protos/metadata/Api'),
+ 'GPBMetadata\\' => array($vendorDir . '/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata'),
+ 'Brick\\Math\\' => array($vendorDir . '/brick/math/src'),
+);
diff --git a/tests/php_test_files/vendor/composer/autoload_real.php b/tests/php_test_files/vendor/composer/autoload_real.php
new file mode 100644
index 0000000..ce16a11
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/autoload_real.php
@@ -0,0 +1,50 @@
+register(true);
+
+ $filesToLoad = \Composer\Autoload\ComposerStaticInitdd8ab381de7afafb2d8c15edeb4bb88b::$files;
+ $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+
+ require $file;
+ }
+ }, null, null);
+ foreach ($filesToLoad as $fileIdentifier => $file) {
+ $requireFile($fileIdentifier, $file);
+ }
+
+ return $loader;
+ }
+}
diff --git a/tests/php_test_files/vendor/composer/autoload_static.php b/tests/php_test_files/vendor/composer/autoload_static.php
new file mode 100644
index 0000000..aa83944
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/autoload_static.php
@@ -0,0 +1,379 @@
+ __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
+ 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
+ '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
+ 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
+ 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
+ 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
+ '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
+ 'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php',
+ '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
+ '662a729f963d39afe703c9d9b7ab4a8c' => __DIR__ . '/..' . '/symfony/polyfill-php83/bootstrap.php',
+ );
+
+ public static $prefixLengthsPsr4 = array (
+ 'T' =>
+ array (
+ 'Temporal\\' => 9,
+ ),
+ 'S' =>
+ array (
+ 'Symfony\\Polyfill\\Php83\\' => 23,
+ 'Symfony\\Polyfill\\Php72\\' => 23,
+ 'Symfony\\Polyfill\\Mbstring\\' => 26,
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
+ 'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
+ 'Symfony\\Component\\Finder\\' => 25,
+ 'Spiral\\Tokenizer\\' => 17,
+ 'Spiral\\RoadRunner\\Tcp\\' => 22,
+ 'Spiral\\RoadRunner\\Services\\' => 27,
+ 'Spiral\\RoadRunner\\Metrics\\' => 26,
+ 'Spiral\\RoadRunner\\KeyValue\\' => 27,
+ 'Spiral\\RoadRunner\\Jobs\\' => 23,
+ 'Spiral\\RoadRunner\\Http\\' => 23,
+ 'Spiral\\RoadRunner\\GRPC\\' => 23,
+ 'Spiral\\RoadRunner\\' => 18,
+ 'Spiral\\Logger\\' => 14,
+ 'Spiral\\Goridge\\' => 15,
+ 'Spiral\\Core\\' => 12,
+ ),
+ 'R' =>
+ array (
+ 'RoadRunner\\Logger\\' => 18,
+ 'RoadRunner\\Centrifugo\\' => 22,
+ 'RoadRunner\\' => 11,
+ 'Ramsey\\Uuid\\' => 12,
+ 'Ramsey\\Collection\\' => 18,
+ ),
+ 'P' =>
+ array (
+ 'Psr\\SimpleCache\\' => 16,
+ 'Psr\\Log\\' => 8,
+ 'Psr\\Http\\Message\\' => 17,
+ 'Psr\\Http\\Client\\' => 16,
+ 'Psr\\Container\\' => 14,
+ ),
+ 'O' =>
+ array (
+ 'OpenTelemetry\\SemConv\\' => 22,
+ 'OpenTelemetry\\SDK\\' => 18,
+ 'OpenTelemetry\\Context\\' => 22,
+ 'OpenTelemetry\\API\\' => 18,
+ ),
+ 'N' =>
+ array (
+ 'Nyholm\\Psr7\\' => 12,
+ 'Nyholm\\Dsn\\' => 11,
+ ),
+ 'M' =>
+ array (
+ 'Monolog\\' => 8,
+ ),
+ 'H' =>
+ array (
+ 'Http\\Promise\\' => 13,
+ 'Http\\Message\\' => 13,
+ 'Http\\Discovery\\' => 15,
+ 'Http\\Client\\' => 12,
+ 'Http\\Adapter\\Guzzle6\\' => 21,
+ ),
+ 'G' =>
+ array (
+ 'GuzzleHttp\\Psr7\\' => 16,
+ 'GuzzleHttp\\Promise\\' => 19,
+ 'GuzzleHttp\\' => 11,
+ 'Google\\Type\\' => 12,
+ 'Google\\Rpc\\' => 11,
+ 'Google\\Protobuf\\' => 16,
+ 'Google\\Iam\\' => 11,
+ 'Google\\Cloud\\' => 13,
+ 'Google\\Api\\' => 11,
+ 'GPBMetadata\\Google\\Type\\' => 24,
+ 'GPBMetadata\\Google\\Rpc\\' => 23,
+ 'GPBMetadata\\Google\\Protobuf\\' => 28,
+ 'GPBMetadata\\Google\\Logging\\' => 27,
+ 'GPBMetadata\\Google\\Iam\\' => 23,
+ 'GPBMetadata\\Google\\Cloud\\' => 25,
+ 'GPBMetadata\\Google\\Api\\' => 23,
+ 'GPBMetadata\\' => 12,
+ ),
+ 'B' =>
+ array (
+ 'Brick\\Math\\' => 11,
+ ),
+ );
+
+ public static $prefixDirsPsr4 = array (
+ 'Temporal\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/roadrunner-php/roadrunner-api-dto/generated/Temporal',
+ ),
+ 'Symfony\\Polyfill\\Php83\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php83',
+ ),
+ 'Symfony\\Polyfill\\Php72\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
+ ),
+ 'Symfony\\Polyfill\\Mbstring\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
+ ),
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
+ ),
+ 'Symfony\\Polyfill\\Intl\\Idn\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn',
+ ),
+ 'Symfony\\Component\\Finder\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/finder',
+ ),
+ 'Spiral\\Tokenizer\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/tokenizer/src',
+ ),
+ 'Spiral\\RoadRunner\\Tcp\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/roadrunner-tcp/src',
+ ),
+ 'Spiral\\RoadRunner\\Services\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/roadrunner-services/src',
+ ),
+ 'Spiral\\RoadRunner\\Metrics\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/roadrunner-metrics/src',
+ ),
+ 'Spiral\\RoadRunner\\KeyValue\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/roadrunner-kv/src',
+ ),
+ 'Spiral\\RoadRunner\\Jobs\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/roadrunner-jobs/src',
+ ),
+ 'Spiral\\RoadRunner\\Http\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/roadrunner-http/src',
+ ),
+ 'Spiral\\RoadRunner\\GRPC\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/roadrunner-grpc/src',
+ ),
+ 'Spiral\\RoadRunner\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/roadrunner-worker/src',
+ ),
+ 'Spiral\\Logger\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/logger/src',
+ ),
+ 'Spiral\\Goridge\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/goridge/src',
+ ),
+ 'Spiral\\Core\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/spiral/core/src',
+ ),
+ 'RoadRunner\\Logger\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/roadrunner-php/app-logger/src',
+ ),
+ 'RoadRunner\\Centrifugo\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/roadrunner-php/centrifugo/src',
+ ),
+ 'RoadRunner\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/roadrunner-php/roadrunner-api-dto/generated/RoadRunner',
+ ),
+ 'Ramsey\\Uuid\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/ramsey/uuid/src',
+ ),
+ 'Ramsey\\Collection\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/ramsey/collection/src',
+ ),
+ 'Psr\\SimpleCache\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/simple-cache/src',
+ ),
+ 'Psr\\Log\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/log/src',
+ ),
+ 'Psr\\Http\\Message\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/http-message/src',
+ 1 => __DIR__ . '/..' . '/psr/http-factory/src',
+ ),
+ 'Psr\\Http\\Client\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/http-client/src',
+ ),
+ 'Psr\\Container\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/container/src',
+ ),
+ 'OpenTelemetry\\SemConv\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/open-telemetry/sem-conv',
+ ),
+ 'OpenTelemetry\\SDK\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/open-telemetry/sdk',
+ ),
+ 'OpenTelemetry\\Context\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/open-telemetry/context',
+ ),
+ 'OpenTelemetry\\API\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/open-telemetry/api',
+ ),
+ 'Nyholm\\Psr7\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/nyholm/psr7/src',
+ ),
+ 'Nyholm\\Dsn\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/nyholm/dsn/src',
+ ),
+ 'Monolog\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
+ ),
+ 'Http\\Promise\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/php-http/promise/src',
+ ),
+ 'Http\\Message\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/php-http/message-factory/src',
+ ),
+ 'Http\\Discovery\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/php-http/discovery/src',
+ ),
+ 'Http\\Client\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/php-http/httplug/src',
+ ),
+ 'Http\\Adapter\\Guzzle6\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/php-http/guzzle6-adapter/src',
+ ),
+ 'GuzzleHttp\\Psr7\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
+ ),
+ 'GuzzleHttp\\Promise\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
+ ),
+ 'GuzzleHttp\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
+ ),
+ 'Google\\Type\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/src/Type',
+ ),
+ 'Google\\Rpc\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/src/Rpc',
+ ),
+ 'Google\\Protobuf\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/protobuf/src/Google/Protobuf',
+ ),
+ 'Google\\Iam\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/src/Iam',
+ ),
+ 'Google\\Cloud\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/src/Cloud',
+ ),
+ 'Google\\Api\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/src/Api',
+ ),
+ 'GPBMetadata\\Google\\Type\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/metadata/Type',
+ ),
+ 'GPBMetadata\\Google\\Rpc\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/metadata/Rpc',
+ ),
+ 'GPBMetadata\\Google\\Protobuf\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/protobuf/src/GPBMetadata/Google/Protobuf',
+ ),
+ 'GPBMetadata\\Google\\Logging\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/metadata/Logging',
+ ),
+ 'GPBMetadata\\Google\\Iam\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/metadata/Iam',
+ ),
+ 'GPBMetadata\\Google\\Cloud\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/metadata/Cloud',
+ ),
+ 'GPBMetadata\\Google\\Api\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/common-protos/metadata/Api',
+ ),
+ 'GPBMetadata\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata',
+ ),
+ 'Brick\\Math\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/brick/math/src',
+ ),
+ );
+
+ public static $classMap = array (
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
+ 'DateError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateError.php',
+ 'DateException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateException.php',
+ 'DateInvalidOperationException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateInvalidOperationException.php',
+ 'DateInvalidTimeZoneException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateInvalidTimeZoneException.php',
+ 'DateMalformedIntervalStringException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateMalformedIntervalStringException.php',
+ 'DateMalformedPeriodStringException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateMalformedPeriodStringException.php',
+ 'DateMalformedStringException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php',
+ 'DateObjectError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateObjectError.php',
+ 'DateRangeError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateRangeError.php',
+ 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
+ 'Override' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/Override.php',
+ 'SQLite3Exception' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/SQLite3Exception.php',
+ );
+
+ public static function getInitializer(ClassLoader $loader)
+ {
+ return \Closure::bind(function () use ($loader) {
+ $loader->prefixLengthsPsr4 = ComposerStaticInitdd8ab381de7afafb2d8c15edeb4bb88b::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 = ComposerStaticInitdd8ab381de7afafb2d8c15edeb4bb88b::$prefixDirsPsr4;
+ $loader->classMap = ComposerStaticInitdd8ab381de7afafb2d8c15edeb4bb88b::$classMap;
+
+ }, null, ClassLoader::class);
+ }
+}
diff --git a/tests/php_test_files/vendor/composer/installed.json b/tests/php_test_files/vendor/composer/installed.json
new file mode 100644
index 0000000..ced7ed1
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/installed.json
@@ -0,0 +1,3560 @@
+{
+ "packages": [
+ {
+ "name": "brick/math",
+ "version": "0.12.1",
+ "version_normalized": "0.12.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/brick/math.git",
+ "reference": "f510c0a40911935b77b86859eb5223d58d660df1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1",
+ "reference": "f510c0a40911935b77b86859eb5223d58d660df1",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "php-coveralls/php-coveralls": "^2.2",
+ "phpunit/phpunit": "^10.1",
+ "vimeo/psalm": "5.16.0"
+ },
+ "time": "2023-11-29T23:19:16+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Brick\\Math\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Arbitrary-precision arithmetic library",
+ "keywords": [
+ "Arbitrary-precision",
+ "BigInteger",
+ "BigRational",
+ "arithmetic",
+ "bigdecimal",
+ "bignum",
+ "bignumber",
+ "brick",
+ "decimal",
+ "integer",
+ "math",
+ "mathematics",
+ "rational"
+ ],
+ "support": {
+ "issues": "https://github.com/brick/math/issues",
+ "source": "https://github.com/brick/math/tree/0.12.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/BenMorel",
+ "type": "github"
+ }
+ ],
+ "install-path": "../brick/math"
+ },
+ {
+ "name": "google/common-protos",
+ "version": "v4.7.0",
+ "version_normalized": "4.7.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/googleapis/common-protos-php.git",
+ "reference": "e58068776f57605c336e32c7db373f0a81da17b8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/googleapis/common-protos-php/zipball/e58068776f57605c336e32c7db373f0a81da17b8",
+ "reference": "e58068776f57605c336e32c7db373f0a81da17b8",
+ "shasum": ""
+ },
+ "require": {
+ "google/protobuf": "^v3.25.3||^4.26.1",
+ "php": "^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.6"
+ },
+ "time": "2024-07-25T20:20:43+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Google\\Api\\": "src/Api",
+ "Google\\Iam\\": "src/Iam",
+ "Google\\Rpc\\": "src/Rpc",
+ "Google\\Type\\": "src/Type",
+ "Google\\Cloud\\": "src/Cloud",
+ "GPBMetadata\\Google\\Api\\": "metadata/Api",
+ "GPBMetadata\\Google\\Iam\\": "metadata/Iam",
+ "GPBMetadata\\Google\\Rpc\\": "metadata/Rpc",
+ "GPBMetadata\\Google\\Type\\": "metadata/Type",
+ "GPBMetadata\\Google\\Cloud\\": "metadata/Cloud",
+ "GPBMetadata\\Google\\Logging\\": "metadata/Logging"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "description": "Google API Common Protos for PHP",
+ "homepage": "https://github.com/googleapis/common-protos-php",
+ "keywords": [
+ "google"
+ ],
+ "support": {
+ "issues": "https://github.com/googleapis/common-protos-php/issues",
+ "source": "https://github.com/googleapis/common-protos-php/tree/v4.7.0"
+ },
+ "install-path": "../google/common-protos"
+ },
+ {
+ "name": "google/protobuf",
+ "version": "v3.25.4",
+ "version_normalized": "3.25.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/protocolbuffers/protobuf-php.git",
+ "reference": "749f6c8e99a7fe51d096c2db656a4af9a46a6b5e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/749f6c8e99a7fe51d096c2db656a4af9a46a6b5e",
+ "reference": "749f6c8e99a7fe51d096c2db656a4af9a46a6b5e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=5.0.0"
+ },
+ "suggest": {
+ "ext-bcmath": "Need to support JSON deserialization"
+ },
+ "time": "2024-07-24T17:10:25+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Google\\Protobuf\\": "src/Google/Protobuf",
+ "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "proto library for PHP",
+ "homepage": "https://developers.google.com/protocol-buffers/",
+ "keywords": [
+ "proto"
+ ],
+ "support": {
+ "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.25.4"
+ },
+ "install-path": "../google/protobuf"
+ },
+ {
+ "name": "guzzlehttp/guzzle",
+ "version": "6.5.8",
+ "version_normalized": "6.5.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981",
+ "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "guzzlehttp/promises": "^1.0",
+ "guzzlehttp/psr7": "^1.9",
+ "php": ">=5.5",
+ "symfony/polyfill-intl-idn": "^1.17"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
+ "psr/log": "^1.1"
+ },
+ "suggest": {
+ "psr/log": "Required for using the Log middleware"
+ },
+ "time": "2022-06-20T22:16:07+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "6.5-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "src/functions_include.php"
+ ],
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Jeremy Lindblom",
+ "email": "jeremeamia@gmail.com",
+ "homepage": "https://github.com/jeremeamia"
+ },
+ {
+ "name": "George Mponos",
+ "email": "gmponos@gmail.com",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Mรกrk Sรกgi-Kazรกr",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "Guzzle is a PHP HTTP client library",
+ "homepage": "http://guzzlephp.org/",
+ "keywords": [
+ "client",
+ "curl",
+ "framework",
+ "http",
+ "http client",
+ "rest",
+ "web service"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/guzzle/issues",
+ "source": "https://github.com/guzzle/guzzle/tree/6.5.8"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../guzzlehttp/guzzle"
+ },
+ {
+ "name": "guzzlehttp/promises",
+ "version": "1.5.3",
+ "version_normalized": "1.5.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/promises.git",
+ "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e",
+ "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
+ },
+ "time": "2023-05-21T12:31:43+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "src/functions_include.php"
+ ],
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "Guzzle promises library",
+ "keywords": [
+ "promise"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/promises/issues",
+ "source": "https://github.com/guzzle/promises/tree/1.5.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../guzzlehttp/promises"
+ },
+ {
+ "name": "guzzlehttp/psr7",
+ "version": "1.9.1",
+ "version_normalized": "1.9.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b",
+ "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0",
+ "psr/http-message": "~1.0",
+ "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
+ },
+ "provide": {
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "ext-zlib": "*",
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
+ },
+ "suggest": {
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
+ },
+ "time": "2023-04-17T16:00:37+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "src/functions_include.php"
+ ],
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "George Mponos",
+ "email": "gmponos@gmail.com",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Mรกrk Sรกgi-Kazรกr",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "PSR-7 message implementation that also provides common utility methods",
+ "keywords": [
+ "http",
+ "message",
+ "psr-7",
+ "request",
+ "response",
+ "stream",
+ "uri",
+ "url"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/psr7/issues",
+ "source": "https://github.com/guzzle/psr7/tree/1.9.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../guzzlehttp/psr7"
+ },
+ {
+ "name": "monolog/monolog",
+ "version": "3.7.0",
+ "version_normalized": "3.7.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Seldaek/monolog.git",
+ "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f4393b648b78a5408747de94fca38beb5f7e9ef8",
+ "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1",
+ "psr/log": "^2.0 || ^3.0"
+ },
+ "provide": {
+ "psr/log-implementation": "3.0.0"
+ },
+ "require-dev": {
+ "aws/aws-sdk-php": "^3.0",
+ "doctrine/couchdb": "~1.0@dev",
+ "elasticsearch/elasticsearch": "^7 || ^8",
+ "ext-json": "*",
+ "graylog2/gelf-php": "^1.4.2 || ^2.0",
+ "guzzlehttp/guzzle": "^7.4.5",
+ "guzzlehttp/psr7": "^2.2",
+ "mongodb/mongodb": "^1.8",
+ "php-amqplib/php-amqplib": "~2.4 || ^3",
+ "phpstan/phpstan": "^1.9",
+ "phpstan/phpstan-deprecation-rules": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.4",
+ "phpunit/phpunit": "^10.5.17",
+ "predis/predis": "^1.1 || ^2",
+ "ruflin/elastica": "^7",
+ "symfony/mailer": "^5.4 || ^6",
+ "symfony/mime": "^5.4 || ^6"
+ },
+ "suggest": {
+ "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
+ "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
+ "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
+ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
+ "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
+ "ext-mbstring": "Allow to work properly with unicode symbols",
+ "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
+ "ext-openssl": "Required to send log messages using SSL",
+ "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
+ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
+ "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
+ "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
+ "rollbar/rollbar": "Allow sending log messages to Rollbar",
+ "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
+ },
+ "time": "2024-06-28T09:40:51+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Monolog\\": "src/Monolog"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "https://seld.be"
+ }
+ ],
+ "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
+ "homepage": "https://github.com/Seldaek/monolog",
+ "keywords": [
+ "log",
+ "logging",
+ "psr-3"
+ ],
+ "support": {
+ "issues": "https://github.com/Seldaek/monolog/issues",
+ "source": "https://github.com/Seldaek/monolog/tree/3.7.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Seldaek",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../monolog/monolog"
+ },
+ {
+ "name": "nyholm/dsn",
+ "version": "2.0.1",
+ "version_normalized": "2.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Nyholm/dsn.git",
+ "reference": "9445621b426bac8c0ca161db8cd700da00a4e618"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Nyholm/dsn/zipball/9445621b426bac8c0ca161db8cd700da00a4e618",
+ "reference": "9445621b426bac8c0ca161db8cd700da00a4e618",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^5.1"
+ },
+ "time": "2021-11-18T09:23:29+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Nyholm\\Dsn\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com"
+ }
+ ],
+ "description": "Parse your DSN strings in a powerful and flexible way",
+ "homepage": "http://tnyholm.se",
+ "keywords": [
+ "database",
+ "dsn",
+ "dsn parser",
+ "parser"
+ ],
+ "support": {
+ "issues": "https://github.com/Nyholm/dsn/issues",
+ "source": "https://github.com/Nyholm/dsn/tree/2.0.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ }
+ ],
+ "install-path": "../nyholm/dsn"
+ },
+ {
+ "name": "nyholm/psr7",
+ "version": "1.8.1",
+ "version_normalized": "1.8.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Nyholm/psr7.git",
+ "reference": "aa5fc277a4f5508013d571341ade0c3886d4d00e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Nyholm/psr7/zipball/aa5fc277a4f5508013d571341ade0c3886d4d00e",
+ "reference": "aa5fc277a4f5508013d571341ade0c3886d4d00e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2",
+ "psr/http-factory": "^1.0",
+ "psr/http-message": "^1.1 || ^2.0"
+ },
+ "provide": {
+ "php-http/message-factory-implementation": "1.0",
+ "psr/http-factory-implementation": "1.0",
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "http-interop/http-factory-tests": "^0.9",
+ "php-http/message-factory": "^1.0",
+ "php-http/psr7-integration-tests": "^1.0",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4",
+ "symfony/error-handler": "^4.4"
+ },
+ "time": "2023-11-13T09:31:12+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.8-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Nyholm\\Psr7\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com"
+ },
+ {
+ "name": "Martijn van der Ven",
+ "email": "martijn@vanderven.se"
+ }
+ ],
+ "description": "A fast PHP7 implementation of PSR-7",
+ "homepage": "https://tnyholm.se",
+ "keywords": [
+ "psr-17",
+ "psr-7"
+ ],
+ "support": {
+ "issues": "https://github.com/Nyholm/psr7/issues",
+ "source": "https://github.com/Nyholm/psr7/tree/1.8.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Zegnat",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nyholm",
+ "type": "github"
+ }
+ ],
+ "install-path": "../nyholm/psr7"
+ },
+ {
+ "name": "open-telemetry/api",
+ "version": "0.0.10",
+ "version_normalized": "0.0.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/api.git",
+ "reference": "1fe1958dabb4f7df3c683156d00db9304f9c235b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/1fe1958dabb4f7df3c683156d00db9304f9c235b",
+ "reference": "1fe1958dabb4f7df3c683156d00db9304f9c235b",
+ "shasum": ""
+ },
+ "require": {
+ "open-telemetry/context": "self.version",
+ "open-telemetry/sem-conv": "self.version",
+ "php": "^7.4 || ^8.0"
+ },
+ "time": "2022-04-27T12:09:42+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\API\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "description": "API for OpenTelemetry PHP.",
+ "keywords": [
+ "Metrics",
+ "api",
+ "apm",
+ "logging",
+ "opentelemetry",
+ "otel",
+ "tracing"
+ ],
+ "support": {
+ "issues": "https://github.com/opentelemetry-php/api/issues",
+ "source": "https://github.com/opentelemetry-php/api/tree/0.0.10"
+ },
+ "install-path": "../open-telemetry/api"
+ },
+ {
+ "name": "open-telemetry/context",
+ "version": "0.0.10",
+ "version_normalized": "0.0.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/context.git",
+ "reference": "7cb8fe4bdab1b0c7e2ae9586def6bef22edc8206"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/7cb8fe4bdab1b0c7e2ae9586def6bef22edc8206",
+ "reference": "7cb8fe4bdab1b0c7e2ae9586def6bef22edc8206",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "suggest": {
+ "ext-ffi": "To allow context switching in Fibers"
+ },
+ "time": "2021-12-31T02:19:23+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\Context\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "description": "Context implementation for OpenTelemetry PHP.",
+ "keywords": [
+ "Context",
+ "Metrics",
+ "apm",
+ "logging",
+ "opentelemetry",
+ "otel",
+ "tracing"
+ ],
+ "support": {
+ "issues": "https://github.com/opentelemetry-php/context/issues",
+ "source": "https://github.com/opentelemetry-php/context/tree/0.0.10"
+ },
+ "install-path": "../open-telemetry/context"
+ },
+ {
+ "name": "open-telemetry/sdk",
+ "version": "0.0.10",
+ "version_normalized": "0.0.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/sdk.git",
+ "reference": "a4c1ded76ca876d24abc462efcd6b787211ce4b4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/a4c1ded76ca876d24abc462efcd6b787211ce4b4",
+ "reference": "a4c1ded76ca876d24abc462efcd6b787211ce4b4",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "nyholm/dsn": "^2.0.0",
+ "open-telemetry/api": "self.version",
+ "open-telemetry/context": "self.version",
+ "open-telemetry/sem-conv": "self.version",
+ "php": "^7.4 || ^8.0",
+ "php-http/async-client-implementation": "^1.0",
+ "php-http/discovery": "^1.14",
+ "psr/http-factory-implementation": "^1.0",
+ "psr/log": "^1.1|^2.0|^3.0",
+ "symfony/polyfill-mbstring": "^1.23"
+ },
+ "suggest": {
+ "ext-mbstring": "To increase performance of string operations"
+ },
+ "time": "2022-04-27T12:09:42+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\SDK\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "description": "SDK for OpenTelemetry PHP.",
+ "keywords": [
+ "Metrics",
+ "apm",
+ "logging",
+ "opentelemetry",
+ "otel",
+ "sdk",
+ "tracing"
+ ],
+ "support": {
+ "issues": "https://github.com/opentelemetry-php/sdk/issues",
+ "source": "https://github.com/opentelemetry-php/sdk/tree/0.0.10"
+ },
+ "install-path": "../open-telemetry/sdk"
+ },
+ {
+ "name": "open-telemetry/sem-conv",
+ "version": "0.0.10",
+ "version_normalized": "0.0.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/sem-conv.git",
+ "reference": "04111a1cd9d0ed459edbae8ac3fdea48b4ae3178"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/04111a1cd9d0ed459edbae8ac3fdea48b4ae3178",
+ "reference": "04111a1cd9d0ed459edbae8ac3fdea48b4ae3178",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "time": "2022-02-16T07:32:22+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\SemConv\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "description": "Semantic conventions for OpenTelemetry PHP.",
+ "keywords": [
+ "Metrics",
+ "apm",
+ "logging",
+ "opentelemetry",
+ "otel",
+ "semantic conventions",
+ "semconv",
+ "tracing"
+ ],
+ "support": {
+ "issues": "https://github.com/opentelemetry-php/sem-conv/issues",
+ "source": "https://github.com/opentelemetry-php/sem-conv/tree/0.0.10"
+ },
+ "install-path": "../open-telemetry/sem-conv"
+ },
+ {
+ "name": "php-http/discovery",
+ "version": "1.19.4",
+ "version_normalized": "1.19.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/discovery.git",
+ "reference": "0700efda8d7526335132360167315fdab3aeb599"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/discovery/zipball/0700efda8d7526335132360167315fdab3aeb599",
+ "reference": "0700efda8d7526335132360167315fdab3aeb599",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.0|^2.0",
+ "php": "^7.1 || ^8.0"
+ },
+ "conflict": {
+ "nyholm/psr7": "<1.0",
+ "zendframework/zend-diactoros": "*"
+ },
+ "provide": {
+ "php-http/async-client-implementation": "*",
+ "php-http/client-implementation": "*",
+ "psr/http-client-implementation": "*",
+ "psr/http-factory-implementation": "*",
+ "psr/http-message-implementation": "*"
+ },
+ "require-dev": {
+ "composer/composer": "^1.0.2|^2.0",
+ "graham-campbell/phpspec-skip-example-extension": "^5.0",
+ "php-http/httplug": "^1.0 || ^2.0",
+ "php-http/message-factory": "^1.0",
+ "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3",
+ "sebastian/comparator": "^3.0.5 || ^4.0.8",
+ "symfony/phpunit-bridge": "^6.4.4 || ^7.0.1"
+ },
+ "time": "2024-03-29T13:00:05+00:00",
+ "type": "composer-plugin",
+ "extra": {
+ "class": "Http\\Discovery\\Composer\\Plugin",
+ "plugin-optional": true
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Http\\Discovery\\": "src/"
+ },
+ "exclude-from-classmap": [
+ "src/Composer/Plugin.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mรกrk Sรกgi-Kazรกr",
+ "email": "mark.sagikazar@gmail.com"
+ }
+ ],
+ "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations",
+ "homepage": "http://php-http.org",
+ "keywords": [
+ "adapter",
+ "client",
+ "discovery",
+ "factory",
+ "http",
+ "message",
+ "psr17",
+ "psr7"
+ ],
+ "support": {
+ "issues": "https://github.com/php-http/discovery/issues",
+ "source": "https://github.com/php-http/discovery/tree/1.19.4"
+ },
+ "install-path": "../php-http/discovery"
+ },
+ {
+ "name": "php-http/guzzle6-adapter",
+ "version": "v2.0.2",
+ "version_normalized": "2.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/guzzle6-adapter.git",
+ "reference": "9d1a45eb1c59f12574552e81fb295e9e53430a56"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/9d1a45eb1c59f12574552e81fb295e9e53430a56",
+ "reference": "9d1a45eb1c59f12574552e81fb295e9e53430a56",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/guzzle": "^6.0",
+ "php": "^7.1 || ^8.0",
+ "php-http/httplug": "^2.0",
+ "psr/http-client": "^1.0"
+ },
+ "provide": {
+ "php-http/async-client-implementation": "1.0",
+ "php-http/client-implementation": "1.0",
+ "psr/http-client-implementation": "1.0"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "php-http/client-integration-tests": "^2.0 || ^3.0",
+ "phpunit/phpunit": "^7.4 || ^8.4"
+ },
+ "time": "2021-03-02T10:52:33+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Http\\Adapter\\Guzzle6\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "David de Boer",
+ "email": "david@ddeboer.nl"
+ },
+ {
+ "name": "Mรกrk Sรกgi-Kazรกr",
+ "email": "mark.sagikazar@gmail.com"
+ }
+ ],
+ "description": "Guzzle 6 HTTP Adapter",
+ "homepage": "http://httplug.io",
+ "keywords": [
+ "Guzzle",
+ "http"
+ ],
+ "support": {
+ "issues": "https://github.com/php-http/guzzle6-adapter/issues",
+ "source": "https://github.com/php-http/guzzle6-adapter/tree/v2.0.2"
+ },
+ "abandoned": "guzzlehttp/guzzle or php-http/guzzle7-adapter",
+ "install-path": "../php-http/guzzle6-adapter"
+ },
+ {
+ "name": "php-http/httplug",
+ "version": "2.4.0",
+ "version_normalized": "2.4.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/httplug.git",
+ "reference": "625ad742c360c8ac580fcc647a1541d29e257f67"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/httplug/zipball/625ad742c360c8ac580fcc647a1541d29e257f67",
+ "reference": "625ad742c360c8ac580fcc647a1541d29e257f67",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0",
+ "php-http/promise": "^1.1",
+ "psr/http-client": "^1.0",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "require-dev": {
+ "friends-of-phpspec/phpspec-code-coverage": "^4.1 || ^5.0 || ^6.0",
+ "phpspec/phpspec": "^5.1 || ^6.0 || ^7.0"
+ },
+ "time": "2023-04-14T15:10:03+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Http\\Client\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Eric GELOEN",
+ "email": "geloen.eric@gmail.com"
+ },
+ {
+ "name": "Mรกrk Sรกgi-Kazรกr",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://sagikazarmark.hu"
+ }
+ ],
+ "description": "HTTPlug, the HTTP client abstraction for PHP",
+ "homepage": "http://httplug.io",
+ "keywords": [
+ "client",
+ "http"
+ ],
+ "support": {
+ "issues": "https://github.com/php-http/httplug/issues",
+ "source": "https://github.com/php-http/httplug/tree/2.4.0"
+ },
+ "install-path": "../php-http/httplug"
+ },
+ {
+ "name": "php-http/message-factory",
+ "version": "1.1.0",
+ "version_normalized": "1.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/message-factory.git",
+ "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/message-factory/zipball/4d8778e1c7d405cbb471574821c1ff5b68cc8f57",
+ "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "time": "2023-04-14T14:16:17+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Http\\Message\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mรกrk Sรกgi-Kazรกr",
+ "email": "mark.sagikazar@gmail.com"
+ }
+ ],
+ "description": "Factory interfaces for PSR-7 HTTP Message",
+ "homepage": "http://php-http.org",
+ "keywords": [
+ "factory",
+ "http",
+ "message",
+ "stream",
+ "uri"
+ ],
+ "support": {
+ "issues": "https://github.com/php-http/message-factory/issues",
+ "source": "https://github.com/php-http/message-factory/tree/1.1.0"
+ },
+ "abandoned": "psr/http-factory",
+ "install-path": "../php-http/message-factory"
+ },
+ {
+ "name": "php-http/promise",
+ "version": "1.3.1",
+ "version_normalized": "1.3.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/promise.git",
+ "reference": "fc85b1fba37c169a69a07ef0d5a8075770cc1f83"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/promise/zipball/fc85b1fba37c169a69a07ef0d5a8075770cc1f83",
+ "reference": "fc85b1fba37c169a69a07ef0d5a8075770cc1f83",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "friends-of-phpspec/phpspec-code-coverage": "^4.3.2 || ^6.3",
+ "phpspec/phpspec": "^5.1.2 || ^6.2 || ^7.4"
+ },
+ "time": "2024-03-15T13:55:21+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Http\\Promise\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Joel Wurtz",
+ "email": "joel.wurtz@gmail.com"
+ },
+ {
+ "name": "Mรกrk Sรกgi-Kazรกr",
+ "email": "mark.sagikazar@gmail.com"
+ }
+ ],
+ "description": "Promise used for asynchronous HTTP requests",
+ "homepage": "http://httplug.io",
+ "keywords": [
+ "promise"
+ ],
+ "support": {
+ "issues": "https://github.com/php-http/promise/issues",
+ "source": "https://github.com/php-http/promise/tree/1.3.1"
+ },
+ "install-path": "../php-http/promise"
+ },
+ {
+ "name": "psr/container",
+ "version": "2.0.2",
+ "version_normalized": "2.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
+ "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.4.0"
+ },
+ "time": "2021-11-05T16:47:00+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/2.0.2"
+ },
+ "install-path": "../psr/container"
+ },
+ {
+ "name": "psr/http-client",
+ "version": "1.0.3",
+ "version_normalized": "1.0.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-client.git",
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0 || ^8.0",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "time": "2023-09-23T14:17:50+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Client\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP clients",
+ "homepage": "https://github.com/php-fig/http-client",
+ "keywords": [
+ "http",
+ "http-client",
+ "psr",
+ "psr-18"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/http-client"
+ },
+ "install-path": "../psr/http-client"
+ },
+ {
+ "name": "psr/http-factory",
+ "version": "1.1.0",
+ "version_normalized": "1.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-factory.git",
+ "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
+ "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "time": "2024-04-15T12:06:14+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
+ "keywords": [
+ "factory",
+ "http",
+ "message",
+ "psr",
+ "psr-17",
+ "psr-7",
+ "request",
+ "response"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/http-factory"
+ },
+ "install-path": "../psr/http-factory"
+ },
+ {
+ "name": "psr/http-message",
+ "version": "1.1",
+ "version_normalized": "1.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-message.git",
+ "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+ "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "time": "2023-04-04T09:50:52+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP messages",
+ "homepage": "https://github.com/php-fig/http-message",
+ "keywords": [
+ "http",
+ "http-message",
+ "psr",
+ "psr-7",
+ "request",
+ "response"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/http-message/tree/1.1"
+ },
+ "install-path": "../psr/http-message"
+ },
+ {
+ "name": "psr/log",
+ "version": "3.0.0",
+ "version_normalized": "3.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
+ "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.0.0"
+ },
+ "time": "2021-07-14T16:46:02+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/3.0.0"
+ },
+ "install-path": "../psr/log"
+ },
+ {
+ "name": "psr/simple-cache",
+ "version": "3.0.0",
+ "version_normalized": "3.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/simple-cache.git",
+ "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865",
+ "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.0.0"
+ },
+ "time": "2021-10-29T13:26:27+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\SimpleCache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interfaces for simple caching",
+ "keywords": [
+ "cache",
+ "caching",
+ "psr",
+ "psr-16",
+ "simple-cache"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/simple-cache/tree/3.0.0"
+ },
+ "install-path": "../psr/simple-cache"
+ },
+ {
+ "name": "ralouphie/getallheaders",
+ "version": "3.0.3",
+ "version_normalized": "3.0.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ralouphie/getallheaders.git",
+ "reference": "120b605dfeb996808c31b6477290a714d356e822"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
+ "reference": "120b605dfeb996808c31b6477290a714d356e822",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6"
+ },
+ "require-dev": {
+ "php-coveralls/php-coveralls": "^2.1",
+ "phpunit/phpunit": "^5 || ^6.5"
+ },
+ "time": "2019-03-08T08:55:37+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "src/getallheaders.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ralph Khattar",
+ "email": "ralph.khattar@gmail.com"
+ }
+ ],
+ "description": "A polyfill for getallheaders.",
+ "support": {
+ "issues": "https://github.com/ralouphie/getallheaders/issues",
+ "source": "https://github.com/ralouphie/getallheaders/tree/develop"
+ },
+ "install-path": "../ralouphie/getallheaders"
+ },
+ {
+ "name": "ramsey/collection",
+ "version": "2.0.0",
+ "version_normalized": "2.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ramsey/collection.git",
+ "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
+ "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "captainhook/plugin-composer": "^5.3",
+ "ergebnis/composer-normalize": "^2.28.3",
+ "fakerphp/faker": "^1.21",
+ "hamcrest/hamcrest-php": "^2.0",
+ "jangregor/phpstan-prophecy": "^1.0",
+ "mockery/mockery": "^1.5",
+ "php-parallel-lint/php-console-highlighter": "^1.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3",
+ "phpcsstandards/phpcsutils": "^1.0.0-rc1",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpstan/extension-installer": "^1.2",
+ "phpstan/phpstan": "^1.9",
+ "phpstan/phpstan-mockery": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.3",
+ "phpunit/phpunit": "^9.5",
+ "psalm/plugin-mockery": "^1.1",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "ramsey/coding-standard": "^2.0.3",
+ "ramsey/conventional-commits": "^1.3",
+ "vimeo/psalm": "^5.4"
+ },
+ "time": "2022-12-31T21:50:55+00:00",
+ "type": "library",
+ "extra": {
+ "captainhook": {
+ "force-install": true
+ },
+ "ramsey/conventional-commits": {
+ "configFile": "conventional-commits.json"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Ramsey\\Collection\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ben Ramsey",
+ "email": "ben@benramsey.com",
+ "homepage": "https://benramsey.com"
+ }
+ ],
+ "description": "A PHP library for representing and manipulating collections.",
+ "keywords": [
+ "array",
+ "collection",
+ "hash",
+ "map",
+ "queue",
+ "set"
+ ],
+ "support": {
+ "issues": "https://github.com/ramsey/collection/issues",
+ "source": "https://github.com/ramsey/collection/tree/2.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ramsey",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/ramsey/collection",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../ramsey/collection"
+ },
+ {
+ "name": "ramsey/uuid",
+ "version": "4.7.6",
+ "version_normalized": "4.7.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ramsey/uuid.git",
+ "reference": "91039bc1faa45ba123c4328958e620d382ec7088"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088",
+ "reference": "91039bc1faa45ba123c4328958e620d382ec7088",
+ "shasum": ""
+ },
+ "require": {
+ "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12",
+ "ext-json": "*",
+ "php": "^8.0",
+ "ramsey/collection": "^1.2 || ^2.0"
+ },
+ "replace": {
+ "rhumsaa/uuid": "self.version"
+ },
+ "require-dev": {
+ "captainhook/captainhook": "^5.10",
+ "captainhook/plugin-composer": "^5.3",
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
+ "doctrine/annotations": "^1.8",
+ "ergebnis/composer-normalize": "^2.15",
+ "mockery/mockery": "^1.3",
+ "paragonie/random-lib": "^2",
+ "php-mock/php-mock": "^2.2",
+ "php-mock/php-mock-mockery": "^1.3",
+ "php-parallel-lint/php-parallel-lint": "^1.1",
+ "phpbench/phpbench": "^1.0",
+ "phpstan/extension-installer": "^1.1",
+ "phpstan/phpstan": "^1.8",
+ "phpstan/phpstan-mockery": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.1",
+ "phpunit/phpunit": "^8.5 || ^9",
+ "ramsey/composer-repl": "^1.4",
+ "slevomat/coding-standard": "^8.4",
+ "squizlabs/php_codesniffer": "^3.5",
+ "vimeo/psalm": "^4.9"
+ },
+ "suggest": {
+ "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
+ "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.",
+ "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.",
+ "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
+ "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
+ },
+ "time": "2024-04-27T21:32:50+00:00",
+ "type": "library",
+ "extra": {
+ "captainhook": {
+ "force-install": true
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "src/functions.php"
+ ],
+ "psr-4": {
+ "Ramsey\\Uuid\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).",
+ "keywords": [
+ "guid",
+ "identifier",
+ "uuid"
+ ],
+ "support": {
+ "issues": "https://github.com/ramsey/uuid/issues",
+ "source": "https://github.com/ramsey/uuid/tree/4.7.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ramsey",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../ramsey/uuid"
+ },
+ {
+ "name": "roadrunner-php/app-logger",
+ "version": "1.2.0",
+ "version_normalized": "1.2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/app-logger.git",
+ "reference": "555a31933c7797cfb5749a5c7176d39c2b368183"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/app-logger/zipball/555a31933c7797cfb5749a5c7176d39c2b368183",
+ "reference": "555a31933c7797cfb5749a5c7176d39c2b368183",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "php": ">=8.1",
+ "roadrunner-php/roadrunner-api-dto": "^1.4",
+ "spiral/goridge": "^3.1 || ^4.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.5",
+ "phpunit/phpunit": "^10.0",
+ "vimeo/psalm": ">=5.8"
+ },
+ "time": "2023-12-22T06:01:40+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "RoadRunner\\Logger\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kirill Astakhov (kastahov)",
+ "email": "kirill.astakhov@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/spiral/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "Send log messages to RoadRunner",
+ "support": {
+ "source": "https://github.com/roadrunner-php/app-logger/tree/1.2.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../roadrunner-php/app-logger"
+ },
+ {
+ "name": "roadrunner-php/centrifugo",
+ "version": "v2.2.0",
+ "version_normalized": "2.2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/centrifugo.git",
+ "reference": "97872398825c9c6cbe4f882474ec476361360629"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/centrifugo/zipball/97872398825c9c6cbe4f882474ec476361360629",
+ "reference": "97872398825c9c6cbe4f882474ec476361360629",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "google/protobuf": "^3.7 || ^4.0",
+ "php": ">=8.1",
+ "roadrunner-php/roadrunner-api-dto": "^1.0",
+ "spiral/goridge": "^4.0",
+ "spiral/roadrunner": "^2023.1 || ^2024.1",
+ "spiral/roadrunner-worker": "^3.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.5",
+ "phpunit/phpunit": "^10.0",
+ "vimeo/psalm": ">= 5.8"
+ },
+ "time": "2024-07-22T07:42:16+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "RoadRunner\\Centrifugo\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "Kirill Nesmeyanov (SerafimArts)",
+ "email": "kirill.nesmeyanov@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/spiral/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner: Centrifugo bridge",
+ "homepage": "https://roadrunner.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/centrifugo/tree/v2.2.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../roadrunner-php/centrifugo"
+ },
+ {
+ "name": "roadrunner-php/roadrunner-api-dto",
+ "version": "v1.8.0",
+ "version_normalized": "1.8.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/roadrunner-api-dto.git",
+ "reference": "a6dfcbaadad5448920fdc24f293f7e7039e0ccb6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/roadrunner-api-dto/zipball/a6dfcbaadad5448920fdc24f293f7e7039e0ccb6",
+ "reference": "a6dfcbaadad5448920fdc24f293f7e7039e0ccb6",
+ "shasum": ""
+ },
+ "require": {
+ "google/protobuf": "^3.22 || ^4.0",
+ "php": "^8.1"
+ },
+ "conflict": {
+ "temporal/sdk": "<2.9.0"
+ },
+ "suggest": {
+ "google/common-protos": "Required for Temporal API"
+ },
+ "time": "2024-07-12T06:50:39+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Temporal\\": "generated/Temporal",
+ "RoadRunner\\": "generated/RoadRunner",
+ "GPBMetadata\\": "generated/GPBMetadata"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Pavel Butchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner PHP API",
+ "homepage": "https://roadrunner.dev",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/roadrunner-api-dto/tree/v1.8.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../roadrunner-php/roadrunner-api-dto"
+ },
+ {
+ "name": "spiral/core",
+ "version": "3.13.0",
+ "version_normalized": "3.13.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spiral/core.git",
+ "reference": "af62783e8b9ec8020966599eb42abe53c19d5286"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spiral/core/zipball/af62783e8b9ec8020966599eb42abe53c19d5286",
+ "reference": "af62783e8b9ec8020966599eb42abe53c19d5286",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1",
+ "psr/container": "^1.1|^2.0"
+ },
+ "provide": {
+ "psr/container-implementation": "^1.1|^2.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.5",
+ "phpunit/phpunit": "^10.1",
+ "vimeo/psalm": "^5.9"
+ },
+ "time": "2024-05-22T18:42:09+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.13.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\Core\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Butchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ }
+ ],
+ "description": "IoC container, IoC scopes, factory, memory, configuration interfaces",
+ "homepage": "https://spiral.dev",
+ "support": {
+ "issues": "https://github.com/spiral/framework/issues",
+ "source": "https://github.com/spiral/core"
+ },
+ "install-path": "../spiral/core"
+ },
+ {
+ "name": "spiral/goridge",
+ "version": "v4.2.0",
+ "version_normalized": "4.2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/goridge.git",
+ "reference": "c6696bd1834f5e88d1252a953a1336c041795411"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/goridge/zipball/c6696bd1834f5e88d1252a953a1336c041795411",
+ "reference": "c6696bd1834f5e88d1252a953a1336c041795411",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "ext-sockets": "*",
+ "php": ">=8.1",
+ "spiral/roadrunner": "^2023 || ^2024.1"
+ },
+ "require-dev": {
+ "google/protobuf": "^3.22",
+ "infection/infection": "^0.26.1",
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "phpunit/phpunit": "^10.0",
+ "rybakit/msgpack": "^0.7",
+ "vimeo/psalm": "^5.9"
+ },
+ "suggest": {
+ "ext-msgpack": "MessagePack codec support",
+ "ext-protobuf": "Protobuf codec support",
+ "google/protobuf": "(^3.0) Protobuf codec support",
+ "rybakit/msgpack": "(^0.7) MessagePack codec support"
+ },
+ "time": "2024-04-11T17:26:14+00:00",
+ "type": "goridge",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\Goridge\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Valery Piashchynski",
+ "homepage": "https://github.com/rustatian"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "homepage": "https://github.com/roxblnfk"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "High-performance PHP-to-Golang RPC bridge",
+ "homepage": "https://spiral.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/goridge/tree/v4.2.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../spiral/goridge"
+ },
+ {
+ "name": "spiral/logger",
+ "version": "3.13.0",
+ "version_normalized": "3.13.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spiral/logger.git",
+ "reference": "41a62ce66698600dae062bf8421077f3fde23e26"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spiral/logger/zipball/41a62ce66698600dae062bf8421077f3fde23e26",
+ "reference": "41a62ce66698600dae062bf8421077f3fde23e26",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1",
+ "psr/log": "1 - 3",
+ "spiral/core": "^3.13"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.5",
+ "phpunit/phpunit": "^10.1",
+ "vimeo/psalm": "^5.9"
+ },
+ "time": "2024-05-22T18:44:09+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.13.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\Logger\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Butchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ }
+ ],
+ "description": "LogFactory and global log listeners",
+ "homepage": "https://spiral.dev",
+ "support": {
+ "issues": "https://github.com/spiral/framework/issues",
+ "source": "https://github.com/spiral/logger"
+ },
+ "install-path": "../spiral/logger"
+ },
+ {
+ "name": "spiral/roadrunner",
+ "version": "v2023.3.12",
+ "version_normalized": "2023.3.12.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-server/roadrunner.git",
+ "reference": "9b5b65e00c6de7327142a8d689646f950fe00788"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-server/roadrunner/zipball/9b5b65e00c6de7327142a8d689646f950fe00788",
+ "reference": "9b5b65e00c6de7327142a8d689646f950fe00788",
+ "shasum": ""
+ },
+ "time": "2024-02-29T18:16:45+00:00",
+ "type": "metapackage",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov / Wolfy-J",
+ "email": "wolfy.jd@gmail.com"
+ },
+ {
+ "name": "Valery Piashchynski",
+ "homepage": "https://github.com/rustatian"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins",
+ "homepage": "https://roadrunner.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://roadrunner.dev/docs",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-server/roadrunner/tree/v2023.3.12"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": null
+ },
+ {
+ "name": "spiral/roadrunner-grpc",
+ "version": "v3.4.0",
+ "version_normalized": "3.4.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/grpc.git",
+ "reference": "ddb3e21c36d6409e4d6c36841cc629feb143d8a1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/grpc/zipball/ddb3e21c36d6409e4d6c36841cc629feb143d8a1",
+ "reference": "ddb3e21c36d6409e4d6c36841cc629feb143d8a1",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "google/common-protos": "^3.1|^4.0",
+ "google/protobuf": "^3.7 || ^4.0",
+ "php": ">=8.1",
+ "spiral/goridge": "^4.0",
+ "spiral/roadrunner": "^2023.1 || ^2024.1",
+ "spiral/roadrunner-worker": "^3.0"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "mockery/mockery": "^1.4",
+ "phpunit/phpunit": "^10.0",
+ "vimeo/psalm": ">=5.8"
+ },
+ "time": "2024-07-22T07:46:54+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\GRPC\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/spiral/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "High-Performance GRPC server for PHP applications",
+ "homepage": "https://roadrunner.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/grpc/tree/v3.4.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../spiral/roadrunner-grpc"
+ },
+ {
+ "name": "spiral/roadrunner-http",
+ "version": "v3.5.1",
+ "version_normalized": "3.5.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/http.git",
+ "reference": "213cd0d5c0fba1548f22a5f5ff333afa88fe24ae"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/http/zipball/213cd0d5c0fba1548f22a5f5ff333afa88fe24ae",
+ "reference": "213cd0d5c0fba1548f22a5f5ff333afa88fe24ae",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "php": ">=8.1",
+ "psr/http-factory": "^1.0.1",
+ "psr/http-message": "^1.0.1 || ^2.0",
+ "roadrunner-php/roadrunner-api-dto": "^1.6",
+ "spiral/roadrunner": "^2023.3 || ^2024.1",
+ "spiral/roadrunner-worker": "^3.5",
+ "symfony/polyfill-php83": "^1.29"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "nyholm/psr7": "^1.3",
+ "phpunit/phpunit": "^10.0",
+ "symfony/process": "^6.2 || ^7.0",
+ "vimeo/psalm": "^5.9"
+ },
+ "suggest": {
+ "ext-protobuf": "Provides Protocol Buffers support. Without it, performance will be lower.",
+ "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools"
+ },
+ "time": "2024-04-26T11:16:10+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\Http\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Valery Piashchynski",
+ "homepage": "https://github.com/rustatian"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "homepage": "https://github.com/roxblnfk"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner: HTTP and PSR-7 worker",
+ "homepage": "https://spiral.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/http/tree/v3.5.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../spiral/roadrunner-http"
+ },
+ {
+ "name": "spiral/roadrunner-jobs",
+ "version": "v4.5.0",
+ "version_normalized": "4.5.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/jobs.git",
+ "reference": "9842316c03a4a21030ac78cd8829245a849d60d0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/jobs/zipball/9842316c03a4a21030ac78cd8829245a849d60d0",
+ "reference": "9842316c03a4a21030ac78cd8829245a849d60d0",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "google/protobuf": "^v3.17",
+ "php": ">=8.1",
+ "ramsey/uuid": "^3 || ^4",
+ "roadrunner-php/roadrunner-api-dto": "^1.0",
+ "spiral/goridge": "^4.0",
+ "spiral/roadrunner": "^2023.1 || ^2024.1",
+ "spiral/roadrunner-worker": "^3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^10.0",
+ "roave/security-advisories": "dev-master",
+ "vimeo/psalm": ">=5.8"
+ },
+ "time": "2024-06-25T08:13:52+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\Jobs\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "Kirill Nesmeyanov (SerafimArts)",
+ "email": "kirill.nesmeyanov@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/spiral/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner Queues (Jobs) plugin API library",
+ "homepage": "https://roadrunner.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/jobs/tree/v4.5.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../spiral/roadrunner-jobs"
+ },
+ {
+ "name": "spiral/roadrunner-kv",
+ "version": "v4.3.0",
+ "version_normalized": "4.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/kv.git",
+ "reference": "bc6e14298988a7fbb2a22f8f2f894bea32a47091"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/kv/zipball/bc6e14298988a7fbb2a22f8f2f894bea32a47091",
+ "reference": "bc6e14298988a7fbb2a22f8f2f894bea32a47091",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "php": ">=8.1",
+ "psr/simple-cache": "2 - 3",
+ "roadrunner-php/roadrunner-api-dto": "^1.0",
+ "spiral/goridge": "^4.2",
+ "spiral/roadrunner": "^2023.1 || ^2024.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^10.0",
+ "roave/security-advisories": "dev-master",
+ "vimeo/psalm": ">=5.8"
+ },
+ "suggest": {
+ "ext-igbinary": "(>3.1.6) Igbinary serailizer support",
+ "ext-sodium": "Sodium serailizer support"
+ },
+ "time": "2024-07-25T09:15:02+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\KeyValue\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Wolfy-J",
+ "email": "wolfy.jd@gmail.com"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "Kirill Nesmeyanov (SerafimArts)",
+ "email": "kirill.nesmeyanov@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/spiral/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner kv plugin bridge",
+ "homepage": "https://roadrunner.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/kv/tree/v4.3.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../spiral/roadrunner-kv"
+ },
+ {
+ "name": "spiral/roadrunner-metrics",
+ "version": "v3.2.0",
+ "version_normalized": "3.2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/metrics.git",
+ "reference": "ad5e245bf68a7f50bc9f7c6de7f5fd60370120c4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/metrics/zipball/ad5e245bf68a7f50bc9f7c6de7f5fd60370120c4",
+ "reference": "ad5e245bf68a7f50bc9f7c6de7f5fd60370120c4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1",
+ "psr/log": ">=2.0",
+ "spiral/goridge": "^4.0",
+ "spiral/roadrunner": "^2023.1 || ^2024.1"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "phpunit/phpunit": "^10.0",
+ "vimeo/psalm": ">=5.8"
+ },
+ "suggest": {
+ "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools"
+ },
+ "time": "2024-04-11T18:10:28+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\Metrics\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "Kirill Nesmeyanov (SerafimArts)",
+ "email": "kirill.nesmeyanov@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/spiral/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner: Prometheus metrics RPC",
+ "homepage": "https://roadrunner.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/metrics/tree/v3.2.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../spiral/roadrunner-metrics"
+ },
+ {
+ "name": "spiral/roadrunner-services",
+ "version": "v2.2.0",
+ "version_normalized": "2.2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/services.git",
+ "reference": "5479afa853f1f4d62a40846bc3b7e71648bca0ee"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/services/zipball/5479afa853f1f4d62a40846bc3b7e71648bca0ee",
+ "reference": "5479afa853f1f4d62a40846bc3b7e71648bca0ee",
+ "shasum": ""
+ },
+ "require": {
+ "google/protobuf": "^3.7",
+ "php": ">=8.1",
+ "roadrunner-php/roadrunner-api-dto": "^1.4",
+ "spiral/goridge": "^4.0",
+ "spiral/roadrunner": "^2023.2 || ^2024.1"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.5",
+ "phpunit/phpunit": "^10.0",
+ "vimeo/psalm": ">=5.8"
+ },
+ "time": "2024-04-11T18:04:23+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\Services\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/spiral/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner services manager",
+ "homepage": "https://roadrunner.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/services/tree/v2.2.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../spiral/roadrunner-services"
+ },
+ {
+ "name": "spiral/roadrunner-tcp",
+ "version": "v3.1.0",
+ "version_normalized": "3.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/tcp.git",
+ "reference": "2fc2fa71aa960a45880cc88c1baffc7f94a3d0af"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/tcp/zipball/2fc2fa71aa960a45880cc88c1baffc7f94a3d0af",
+ "reference": "2fc2fa71aa960a45880cc88c1baffc7f94a3d0af",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "php": ">=8.1",
+ "spiral/roadrunner": "^2023.1",
+ "spiral/roadrunner-worker": "^3.0"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "phpunit/phpunit": "^10.5",
+ "vimeo/psalm": ">=5.8"
+ },
+ "suggest": {
+ "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools"
+ },
+ "time": "2024-02-29T10:38:30+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\Tcp\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/spiral/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner: TCP worker",
+ "homepage": "https://roadrunner.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/tcp/tree/v3.1.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../spiral/roadrunner-tcp"
+ },
+ {
+ "name": "spiral/roadrunner-worker",
+ "version": "v3.6.0",
+ "version_normalized": "3.6.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/worker.git",
+ "reference": "44c6f37c6abc25175c2723bd6daaa17651b18036"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/worker/zipball/44c6f37c6abc25175c2723bd6daaa17651b18036",
+ "reference": "44c6f37c6abc25175c2723bd6daaa17651b18036",
+ "shasum": ""
+ },
+ "require": {
+ "composer-runtime-api": "^2.0",
+ "ext-json": "*",
+ "ext-sockets": "*",
+ "php": ">=8.1",
+ "psr/log": "^2.0 || ^3.0",
+ "spiral/goridge": "^4.1.0",
+ "spiral/roadrunner": "^2023.1 || ^2024.1"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "phpunit/phpunit": "^10.0",
+ "symfony/var-dumper": "^6.3 || ^7.0",
+ "vimeo/psalm": "^5.9"
+ },
+ "suggest": {
+ "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools"
+ },
+ "time": "2024-06-03T15:30:19+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Valery Piashchynski",
+ "homepage": "https://github.com/rustatian"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "homepage": "https://github.com/roxblnfk"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner: PHP worker",
+ "homepage": "https://spiral.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://docs.roadrunner.dev",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/worker/tree/v3.6.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "install-path": "../spiral/roadrunner-worker"
+ },
+ {
+ "name": "spiral/tokenizer",
+ "version": "3.13.0",
+ "version_normalized": "3.13.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spiral/tokenizer.git",
+ "reference": "d87660bcccd0bf4e6647fe3caebc539b8afae090"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spiral/tokenizer/zipball/d87660bcccd0bf4e6647fe3caebc539b8afae090",
+ "reference": "d87660bcccd0bf4e6647fe3caebc539b8afae090",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=8.1",
+ "spiral/core": "^3.13",
+ "spiral/logger": "^3.13",
+ "symfony/finder": "^5.3.7 || ^6.0 || ^7.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.6",
+ "phpunit/phpunit": "^10.1",
+ "spiral/attributes": "^2.8|^3.0",
+ "spiral/boot": "^3.13",
+ "spiral/files": "^3.13",
+ "vimeo/psalm": "^5.9"
+ },
+ "time": "2024-05-22T18:46:49+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.13.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\Tokenizer\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Butchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ }
+ ],
+ "description": "Static Analysis: Class and Invocation locators",
+ "homepage": "https://spiral.dev",
+ "support": {
+ "issues": "https://github.com/spiral/framework/issues",
+ "source": "https://github.com/spiral/tokenizer"
+ },
+ "install-path": "../spiral/tokenizer"
+ },
+ {
+ "name": "symfony/finder",
+ "version": "v7.1.3",
+ "version_normalized": "7.1.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/finder.git",
+ "reference": "717c6329886f32dc65e27461f80f2a465412fdca"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/717c6329886f32dc65e27461f80f2a465412fdca",
+ "reference": "717c6329886f32dc65e27461f80f2a465412fdca",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.2"
+ },
+ "require-dev": {
+ "symfony/filesystem": "^6.4|^7.0"
+ },
+ "time": "2024-07-24T07:08:44+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Finder\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Finds files and directories via an intuitive fluent interface",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/finder/tree/v7.1.3"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/finder"
+ },
+ {
+ "name": "symfony/polyfill-intl-idn",
+ "version": "v1.30.0",
+ "version_normalized": "1.30.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-idn.git",
+ "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c",
+ "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1",
+ "symfony/polyfill-intl-normalizer": "^1.10",
+ "symfony/polyfill-php72": "^1.10"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "time": "2024-05-31T15:07:36+00:00",
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Idn\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Laurent Bassin",
+ "email": "laurent@bassin.info"
+ },
+ {
+ "name": "Trevor Rowbotham",
+ "email": "trevor.rowbotham@pm.me"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "idn",
+ "intl",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-intl-idn"
+ },
+ {
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.30.0",
+ "version_normalized": "1.30.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb",
+ "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "time": "2024-05-31T15:07:36+00:00",
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "intl",
+ "normalizer",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-intl-normalizer"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.30.0",
+ "version_normalized": "1.30.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c",
+ "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-mbstring": "*"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "time": "2024-06-19T12:30:46+00:00",
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-mbstring"
+ },
+ {
+ "name": "symfony/polyfill-php72",
+ "version": "v1.30.0",
+ "version_normalized": "1.30.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php72.git",
+ "reference": "10112722600777e02d2745716b70c5db4ca70442"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/10112722600777e02d2745716b70c5db4ca70442",
+ "reference": "10112722600777e02d2745716b70c5db4ca70442",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2024-06-19T12:30:46+00:00",
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php72\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php72/tree/v1.30.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-php72"
+ },
+ {
+ "name": "symfony/polyfill-php83",
+ "version": "v1.30.0",
+ "version_normalized": "1.30.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php83.git",
+ "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9",
+ "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2024-06-19T12:35:24+00:00",
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php83\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php83/tree/v1.30.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-php83"
+ }
+ ],
+ "dev": true,
+ "dev-package-names": []
+}
diff --git a/tests/php_test_files/vendor/composer/installed.php b/tests/php_test_files/vendor/composer/installed.php
new file mode 100644
index 0000000..0fd4c3b
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/installed.php
@@ -0,0 +1,523 @@
+ array(
+ 'name' => 'test/test',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => '91b5a34522020c966e702657530b5c977afd91d5',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'dev' => true,
+ ),
+ 'versions' => array(
+ 'brick/math' => array(
+ 'pretty_version' => '0.12.1',
+ 'version' => '0.12.1.0',
+ 'reference' => 'f510c0a40911935b77b86859eb5223d58d660df1',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../brick/math',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'google/common-protos' => array(
+ 'pretty_version' => 'v4.7.0',
+ 'version' => '4.7.0.0',
+ 'reference' => 'e58068776f57605c336e32c7db373f0a81da17b8',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../google/common-protos',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'google/protobuf' => array(
+ 'pretty_version' => 'v3.25.4',
+ 'version' => '3.25.4.0',
+ 'reference' => '749f6c8e99a7fe51d096c2db656a4af9a46a6b5e',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../google/protobuf',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/guzzle' => array(
+ 'pretty_version' => '6.5.8',
+ 'version' => '6.5.8.0',
+ 'reference' => 'a52f0440530b54fa079ce76e8c5d196a42cad981',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/promises' => array(
+ 'pretty_version' => '1.5.3',
+ 'version' => '1.5.3.0',
+ 'reference' => '67ab6e18aaa14d753cc148911d273f6e6cb6721e',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/promises',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/psr7' => array(
+ 'pretty_version' => '1.9.1',
+ 'version' => '1.9.1.0',
+ 'reference' => 'e4490cabc77465aaee90b20cfc9a770f8c04be6b',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/psr7',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'monolog/monolog' => array(
+ 'pretty_version' => '3.7.0',
+ 'version' => '3.7.0.0',
+ 'reference' => 'f4393b648b78a5408747de94fca38beb5f7e9ef8',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../monolog/monolog',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'nyholm/dsn' => array(
+ 'pretty_version' => '2.0.1',
+ 'version' => '2.0.1.0',
+ 'reference' => '9445621b426bac8c0ca161db8cd700da00a4e618',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../nyholm/dsn',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'nyholm/psr7' => array(
+ 'pretty_version' => '1.8.1',
+ 'version' => '1.8.1.0',
+ 'reference' => 'aa5fc277a4f5508013d571341ade0c3886d4d00e',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../nyholm/psr7',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'open-telemetry/api' => array(
+ 'pretty_version' => '0.0.10',
+ 'version' => '0.0.10.0',
+ 'reference' => '1fe1958dabb4f7df3c683156d00db9304f9c235b',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../open-telemetry/api',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'open-telemetry/context' => array(
+ 'pretty_version' => '0.0.10',
+ 'version' => '0.0.10.0',
+ 'reference' => '7cb8fe4bdab1b0c7e2ae9586def6bef22edc8206',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../open-telemetry/context',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'open-telemetry/sdk' => array(
+ 'pretty_version' => '0.0.10',
+ 'version' => '0.0.10.0',
+ 'reference' => 'a4c1ded76ca876d24abc462efcd6b787211ce4b4',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../open-telemetry/sdk',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'open-telemetry/sem-conv' => array(
+ 'pretty_version' => '0.0.10',
+ 'version' => '0.0.10.0',
+ 'reference' => '04111a1cd9d0ed459edbae8ac3fdea48b4ae3178',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../open-telemetry/sem-conv',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'php-http/async-client-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '*',
+ 1 => '1.0',
+ ),
+ ),
+ 'php-http/client-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '*',
+ 1 => '1.0',
+ ),
+ ),
+ 'php-http/discovery' => array(
+ 'pretty_version' => '1.19.4',
+ 'version' => '1.19.4.0',
+ 'reference' => '0700efda8d7526335132360167315fdab3aeb599',
+ 'type' => 'composer-plugin',
+ 'install_path' => __DIR__ . '/../php-http/discovery',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'php-http/guzzle6-adapter' => array(
+ 'pretty_version' => 'v2.0.2',
+ 'version' => '2.0.2.0',
+ 'reference' => '9d1a45eb1c59f12574552e81fb295e9e53430a56',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../php-http/guzzle6-adapter',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'php-http/httplug' => array(
+ 'pretty_version' => '2.4.0',
+ 'version' => '2.4.0.0',
+ 'reference' => '625ad742c360c8ac580fcc647a1541d29e257f67',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../php-http/httplug',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'php-http/message-factory' => array(
+ 'pretty_version' => '1.1.0',
+ 'version' => '1.1.0.0',
+ 'reference' => '4d8778e1c7d405cbb471574821c1ff5b68cc8f57',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../php-http/message-factory',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'php-http/message-factory-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '1.0',
+ ),
+ ),
+ 'php-http/promise' => array(
+ 'pretty_version' => '1.3.1',
+ 'version' => '1.3.1.0',
+ 'reference' => 'fc85b1fba37c169a69a07ef0d5a8075770cc1f83',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../php-http/promise',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/container' => array(
+ 'pretty_version' => '2.0.2',
+ 'version' => '2.0.2.0',
+ 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/container',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/container-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '^1.1|^2.0',
+ ),
+ ),
+ 'psr/http-client' => array(
+ 'pretty_version' => '1.0.3',
+ 'version' => '1.0.3.0',
+ 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/http-client',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/http-client-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '*',
+ 1 => '1.0',
+ ),
+ ),
+ 'psr/http-factory' => array(
+ 'pretty_version' => '1.1.0',
+ 'version' => '1.1.0.0',
+ 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/http-factory',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/http-factory-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '*',
+ 1 => '1.0',
+ ),
+ ),
+ 'psr/http-message' => array(
+ 'pretty_version' => '1.1',
+ 'version' => '1.1.0.0',
+ 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/http-message',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/http-message-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '*',
+ 1 => '1.0',
+ ),
+ ),
+ 'psr/log' => array(
+ 'pretty_version' => '3.0.0',
+ 'version' => '3.0.0.0',
+ 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/log',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/log-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '3.0.0',
+ ),
+ ),
+ 'psr/simple-cache' => array(
+ 'pretty_version' => '3.0.0',
+ 'version' => '3.0.0.0',
+ 'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/simple-cache',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'ralouphie/getallheaders' => array(
+ 'pretty_version' => '3.0.3',
+ 'version' => '3.0.3.0',
+ 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../ralouphie/getallheaders',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'ramsey/collection' => array(
+ 'pretty_version' => '2.0.0',
+ 'version' => '2.0.0.0',
+ 'reference' => 'a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../ramsey/collection',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'ramsey/uuid' => array(
+ 'pretty_version' => '4.7.6',
+ 'version' => '4.7.6.0',
+ 'reference' => '91039bc1faa45ba123c4328958e620d382ec7088',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../ramsey/uuid',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'rhumsaa/uuid' => array(
+ 'dev_requirement' => false,
+ 'replaced' => array(
+ 0 => '4.7.6',
+ ),
+ ),
+ 'roadrunner-php/app-logger' => array(
+ 'pretty_version' => '1.2.0',
+ 'version' => '1.2.0.0',
+ 'reference' => '555a31933c7797cfb5749a5c7176d39c2b368183',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../roadrunner-php/app-logger',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'roadrunner-php/centrifugo' => array(
+ 'pretty_version' => 'v2.2.0',
+ 'version' => '2.2.0.0',
+ 'reference' => '97872398825c9c6cbe4f882474ec476361360629',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../roadrunner-php/centrifugo',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'roadrunner-php/roadrunner-api-dto' => array(
+ 'pretty_version' => 'v1.8.0',
+ 'version' => '1.8.0.0',
+ 'reference' => 'a6dfcbaadad5448920fdc24f293f7e7039e0ccb6',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../roadrunner-php/roadrunner-api-dto',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/core' => array(
+ 'pretty_version' => '3.13.0',
+ 'version' => '3.13.0.0',
+ 'reference' => 'af62783e8b9ec8020966599eb42abe53c19d5286',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/core',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/goridge' => array(
+ 'pretty_version' => 'v4.2.0',
+ 'version' => '4.2.0.0',
+ 'reference' => 'c6696bd1834f5e88d1252a953a1336c041795411',
+ 'type' => 'goridge',
+ 'install_path' => __DIR__ . '/../spiral/goridge',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/logger' => array(
+ 'pretty_version' => '3.13.0',
+ 'version' => '3.13.0.0',
+ 'reference' => '41a62ce66698600dae062bf8421077f3fde23e26',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/logger',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/roadrunner' => array(
+ 'pretty_version' => 'v2023.3.12',
+ 'version' => '2023.3.12.0',
+ 'reference' => '9b5b65e00c6de7327142a8d689646f950fe00788',
+ 'type' => 'metapackage',
+ 'install_path' => null,
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/roadrunner-grpc' => array(
+ 'pretty_version' => 'v3.4.0',
+ 'version' => '3.4.0.0',
+ 'reference' => 'ddb3e21c36d6409e4d6c36841cc629feb143d8a1',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/roadrunner-grpc',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/roadrunner-http' => array(
+ 'pretty_version' => 'v3.5.1',
+ 'version' => '3.5.1.0',
+ 'reference' => '213cd0d5c0fba1548f22a5f5ff333afa88fe24ae',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/roadrunner-http',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/roadrunner-jobs' => array(
+ 'pretty_version' => 'v4.5.0',
+ 'version' => '4.5.0.0',
+ 'reference' => '9842316c03a4a21030ac78cd8829245a849d60d0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/roadrunner-jobs',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/roadrunner-kv' => array(
+ 'pretty_version' => 'v4.3.0',
+ 'version' => '4.3.0.0',
+ 'reference' => 'bc6e14298988a7fbb2a22f8f2f894bea32a47091',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/roadrunner-kv',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/roadrunner-metrics' => array(
+ 'pretty_version' => 'v3.2.0',
+ 'version' => '3.2.0.0',
+ 'reference' => 'ad5e245bf68a7f50bc9f7c6de7f5fd60370120c4',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/roadrunner-metrics',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/roadrunner-services' => array(
+ 'pretty_version' => 'v2.2.0',
+ 'version' => '2.2.0.0',
+ 'reference' => '5479afa853f1f4d62a40846bc3b7e71648bca0ee',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/roadrunner-services',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/roadrunner-tcp' => array(
+ 'pretty_version' => 'v3.1.0',
+ 'version' => '3.1.0.0',
+ 'reference' => '2fc2fa71aa960a45880cc88c1baffc7f94a3d0af',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/roadrunner-tcp',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/roadrunner-worker' => array(
+ 'pretty_version' => 'v3.6.0',
+ 'version' => '3.6.0.0',
+ 'reference' => '44c6f37c6abc25175c2723bd6daaa17651b18036',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/roadrunner-worker',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'spiral/tokenizer' => array(
+ 'pretty_version' => '3.13.0',
+ 'version' => '3.13.0.0',
+ 'reference' => 'd87660bcccd0bf4e6647fe3caebc539b8afae090',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spiral/tokenizer',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/finder' => array(
+ 'pretty_version' => 'v7.1.3',
+ 'version' => '7.1.3.0',
+ 'reference' => '717c6329886f32dc65e27461f80f2a465412fdca',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/finder',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-intl-idn' => array(
+ 'pretty_version' => 'v1.30.0',
+ 'version' => '1.30.0.0',
+ 'reference' => 'a6e83bdeb3c84391d1dfe16f42e40727ce524a5c',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-intl-normalizer' => array(
+ 'pretty_version' => 'v1.30.0',
+ 'version' => '1.30.0.0',
+ 'reference' => 'a95281b0be0d9ab48050ebd988b967875cdb9fdb',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-mbstring' => array(
+ 'pretty_version' => 'v1.30.0',
+ 'version' => '1.30.0.0',
+ 'reference' => 'fd22ab50000ef01661e2a31d850ebaa297f8e03c',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-php72' => array(
+ 'pretty_version' => 'v1.30.0',
+ 'version' => '1.30.0.0',
+ 'reference' => '10112722600777e02d2745716b70c5db4ca70442',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php72',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-php83' => array(
+ 'pretty_version' => 'v1.30.0',
+ 'version' => '1.30.0.0',
+ 'reference' => 'dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php83',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'test/test' => array(
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => '91b5a34522020c966e702657530b5c977afd91d5',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ ),
+);
diff --git a/tests/php_test_files/vendor/composer/platform_check.php b/tests/php_test_files/vendor/composer/platform_check.php
new file mode 100644
index 0000000..d32d90c
--- /dev/null
+++ b/tests/php_test_files/vendor/composer/platform_check.php
@@ -0,0 +1,26 @@
+= 80200)) {
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 8.2.0". You are running ' . PHP_VERSION . '.';
+}
+
+if ($issues) {
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
+ } elseif (!headers_sent()) {
+ echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
+ }
+ }
+ trigger_error(
+ 'Composer detected issues in your platform: ' . implode(' ', $issues),
+ E_USER_ERROR
+ );
+}
diff --git a/tests/php_test_files/vendor/google/common-protos/CHANGELOG.md b/tests/php_test_files/vendor/google/common-protos/CHANGELOG.md
new file mode 100644
index 0000000..7827d1f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/CHANGELOG.md
@@ -0,0 +1,108 @@
+# Changelog
+
+## [4.7.0](https://github.com/googleapis/common-protos-php/compare/v4.6.0...v4.7.0) (2024-07-25)
+
+
+### Features
+
+* Add FieldInfo.referenced_types for generics ([246c334](https://github.com/googleapis/common-protos-php/commit/246c334480ce2f307fd1ed60f2712eda0d5da8b4))
+
+
+### Bug Fixes
+
+* Un-deprecate Endpoint.aliases field ([246c334](https://github.com/googleapis/common-protos-php/commit/246c334480ce2f307fd1ed60f2712eda0d5da8b4))
+
+## [4.6.0](https://github.com/googleapis/common-protos-php/compare/v4.5.0...v4.6.0) (2024-04-03)
+
+
+### Features
+
+* Add `api_version` extension to `ServiceOptions`, for collaborative versioning ([#82](https://github.com/googleapis/common-protos-php/issues/82)) ([2ff1de8](https://github.com/googleapis/common-protos-php/commit/2ff1de8c6ffa2b125f502516cbad1315264a9b7b))
+* Add `ErrorReason.LOCATION_POLICY_VIOLATED` enum value ([2ff1de8](https://github.com/googleapis/common-protos-php/commit/2ff1de8c6ffa2b125f502516cbad1315264a9b7b))
+* Add `Publishing.rest_reference_documentation_uri` to aid client library publication ([2ff1de8](https://github.com/googleapis/common-protos-php/commit/2ff1de8c6ffa2b125f502516cbad1315264a9b7b))
+
+## [4.5.0](https://github.com/googleapis/common-protos-php/compare/v4.4.0...v4.5.0) (2023-11-29)
+
+
+### Features
+
+* Add auto_populated_fields to google.api.MethodSettings ([#74](https://github.com/googleapis/common-protos-php/issues/74)) ([d739417](https://github.com/googleapis/common-protos-php/commit/d7394176eb95f0e92af4e93746dba8f515ba9bc2))
+
+## [4.4.0](https://github.com/googleapis/common-protos-php/compare/v4.3.0...v4.4.0) (2023-10-02)
+
+
+### Features
+
+* Public google.api.FieldInfo type and extension ([#71](https://github.com/googleapis/common-protos-php/issues/71)) ([4002074](https://github.com/googleapis/common-protos-php/commit/40020744c65e7561dec08e1cd2994afcc51ec771))
+
+## [4.3.0](https://github.com/googleapis/common-protos-php/compare/v4.2.0...v4.3.0) (2023-08-22)
+
+
+### Features
+
+* Add new FieldBehavior value IDENTIFIER ([#67](https://github.com/googleapis/common-protos-php/issues/67)) ([6c6c21f](https://github.com/googleapis/common-protos-php/commit/6c6c21fc4a2f4711aeddad11082ed17acaf4733c))
+
+## [4.2.0](https://github.com/googleapis/common-protos-php/compare/v4.1.0...v4.2.0) (2023-07-25)
+
+
+### Features
+
+* Add a proto message to describe the `resource_type` and `resource_permission` for an API method ([#64](https://github.com/googleapis/common-protos-php/issues/64)) ([8a0ff5f](https://github.com/googleapis/common-protos-php/commit/8a0ff5f9ffcf3683fc4718e85e97f45a001a1925))
+
+## [4.1.0](https://github.com/googleapis/common-protos-php/compare/v4.0.0...v4.1.0) (2023-05-06)
+
+
+### Features
+
+* Add ConfigServiceV2.CreateBucketAsync method for creating Log Buckets asynchronously ([b18d554](https://github.com/googleapis/common-protos-php/commit/b18d55421cbe1e55d62b5d149e56be23db8c4286))
+* Add ConfigServiceV2.CreateLink method for creating linked datasets for Log Analytics Buckets ([b18d554](https://github.com/googleapis/common-protos-php/commit/b18d55421cbe1e55d62b5d149e56be23db8c4286))
+* Add ConfigServiceV2.DeleteLink method for deleting linked datasets ([b18d554](https://github.com/googleapis/common-protos-php/commit/b18d55421cbe1e55d62b5d149e56be23db8c4286))
+* Add ConfigServiceV2.GetLink methods for describing linked datasets ([b18d554](https://github.com/googleapis/common-protos-php/commit/b18d55421cbe1e55d62b5d149e56be23db8c4286))
+* Add ConfigServiceV2.ListLinks method for listing linked datasets ([b18d554](https://github.com/googleapis/common-protos-php/commit/b18d55421cbe1e55d62b5d149e56be23db8c4286))
+* Add ConfigServiceV2.UpdateBucketAsync method for creating Log Buckets asynchronously ([b18d554](https://github.com/googleapis/common-protos-php/commit/b18d55421cbe1e55d62b5d149e56be23db8c4286))
+* Add LogBucket.analytics_enabled field that specifies whether Log Bucket's Analytics features are enabled ([b18d554](https://github.com/googleapis/common-protos-php/commit/b18d55421cbe1e55d62b5d149e56be23db8c4286))
+* Add LogBucket.index_configs field that contains a list of Log Bucket's indexed fields and related configuration data ([b18d554](https://github.com/googleapis/common-protos-php/commit/b18d55421cbe1e55d62b5d149e56be23db8c4286))
+* Log Analytics features of the Cloud Logging API ([#60](https://github.com/googleapis/common-protos-php/issues/60)) ([b18d554](https://github.com/googleapis/common-protos-php/commit/b18d55421cbe1e55d62b5d149e56be23db8c4286))
+
+## [4.0.0](https://github.com/googleapis/common-protos-php/compare/v3.2.0...v4.0.0) (2023-05-01)
+
+
+### โ BREAKING CHANGES
+
+* remove files unknown to owlbot ([#59](https://github.com/googleapis/common-protos-php/issues/59))
+* add owlbot automated updates ([#54](https://github.com/googleapis/common-protos-php/issues/54))
+
+### Features
+
+* Add owlbot automated updates ([#54](https://github.com/googleapis/common-protos-php/issues/54)) ([6d9134d](https://github.com/googleapis/common-protos-php/commit/6d9134d2f927e9c4aa3165e823477e25ef8ff38f))
+* Regenerate all common protos from new owlbot config ([#58](https://github.com/googleapis/common-protos-php/issues/58)) ([5dac653](https://github.com/googleapis/common-protos-php/commit/5dac653bdd60c4dbaec45e73e0ec487e5aeac9b1))
+
+
+### Miscellaneous Chores
+
+* Remove files unknown to owlbot ([#59](https://github.com/googleapis/common-protos-php/issues/59)) ([f541342](https://github.com/googleapis/common-protos-php/commit/f54134263a142e278c56f5e03e5a3d8c6f72aac3))
+
+## [3.2.0](https://github.com/googleapis/common-protos-php/compare/v3.1.0...v3.2.0) (2023-01-12)
+
+
+### Features
+
+* Refresh types ([#49](https://github.com/googleapis/common-protos-php/issues/49)) ([bd71fc0](https://github.com/googleapis/common-protos-php/commit/bd71fc05cbca1ccd94b71a42c227f0d69c688f07))
+
+## [3.1.0](https://github.com/googleapis/common-protos-php/compare/v3.0.0...v3.1.0) (2022-10-05)
+
+
+### Features
+
+* Make autoloader more efficient ([#45](https://github.com/googleapis/common-protos-php/issues/45)) ([cdff58a](https://github.com/googleapis/common-protos-php/commit/cdff58a3ff6c42e461f18f14c0bbd8e171456924))
+
+## [3.0.0](https://github.com/googleapis/common-protos-php/compare/2.1.0...v3.0.0) (2022-07-29)
+
+
+### โ BREAKING CHANGES
+
+* remove longrunning classes from common protos (#41)
+
+### Miscellaneous Chores
+
+* remove longrunning classes from common protos ([#41](https://github.com/googleapis/common-protos-php/issues/41)) ([e88dd1d](https://github.com/googleapis/common-protos-php/commit/e88dd1d5dfef93358dc0bd7f3d62d09bbfd750b6))
diff --git a/tests/php_test_files/vendor/google/common-protos/CODE_OF_CONDUCT.md b/tests/php_test_files/vendor/google/common-protos/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..46b2a08
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/CODE_OF_CONDUCT.md
@@ -0,0 +1,43 @@
+# Contributor Code of Conduct
+
+As contributors and maintainers of this project,
+and in the interest of fostering an open and welcoming community,
+we pledge to respect all people who contribute through reporting issues,
+posting feature requests, updating documentation,
+submitting pull requests or patches, and other activities.
+
+We are committed to making participation in this project
+a harassment-free experience for everyone,
+regardless of level of experience, gender, gender identity and expression,
+sexual orientation, disability, personal appearance,
+body size, race, ethnicity, age, religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery
+* Personal attacks
+* Trolling or insulting/derogatory comments
+* Public or private harassment
+* Publishing other's private information,
+such as physical or electronic
+addresses, without explicit permission
+* Other unethical or unprofessional conduct.
+
+Project maintainers have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct.
+By adopting this Code of Conduct,
+project maintainers commit themselves to fairly and consistently
+applying these principles to every aspect of managing this project.
+Project maintainers who do not follow or enforce the Code of Conduct
+may be permanently removed from the project team.
+
+This code of conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior
+may be reported by opening an issue
+or contacting one or more of the project maintainers.
+
+This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
+available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
diff --git a/tests/php_test_files/vendor/google/common-protos/CONTRIBUTING.md b/tests/php_test_files/vendor/google/common-protos/CONTRIBUTING.md
new file mode 100644
index 0000000..23c9455
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/CONTRIBUTING.md
@@ -0,0 +1,45 @@
+## Contributing
+
+We are pleased that you are interested in contributing to our work.
+
+### Generated Protocol Buffer Classes
+
+The classes in this repository are generated by the protocol buffer
+compiler, as known as protoc. As such, we can not accept contributions
+directly to these generated classes. Instead, changes should be
+suggested upstream in the [API Common Protos][api-common-protos]
+repository.
+
+
+### Documentation
+
+We want for both protocol buffers and the types that we have provided here
+to be understandable to everyone, including to those who may be unfamiliar
+with the ecosystem or concepts.
+
+That means we want our documentation to be better, and welcome anyone
+willing to help with this. For documentation in the generated classes, please
+open a pull request against the [API Common Protos][api-common-protos]
+repository.
+
+Any improvements to READMEs or other non-generated documentation or
+development scripts in this repository would be greatly appreciated - please
+open a pull request.
+
+
+## Contributor License Agreement
+
+Before we can accept your pull requests, you will need to sign a Contributor
+License Agreement (CLA):
+
+ - **If you are an individual writing original source code** and **you own the
+ intellectual property**, then you need to sign an [individual CLA][].
+ - **If you work for a company that wants to allow you to contribute your
+ work**, then you need to sign a [corporate CLA][].
+
+You can sign these electronically (just scroll to the bottom). After that,
+we'll be able to accept your pull requests.
+
+ [individual CLA]: https://developers.google.com/open-source/cla/individual
+ [corporate CLA]: https://developers.google.com/open-source/cla/corporate
+ [api-common-protos]: https://github.com/googleapis/api-common-protos
\ No newline at end of file
diff --git a/tests/php_test_files/vendor/google/common-protos/LICENSE b/tests/php_test_files/vendor/google/common-protos/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/tests/php_test_files/vendor/google/common-protos/README.md b/tests/php_test_files/vendor/google/common-protos/README.md
new file mode 100644
index 0000000..29c3502
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/README.md
@@ -0,0 +1,46 @@
+## Common Protos PHP
+
+[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
+
+![Build Status](https://github.com/googleapis/common-protos-php/actions/workflows/tests.yml/badge.svg)
+
+- [Documentation](https://googleapis.github.io/common-protos-php)
+
+This repository is a home for the [protocol buffer][protobuf] types which are
+common dependencies throughout the Google API ecosystem, generated for PHP.
+The protobuf definitions for these generated PHP classes are provided by the
+[Common Components AIP][common-components-aip] repository.
+
+## Using these generated classes
+
+These classes are made available under an Apache license (see `LICENSE`) and
+you are free to depend on them within your applications. They are
+considered stable and will not change in backwards-incompaible ways.
+
+They are distributed as the [google/common-protos][packagist-common-protos]
+composer package, available on [Packagist][packagist].
+
+In order to depend on these classes, add the following line to your
+composer.json file in the `requires` section:
+
+```
+ "google/common-protos": "^2.0"
+```
+
+Or else use composer from the command line:
+
+```bash
+composer require google/common-protos
+```
+
+## License
+
+These classes are licensed using the Apache 2.0 software license, a
+permissive, copyfree license. You are free to use them in your applications
+provided the license terms are honored.
+
+ [api-style]: https://cloud.google.com/apis/design/
+ [protobuf]: https://developers.google.com/protocol-buffers/
+ [common-components-aip]: https://google.aip.dev/213
+ [packagist-common-protos]: https://packagist.org/packages/google/common-protos/
+ [packagist]: https://packagist.org/
diff --git a/tests/php_test_files/vendor/google/common-protos/SECURITY.md b/tests/php_test_files/vendor/google/common-protos/SECURITY.md
new file mode 100644
index 0000000..8b58ae9
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/SECURITY.md
@@ -0,0 +1,7 @@
+# Security Policy
+
+To report a security issue, please use [g.co/vulnz](https://g.co/vulnz).
+
+The Google Security Team will respond within 5 working days of your report on g.co/vulnz.
+
+We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue.
diff --git a/tests/php_test_files/vendor/google/common-protos/composer.json b/tests/php_test_files/vendor/google/common-protos/composer.json
new file mode 100644
index 0000000..f181977
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/composer.json
@@ -0,0 +1,30 @@
+{
+ "name": "google/common-protos",
+ "type": "library",
+ "description": "Google API Common Protos for PHP",
+ "keywords": ["google"],
+ "homepage": "https://github.com/googleapis/common-protos-php",
+ "license": "Apache-2.0",
+ "require": {
+ "php": "^8.0",
+ "google/protobuf": "^v3.25.3||^4.26.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.6"
+ },
+ "autoload": {
+ "psr-4": {
+ "Google\\Api\\": "src/Api",
+ "Google\\Cloud\\": "src/Cloud",
+ "Google\\Iam\\": "src/Iam",
+ "Google\\Rpc\\": "src/Rpc",
+ "Google\\Type\\": "src/Type",
+ "GPBMetadata\\Google\\Api\\": "metadata/Api",
+ "GPBMetadata\\Google\\Cloud\\": "metadata/Cloud",
+ "GPBMetadata\\Google\\Iam\\": "metadata/Iam",
+ "GPBMetadata\\Google\\Logging\\": "metadata/Logging",
+ "GPBMetadata\\Google\\Rpc\\": "metadata/Rpc",
+ "GPBMetadata\\Google\\Type\\": "metadata/Type"
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Annotations.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Annotations.php
new file mode 100644
index 0000000..7bec22e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Annotations.php
@@ -0,0 +1,29 @@
+internalAddGeneratedFile(
+ '
+ฤ
+google/api/annotations.proto
+google.api google/protobuf/descriptor.protoBn
+com.google.apiBAnnotationsProtoPZAgoogle.golang.org/genproto/googleapis/api/annotations;annotationsขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Auth.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Auth.php
new file mode 100644
index 0000000..7240db8
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Auth.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Backend.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Backend.php
new file mode 100644
index 0000000..6d50482
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Backend.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Billing.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Billing.php
new file mode 100644
index 0000000..818aac1
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Billing.php
@@ -0,0 +1,33 @@
+internalAddGeneratedFile(
+ '
+ด
+google/api/billing.proto
+google.api"
+BillingE
+consumer_destinations (2&.google.api.Billing.BillingDestinationA
+BillingDestination
+monitored_resource (
+metrics ( Bn
+com.google.apiBBillingProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Client.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Client.php
new file mode 100644
index 0000000..8ff39b0
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Client.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/ConfigChange.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/ConfigChange.php
new file mode 100644
index 0000000..b0444eb
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/ConfigChange.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Consumer.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Consumer.php
new file mode 100644
index 0000000..a62c598
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Consumer.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Context.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Context.php
new file mode 100644
index 0000000..74ffd87
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Context.php
@@ -0,0 +1,36 @@
+internalAddGeneratedFile(
+ '
+แ
+google/api/context.proto
+google.api"1
+Context&
+rules (2.google.api.ContextRule"
+ContextRule
+selector (
+ requested (
+provided ( "
+allowed_request_extensions ( #
+allowed_response_extensions ( Bn
+com.google.apiBContextProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Control.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Control.php
new file mode 100644
index 0000000..ead6700
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Control.php
@@ -0,0 +1,32 @@
+internalAddGeneratedFile(
+ '
+๑
+google/api/control.proto
+google.api"Q
+Control
+environment ( 1
+method_policies (2.google.api.MethodPolicyBn
+com.google.apiBControlProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Distribution.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Distribution.php
new file mode 100644
index 0000000..052aa6c
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Distribution.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Documentation.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Documentation.php
new file mode 100644
index 0000000..2c80046
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Documentation.php
@@ -0,0 +1,43 @@
+internalAddGeneratedFile(
+ '
+
+google/api/documentation.proto
+google.api"ป
+
Documentation
+summary (
+pages (2.google.api.Page,
+rules (2.google.api.DocumentationRule
+documentation_root_url (
+service_root_url (
+overview ( "[
+DocumentationRule
+selector (
+description (
+deprecation_description ( "I
+Page
+name (
+content ( "
+subpages (2.google.api.PageBt
+com.google.apiBDocumentationProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Endpoint.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Endpoint.php
new file mode 100644
index 0000000..a51aa07
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Endpoint.php
@@ -0,0 +1,34 @@
+internalAddGeneratedFile(
+ '
+๏
+google/api/endpoint.proto
+google.api"M
+Endpoint
+name (
+aliases (
+targete (
+
+allow_cors (Bo
+com.google.apiB
EndpointProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/ErrorReason.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/ErrorReason.php
new file mode 100644
index 0000000..22bd2d6
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/ErrorReason.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/FieldBehavior.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/FieldBehavior.php
new file mode 100644
index 0000000..b8a8d26
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/FieldBehavior.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/FieldInfo.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/FieldInfo.php
new file mode 100644
index 0000000..7daa960
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/FieldInfo.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Http.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Http.php
new file mode 100644
index 0000000..a1e0edc
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Http.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Httpbody.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Httpbody.php
new file mode 100644
index 0000000..382fd83
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Httpbody.php
@@ -0,0 +1,34 @@
+internalAddGeneratedFile(
+ '
+๓
+google/api/httpbody.proto
+google.api"X
+HttpBody
+content_type (
+data ((
+
+extensions (2.google.protobuf.AnyBh
+com.google.apiB
HttpBodyProtoPZ;google.golang.org/genproto/googleapis/api/httpbody;httpbody๘ขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Label.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Label.php
new file mode 100644
index 0000000..62f8872
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Label.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/LaunchStage.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/LaunchStage.php
new file mode 100644
index 0000000..3f19c3c
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/LaunchStage.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Log.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Log.php
new file mode 100644
index 0000000..6fe86a6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Log.php
@@ -0,0 +1,34 @@
+internalAddGeneratedFile(
+ '
+
+google/api/log.proto
+google.api"u
+
LogDescriptor
+name ( +
+labels (2.google.api.LabelDescriptor
+description (
+display_name ( Bj
+com.google.apiBLogProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Logging.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Logging.php
new file mode 100644
index 0000000..179277d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Logging.php
@@ -0,0 +1,34 @@
+internalAddGeneratedFile(
+ '
+๘
+google/api/logging.proto
+google.api"ื
+LoggingE
+producer_destinations (2&.google.api.Logging.LoggingDestinationE
+consumer_destinations (2&.google.api.Logging.LoggingDestination>
+LoggingDestination
+monitored_resource (
+logs ( Bn
+com.google.apiBLoggingProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Metric.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Metric.php
new file mode 100644
index 0000000..7a348b0
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Metric.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/MonitoredResource.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/MonitoredResource.php
new file mode 100644
index 0000000..f8c0239
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/MonitoredResource.php
@@ -0,0 +1,50 @@
+internalAddGeneratedFile(
+ '
+
+#google/api/monitored_resource.proto
+google.apigoogle/api/launch_stage.protogoogle/protobuf/struct.proto"ภ
+MonitoredResourceDescriptor
+name (
+type (
+display_name (
+description ( +
+labels (2.google.api.LabelDescriptor-
+launch_stage (2.google.api.LaunchStage"
+MonitoredResource
+type ( 9
+labels (2).google.api.MonitoredResource.LabelsEntry-
+LabelsEntry
+key (
+value ( :8"ส
+MonitoredResourceMetadata.
+
system_labels (2.google.protobuf.StructJ
+user_labels (25.google.api.MonitoredResourceMetadata.UserLabelsEntry1
+UserLabelsEntry
+key (
+value ( :8By
+com.google.apiBMonitoredResourceProtoPZCgoogle.golang.org/genproto/googleapis/api/monitoredres;monitoredres๘ขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Monitoring.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Monitoring.php
new file mode 100644
index 0000000..2b13194
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Monitoring.php
@@ -0,0 +1,35 @@
+internalAddGeneratedFile(
+ '
+
+google/api/monitoring.proto
+google.api"์
+
+MonitoringK
+producer_destinations (2,.google.api.Monitoring.MonitoringDestinationK
+consumer_destinations (2,.google.api.Monitoring.MonitoringDestinationD
+MonitoringDestination
+monitored_resource (
+metrics ( Bq
+com.google.apiBMonitoringProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Policy.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Policy.php
new file mode 100644
index 0000000..9d3ce0f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Policy.php
@@ -0,0 +1,35 @@
+internalAddGeneratedFile(
+ '
+๋
+google/api/policy.proto
+google.api google/protobuf/descriptor.proto"S
+FieldPolicy
+selector (
+resource_permission (
+
resource_type ( "S
+MethodPolicy
+selector ( 1
+request_policies (2.google.api.FieldPolicyBp
+com.google.apiBPolicyProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig๘ขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Quota.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Quota.php
new file mode 100644
index 0000000..4226383
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Quota.php
@@ -0,0 +1,55 @@
+internalAddGeneratedFile(
+ '
+ฅ
+google/api/quota.proto
+google.api"]
+Quota&
+limits (2.google.api.QuotaLimit,
+metric_rules (2.google.api.MetricRule"
+
+MetricRule
+selector ( =
+metric_costs (2\'.google.api.MetricRule.MetricCostsEntry2
+MetricCostsEntry
+key (
+value (:8"
+
+QuotaLimit
+name (
+description (
+
default_limit (
+ max_limit (
+ free_tier (
+duration (
+metric (
+unit ( 2
+values
+ (2".google.api.QuotaLimit.ValuesEntry
+display_name ( -
+ValuesEntry
+key (
+value (:8Bl
+com.google.apiB
+QuotaProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Resource.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Resource.php
new file mode 100644
index 0000000..b6021be
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Resource.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Routing.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Routing.php
new file mode 100644
index 0000000..6139d25
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Routing.php
@@ -0,0 +1,33 @@
+internalAddGeneratedFile(
+ '
+ฟ
+google/api/routing.proto
+google.api google/protobuf/descriptor.proto"G
+RoutingRule8
+routing_parameters (2.google.api.RoutingParameter"8
+RoutingParameter
+field (
+
path_template ( Bj
+com.google.apiBRoutingProtoPZAgoogle.golang.org/genproto/googleapis/api/annotations;annotationsขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Service.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Service.php
new file mode 100644
index 0000000..109365a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Service.php
@@ -0,0 +1,80 @@
+internalAddGeneratedFile(
+ '
+ษ
+google/api/service.proto
+google.apigoogle/api/backend.protogoogle/api/billing.protogoogle/api/client.protogoogle/api/context.protogoogle/api/control.protogoogle/api/documentation.protogoogle/api/endpoint.protogoogle/api/http.protogoogle/api/log.protogoogle/api/logging.protogoogle/api/metric.proto#google/api/monitored_resource.protogoogle/api/monitoring.protogoogle/api/quota.protogoogle/api/source_info.proto!google/api/system_parameter.protogoogle/api/usage.protogoogle/protobuf/api.protogoogle/protobuf/type.protogoogle/protobuf/wrappers.proto"
+Service
+name (
+title (
+producer_project_id (
+
+id! ( "
+apis (2.google.protobuf.Api$
+types (2.google.protobuf.Type$
+enums (2.google.protobuf.Enum0
+
documentation (2.google.api.Documentation$
+backend (2.google.api.Backend
+http (2.google.api.Http
+quota
+ (2.google.api.Quota2
+authentication (2.google.api.Authentication$
+context (2.google.api.Context
+usage (2.google.api.Usage\'
+ endpoints (2.google.api.Endpoint$
+control (2.google.api.Control\'
+logs (2.google.api.LogDescriptor-
+metrics (2.google.api.MetricDescriptorD
+monitored_resources (2\'.google.api.MonitoredResourceDescriptor$
+billing (2.google.api.Billing$
+logging (2.google.api.Logging*
+
+monitoring (2.google.api.Monitoring7
+system_parameters (2.google.api.SystemParameters+
+source_info% (2.google.api.SourceInfo*
+
+publishing- (2.google.api.Publishing4
+config_version (2.google.protobuf.UInt32ValueBn
+com.google.apiBServiceProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/SourceInfo.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/SourceInfo.php
new file mode 100644
index 0000000..9e3a180
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/SourceInfo.php
@@ -0,0 +1,32 @@
+internalAddGeneratedFile(
+ '
+฿
+google/api/source_info.proto
+google.api"8
+
+SourceInfo*
+source_files (2.google.protobuf.AnyBq
+com.google.apiBSourceInfoProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/SystemParameter.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/SystemParameter.php
new file mode 100644
index 0000000..d341405
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/SystemParameter.php
@@ -0,0 +1,38 @@
+internalAddGeneratedFile(
+ '
+
+!google/api/system_parameter.proto
+google.api"B
+SystemParameters.
+rules (2.google.api.SystemParameterRule"X
+SystemParameterRule
+selector ( /
+
+parameters (2.google.api.SystemParameter"Q
+SystemParameter
+name (
+http_header (
+url_query_parameter ( Bv
+com.google.apiBSystemParameterProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Usage.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Usage.php
new file mode 100644
index 0000000..3d7a644
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Usage.php
@@ -0,0 +1,37 @@
+internalAddGeneratedFile(
+ '
+ๅ
+google/api/usage.proto
+google.api"j
+Usage
+requirements ( $
+rules (2.google.api.UsageRule%
+producer_notification_channel ( "]
+ UsageRule
+selector (
+allow_unregistered_calls (
+skip_service_control (Bl
+com.google.apiB
+UsageProtoPZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Api/Visibility.php b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Visibility.php
new file mode 100644
index 0000000..e1cc138
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Api/Visibility.php
@@ -0,0 +1,34 @@
+internalAddGeneratedFile(
+ '
+ต
+google/api/visibility.proto
+google.api google/protobuf/descriptor.proto"7
+
+Visibility)
+rules (2.google.api.VisibilityRule"7
+VisibilityRule
+selector (
+restriction ( Bn
+com.google.apiBVisibilityProtoPZ?google.golang.org/genproto/googleapis/api/visibility;visibility๘ขGAPIbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Cloud/ExtendedOperations.php b/tests/php_test_files/vendor/google/common-protos/metadata/Cloud/ExtendedOperations.php
new file mode 100644
index 0000000..08219cb
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Cloud/ExtendedOperations.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Cloud/Location/Locations.php b/tests/php_test_files/vendor/google/common-protos/metadata/Cloud/Location/Locations.php
new file mode 100644
index 0000000..ad572c2
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Cloud/Location/Locations.php
@@ -0,0 +1,53 @@
+internalAddGeneratedFile(
+ '
+ำ
+%google/cloud/location/locations.protogoogle.cloud.locationgoogle/protobuf/any.protogoogle/api/client.proto"[
+ListLocationsRequest
+name (
+filter (
+ page_size (
+
+page_token ( "d
+ListLocationsResponse2
+ locations (2.google.cloud.location.Location
+next_page_token ( ""
+GetLocationRequest
+name ( "ื
+Location
+name (
+location_id (
+display_name ( ;
+labels (2+.google.cloud.location.Location.LabelsEntry&
+metadata (2.google.protobuf.Any-
+LabelsEntry
+key (
+value ( :82ค
+ Locationsซ
+
ListLocations+.google.cloud.location.ListLocationsRequest,.google.cloud.location.ListLocationsResponse"?ำไ9/v1/{name=locations}Z!/v1/{name=projects/*}/locations
+GetLocation).google.cloud.location.GetLocationRequest.google.cloud.location.Location"Cำไ=/v1/{name=locations/*}Z#!/v1/{name=projects/*/locations/*}HสAcloud.googleapis.comาA.https://www.googleapis.com/auth/cloud-platformBo
+com.google.cloud.locationBLocationsProtoPZ=google.golang.org/genproto/googleapis/cloud/location;location๘bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/IamPolicy.php b/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/IamPolicy.php
new file mode 100644
index 0000000..02fa586
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/IamPolicy.php
@@ -0,0 +1,53 @@
+internalAddGeneratedFile(
+ '
+
+google/iam/v1/iam_policy.proto
google.iam.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/iam/v1/options.protogoogle/iam/v1/policy.proto google/protobuf/field_mask.proto"
+SetIamPolicyRequest
+resource ( B เA๚A
+**
+policy (2.google.iam.v1.PolicyBเA/
+update_mask (2.google.protobuf.FieldMask"d
+GetIamPolicyRequest
+resource ( B เA๚A
+*0
+options (2.google.iam.v1.GetPolicyOptions"R
+TestIamPermissionsRequest
+resource ( B เA๚A
+*
+permissions ( BเA"1
+TestIamPermissionsResponse
+permissions ( 2ด
+ IAMPolicyt
+SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy")ำไ#"/v1/{resource=**}:setIamPolicy:*t
+GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy")ำไ#"/v1/{resource=**}:getIamPolicy:*
+TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"/ำไ)"$/v1/{resource=**}:testIamPermissions:*สAiam-meta-api.googleapis.comB
+com.google.iam.v1BIamPolicyProtoPZ)cloud.google.com/go/iam/apiv1/iampb;iampb๘ชGoogle.Cloud.Iam.V1สGoogle\\Cloud\\Iam\\V1bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/Logging/AuditData.php b/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/Logging/AuditData.php
new file mode 100644
index 0000000..3dcb651
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/Logging/AuditData.php
@@ -0,0 +1,30 @@
+internalAddGeneratedFile(
+ '
+
+&google/iam/v1/logging/audit_data.protogoogle.iam.v1.logging"=
+ AuditData0
+policy_delta (2.google.iam.v1.PolicyDeltaB
+com.google.iam.v1.loggingBAuditDataProtoPZ9cloud.google.com/go/iam/apiv1/logging/loggingpb;loggingpbชGoogle.Cloud.Iam.V1.Loggingbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/Options.php b/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/Options.php
new file mode 100644
index 0000000..630ae5b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/Options.php
@@ -0,0 +1,29 @@
+internalAddGeneratedFile(
+ '
+้
+google/iam/v1/options.proto
google.iam.v1"4
+GetPolicyOptions
+requested_policy_version (B}
+com.google.iam.v1BOptionsProtoPZ)cloud.google.com/go/iam/apiv1/iampb;iampb๘ชGoogle.Cloud.Iam.V1สGoogle\\Cloud\\Iam\\V1bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/Policy.php b/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/Policy.php
new file mode 100644
index 0000000..ed5ae81
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Iam/V1/Policy.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Logging/Type/HttpRequest.php b/tests/php_test_files/vendor/google/common-protos/metadata/Logging/Type/HttpRequest.php
new file mode 100644
index 0000000..3c51368
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Logging/Type/HttpRequest.php
@@ -0,0 +1,46 @@
+internalAddGeneratedFile(
+ '
+๘
+&google/logging/type/http_request.protogoogle.logging.type"๏
+HttpRequest
+request_method (
+request_url (
+request_size (
+status (
+
response_size (
+
+user_agent (
+ remote_ip (
+ server_ip
(
+referer ( *
+latency (2.google.protobuf.Duration
+cache_lookup (
+ cache_hit (*
+"cache_validated_with_origin_server
+ (
+cache_fill_bytes (
+protocol ( Bพ
+com.google.logging.typeBHttpRequestProtoPZ8google.golang.org/genproto/googleapis/logging/type;ltypeชGoogle.Cloud.Logging.TypeสGoogle\\Cloud\\Logging\\Type๊Google::Cloud::Logging::Typebproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Logging/Type/LogSeverity.php b/tests/php_test_files/vendor/google/common-protos/metadata/Logging/Type/LogSeverity.php
new file mode 100644
index 0000000..6acaa69
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Logging/Type/LogSeverity.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Code.php b/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Code.php
new file mode 100644
index 0000000..2a57a20
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Code.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Context/AttributeContext.php b/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Context/AttributeContext.php
new file mode 100644
index 0000000..d7402e2
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Context/AttributeContext.php
@@ -0,0 +1,109 @@
+internalAddGeneratedFile(
+ '
+ป
+*google/rpc/context/attribute_context.protogoogle.rpc.contextgoogle/protobuf/duration.protogoogle/protobuf/struct.protogoogle/protobuf/timestamp.proto"
+AttributeContext9
+origin (2).google.rpc.context.AttributeContext.Peer9
+source (2).google.rpc.context.AttributeContext.Peer>
+destination (2).google.rpc.context.AttributeContext.Peer=
+request (2,.google.rpc.context.AttributeContext.Request?
+response (2-.google.rpc.context.AttributeContext.Response?
+resource (2-.google.rpc.context.AttributeContext.Resource5
+api (2(.google.rpc.context.AttributeContext.Api(
+
+extensions (2.google.protobuf.Anyพ
+Peer
+
+ip (
+port (E
+labels (25.google.rpc.context.AttributeContext.Peer.LabelsEntry
+ principal (
+region_code ( -
+LabelsEntry
+key (
+value ( :8L
+Api
+service (
+ operation (
+protocol (
+version (
+Auth
+ principal (
+ audiences (
+ presenter ( \'
+claims (2.google.protobuf.Struct
+
access_levels ( ๏
+Request
+
+id (
+method ( J
+headers (29.google.rpc.context.AttributeContext.Request.HeadersEntry
+path (
+host (
+scheme (
+query ( (
+time (2.google.protobuf.Timestamp
+size
+ (
+protocol (
+reason ( 7
+auth
(2).google.rpc.context.AttributeContext.Auth.
+HeadersEntry
+key (
+value ( :8
+Response
+code (
+size (K
+headers (2:.google.rpc.context.AttributeContext.Response.HeadersEntry(
+time (2.google.protobuf.Timestamp2
+backend_latency (2.google.protobuf.Duration.
+HeadersEntry
+key (
+value ( :8
+Resource
+service (
+name (
+type ( I
+labels (29.google.rpc.context.AttributeContext.Resource.LabelsEntry
+uid ( S
+annotations (2>.google.rpc.context.AttributeContext.Resource.AnnotationsEntry
+display_name ( /
+create_time (2.google.protobuf.Timestamp/
+update_time (2.google.protobuf.Timestamp/
+delete_time
+ (2.google.protobuf.Timestamp
+etag (
+location ( -
+LabelsEntry
+key (
+value ( :82
+AnnotationsEntry
+key (
+value ( :8B
+com.google.rpc.contextBAttributeContextProtoPZUgoogle.golang.org/genproto/googleapis/rpc/context/attribute_context;attribute_context๘bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Context/AuditContext.php b/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Context/AuditContext.php
new file mode 100644
index 0000000..40b9c06
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Context/AuditContext.php
@@ -0,0 +1,34 @@
+internalAddGeneratedFile(
+ '
+๛
+&google/rpc/context/audit_context.protogoogle.rpc.context"ว
+AuditContext
+ audit_log (1
+scrubbed_request (2.google.protobuf.Struct2
+scrubbed_response (2.google.protobuf.Struct$
+scrubbed_response_item_count (
+target_resource ( Bk
+com.google.rpc.contextBAuditContextProtoPZ9google.golang.org/genproto/googleapis/rpc/context;context๘bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/ErrorDetails.php b/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/ErrorDetails.php
new file mode 100644
index 0000000..37c002f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/ErrorDetails.php
@@ -0,0 +1,77 @@
+internalAddGeneratedFile(
+ '
+๊
+google/rpc/error_details.proto
+google.rpc"
+ ErrorInfo
+reason (
+domain ( 5
+metadata (2#.google.rpc.ErrorInfo.MetadataEntry/
+
MetadataEntry
+key (
+value ( :8";
+ RetryInfo.
+retry_delay (2.google.protobuf.Duration"2
+ DebugInfo
+
stack_entries (
+detail ( "y
+QuotaFailure6
+
+violations (2".google.rpc.QuotaFailure.Violation1
+ Violation
+subject (
+description ( "
+PreconditionFailure=
+
+violations (2).google.rpc.PreconditionFailure.Violation?
+ Violation
+type (
+subject (
+description ( "
+
+BadRequest?
+field_violations (2%.google.rpc.BadRequest.FieldViolation4
+FieldViolation
+field (
+description ( "7
+RequestInfo
+
+request_id (
+serving_data ( "`
+ResourceInfo
+
resource_type (
+
resource_name (
+owner (
+description ( "V
+Help$
+links (2.google.rpc.Help.Link(
+Link
+description (
+url ( "3
+LocalizedMessage
+locale (
+message ( Bl
+com.google.rpcBErrorDetailsProtoPZ?google.golang.org/genproto/googleapis/rpc/errdetails;errdetailsขRPCbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Status.php b/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Status.php
new file mode 100644
index 0000000..8560f42
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Rpc/Status.php
@@ -0,0 +1,33 @@
+internalAddGeneratedFile(
+ '
+เ
+google/rpc/status.proto
+google.rpc"N
+Status
+code (
+message ( %
+details (2.google.protobuf.AnyBa
+com.google.rpcBStatusProtoPZ7google.golang.org/genproto/googleapis/rpc/status;status๘ขRPCbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/CalendarPeriod.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/CalendarPeriod.php
new file mode 100644
index 0000000..2f1368e
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Type/CalendarPeriod.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Color.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Color.php
new file mode 100644
index 0000000..cae1566
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Color.php
@@ -0,0 +1,34 @@
+internalAddGeneratedFile(
+ '
+๏
+google/type/color.protogoogle.type"]
+Color
+red (
+green (
+blue (*
+alpha (2.google.protobuf.FloatValueB`
+com.google.typeB
+ColorProtoPZ6google.golang.org/genproto/googleapis/type/color;color๘ขGTPbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Date.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Date.php
new file mode 100644
index 0000000..8d754f8
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Date.php
@@ -0,0 +1,31 @@
+internalAddGeneratedFile(
+ '
+พ
+google/type/date.protogoogle.type"0
+Date
+year (
+month (
+day (B]
+com.google.typeB DateProtoPZ4google.golang.org/genproto/googleapis/type/date;date๘ขGTPbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Datetime.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Datetime.php
new file mode 100644
index 0000000..bb5fede
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Datetime.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Dayofweek.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Dayofweek.php
new file mode 100644
index 0000000..b79adcd
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Dayofweek.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Decimal.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Decimal.php
new file mode 100644
index 0000000..20ddcb6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Decimal.php
@@ -0,0 +1,29 @@
+internalAddGeneratedFile(
+ '
+ฒ
+google/type/decimal.protogoogle.type"
+Decimal
+value ( Bf
+com.google.typeBDecimalProtoPZ:google.golang.org/genproto/googleapis/type/decimal;decimal๘ขGTPbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Expr.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Expr.php
new file mode 100644
index 0000000..db6f33b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Expr.php
@@ -0,0 +1,33 @@
+internalAddGeneratedFile(
+ '
+
+google/type/expr.protogoogle.type"P
+Expr
+
+expression (
+title (
+description (
+location ( BZ
+com.google.typeB ExprProtoPZ4google.golang.org/genproto/googleapis/type/expr;exprขGTPbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Fraction.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Fraction.php
new file mode 100644
index 0000000..4c34bf8
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Fraction.php
@@ -0,0 +1,30 @@
+internalAddGeneratedFile(
+ '
+อ
+google/type/fraction.protogoogle.type"2
+Fraction
+ numerator (
+denominator (Bf
+com.google.typeB
FractionProtoPZinternalAddGeneratedFile(
+ '
+
+google/type/interval.protogoogle.type"h
+Interval.
+
+start_time (2.google.protobuf.Timestamp,
+end_time (2.google.protobuf.TimestampBi
+com.google.typeB
IntervalProtoPZinternalAddGeneratedFile(
+ '
+ร
+google/type/latlng.protogoogle.type"-
+LatLng
+latitude (
+ longitude (Bc
+com.google.typeBLatLngProtoPZ8google.golang.org/genproto/googleapis/type/latlng;latlng๘ขGTPbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/LocalizedText.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/LocalizedText.php
new file mode 100644
index 0000000..ab64343
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Type/LocalizedText.php
@@ -0,0 +1,30 @@
+internalAddGeneratedFile(
+ '
+้
+ google/type/localized_text.protogoogle.type"4
+
LocalizedText
+text (
+
language_code ( Bz
+com.google.typeBLocalizedTextProtoPZHgoogle.golang.org/genproto/googleapis/type/localized_text;localized_text๘ขGTPbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Money.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Money.php
new file mode 100644
index 0000000..01395b8
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Money.php
@@ -0,0 +1,32 @@
+internalAddGeneratedFile(
+ '
+ฮ
+google/type/money.protogoogle.type"<
+Money
+
currency_code (
+units (
+nanos (B`
+com.google.typeB
+MoneyProtoPZ6google.golang.org/genproto/googleapis/type/money;money๘ขGTPbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Month.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Month.php
new file mode 100644
index 0000000..e0c5124
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Month.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/PhoneNumber.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/PhoneNumber.php
new file mode 100644
index 0000000..d70da1e
Binary files /dev/null and b/tests/php_test_files/vendor/google/common-protos/metadata/Type/PhoneNumber.php differ
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/PostalAddress.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/PostalAddress.php
new file mode 100644
index 0000000..46425c7
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Type/PostalAddress.php
@@ -0,0 +1,41 @@
+internalAddGeneratedFile(
+ '
+ฑ
+ google/type/postal_address.protogoogle.type"
+
PostalAddress
+revision (
+region_code (
+
language_code (
+postal_code (
+sorting_code (
+administrative_area (
+locality (
+sublocality (
+
address_lines (
+
+recipients
+ (
+organization ( Bx
+com.google.typeBPostalAddressProtoPZFgoogle.golang.org/genproto/googleapis/type/postaladdress;postaladdress๘ขGTPbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Quaternion.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Quaternion.php
new file mode 100644
index 0000000..117de8e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Quaternion.php
@@ -0,0 +1,33 @@
+internalAddGeneratedFile(
+ '
+
+google/type/quaternion.protogoogle.type"8
+
+Quaternion
+x (
+y (
+z (
+w (Bo
+com.google.typeBQuaternionProtoPZ@google.golang.org/genproto/googleapis/type/quaternion;quaternion๘ขGTPbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/metadata/Type/Timeofday.php b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Timeofday.php
new file mode 100644
index 0000000..ae198be
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/metadata/Type/Timeofday.php
@@ -0,0 +1,32 @@
+internalAddGeneratedFile(
+ '
+ํ
+google/type/timeofday.protogoogle.type"K
+ TimeOfDay
+hours (
+minutes (
+seconds (
+nanos (Bl
+com.google.typeBTimeOfDayProtoPZ>google.golang.org/genproto/googleapis/type/timeofday;timeofday๘ขGTPbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/renovate.json b/tests/php_test_files/vendor/google/common-protos/renovate.json
new file mode 100644
index 0000000..6d81213
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/renovate.json
@@ -0,0 +1,7 @@
+{
+ "extends": [
+ "config:base",
+ ":preserveSemverRanges",
+ ":disableDependencyDashboard"
+ ]
+}
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Advice.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Advice.php
new file mode 100644
index 0000000..e4a5378
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Advice.php
@@ -0,0 +1,72 @@
+google.api.Advice
+ */
+class Advice extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Useful description for why this advice was applied and what actions should
+ * be taken to mitigate any implied risks.
+ *
+ * Generated from protobuf field string description = 2;
+ */
+ protected $description = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $description
+ * Useful description for why this advice was applied and what actions should
+ * be taken to mitigate any implied risks.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\ConfigChange::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Useful description for why this advice was applied and what actions should
+ * be taken to mitigate any implied risks.
+ *
+ * Generated from protobuf field string description = 2;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * Useful description for why this advice was applied and what actions should
+ * be taken to mitigate any implied risks.
+ *
+ * Generated from protobuf field string description = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/AuthProvider.php b/tests/php_test_files/vendor/google/common-protos/src/Api/AuthProvider.php
new file mode 100644
index 0000000..3640d3a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/AuthProvider.php
@@ -0,0 +1,419 @@
+google.api.AuthProvider
+ */
+class AuthProvider extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The unique identifier of the auth provider. It will be referred to by
+ * `AuthRequirement.provider_id`.
+ * Example: "bookstore_auth".
+ *
+ * Generated from protobuf field string id = 1;
+ */
+ protected $id = '';
+ /**
+ * Identifies the principal that issued the JWT. See
+ * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+ * Usually a URL or an email address.
+ * Example: https://securetoken.google.com
+ * Example: 1234567-compute@developer.gserviceaccount.com
+ *
+ * Generated from protobuf field string issuer = 2;
+ */
+ protected $issuer = '';
+ /**
+ * URL of the provider's public key set to validate signature of the JWT. See
+ * [OpenID
+ * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+ * Optional if the key set document:
+ * - can be retrieved from
+ * [OpenID
+ * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+ * of the issuer.
+ * - can be inferred from the email domain of the issuer (e.g. a Google
+ * service account).
+ * Example: https://www.googleapis.com/oauth2/v1/certs
+ *
+ * Generated from protobuf field string jwks_uri = 3;
+ */
+ protected $jwks_uri = '';
+ /**
+ * The list of JWT
+ * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+ * that are allowed to access. A JWT containing any of these audiences will
+ * be accepted. When this setting is absent, JWTs with audiences:
+ * - "https://[service.name]/[google.protobuf.Api.name]"
+ * - "https://[service.name]/"
+ * will be accepted.
+ * For example, if no audiences are in the setting, LibraryService API will
+ * accept JWTs with the following audiences:
+ * -
+ * https://library-example.googleapis.com/google.example.library.v1.LibraryService
+ * - https://library-example.googleapis.com/
+ * Example:
+ * audiences: bookstore_android.apps.googleusercontent.com,
+ * bookstore_web.apps.googleusercontent.com
+ *
+ * Generated from protobuf field string audiences = 4;
+ */
+ protected $audiences = '';
+ /**
+ * Redirect URL if JWT token is required but not present or is expired.
+ * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+ *
+ * Generated from protobuf field string authorization_url = 5;
+ */
+ protected $authorization_url = '';
+ /**
+ * Defines the locations to extract the JWT. For now it is only used by the
+ * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+ * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+ * JWT locations can be one of HTTP headers, URL query parameters or
+ * cookies. The rule is that the first match wins.
+ * If not specified, default to use following 3 locations:
+ * 1) Authorization: Bearer
+ * 2) x-goog-iap-jwt-assertion
+ * 3) access_token query parameter
+ * Default locations can be specified as followings:
+ * jwt_locations:
+ * - header: Authorization
+ * value_prefix: "Bearer "
+ * - header: x-goog-iap-jwt-assertion
+ * - query: access_token
+ *
+ * Generated from protobuf field repeated .google.api.JwtLocation jwt_locations = 6;
+ */
+ private $jwt_locations;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $id
+ * The unique identifier of the auth provider. It will be referred to by
+ * `AuthRequirement.provider_id`.
+ * Example: "bookstore_auth".
+ * @type string $issuer
+ * Identifies the principal that issued the JWT. See
+ * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+ * Usually a URL or an email address.
+ * Example: https://securetoken.google.com
+ * Example: 1234567-compute@developer.gserviceaccount.com
+ * @type string $jwks_uri
+ * URL of the provider's public key set to validate signature of the JWT. See
+ * [OpenID
+ * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+ * Optional if the key set document:
+ * - can be retrieved from
+ * [OpenID
+ * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+ * of the issuer.
+ * - can be inferred from the email domain of the issuer (e.g. a Google
+ * service account).
+ * Example: https://www.googleapis.com/oauth2/v1/certs
+ * @type string $audiences
+ * The list of JWT
+ * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+ * that are allowed to access. A JWT containing any of these audiences will
+ * be accepted. When this setting is absent, JWTs with audiences:
+ * - "https://[service.name]/[google.protobuf.Api.name]"
+ * - "https://[service.name]/"
+ * will be accepted.
+ * For example, if no audiences are in the setting, LibraryService API will
+ * accept JWTs with the following audiences:
+ * -
+ * https://library-example.googleapis.com/google.example.library.v1.LibraryService
+ * - https://library-example.googleapis.com/
+ * Example:
+ * audiences: bookstore_android.apps.googleusercontent.com,
+ * bookstore_web.apps.googleusercontent.com
+ * @type string $authorization_url
+ * Redirect URL if JWT token is required but not present or is expired.
+ * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+ * @type array<\Google\Api\JwtLocation>|\Google\Protobuf\Internal\RepeatedField $jwt_locations
+ * Defines the locations to extract the JWT. For now it is only used by the
+ * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+ * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+ * JWT locations can be one of HTTP headers, URL query parameters or
+ * cookies. The rule is that the first match wins.
+ * If not specified, default to use following 3 locations:
+ * 1) Authorization: Bearer
+ * 2) x-goog-iap-jwt-assertion
+ * 3) access_token query parameter
+ * Default locations can be specified as followings:
+ * jwt_locations:
+ * - header: Authorization
+ * value_prefix: "Bearer "
+ * - header: x-goog-iap-jwt-assertion
+ * - query: access_token
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Auth::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The unique identifier of the auth provider. It will be referred to by
+ * `AuthRequirement.provider_id`.
+ * Example: "bookstore_auth".
+ *
+ * Generated from protobuf field string id = 1;
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * The unique identifier of the auth provider. It will be referred to by
+ * `AuthRequirement.provider_id`.
+ * Example: "bookstore_auth".
+ *
+ * Generated from protobuf field string id = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Identifies the principal that issued the JWT. See
+ * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+ * Usually a URL or an email address.
+ * Example: https://securetoken.google.com
+ * Example: 1234567-compute@developer.gserviceaccount.com
+ *
+ * Generated from protobuf field string issuer = 2;
+ * @return string
+ */
+ public function getIssuer()
+ {
+ return $this->issuer;
+ }
+
+ /**
+ * Identifies the principal that issued the JWT. See
+ * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+ * Usually a URL or an email address.
+ * Example: https://securetoken.google.com
+ * Example: 1234567-compute@developer.gserviceaccount.com
+ *
+ * Generated from protobuf field string issuer = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setIssuer($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->issuer = $var;
+
+ return $this;
+ }
+
+ /**
+ * URL of the provider's public key set to validate signature of the JWT. See
+ * [OpenID
+ * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+ * Optional if the key set document:
+ * - can be retrieved from
+ * [OpenID
+ * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+ * of the issuer.
+ * - can be inferred from the email domain of the issuer (e.g. a Google
+ * service account).
+ * Example: https://www.googleapis.com/oauth2/v1/certs
+ *
+ * Generated from protobuf field string jwks_uri = 3;
+ * @return string
+ */
+ public function getJwksUri()
+ {
+ return $this->jwks_uri;
+ }
+
+ /**
+ * URL of the provider's public key set to validate signature of the JWT. See
+ * [OpenID
+ * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+ * Optional if the key set document:
+ * - can be retrieved from
+ * [OpenID
+ * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+ * of the issuer.
+ * - can be inferred from the email domain of the issuer (e.g. a Google
+ * service account).
+ * Example: https://www.googleapis.com/oauth2/v1/certs
+ *
+ * Generated from protobuf field string jwks_uri = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setJwksUri($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->jwks_uri = $var;
+
+ return $this;
+ }
+
+ /**
+ * The list of JWT
+ * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+ * that are allowed to access. A JWT containing any of these audiences will
+ * be accepted. When this setting is absent, JWTs with audiences:
+ * - "https://[service.name]/[google.protobuf.Api.name]"
+ * - "https://[service.name]/"
+ * will be accepted.
+ * For example, if no audiences are in the setting, LibraryService API will
+ * accept JWTs with the following audiences:
+ * -
+ * https://library-example.googleapis.com/google.example.library.v1.LibraryService
+ * - https://library-example.googleapis.com/
+ * Example:
+ * audiences: bookstore_android.apps.googleusercontent.com,
+ * bookstore_web.apps.googleusercontent.com
+ *
+ * Generated from protobuf field string audiences = 4;
+ * @return string
+ */
+ public function getAudiences()
+ {
+ return $this->audiences;
+ }
+
+ /**
+ * The list of JWT
+ * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+ * that are allowed to access. A JWT containing any of these audiences will
+ * be accepted. When this setting is absent, JWTs with audiences:
+ * - "https://[service.name]/[google.protobuf.Api.name]"
+ * - "https://[service.name]/"
+ * will be accepted.
+ * For example, if no audiences are in the setting, LibraryService API will
+ * accept JWTs with the following audiences:
+ * -
+ * https://library-example.googleapis.com/google.example.library.v1.LibraryService
+ * - https://library-example.googleapis.com/
+ * Example:
+ * audiences: bookstore_android.apps.googleusercontent.com,
+ * bookstore_web.apps.googleusercontent.com
+ *
+ * Generated from protobuf field string audiences = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setAudiences($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->audiences = $var;
+
+ return $this;
+ }
+
+ /**
+ * Redirect URL if JWT token is required but not present or is expired.
+ * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+ *
+ * Generated from protobuf field string authorization_url = 5;
+ * @return string
+ */
+ public function getAuthorizationUrl()
+ {
+ return $this->authorization_url;
+ }
+
+ /**
+ * Redirect URL if JWT token is required but not present or is expired.
+ * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+ *
+ * Generated from protobuf field string authorization_url = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setAuthorizationUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->authorization_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * Defines the locations to extract the JWT. For now it is only used by the
+ * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+ * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+ * JWT locations can be one of HTTP headers, URL query parameters or
+ * cookies. The rule is that the first match wins.
+ * If not specified, default to use following 3 locations:
+ * 1) Authorization: Bearer
+ * 2) x-goog-iap-jwt-assertion
+ * 3) access_token query parameter
+ * Default locations can be specified as followings:
+ * jwt_locations:
+ * - header: Authorization
+ * value_prefix: "Bearer "
+ * - header: x-goog-iap-jwt-assertion
+ * - query: access_token
+ *
+ * Generated from protobuf field repeated .google.api.JwtLocation jwt_locations = 6;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getJwtLocations()
+ {
+ return $this->jwt_locations;
+ }
+
+ /**
+ * Defines the locations to extract the JWT. For now it is only used by the
+ * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+ * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+ * JWT locations can be one of HTTP headers, URL query parameters or
+ * cookies. The rule is that the first match wins.
+ * If not specified, default to use following 3 locations:
+ * 1) Authorization: Bearer
+ * 2) x-goog-iap-jwt-assertion
+ * 3) access_token query parameter
+ * Default locations can be specified as followings:
+ * jwt_locations:
+ * - header: Authorization
+ * value_prefix: "Bearer "
+ * - header: x-goog-iap-jwt-assertion
+ * - query: access_token
+ *
+ * Generated from protobuf field repeated .google.api.JwtLocation jwt_locations = 6;
+ * @param array<\Google\Api\JwtLocation>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setJwtLocations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\JwtLocation::class);
+ $this->jwt_locations = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/AuthRequirement.php b/tests/php_test_files/vendor/google/common-protos/src/Api/AuthRequirement.php
new file mode 100644
index 0000000..287f2a7
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/AuthRequirement.php
@@ -0,0 +1,159 @@
+google.api.AuthRequirement
+ */
+class AuthRequirement extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * [id][google.api.AuthProvider.id] from authentication provider.
+ * Example:
+ * provider_id: bookstore_auth
+ *
+ * Generated from protobuf field string provider_id = 1;
+ */
+ protected $provider_id = '';
+ /**
+ * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+ * implemented and accepted in all the runtime components.
+ * The list of JWT
+ * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+ * that are allowed to access. A JWT containing any of these audiences will
+ * be accepted. When this setting is absent, only JWTs with audience
+ * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+ * will be accepted. For example, if no audiences are in the setting,
+ * LibraryService API will only accept JWTs with the following audience
+ * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+ * Example:
+ * audiences: bookstore_android.apps.googleusercontent.com,
+ * bookstore_web.apps.googleusercontent.com
+ *
+ * Generated from protobuf field string audiences = 2;
+ */
+ protected $audiences = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $provider_id
+ * [id][google.api.AuthProvider.id] from authentication provider.
+ * Example:
+ * provider_id: bookstore_auth
+ * @type string $audiences
+ * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+ * implemented and accepted in all the runtime components.
+ * The list of JWT
+ * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+ * that are allowed to access. A JWT containing any of these audiences will
+ * be accepted. When this setting is absent, only JWTs with audience
+ * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+ * will be accepted. For example, if no audiences are in the setting,
+ * LibraryService API will only accept JWTs with the following audience
+ * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+ * Example:
+ * audiences: bookstore_android.apps.googleusercontent.com,
+ * bookstore_web.apps.googleusercontent.com
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Auth::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * [id][google.api.AuthProvider.id] from authentication provider.
+ * Example:
+ * provider_id: bookstore_auth
+ *
+ * Generated from protobuf field string provider_id = 1;
+ * @return string
+ */
+ public function getProviderId()
+ {
+ return $this->provider_id;
+ }
+
+ /**
+ * [id][google.api.AuthProvider.id] from authentication provider.
+ * Example:
+ * provider_id: bookstore_auth
+ *
+ * Generated from protobuf field string provider_id = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setProviderId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->provider_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+ * implemented and accepted in all the runtime components.
+ * The list of JWT
+ * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+ * that are allowed to access. A JWT containing any of these audiences will
+ * be accepted. When this setting is absent, only JWTs with audience
+ * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+ * will be accepted. For example, if no audiences are in the setting,
+ * LibraryService API will only accept JWTs with the following audience
+ * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+ * Example:
+ * audiences: bookstore_android.apps.googleusercontent.com,
+ * bookstore_web.apps.googleusercontent.com
+ *
+ * Generated from protobuf field string audiences = 2;
+ * @return string
+ */
+ public function getAudiences()
+ {
+ return $this->audiences;
+ }
+
+ /**
+ * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+ * implemented and accepted in all the runtime components.
+ * The list of JWT
+ * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+ * that are allowed to access. A JWT containing any of these audiences will
+ * be accepted. When this setting is absent, only JWTs with audience
+ * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+ * will be accepted. For example, if no audiences are in the setting,
+ * LibraryService API will only accept JWTs with the following audience
+ * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+ * Example:
+ * audiences: bookstore_android.apps.googleusercontent.com,
+ * bookstore_web.apps.googleusercontent.com
+ *
+ * Generated from protobuf field string audiences = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setAudiences($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->audiences = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Authentication.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Authentication.php
new file mode 100644
index 0000000..9ee3ba6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Authentication.php
@@ -0,0 +1,120 @@
+google.api.Authentication
+ */
+class Authentication extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A list of authentication rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.AuthenticationRule rules = 3;
+ */
+ private $rules;
+ /**
+ * Defines a set of authentication providers that a service supports.
+ *
+ * Generated from protobuf field repeated .google.api.AuthProvider providers = 4;
+ */
+ private $providers;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\AuthenticationRule>|\Google\Protobuf\Internal\RepeatedField $rules
+ * A list of authentication rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ * @type array<\Google\Api\AuthProvider>|\Google\Protobuf\Internal\RepeatedField $providers
+ * Defines a set of authentication providers that a service supports.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Auth::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A list of authentication rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.AuthenticationRule rules = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRules()
+ {
+ return $this->rules;
+ }
+
+ /**
+ * A list of authentication rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.AuthenticationRule rules = 3;
+ * @param array<\Google\Api\AuthenticationRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\AuthenticationRule::class);
+ $this->rules = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Defines a set of authentication providers that a service supports.
+ *
+ * Generated from protobuf field repeated .google.api.AuthProvider providers = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getProviders()
+ {
+ return $this->providers;
+ }
+
+ /**
+ * Defines a set of authentication providers that a service supports.
+ *
+ * Generated from protobuf field repeated .google.api.AuthProvider providers = 4;
+ * @param array<\Google\Api\AuthProvider>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setProviders($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\AuthProvider::class);
+ $this->providers = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/AuthenticationRule.php b/tests/php_test_files/vendor/google/common-protos/src/Api/AuthenticationRule.php
new file mode 100644
index 0000000..7606811
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/AuthenticationRule.php
@@ -0,0 +1,197 @@
+google.api.AuthenticationRule
+ */
+class AuthenticationRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * The requirements for OAuth credentials.
+ *
+ * Generated from protobuf field .google.api.OAuthRequirements oauth = 2;
+ */
+ protected $oauth = null;
+ /**
+ * If true, the service accepts API keys without any other credential.
+ * This flag only applies to HTTP and gRPC requests.
+ *
+ * Generated from protobuf field bool allow_without_credential = 5;
+ */
+ protected $allow_without_credential = false;
+ /**
+ * Requirements for additional authentication providers.
+ *
+ * Generated from protobuf field repeated .google.api.AuthRequirement requirements = 7;
+ */
+ private $requirements;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * @type \Google\Api\OAuthRequirements $oauth
+ * The requirements for OAuth credentials.
+ * @type bool $allow_without_credential
+ * If true, the service accepts API keys without any other credential.
+ * This flag only applies to HTTP and gRPC requests.
+ * @type array<\Google\Api\AuthRequirement>|\Google\Protobuf\Internal\RepeatedField $requirements
+ * Requirements for additional authentication providers.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Auth::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * The requirements for OAuth credentials.
+ *
+ * Generated from protobuf field .google.api.OAuthRequirements oauth = 2;
+ * @return \Google\Api\OAuthRequirements|null
+ */
+ public function getOauth()
+ {
+ return $this->oauth;
+ }
+
+ public function hasOauth()
+ {
+ return isset($this->oauth);
+ }
+
+ public function clearOauth()
+ {
+ unset($this->oauth);
+ }
+
+ /**
+ * The requirements for OAuth credentials.
+ *
+ * Generated from protobuf field .google.api.OAuthRequirements oauth = 2;
+ * @param \Google\Api\OAuthRequirements $var
+ * @return $this
+ */
+ public function setOauth($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\OAuthRequirements::class);
+ $this->oauth = $var;
+
+ return $this;
+ }
+
+ /**
+ * If true, the service accepts API keys without any other credential.
+ * This flag only applies to HTTP and gRPC requests.
+ *
+ * Generated from protobuf field bool allow_without_credential = 5;
+ * @return bool
+ */
+ public function getAllowWithoutCredential()
+ {
+ return $this->allow_without_credential;
+ }
+
+ /**
+ * If true, the service accepts API keys without any other credential.
+ * This flag only applies to HTTP and gRPC requests.
+ *
+ * Generated from protobuf field bool allow_without_credential = 5;
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowWithoutCredential($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_without_credential = $var;
+
+ return $this;
+ }
+
+ /**
+ * Requirements for additional authentication providers.
+ *
+ * Generated from protobuf field repeated .google.api.AuthRequirement requirements = 7;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRequirements()
+ {
+ return $this->requirements;
+ }
+
+ /**
+ * Requirements for additional authentication providers.
+ *
+ * Generated from protobuf field repeated .google.api.AuthRequirement requirements = 7;
+ * @param array<\Google\Api\AuthRequirement>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRequirements($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\AuthRequirement::class);
+ $this->requirements = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Backend.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Backend.php
new file mode 100644
index 0000000..28b6a07
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Backend.php
@@ -0,0 +1,71 @@
+google.api.Backend
+ */
+class Backend extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A list of API backend rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.BackendRule rules = 1;
+ */
+ private $rules;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\BackendRule>|\Google\Protobuf\Internal\RepeatedField $rules
+ * A list of API backend rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Backend::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A list of API backend rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.BackendRule rules = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRules()
+ {
+ return $this->rules;
+ }
+
+ /**
+ * A list of API backend rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.BackendRule rules = 1;
+ * @param array<\Google\Api\BackendRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\BackendRule::class);
+ $this->rules = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/BackendRule.php b/tests/php_test_files/vendor/google/common-protos/src/Api/BackendRule.php
new file mode 100644
index 0000000..37745f1
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/BackendRule.php
@@ -0,0 +1,525 @@
+google.api.BackendRule
+ */
+class BackendRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * The address of the API backend.
+ * The scheme is used to determine the backend protocol and security.
+ * The following schemes are accepted:
+ * SCHEME PROTOCOL SECURITY
+ * http:// HTTP None
+ * https:// HTTP TLS
+ * grpc:// gRPC None
+ * grpcs:// gRPC TLS
+ * It is recommended to explicitly include a scheme. Leaving out the scheme
+ * may cause constrasting behaviors across platforms.
+ * If the port is unspecified, the default is:
+ * - 80 for schemes without TLS
+ * - 443 for schemes with TLS
+ * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+ * to specify the protocol version.
+ *
+ * Generated from protobuf field string address = 2;
+ */
+ protected $address = '';
+ /**
+ * The number of seconds to wait for a response from a request. The default
+ * varies based on the request protocol and deployment environment.
+ *
+ * Generated from protobuf field double deadline = 3;
+ */
+ protected $deadline = 0.0;
+ /**
+ * Deprecated, do not use.
+ *
+ * Generated from protobuf field double min_deadline = 4 [deprecated = true];
+ * @deprecated
+ */
+ protected $min_deadline = 0.0;
+ /**
+ * The number of seconds to wait for the completion of a long running
+ * operation. The default is no deadline.
+ *
+ * Generated from protobuf field double operation_deadline = 5;
+ */
+ protected $operation_deadline = 0.0;
+ /**
+ * Generated from protobuf field .google.api.BackendRule.PathTranslation path_translation = 6;
+ */
+ protected $path_translation = 0;
+ /**
+ * The protocol used for sending a request to the backend.
+ * The supported values are "http/1.1" and "h2".
+ * The default value is inferred from the scheme in the
+ * [address][google.api.BackendRule.address] field:
+ * SCHEME PROTOCOL
+ * http:// http/1.1
+ * https:// http/1.1
+ * grpc:// h2
+ * grpcs:// h2
+ * For secure HTTP backends (https://) that support HTTP/2, set this field
+ * to "h2" for improved performance.
+ * Configuring this field to non-default values is only supported for secure
+ * HTTP backends. This field will be ignored for all other backends.
+ * See
+ * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+ * for more details on the supported values.
+ *
+ * Generated from protobuf field string protocol = 9;
+ */
+ protected $protocol = '';
+ /**
+ * The map between request protocol and the backend address.
+ *
+ * Generated from protobuf field map overrides_by_request_protocol = 10;
+ */
+ private $overrides_by_request_protocol;
+ protected $authentication;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * @type string $address
+ * The address of the API backend.
+ * The scheme is used to determine the backend protocol and security.
+ * The following schemes are accepted:
+ * SCHEME PROTOCOL SECURITY
+ * http:// HTTP None
+ * https:// HTTP TLS
+ * grpc:// gRPC None
+ * grpcs:// gRPC TLS
+ * It is recommended to explicitly include a scheme. Leaving out the scheme
+ * may cause constrasting behaviors across platforms.
+ * If the port is unspecified, the default is:
+ * - 80 for schemes without TLS
+ * - 443 for schemes with TLS
+ * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+ * to specify the protocol version.
+ * @type float $deadline
+ * The number of seconds to wait for a response from a request. The default
+ * varies based on the request protocol and deployment environment.
+ * @type float $min_deadline
+ * Deprecated, do not use.
+ * @type float $operation_deadline
+ * The number of seconds to wait for the completion of a long running
+ * operation. The default is no deadline.
+ * @type int $path_translation
+ * @type string $jwt_audience
+ * The JWT audience is used when generating a JWT ID token for the backend.
+ * This ID token will be added in the HTTP "authorization" header, and sent
+ * to the backend.
+ * @type bool $disable_auth
+ * When disable_auth is true, a JWT ID token won't be generated and the
+ * original "Authorization" HTTP header will be preserved. If the header is
+ * used to carry the original token and is expected by the backend, this
+ * field must be set to true to preserve the header.
+ * @type string $protocol
+ * The protocol used for sending a request to the backend.
+ * The supported values are "http/1.1" and "h2".
+ * The default value is inferred from the scheme in the
+ * [address][google.api.BackendRule.address] field:
+ * SCHEME PROTOCOL
+ * http:// http/1.1
+ * https:// http/1.1
+ * grpc:// h2
+ * grpcs:// h2
+ * For secure HTTP backends (https://) that support HTTP/2, set this field
+ * to "h2" for improved performance.
+ * Configuring this field to non-default values is only supported for secure
+ * HTTP backends. This field will be ignored for all other backends.
+ * See
+ * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+ * for more details on the supported values.
+ * @type array|\Google\Protobuf\Internal\MapField $overrides_by_request_protocol
+ * The map between request protocol and the backend address.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Backend::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * The address of the API backend.
+ * The scheme is used to determine the backend protocol and security.
+ * The following schemes are accepted:
+ * SCHEME PROTOCOL SECURITY
+ * http:// HTTP None
+ * https:// HTTP TLS
+ * grpc:// gRPC None
+ * grpcs:// gRPC TLS
+ * It is recommended to explicitly include a scheme. Leaving out the scheme
+ * may cause constrasting behaviors across platforms.
+ * If the port is unspecified, the default is:
+ * - 80 for schemes without TLS
+ * - 443 for schemes with TLS
+ * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+ * to specify the protocol version.
+ *
+ * Generated from protobuf field string address = 2;
+ * @return string
+ */
+ public function getAddress()
+ {
+ return $this->address;
+ }
+
+ /**
+ * The address of the API backend.
+ * The scheme is used to determine the backend protocol and security.
+ * The following schemes are accepted:
+ * SCHEME PROTOCOL SECURITY
+ * http:// HTTP None
+ * https:// HTTP TLS
+ * grpc:// gRPC None
+ * grpcs:// gRPC TLS
+ * It is recommended to explicitly include a scheme. Leaving out the scheme
+ * may cause constrasting behaviors across platforms.
+ * If the port is unspecified, the default is:
+ * - 80 for schemes without TLS
+ * - 443 for schemes with TLS
+ * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+ * to specify the protocol version.
+ *
+ * Generated from protobuf field string address = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setAddress($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->address = $var;
+
+ return $this;
+ }
+
+ /**
+ * The number of seconds to wait for a response from a request. The default
+ * varies based on the request protocol and deployment environment.
+ *
+ * Generated from protobuf field double deadline = 3;
+ * @return float
+ */
+ public function getDeadline()
+ {
+ return $this->deadline;
+ }
+
+ /**
+ * The number of seconds to wait for a response from a request. The default
+ * varies based on the request protocol and deployment environment.
+ *
+ * Generated from protobuf field double deadline = 3;
+ * @param float $var
+ * @return $this
+ */
+ public function setDeadline($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->deadline = $var;
+
+ return $this;
+ }
+
+ /**
+ * Deprecated, do not use.
+ *
+ * Generated from protobuf field double min_deadline = 4 [deprecated = true];
+ * @return float
+ * @deprecated
+ */
+ public function getMinDeadline()
+ {
+ @trigger_error('min_deadline is deprecated.', E_USER_DEPRECATED);
+ return $this->min_deadline;
+ }
+
+ /**
+ * Deprecated, do not use.
+ *
+ * Generated from protobuf field double min_deadline = 4 [deprecated = true];
+ * @param float $var
+ * @return $this
+ * @deprecated
+ */
+ public function setMinDeadline($var)
+ {
+ @trigger_error('min_deadline is deprecated.', E_USER_DEPRECATED);
+ GPBUtil::checkDouble($var);
+ $this->min_deadline = $var;
+
+ return $this;
+ }
+
+ /**
+ * The number of seconds to wait for the completion of a long running
+ * operation. The default is no deadline.
+ *
+ * Generated from protobuf field double operation_deadline = 5;
+ * @return float
+ */
+ public function getOperationDeadline()
+ {
+ return $this->operation_deadline;
+ }
+
+ /**
+ * The number of seconds to wait for the completion of a long running
+ * operation. The default is no deadline.
+ *
+ * Generated from protobuf field double operation_deadline = 5;
+ * @param float $var
+ * @return $this
+ */
+ public function setOperationDeadline($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->operation_deadline = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field .google.api.BackendRule.PathTranslation path_translation = 6;
+ * @return int
+ */
+ public function getPathTranslation()
+ {
+ return $this->path_translation;
+ }
+
+ /**
+ * Generated from protobuf field .google.api.BackendRule.PathTranslation path_translation = 6;
+ * @param int $var
+ * @return $this
+ */
+ public function setPathTranslation($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\BackendRule\PathTranslation::class);
+ $this->path_translation = $var;
+
+ return $this;
+ }
+
+ /**
+ * The JWT audience is used when generating a JWT ID token for the backend.
+ * This ID token will be added in the HTTP "authorization" header, and sent
+ * to the backend.
+ *
+ * Generated from protobuf field string jwt_audience = 7;
+ * @return string
+ */
+ public function getJwtAudience()
+ {
+ return $this->readOneof(7);
+ }
+
+ public function hasJwtAudience()
+ {
+ return $this->hasOneof(7);
+ }
+
+ /**
+ * The JWT audience is used when generating a JWT ID token for the backend.
+ * This ID token will be added in the HTTP "authorization" header, and sent
+ * to the backend.
+ *
+ * Generated from protobuf field string jwt_audience = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setJwtAudience($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(7, $var);
+
+ return $this;
+ }
+
+ /**
+ * When disable_auth is true, a JWT ID token won't be generated and the
+ * original "Authorization" HTTP header will be preserved. If the header is
+ * used to carry the original token and is expected by the backend, this
+ * field must be set to true to preserve the header.
+ *
+ * Generated from protobuf field bool disable_auth = 8;
+ * @return bool
+ */
+ public function getDisableAuth()
+ {
+ return $this->readOneof(8);
+ }
+
+ public function hasDisableAuth()
+ {
+ return $this->hasOneof(8);
+ }
+
+ /**
+ * When disable_auth is true, a JWT ID token won't be generated and the
+ * original "Authorization" HTTP header will be preserved. If the header is
+ * used to carry the original token and is expected by the backend, this
+ * field must be set to true to preserve the header.
+ *
+ * Generated from protobuf field bool disable_auth = 8;
+ * @param bool $var
+ * @return $this
+ */
+ public function setDisableAuth($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->writeOneof(8, $var);
+
+ return $this;
+ }
+
+ /**
+ * The protocol used for sending a request to the backend.
+ * The supported values are "http/1.1" and "h2".
+ * The default value is inferred from the scheme in the
+ * [address][google.api.BackendRule.address] field:
+ * SCHEME PROTOCOL
+ * http:// http/1.1
+ * https:// http/1.1
+ * grpc:// h2
+ * grpcs:// h2
+ * For secure HTTP backends (https://) that support HTTP/2, set this field
+ * to "h2" for improved performance.
+ * Configuring this field to non-default values is only supported for secure
+ * HTTP backends. This field will be ignored for all other backends.
+ * See
+ * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+ * for more details on the supported values.
+ *
+ * Generated from protobuf field string protocol = 9;
+ * @return string
+ */
+ public function getProtocol()
+ {
+ return $this->protocol;
+ }
+
+ /**
+ * The protocol used for sending a request to the backend.
+ * The supported values are "http/1.1" and "h2".
+ * The default value is inferred from the scheme in the
+ * [address][google.api.BackendRule.address] field:
+ * SCHEME PROTOCOL
+ * http:// http/1.1
+ * https:// http/1.1
+ * grpc:// h2
+ * grpcs:// h2
+ * For secure HTTP backends (https://) that support HTTP/2, set this field
+ * to "h2" for improved performance.
+ * Configuring this field to non-default values is only supported for secure
+ * HTTP backends. This field will be ignored for all other backends.
+ * See
+ * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+ * for more details on the supported values.
+ *
+ * Generated from protobuf field string protocol = 9;
+ * @param string $var
+ * @return $this
+ */
+ public function setProtocol($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->protocol = $var;
+
+ return $this;
+ }
+
+ /**
+ * The map between request protocol and the backend address.
+ *
+ * Generated from protobuf field map overrides_by_request_protocol = 10;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getOverridesByRequestProtocol()
+ {
+ return $this->overrides_by_request_protocol;
+ }
+
+ /**
+ * The map between request protocol and the backend address.
+ *
+ * Generated from protobuf field map overrides_by_request_protocol = 10;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setOverridesByRequestProtocol($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\BackendRule::class);
+ $this->overrides_by_request_protocol = $arr;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getAuthentication()
+ {
+ return $this->whichOneof("authentication");
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/BackendRule/PathTranslation.php b/tests/php_test_files/vendor/google/common-protos/src/Api/BackendRule/PathTranslation.php
new file mode 100644
index 0000000..d076295
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/BackendRule/PathTranslation.php
@@ -0,0 +1,93 @@
+google.api.BackendRule.PathTranslation
+ */
+class PathTranslation
+{
+ /**
+ * Generated from protobuf enum PATH_TRANSLATION_UNSPECIFIED = 0;
+ */
+ const PATH_TRANSLATION_UNSPECIFIED = 0;
+ /**
+ * Use the backend address as-is, with no modification to the path. If the
+ * URL pattern contains variables, the variable names and values will be
+ * appended to the query string. If a query string parameter and a URL
+ * pattern variable have the same name, this may result in duplicate keys in
+ * the query string.
+ * # Examples
+ * Given the following operation config:
+ * Method path: /api/company/{cid}/user/{uid}
+ * Backend address: https://example.cloudfunctions.net/getUser
+ * Requests to the following request paths will call the backend at the
+ * translated path:
+ * Request path: /api/company/widgetworks/user/johndoe
+ * Translated:
+ * https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
+ * Request path: /api/company/widgetworks/user/johndoe?timezone=EST
+ * Translated:
+ * https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
+ *
+ * Generated from protobuf enum CONSTANT_ADDRESS = 1;
+ */
+ const CONSTANT_ADDRESS = 1;
+ /**
+ * The request path will be appended to the backend address.
+ * # Examples
+ * Given the following operation config:
+ * Method path: /api/company/{cid}/user/{uid}
+ * Backend address: https://example.appspot.com
+ * Requests to the following request paths will call the backend at the
+ * translated path:
+ * Request path: /api/company/widgetworks/user/johndoe
+ * Translated:
+ * https://example.appspot.com/api/company/widgetworks/user/johndoe
+ * Request path: /api/company/widgetworks/user/johndoe?timezone=EST
+ * Translated:
+ * https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
+ *
+ * Generated from protobuf enum APPEND_PATH_TO_ADDRESS = 2;
+ */
+ const APPEND_PATH_TO_ADDRESS = 2;
+
+ private static $valueToName = [
+ self::PATH_TRANSLATION_UNSPECIFIED => 'PATH_TRANSLATION_UNSPECIFIED',
+ self::CONSTANT_ADDRESS => 'CONSTANT_ADDRESS',
+ self::APPEND_PATH_TO_ADDRESS => 'APPEND_PATH_TO_ADDRESS',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Billing.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Billing.php
new file mode 100644
index 0000000..241d2f0
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Billing.php
@@ -0,0 +1,107 @@
+google.api.Billing
+ */
+class Billing extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Billing configurations for sending metrics to the consumer project.
+ * There can be multiple consumer destinations per service, each one must have
+ * a different monitored resource type. A metric can be used in at most
+ * one consumer destination.
+ *
+ * Generated from protobuf field repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
+ */
+ private $consumer_destinations;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\Billing\BillingDestination>|\Google\Protobuf\Internal\RepeatedField $consumer_destinations
+ * Billing configurations for sending metrics to the consumer project.
+ * There can be multiple consumer destinations per service, each one must have
+ * a different monitored resource type. A metric can be used in at most
+ * one consumer destination.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Billing::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Billing configurations for sending metrics to the consumer project.
+ * There can be multiple consumer destinations per service, each one must have
+ * a different monitored resource type. A metric can be used in at most
+ * one consumer destination.
+ *
+ * Generated from protobuf field repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getConsumerDestinations()
+ {
+ return $this->consumer_destinations;
+ }
+
+ /**
+ * Billing configurations for sending metrics to the consumer project.
+ * There can be multiple consumer destinations per service, each one must have
+ * a different monitored resource type. A metric can be used in at most
+ * one consumer destination.
+ *
+ * Generated from protobuf field repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
+ * @param array<\Google\Api\Billing\BillingDestination>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setConsumerDestinations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Billing\BillingDestination::class);
+ $this->consumer_destinations = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Billing/BillingDestination.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Billing/BillingDestination.php
new file mode 100644
index 0000000..39be6dd
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Billing/BillingDestination.php
@@ -0,0 +1,119 @@
+google.api.Billing.BillingDestination
+ */
+class BillingDestination extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The monitored resource type. The type must be defined in
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ *
+ * Generated from protobuf field string monitored_resource = 1;
+ */
+ protected $monitored_resource = '';
+ /**
+ * Names of the metrics to report to this billing destination.
+ * Each name must be defined in
+ * [Service.metrics][google.api.Service.metrics] section.
+ *
+ * Generated from protobuf field repeated string metrics = 2;
+ */
+ private $metrics;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $monitored_resource
+ * The monitored resource type. The type must be defined in
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $metrics
+ * Names of the metrics to report to this billing destination.
+ * Each name must be defined in
+ * [Service.metrics][google.api.Service.metrics] section.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Billing::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The monitored resource type. The type must be defined in
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ *
+ * Generated from protobuf field string monitored_resource = 1;
+ * @return string
+ */
+ public function getMonitoredResource()
+ {
+ return $this->monitored_resource;
+ }
+
+ /**
+ * The monitored resource type. The type must be defined in
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ *
+ * Generated from protobuf field string monitored_resource = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setMonitoredResource($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->monitored_resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * Names of the metrics to report to this billing destination.
+ * Each name must be defined in
+ * [Service.metrics][google.api.Service.metrics] section.
+ *
+ * Generated from protobuf field repeated string metrics = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMetrics()
+ {
+ return $this->metrics;
+ }
+
+ /**
+ * Names of the metrics to report to this billing destination.
+ * Each name must be defined in
+ * [Service.metrics][google.api.Service.metrics] section.
+ *
+ * Generated from protobuf field repeated string metrics = 2;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->metrics = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ChangeType.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ChangeType.php
new file mode 100644
index 0000000..e39ab1b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ChangeType.php
@@ -0,0 +1,72 @@
+google.api.ChangeType
+ */
+class ChangeType
+{
+ /**
+ * No value was provided.
+ *
+ * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0;
+ */
+ const CHANGE_TYPE_UNSPECIFIED = 0;
+ /**
+ * The changed object exists in the 'new' service configuration, but not
+ * in the 'old' service configuration.
+ *
+ * Generated from protobuf enum ADDED = 1;
+ */
+ const ADDED = 1;
+ /**
+ * The changed object exists in the 'old' service configuration, but not
+ * in the 'new' service configuration.
+ *
+ * Generated from protobuf enum REMOVED = 2;
+ */
+ const REMOVED = 2;
+ /**
+ * The changed object exists in both service configurations, but its value
+ * is different.
+ *
+ * Generated from protobuf enum MODIFIED = 3;
+ */
+ const MODIFIED = 3;
+
+ private static $valueToName = [
+ self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED',
+ self::ADDED => 'ADDED',
+ self::REMOVED => 'REMOVED',
+ self::MODIFIED => 'MODIFIED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ClientLibraryDestination.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ClientLibraryDestination.php
new file mode 100644
index 0000000..81aee77
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ClientLibraryDestination.php
@@ -0,0 +1,63 @@
+google.api.ClientLibraryDestination
+ */
+class ClientLibraryDestination
+{
+ /**
+ * Client libraries will neither be generated nor published to package
+ * managers.
+ *
+ * Generated from protobuf enum CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0;
+ */
+ const CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0;
+ /**
+ * Generate the client library in a repo under github.com/googleapis,
+ * but don't publish it to package managers.
+ *
+ * Generated from protobuf enum GITHUB = 10;
+ */
+ const GITHUB = 10;
+ /**
+ * Publish the library to package managers like nuget.org and npmjs.com.
+ *
+ * Generated from protobuf enum PACKAGE_MANAGER = 20;
+ */
+ const PACKAGE_MANAGER = 20;
+
+ private static $valueToName = [
+ self::CLIENT_LIBRARY_DESTINATION_UNSPECIFIED => 'CLIENT_LIBRARY_DESTINATION_UNSPECIFIED',
+ self::GITHUB => 'GITHUB',
+ self::PACKAGE_MANAGER => 'PACKAGE_MANAGER',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ClientLibraryOrganization.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ClientLibraryOrganization.php
new file mode 100644
index 0000000..bbb985f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ClientLibraryOrganization.php
@@ -0,0 +1,97 @@
+google.api.ClientLibraryOrganization
+ */
+class ClientLibraryOrganization
+{
+ /**
+ * Not useful.
+ *
+ * Generated from protobuf enum CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0;
+ */
+ const CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0;
+ /**
+ * Google Cloud Platform Org.
+ *
+ * Generated from protobuf enum CLOUD = 1;
+ */
+ const CLOUD = 1;
+ /**
+ * Ads (Advertising) Org.
+ *
+ * Generated from protobuf enum ADS = 2;
+ */
+ const ADS = 2;
+ /**
+ * Photos Org.
+ *
+ * Generated from protobuf enum PHOTOS = 3;
+ */
+ const PHOTOS = 3;
+ /**
+ * Street View Org.
+ *
+ * Generated from protobuf enum STREET_VIEW = 4;
+ */
+ const STREET_VIEW = 4;
+ /**
+ * Shopping Org.
+ *
+ * Generated from protobuf enum SHOPPING = 5;
+ */
+ const SHOPPING = 5;
+ /**
+ * Geo Org.
+ *
+ * Generated from protobuf enum GEO = 6;
+ */
+ const GEO = 6;
+ /**
+ * Generative AI - https://developers.generativeai.google
+ *
+ * Generated from protobuf enum GENERATIVE_AI = 7;
+ */
+ const GENERATIVE_AI = 7;
+
+ private static $valueToName = [
+ self::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED => 'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED',
+ self::CLOUD => 'CLOUD',
+ self::ADS => 'ADS',
+ self::PHOTOS => 'PHOTOS',
+ self::STREET_VIEW => 'STREET_VIEW',
+ self::SHOPPING => 'SHOPPING',
+ self::GEO => 'GEO',
+ self::GENERATIVE_AI => 'GENERATIVE_AI',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ClientLibrarySettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ClientLibrarySettings.php
new file mode 100644
index 0000000..d67588e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ClientLibrarySettings.php
@@ -0,0 +1,499 @@
+google.api.ClientLibrarySettings
+ */
+class ClientLibrarySettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Version of the API to apply these settings to. This is the full protobuf
+ * package for the API, ending in the version element.
+ * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+ *
+ * Generated from protobuf field string version = 1;
+ */
+ protected $version = '';
+ /**
+ * Launch stage of this version of the API.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 2;
+ */
+ protected $launch_stage = 0;
+ /**
+ * When using transport=rest, the client request will encode enums as
+ * numbers rather than strings.
+ *
+ * Generated from protobuf field bool rest_numeric_enums = 3;
+ */
+ protected $rest_numeric_enums = false;
+ /**
+ * Settings for legacy Java features, supported in the Service YAML.
+ *
+ * Generated from protobuf field .google.api.JavaSettings java_settings = 21;
+ */
+ protected $java_settings = null;
+ /**
+ * Settings for C++ client libraries.
+ *
+ * Generated from protobuf field .google.api.CppSettings cpp_settings = 22;
+ */
+ protected $cpp_settings = null;
+ /**
+ * Settings for PHP client libraries.
+ *
+ * Generated from protobuf field .google.api.PhpSettings php_settings = 23;
+ */
+ protected $php_settings = null;
+ /**
+ * Settings for Python client libraries.
+ *
+ * Generated from protobuf field .google.api.PythonSettings python_settings = 24;
+ */
+ protected $python_settings = null;
+ /**
+ * Settings for Node client libraries.
+ *
+ * Generated from protobuf field .google.api.NodeSettings node_settings = 25;
+ */
+ protected $node_settings = null;
+ /**
+ * Settings for .NET client libraries.
+ *
+ * Generated from protobuf field .google.api.DotnetSettings dotnet_settings = 26;
+ */
+ protected $dotnet_settings = null;
+ /**
+ * Settings for Ruby client libraries.
+ *
+ * Generated from protobuf field .google.api.RubySettings ruby_settings = 27;
+ */
+ protected $ruby_settings = null;
+ /**
+ * Settings for Go client libraries.
+ *
+ * Generated from protobuf field .google.api.GoSettings go_settings = 28;
+ */
+ protected $go_settings = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $version
+ * Version of the API to apply these settings to. This is the full protobuf
+ * package for the API, ending in the version element.
+ * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+ * @type int $launch_stage
+ * Launch stage of this version of the API.
+ * @type bool $rest_numeric_enums
+ * When using transport=rest, the client request will encode enums as
+ * numbers rather than strings.
+ * @type \Google\Api\JavaSettings $java_settings
+ * Settings for legacy Java features, supported in the Service YAML.
+ * @type \Google\Api\CppSettings $cpp_settings
+ * Settings for C++ client libraries.
+ * @type \Google\Api\PhpSettings $php_settings
+ * Settings for PHP client libraries.
+ * @type \Google\Api\PythonSettings $python_settings
+ * Settings for Python client libraries.
+ * @type \Google\Api\NodeSettings $node_settings
+ * Settings for Node client libraries.
+ * @type \Google\Api\DotnetSettings $dotnet_settings
+ * Settings for .NET client libraries.
+ * @type \Google\Api\RubySettings $ruby_settings
+ * Settings for Ruby client libraries.
+ * @type \Google\Api\GoSettings $go_settings
+ * Settings for Go client libraries.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Version of the API to apply these settings to. This is the full protobuf
+ * package for the API, ending in the version element.
+ * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+ *
+ * Generated from protobuf field string version = 1;
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * Version of the API to apply these settings to. This is the full protobuf
+ * package for the API, ending in the version element.
+ * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+ *
+ * Generated from protobuf field string version = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->version = $var;
+
+ return $this;
+ }
+
+ /**
+ * Launch stage of this version of the API.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 2;
+ * @return int
+ */
+ public function getLaunchStage()
+ {
+ return $this->launch_stage;
+ }
+
+ /**
+ * Launch stage of this version of the API.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setLaunchStage($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class);
+ $this->launch_stage = $var;
+
+ return $this;
+ }
+
+ /**
+ * When using transport=rest, the client request will encode enums as
+ * numbers rather than strings.
+ *
+ * Generated from protobuf field bool rest_numeric_enums = 3;
+ * @return bool
+ */
+ public function getRestNumericEnums()
+ {
+ return $this->rest_numeric_enums;
+ }
+
+ /**
+ * When using transport=rest, the client request will encode enums as
+ * numbers rather than strings.
+ *
+ * Generated from protobuf field bool rest_numeric_enums = 3;
+ * @param bool $var
+ * @return $this
+ */
+ public function setRestNumericEnums($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->rest_numeric_enums = $var;
+
+ return $this;
+ }
+
+ /**
+ * Settings for legacy Java features, supported in the Service YAML.
+ *
+ * Generated from protobuf field .google.api.JavaSettings java_settings = 21;
+ * @return \Google\Api\JavaSettings|null
+ */
+ public function getJavaSettings()
+ {
+ return $this->java_settings;
+ }
+
+ public function hasJavaSettings()
+ {
+ return isset($this->java_settings);
+ }
+
+ public function clearJavaSettings()
+ {
+ unset($this->java_settings);
+ }
+
+ /**
+ * Settings for legacy Java features, supported in the Service YAML.
+ *
+ * Generated from protobuf field .google.api.JavaSettings java_settings = 21;
+ * @param \Google\Api\JavaSettings $var
+ * @return $this
+ */
+ public function setJavaSettings($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\JavaSettings::class);
+ $this->java_settings = $var;
+
+ return $this;
+ }
+
+ /**
+ * Settings for C++ client libraries.
+ *
+ * Generated from protobuf field .google.api.CppSettings cpp_settings = 22;
+ * @return \Google\Api\CppSettings|null
+ */
+ public function getCppSettings()
+ {
+ return $this->cpp_settings;
+ }
+
+ public function hasCppSettings()
+ {
+ return isset($this->cpp_settings);
+ }
+
+ public function clearCppSettings()
+ {
+ unset($this->cpp_settings);
+ }
+
+ /**
+ * Settings for C++ client libraries.
+ *
+ * Generated from protobuf field .google.api.CppSettings cpp_settings = 22;
+ * @param \Google\Api\CppSettings $var
+ * @return $this
+ */
+ public function setCppSettings($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\CppSettings::class);
+ $this->cpp_settings = $var;
+
+ return $this;
+ }
+
+ /**
+ * Settings for PHP client libraries.
+ *
+ * Generated from protobuf field .google.api.PhpSettings php_settings = 23;
+ * @return \Google\Api\PhpSettings|null
+ */
+ public function getPhpSettings()
+ {
+ return $this->php_settings;
+ }
+
+ public function hasPhpSettings()
+ {
+ return isset($this->php_settings);
+ }
+
+ public function clearPhpSettings()
+ {
+ unset($this->php_settings);
+ }
+
+ /**
+ * Settings for PHP client libraries.
+ *
+ * Generated from protobuf field .google.api.PhpSettings php_settings = 23;
+ * @param \Google\Api\PhpSettings $var
+ * @return $this
+ */
+ public function setPhpSettings($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\PhpSettings::class);
+ $this->php_settings = $var;
+
+ return $this;
+ }
+
+ /**
+ * Settings for Python client libraries.
+ *
+ * Generated from protobuf field .google.api.PythonSettings python_settings = 24;
+ * @return \Google\Api\PythonSettings|null
+ */
+ public function getPythonSettings()
+ {
+ return $this->python_settings;
+ }
+
+ public function hasPythonSettings()
+ {
+ return isset($this->python_settings);
+ }
+
+ public function clearPythonSettings()
+ {
+ unset($this->python_settings);
+ }
+
+ /**
+ * Settings for Python client libraries.
+ *
+ * Generated from protobuf field .google.api.PythonSettings python_settings = 24;
+ * @param \Google\Api\PythonSettings $var
+ * @return $this
+ */
+ public function setPythonSettings($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\PythonSettings::class);
+ $this->python_settings = $var;
+
+ return $this;
+ }
+
+ /**
+ * Settings for Node client libraries.
+ *
+ * Generated from protobuf field .google.api.NodeSettings node_settings = 25;
+ * @return \Google\Api\NodeSettings|null
+ */
+ public function getNodeSettings()
+ {
+ return $this->node_settings;
+ }
+
+ public function hasNodeSettings()
+ {
+ return isset($this->node_settings);
+ }
+
+ public function clearNodeSettings()
+ {
+ unset($this->node_settings);
+ }
+
+ /**
+ * Settings for Node client libraries.
+ *
+ * Generated from protobuf field .google.api.NodeSettings node_settings = 25;
+ * @param \Google\Api\NodeSettings $var
+ * @return $this
+ */
+ public function setNodeSettings($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\NodeSettings::class);
+ $this->node_settings = $var;
+
+ return $this;
+ }
+
+ /**
+ * Settings for .NET client libraries.
+ *
+ * Generated from protobuf field .google.api.DotnetSettings dotnet_settings = 26;
+ * @return \Google\Api\DotnetSettings|null
+ */
+ public function getDotnetSettings()
+ {
+ return $this->dotnet_settings;
+ }
+
+ public function hasDotnetSettings()
+ {
+ return isset($this->dotnet_settings);
+ }
+
+ public function clearDotnetSettings()
+ {
+ unset($this->dotnet_settings);
+ }
+
+ /**
+ * Settings for .NET client libraries.
+ *
+ * Generated from protobuf field .google.api.DotnetSettings dotnet_settings = 26;
+ * @param \Google\Api\DotnetSettings $var
+ * @return $this
+ */
+ public function setDotnetSettings($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\DotnetSettings::class);
+ $this->dotnet_settings = $var;
+
+ return $this;
+ }
+
+ /**
+ * Settings for Ruby client libraries.
+ *
+ * Generated from protobuf field .google.api.RubySettings ruby_settings = 27;
+ * @return \Google\Api\RubySettings|null
+ */
+ public function getRubySettings()
+ {
+ return $this->ruby_settings;
+ }
+
+ public function hasRubySettings()
+ {
+ return isset($this->ruby_settings);
+ }
+
+ public function clearRubySettings()
+ {
+ unset($this->ruby_settings);
+ }
+
+ /**
+ * Settings for Ruby client libraries.
+ *
+ * Generated from protobuf field .google.api.RubySettings ruby_settings = 27;
+ * @param \Google\Api\RubySettings $var
+ * @return $this
+ */
+ public function setRubySettings($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\RubySettings::class);
+ $this->ruby_settings = $var;
+
+ return $this;
+ }
+
+ /**
+ * Settings for Go client libraries.
+ *
+ * Generated from protobuf field .google.api.GoSettings go_settings = 28;
+ * @return \Google\Api\GoSettings|null
+ */
+ public function getGoSettings()
+ {
+ return $this->go_settings;
+ }
+
+ public function hasGoSettings()
+ {
+ return isset($this->go_settings);
+ }
+
+ public function clearGoSettings()
+ {
+ unset($this->go_settings);
+ }
+
+ /**
+ * Settings for Go client libraries.
+ *
+ * Generated from protobuf field .google.api.GoSettings go_settings = 28;
+ * @param \Google\Api\GoSettings $var
+ * @return $this
+ */
+ public function setGoSettings($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\GoSettings::class);
+ $this->go_settings = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/CommonLanguageSettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/CommonLanguageSettings.php
new file mode 100644
index 0000000..f5b0985
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/CommonLanguageSettings.php
@@ -0,0 +1,110 @@
+google.api.CommonLanguageSettings
+ */
+class CommonLanguageSettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Link to automatically generated reference documentation. Example:
+ * https://cloud.google.com/nodejs/docs/reference/asset/latest
+ *
+ * Generated from protobuf field string reference_docs_uri = 1 [deprecated = true];
+ * @deprecated
+ */
+ protected $reference_docs_uri = '';
+ /**
+ * The destination where API teams want this client library to be published.
+ *
+ * Generated from protobuf field repeated .google.api.ClientLibraryDestination destinations = 2;
+ */
+ private $destinations;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $reference_docs_uri
+ * Link to automatically generated reference documentation. Example:
+ * https://cloud.google.com/nodejs/docs/reference/asset/latest
+ * @type array|\Google\Protobuf\Internal\RepeatedField $destinations
+ * The destination where API teams want this client library to be published.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Link to automatically generated reference documentation. Example:
+ * https://cloud.google.com/nodejs/docs/reference/asset/latest
+ *
+ * Generated from protobuf field string reference_docs_uri = 1 [deprecated = true];
+ * @return string
+ * @deprecated
+ */
+ public function getReferenceDocsUri()
+ {
+ @trigger_error('reference_docs_uri is deprecated.', E_USER_DEPRECATED);
+ return $this->reference_docs_uri;
+ }
+
+ /**
+ * Link to automatically generated reference documentation. Example:
+ * https://cloud.google.com/nodejs/docs/reference/asset/latest
+ *
+ * Generated from protobuf field string reference_docs_uri = 1 [deprecated = true];
+ * @param string $var
+ * @return $this
+ * @deprecated
+ */
+ public function setReferenceDocsUri($var)
+ {
+ @trigger_error('reference_docs_uri is deprecated.', E_USER_DEPRECATED);
+ GPBUtil::checkString($var, True);
+ $this->reference_docs_uri = $var;
+
+ return $this;
+ }
+
+ /**
+ * The destination where API teams want this client library to be published.
+ *
+ * Generated from protobuf field repeated .google.api.ClientLibraryDestination destinations = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDestinations()
+ {
+ return $this->destinations;
+ }
+
+ /**
+ * The destination where API teams want this client library to be published.
+ *
+ * Generated from protobuf field repeated .google.api.ClientLibraryDestination destinations = 2;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDestinations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Api\ClientLibraryDestination::class);
+ $this->destinations = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ConfigChange.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ConfigChange.php
new file mode 100644
index 0000000..8c4fcd5
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ConfigChange.php
@@ -0,0 +1,251 @@
+google.api.ConfigChange
+ */
+class ConfigChange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Object hierarchy path to the change, with levels separated by a '.'
+ * character. For repeated fields, an applicable unique identifier field is
+ * used for the index (usually selector, name, or id). For maps, the term
+ * 'key' is used. If the field has no unique identifier, the numeric index
+ * is used.
+ * Examples:
+ * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+ * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+ * - logging.producer_destinations[0]
+ *
+ * Generated from protobuf field string element = 1;
+ */
+ protected $element = '';
+ /**
+ * Value of the changed object in the old Service configuration,
+ * in JSON format. This field will not be populated if ChangeType == ADDED.
+ *
+ * Generated from protobuf field string old_value = 2;
+ */
+ protected $old_value = '';
+ /**
+ * Value of the changed object in the new Service configuration,
+ * in JSON format. This field will not be populated if ChangeType == REMOVED.
+ *
+ * Generated from protobuf field string new_value = 3;
+ */
+ protected $new_value = '';
+ /**
+ * The type for this change, either ADDED, REMOVED, or MODIFIED.
+ *
+ * Generated from protobuf field .google.api.ChangeType change_type = 4;
+ */
+ protected $change_type = 0;
+ /**
+ * Collection of advice provided for this change, useful for determining the
+ * possible impact of this change.
+ *
+ * Generated from protobuf field repeated .google.api.Advice advices = 5;
+ */
+ private $advices;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $element
+ * Object hierarchy path to the change, with levels separated by a '.'
+ * character. For repeated fields, an applicable unique identifier field is
+ * used for the index (usually selector, name, or id). For maps, the term
+ * 'key' is used. If the field has no unique identifier, the numeric index
+ * is used.
+ * Examples:
+ * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+ * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+ * - logging.producer_destinations[0]
+ * @type string $old_value
+ * Value of the changed object in the old Service configuration,
+ * in JSON format. This field will not be populated if ChangeType == ADDED.
+ * @type string $new_value
+ * Value of the changed object in the new Service configuration,
+ * in JSON format. This field will not be populated if ChangeType == REMOVED.
+ * @type int $change_type
+ * The type for this change, either ADDED, REMOVED, or MODIFIED.
+ * @type array<\Google\Api\Advice>|\Google\Protobuf\Internal\RepeatedField $advices
+ * Collection of advice provided for this change, useful for determining the
+ * possible impact of this change.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\ConfigChange::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Object hierarchy path to the change, with levels separated by a '.'
+ * character. For repeated fields, an applicable unique identifier field is
+ * used for the index (usually selector, name, or id). For maps, the term
+ * 'key' is used. If the field has no unique identifier, the numeric index
+ * is used.
+ * Examples:
+ * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+ * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+ * - logging.producer_destinations[0]
+ *
+ * Generated from protobuf field string element = 1;
+ * @return string
+ */
+ public function getElement()
+ {
+ return $this->element;
+ }
+
+ /**
+ * Object hierarchy path to the change, with levels separated by a '.'
+ * character. For repeated fields, an applicable unique identifier field is
+ * used for the index (usually selector, name, or id). For maps, the term
+ * 'key' is used. If the field has no unique identifier, the numeric index
+ * is used.
+ * Examples:
+ * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+ * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+ * - logging.producer_destinations[0]
+ *
+ * Generated from protobuf field string element = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setElement($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->element = $var;
+
+ return $this;
+ }
+
+ /**
+ * Value of the changed object in the old Service configuration,
+ * in JSON format. This field will not be populated if ChangeType == ADDED.
+ *
+ * Generated from protobuf field string old_value = 2;
+ * @return string
+ */
+ public function getOldValue()
+ {
+ return $this->old_value;
+ }
+
+ /**
+ * Value of the changed object in the old Service configuration,
+ * in JSON format. This field will not be populated if ChangeType == ADDED.
+ *
+ * Generated from protobuf field string old_value = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setOldValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->old_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Value of the changed object in the new Service configuration,
+ * in JSON format. This field will not be populated if ChangeType == REMOVED.
+ *
+ * Generated from protobuf field string new_value = 3;
+ * @return string
+ */
+ public function getNewValue()
+ {
+ return $this->new_value;
+ }
+
+ /**
+ * Value of the changed object in the new Service configuration,
+ * in JSON format. This field will not be populated if ChangeType == REMOVED.
+ *
+ * Generated from protobuf field string new_value = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setNewValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->new_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * The type for this change, either ADDED, REMOVED, or MODIFIED.
+ *
+ * Generated from protobuf field .google.api.ChangeType change_type = 4;
+ * @return int
+ */
+ public function getChangeType()
+ {
+ return $this->change_type;
+ }
+
+ /**
+ * The type for this change, either ADDED, REMOVED, or MODIFIED.
+ *
+ * Generated from protobuf field .google.api.ChangeType change_type = 4;
+ * @param int $var
+ * @return $this
+ */
+ public function setChangeType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\ChangeType::class);
+ $this->change_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Collection of advice provided for this change, useful for determining the
+ * possible impact of this change.
+ *
+ * Generated from protobuf field repeated .google.api.Advice advices = 5;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAdvices()
+ {
+ return $this->advices;
+ }
+
+ /**
+ * Collection of advice provided for this change, useful for determining the
+ * possible impact of this change.
+ *
+ * Generated from protobuf field repeated .google.api.Advice advices = 5;
+ * @param array<\Google\Api\Advice>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAdvices($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Advice::class);
+ $this->advices = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Context.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Context.php
new file mode 100644
index 0000000..b353115
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Context.php
@@ -0,0 +1,98 @@
+-binโ and
+ * โx-goog-ext--jspbโ format. For example, list any service
+ * specific protobuf types that can appear in grpc metadata as follows in your
+ * yaml file:
+ * Example:
+ * context:
+ * rules:
+ * - selector: "google.example.library.v1.LibraryService.CreateBook"
+ * allowed_request_extensions:
+ * - google.foo.v1.NewExtension
+ * allowed_response_extensions:
+ * - google.foo.v1.NewExtension
+ * You can also specify extension ID instead of fully qualified extension name
+ * here.
+ *
+ * Generated from protobuf message google.api.Context
+ */
+class Context extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A list of RPC context rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.ContextRule rules = 1;
+ */
+ private $rules;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\ContextRule>|\Google\Protobuf\Internal\RepeatedField $rules
+ * A list of RPC context rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Context::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A list of RPC context rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.ContextRule rules = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRules()
+ {
+ return $this->rules;
+ }
+
+ /**
+ * A list of RPC context rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.ContextRule rules = 1;
+ * @param array<\Google\Api\ContextRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\ContextRule::class);
+ $this->rules = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ContextRule.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ContextRule.php
new file mode 100644
index 0000000..f455b1e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ContextRule.php
@@ -0,0 +1,228 @@
+google.api.ContextRule
+ */
+class ContextRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * A list of full type names of requested contexts, only the requested context
+ * will be made available to the backend.
+ *
+ * Generated from protobuf field repeated string requested = 2;
+ */
+ private $requested;
+ /**
+ * A list of full type names of provided contexts. It is used to support
+ * propagating HTTP headers and ETags from the response extension.
+ *
+ * Generated from protobuf field repeated string provided = 3;
+ */
+ private $provided;
+ /**
+ * A list of full type names or extension IDs of extensions allowed in grpc
+ * side channel from client to backend.
+ *
+ * Generated from protobuf field repeated string allowed_request_extensions = 4;
+ */
+ private $allowed_request_extensions;
+ /**
+ * A list of full type names or extension IDs of extensions allowed in grpc
+ * side channel from backend to client.
+ *
+ * Generated from protobuf field repeated string allowed_response_extensions = 5;
+ */
+ private $allowed_response_extensions;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $requested
+ * A list of full type names of requested contexts, only the requested context
+ * will be made available to the backend.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $provided
+ * A list of full type names of provided contexts. It is used to support
+ * propagating HTTP headers and ETags from the response extension.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_request_extensions
+ * A list of full type names or extension IDs of extensions allowed in grpc
+ * side channel from client to backend.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_response_extensions
+ * A list of full type names or extension IDs of extensions allowed in grpc
+ * side channel from backend to client.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Context::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of full type names of requested contexts, only the requested context
+ * will be made available to the backend.
+ *
+ * Generated from protobuf field repeated string requested = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRequested()
+ {
+ return $this->requested;
+ }
+
+ /**
+ * A list of full type names of requested contexts, only the requested context
+ * will be made available to the backend.
+ *
+ * Generated from protobuf field repeated string requested = 2;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRequested($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->requested = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A list of full type names of provided contexts. It is used to support
+ * propagating HTTP headers and ETags from the response extension.
+ *
+ * Generated from protobuf field repeated string provided = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getProvided()
+ {
+ return $this->provided;
+ }
+
+ /**
+ * A list of full type names of provided contexts. It is used to support
+ * propagating HTTP headers and ETags from the response extension.
+ *
+ * Generated from protobuf field repeated string provided = 3;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setProvided($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->provided = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A list of full type names or extension IDs of extensions allowed in grpc
+ * side channel from client to backend.
+ *
+ * Generated from protobuf field repeated string allowed_request_extensions = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAllowedRequestExtensions()
+ {
+ return $this->allowed_request_extensions;
+ }
+
+ /**
+ * A list of full type names or extension IDs of extensions allowed in grpc
+ * side channel from client to backend.
+ *
+ * Generated from protobuf field repeated string allowed_request_extensions = 4;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAllowedRequestExtensions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->allowed_request_extensions = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A list of full type names or extension IDs of extensions allowed in grpc
+ * side channel from backend to client.
+ *
+ * Generated from protobuf field repeated string allowed_response_extensions = 5;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAllowedResponseExtensions()
+ {
+ return $this->allowed_response_extensions;
+ }
+
+ /**
+ * A list of full type names or extension IDs of extensions allowed in grpc
+ * side channel from backend to client.
+ *
+ * Generated from protobuf field repeated string allowed_response_extensions = 5;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAllowedResponseExtensions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->allowed_response_extensions = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Control.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Control.php
new file mode 100644
index 0000000..5b9bdf1
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Control.php
@@ -0,0 +1,112 @@
+google.api.Control
+ */
+class Control extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The service controller environment to use. If empty, no control plane
+ * feature (like quota and billing) will be enabled. The recommended value for
+ * most services is servicecontrol.googleapis.com
+ *
+ * Generated from protobuf field string environment = 1;
+ */
+ protected $environment = '';
+ /**
+ * Defines policies applying to the API methods of the service.
+ *
+ * Generated from protobuf field repeated .google.api.MethodPolicy method_policies = 4;
+ */
+ private $method_policies;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $environment
+ * The service controller environment to use. If empty, no control plane
+ * feature (like quota and billing) will be enabled. The recommended value for
+ * most services is servicecontrol.googleapis.com
+ * @type array<\Google\Api\MethodPolicy>|\Google\Protobuf\Internal\RepeatedField $method_policies
+ * Defines policies applying to the API methods of the service.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Control::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The service controller environment to use. If empty, no control plane
+ * feature (like quota and billing) will be enabled. The recommended value for
+ * most services is servicecontrol.googleapis.com
+ *
+ * Generated from protobuf field string environment = 1;
+ * @return string
+ */
+ public function getEnvironment()
+ {
+ return $this->environment;
+ }
+
+ /**
+ * The service controller environment to use. If empty, no control plane
+ * feature (like quota and billing) will be enabled. The recommended value for
+ * most services is servicecontrol.googleapis.com
+ *
+ * Generated from protobuf field string environment = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setEnvironment($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->environment = $var;
+
+ return $this;
+ }
+
+ /**
+ * Defines policies applying to the API methods of the service.
+ *
+ * Generated from protobuf field repeated .google.api.MethodPolicy method_policies = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMethodPolicies()
+ {
+ return $this->method_policies;
+ }
+
+ /**
+ * Defines policies applying to the API methods of the service.
+ *
+ * Generated from protobuf field repeated .google.api.MethodPolicy method_policies = 4;
+ * @param array<\Google\Api\MethodPolicy>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMethodPolicies($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MethodPolicy::class);
+ $this->method_policies = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/CppSettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/CppSettings.php
new file mode 100644
index 0000000..d814b5c
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/CppSettings.php
@@ -0,0 +1,77 @@
+google.api.CppSettings
+ */
+class CppSettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ */
+ protected $common = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Api\CommonLanguageSettings $common
+ * Some settings.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @return \Google\Api\CommonLanguageSettings|null
+ */
+ public function getCommon()
+ {
+ return $this->common;
+ }
+
+ public function hasCommon()
+ {
+ return isset($this->common);
+ }
+
+ public function clearCommon()
+ {
+ unset($this->common);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @param \Google\Api\CommonLanguageSettings $var
+ * @return $this
+ */
+ public function setCommon($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\CommonLanguageSettings::class);
+ $this->common = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/CustomHttpPattern.php b/tests/php_test_files/vendor/google/common-protos/src/Api/CustomHttpPattern.php
new file mode 100644
index 0000000..e937032
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/CustomHttpPattern.php
@@ -0,0 +1,101 @@
+google.api.CustomHttpPattern
+ */
+class CustomHttpPattern extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The name of this custom HTTP verb.
+ *
+ * Generated from protobuf field string kind = 1;
+ */
+ protected $kind = '';
+ /**
+ * The path matched by this custom verb.
+ *
+ * Generated from protobuf field string path = 2;
+ */
+ protected $path = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $kind
+ * The name of this custom HTTP verb.
+ * @type string $path
+ * The path matched by this custom verb.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Http::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The name of this custom HTTP verb.
+ *
+ * Generated from protobuf field string kind = 1;
+ * @return string
+ */
+ public function getKind()
+ {
+ return $this->kind;
+ }
+
+ /**
+ * The name of this custom HTTP verb.
+ *
+ * Generated from protobuf field string kind = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setKind($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->kind = $var;
+
+ return $this;
+ }
+
+ /**
+ * The path matched by this custom verb.
+ *
+ * Generated from protobuf field string path = 2;
+ * @return string
+ */
+ public function getPath()
+ {
+ return $this->path;
+ }
+
+ /**
+ * The path matched by this custom verb.
+ *
+ * Generated from protobuf field string path = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setPath($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->path = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution.php
new file mode 100644
index 0000000..e81aae5
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution.php
@@ -0,0 +1,390 @@
+google.api.Distribution
+ */
+class Distribution extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The number of values in the population. Must be non-negative. This value
+ * must equal the sum of the values in `bucket_counts` if a histogram is
+ * provided.
+ *
+ * Generated from protobuf field int64 count = 1;
+ */
+ protected $count = 0;
+ /**
+ * The arithmetic mean of the values in the population. If `count` is zero
+ * then this field must be zero.
+ *
+ * Generated from protobuf field double mean = 2;
+ */
+ protected $mean = 0.0;
+ /**
+ * The sum of squared deviations from the mean of the values in the
+ * population. For values x_i this is:
+ * Sum[i=1..n]((x_i - mean)^2)
+ * Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
+ * describes Welford's method for accumulating this sum in one pass.
+ * If `count` is zero then this field must be zero.
+ *
+ * Generated from protobuf field double sum_of_squared_deviation = 3;
+ */
+ protected $sum_of_squared_deviation = 0.0;
+ /**
+ * If specified, contains the range of the population values. The field
+ * must not be present if the `count` is zero.
+ *
+ * Generated from protobuf field .google.api.Distribution.Range range = 4;
+ */
+ protected $range = null;
+ /**
+ * Defines the histogram bucket boundaries. If the distribution does not
+ * contain a histogram, then omit this field.
+ *
+ * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 6;
+ */
+ protected $bucket_options = null;
+ /**
+ * The number of values in each bucket of the histogram, as described in
+ * `bucket_options`. If the distribution does not have a histogram, then omit
+ * this field. If there is a histogram, then the sum of the values in
+ * `bucket_counts` must equal the value in the `count` field of the
+ * distribution.
+ * If present, `bucket_counts` should contain N values, where N is the number
+ * of buckets specified in `bucket_options`. If you supply fewer than N
+ * values, the remaining values are assumed to be 0.
+ * The order of the values in `bucket_counts` follows the bucket numbering
+ * schemes described for the three bucket types. The first value must be the
+ * count for the underflow bucket (number 0). The next N-2 values are the
+ * counts for the finite buckets (number 1 through N-2). The N'th value in
+ * `bucket_counts` is the count for the overflow bucket (number N-1).
+ *
+ * Generated from protobuf field repeated int64 bucket_counts = 7;
+ */
+ private $bucket_counts;
+ /**
+ * Must be in increasing order of `value` field.
+ *
+ * Generated from protobuf field repeated .google.api.Distribution.Exemplar exemplars = 10;
+ */
+ private $exemplars;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $count
+ * The number of values in the population. Must be non-negative. This value
+ * must equal the sum of the values in `bucket_counts` if a histogram is
+ * provided.
+ * @type float $mean
+ * The arithmetic mean of the values in the population. If `count` is zero
+ * then this field must be zero.
+ * @type float $sum_of_squared_deviation
+ * The sum of squared deviations from the mean of the values in the
+ * population. For values x_i this is:
+ * Sum[i=1..n]((x_i - mean)^2)
+ * Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
+ * describes Welford's method for accumulating this sum in one pass.
+ * If `count` is zero then this field must be zero.
+ * @type \Google\Api\Distribution\Range $range
+ * If specified, contains the range of the population values. The field
+ * must not be present if the `count` is zero.
+ * @type \Google\Api\Distribution\BucketOptions $bucket_options
+ * Defines the histogram bucket boundaries. If the distribution does not
+ * contain a histogram, then omit this field.
+ * @type array|array|\Google\Protobuf\Internal\RepeatedField $bucket_counts
+ * The number of values in each bucket of the histogram, as described in
+ * `bucket_options`. If the distribution does not have a histogram, then omit
+ * this field. If there is a histogram, then the sum of the values in
+ * `bucket_counts` must equal the value in the `count` field of the
+ * distribution.
+ * If present, `bucket_counts` should contain N values, where N is the number
+ * of buckets specified in `bucket_options`. If you supply fewer than N
+ * values, the remaining values are assumed to be 0.
+ * The order of the values in `bucket_counts` follows the bucket numbering
+ * schemes described for the three bucket types. The first value must be the
+ * count for the underflow bucket (number 0). The next N-2 values are the
+ * counts for the finite buckets (number 1 through N-2). The N'th value in
+ * `bucket_counts` is the count for the overflow bucket (number N-1).
+ * @type array<\Google\Api\Distribution\Exemplar>|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * Must be in increasing order of `value` field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Distribution::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The number of values in the population. Must be non-negative. This value
+ * must equal the sum of the values in `bucket_counts` if a histogram is
+ * provided.
+ *
+ * Generated from protobuf field int64 count = 1;
+ * @return int|string
+ */
+ public function getCount()
+ {
+ return $this->count;
+ }
+
+ /**
+ * The number of values in the population. Must be non-negative. This value
+ * must equal the sum of the values in `bucket_counts` if a histogram is
+ * provided.
+ *
+ * Generated from protobuf field int64 count = 1;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCount($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->count = $var;
+
+ return $this;
+ }
+
+ /**
+ * The arithmetic mean of the values in the population. If `count` is zero
+ * then this field must be zero.
+ *
+ * Generated from protobuf field double mean = 2;
+ * @return float
+ */
+ public function getMean()
+ {
+ return $this->mean;
+ }
+
+ /**
+ * The arithmetic mean of the values in the population. If `count` is zero
+ * then this field must be zero.
+ *
+ * Generated from protobuf field double mean = 2;
+ * @param float $var
+ * @return $this
+ */
+ public function setMean($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->mean = $var;
+
+ return $this;
+ }
+
+ /**
+ * The sum of squared deviations from the mean of the values in the
+ * population. For values x_i this is:
+ * Sum[i=1..n]((x_i - mean)^2)
+ * Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
+ * describes Welford's method for accumulating this sum in one pass.
+ * If `count` is zero then this field must be zero.
+ *
+ * Generated from protobuf field double sum_of_squared_deviation = 3;
+ * @return float
+ */
+ public function getSumOfSquaredDeviation()
+ {
+ return $this->sum_of_squared_deviation;
+ }
+
+ /**
+ * The sum of squared deviations from the mean of the values in the
+ * population. For values x_i this is:
+ * Sum[i=1..n]((x_i - mean)^2)
+ * Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
+ * describes Welford's method for accumulating this sum in one pass.
+ * If `count` is zero then this field must be zero.
+ *
+ * Generated from protobuf field double sum_of_squared_deviation = 3;
+ * @param float $var
+ * @return $this
+ */
+ public function setSumOfSquaredDeviation($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->sum_of_squared_deviation = $var;
+
+ return $this;
+ }
+
+ /**
+ * If specified, contains the range of the population values. The field
+ * must not be present if the `count` is zero.
+ *
+ * Generated from protobuf field .google.api.Distribution.Range range = 4;
+ * @return \Google\Api\Distribution\Range|null
+ */
+ public function getRange()
+ {
+ return $this->range;
+ }
+
+ public function hasRange()
+ {
+ return isset($this->range);
+ }
+
+ public function clearRange()
+ {
+ unset($this->range);
+ }
+
+ /**
+ * If specified, contains the range of the population values. The field
+ * must not be present if the `count` is zero.
+ *
+ * Generated from protobuf field .google.api.Distribution.Range range = 4;
+ * @param \Google\Api\Distribution\Range $var
+ * @return $this
+ */
+ public function setRange($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Distribution\Range::class);
+ $this->range = $var;
+
+ return $this;
+ }
+
+ /**
+ * Defines the histogram bucket boundaries. If the distribution does not
+ * contain a histogram, then omit this field.
+ *
+ * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 6;
+ * @return \Google\Api\Distribution\BucketOptions|null
+ */
+ public function getBucketOptions()
+ {
+ return $this->bucket_options;
+ }
+
+ public function hasBucketOptions()
+ {
+ return isset($this->bucket_options);
+ }
+
+ public function clearBucketOptions()
+ {
+ unset($this->bucket_options);
+ }
+
+ /**
+ * Defines the histogram bucket boundaries. If the distribution does not
+ * contain a histogram, then omit this field.
+ *
+ * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 6;
+ * @param \Google\Api\Distribution\BucketOptions $var
+ * @return $this
+ */
+ public function setBucketOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Distribution\BucketOptions::class);
+ $this->bucket_options = $var;
+
+ return $this;
+ }
+
+ /**
+ * The number of values in each bucket of the histogram, as described in
+ * `bucket_options`. If the distribution does not have a histogram, then omit
+ * this field. If there is a histogram, then the sum of the values in
+ * `bucket_counts` must equal the value in the `count` field of the
+ * distribution.
+ * If present, `bucket_counts` should contain N values, where N is the number
+ * of buckets specified in `bucket_options`. If you supply fewer than N
+ * values, the remaining values are assumed to be 0.
+ * The order of the values in `bucket_counts` follows the bucket numbering
+ * schemes described for the three bucket types. The first value must be the
+ * count for the underflow bucket (number 0). The next N-2 values are the
+ * counts for the finite buckets (number 1 through N-2). The N'th value in
+ * `bucket_counts` is the count for the overflow bucket (number N-1).
+ *
+ * Generated from protobuf field repeated int64 bucket_counts = 7;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBucketCounts()
+ {
+ return $this->bucket_counts;
+ }
+
+ /**
+ * The number of values in each bucket of the histogram, as described in
+ * `bucket_options`. If the distribution does not have a histogram, then omit
+ * this field. If there is a histogram, then the sum of the values in
+ * `bucket_counts` must equal the value in the `count` field of the
+ * distribution.
+ * If present, `bucket_counts` should contain N values, where N is the number
+ * of buckets specified in `bucket_options`. If you supply fewer than N
+ * values, the remaining values are assumed to be 0.
+ * The order of the values in `bucket_counts` follows the bucket numbering
+ * schemes described for the three bucket types. The first value must be the
+ * count for the underflow bucket (number 0). The next N-2 values are the
+ * counts for the finite buckets (number 1 through N-2). The N'th value in
+ * `bucket_counts` is the count for the overflow bucket (number N-1).
+ *
+ * Generated from protobuf field repeated int64 bucket_counts = 7;
+ * @param array|array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBucketCounts($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
+ $this->bucket_counts = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Must be in increasing order of `value` field.
+ *
+ * Generated from protobuf field repeated .google.api.Distribution.Exemplar exemplars = 10;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * Must be in increasing order of `value` field.
+ *
+ * Generated from protobuf field repeated .google.api.Distribution.Exemplar exemplars = 10;
+ * @param array<\Google\Api\Distribution\Exemplar>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Distribution\Exemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions.php
new file mode 100644
index 0000000..22aa21f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions.php
@@ -0,0 +1,155 @@
+ 0) is the
+ * same as the upper bound of bucket i - 1. The buckets span the whole range
+ * of finite values: lower bound of the underflow bucket is -infinity and the
+ * upper bound of the overflow bucket is +infinity. The finite buckets are
+ * so-called because both bounds are finite.
+ *
+ * Generated from protobuf message google.api.Distribution.BucketOptions
+ */
+class BucketOptions extends \Google\Protobuf\Internal\Message
+{
+ protected $options;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Api\Distribution\BucketOptions\Linear $linear_buckets
+ * The linear bucket.
+ * @type \Google\Api\Distribution\BucketOptions\Exponential $exponential_buckets
+ * The exponential buckets.
+ * @type \Google\Api\Distribution\BucketOptions\Explicit $explicit_buckets
+ * The explicit buckets.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Distribution::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The linear bucket.
+ *
+ * Generated from protobuf field .google.api.Distribution.BucketOptions.Linear linear_buckets = 1;
+ * @return \Google\Api\Distribution\BucketOptions\Linear|null
+ */
+ public function getLinearBuckets()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasLinearBuckets()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * The linear bucket.
+ *
+ * Generated from protobuf field .google.api.Distribution.BucketOptions.Linear linear_buckets = 1;
+ * @param \Google\Api\Distribution\BucketOptions\Linear $var
+ * @return $this
+ */
+ public function setLinearBuckets($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Distribution\BucketOptions\Linear::class);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * The exponential buckets.
+ *
+ * Generated from protobuf field .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;
+ * @return \Google\Api\Distribution\BucketOptions\Exponential|null
+ */
+ public function getExponentialBuckets()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasExponentialBuckets()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * The exponential buckets.
+ *
+ * Generated from protobuf field .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;
+ * @param \Google\Api\Distribution\BucketOptions\Exponential $var
+ * @return $this
+ */
+ public function setExponentialBuckets($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Distribution\BucketOptions\Exponential::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * The explicit buckets.
+ *
+ * Generated from protobuf field .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;
+ * @return \Google\Api\Distribution\BucketOptions\Explicit|null
+ */
+ public function getExplicitBuckets()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasExplicitBuckets()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * The explicit buckets.
+ *
+ * Generated from protobuf field .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;
+ * @param \Google\Api\Distribution\BucketOptions\Explicit $var
+ * @return $this
+ */
+ public function setExplicitBuckets($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Distribution\BucketOptions\Explicit::class);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getOptions()
+ {
+ return $this->whichOneof("options");
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions/Explicit.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions/Explicit.php
new file mode 100644
index 0000000..e39aaae
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions/Explicit.php
@@ -0,0 +1,75 @@
+google.api.Distribution.BucketOptions.Explicit
+ */
+class Explicit extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The values must be monotonically increasing.
+ *
+ * Generated from protobuf field repeated double bounds = 1;
+ */
+ private $bounds;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\RepeatedField $bounds
+ * The values must be monotonically increasing.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Distribution::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The values must be monotonically increasing.
+ *
+ * Generated from protobuf field repeated double bounds = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBounds()
+ {
+ return $this->bounds;
+ }
+
+ /**
+ * The values must be monotonically increasing.
+ *
+ * Generated from protobuf field repeated double bounds = 1;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBounds($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE);
+ $this->bounds = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions/Exponential.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions/Exponential.php
new file mode 100644
index 0000000..b717581
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions/Exponential.php
@@ -0,0 +1,142 @@
+google.api.Distribution.BucketOptions.Exponential
+ */
+class Exponential extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field int32 num_finite_buckets = 1;
+ */
+ protected $num_finite_buckets = 0;
+ /**
+ * Must be greater than 1.
+ *
+ * Generated from protobuf field double growth_factor = 2;
+ */
+ protected $growth_factor = 0.0;
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field double scale = 3;
+ */
+ protected $scale = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $num_finite_buckets
+ * Must be greater than 0.
+ * @type float $growth_factor
+ * Must be greater than 1.
+ * @type float $scale
+ * Must be greater than 0.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Distribution::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field int32 num_finite_buckets = 1;
+ * @return int
+ */
+ public function getNumFiniteBuckets()
+ {
+ return $this->num_finite_buckets;
+ }
+
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field int32 num_finite_buckets = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setNumFiniteBuckets($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->num_finite_buckets = $var;
+
+ return $this;
+ }
+
+ /**
+ * Must be greater than 1.
+ *
+ * Generated from protobuf field double growth_factor = 2;
+ * @return float
+ */
+ public function getGrowthFactor()
+ {
+ return $this->growth_factor;
+ }
+
+ /**
+ * Must be greater than 1.
+ *
+ * Generated from protobuf field double growth_factor = 2;
+ * @param float $var
+ * @return $this
+ */
+ public function setGrowthFactor($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->growth_factor = $var;
+
+ return $this;
+ }
+
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field double scale = 3;
+ * @return float
+ */
+ public function getScale()
+ {
+ return $this->scale;
+ }
+
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field double scale = 3;
+ * @param float $var
+ * @return $this
+ */
+ public function setScale($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->scale = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions/Linear.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions/Linear.php
new file mode 100644
index 0000000..8ed9bc9
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/BucketOptions/Linear.php
@@ -0,0 +1,142 @@
+google.api.Distribution.BucketOptions.Linear
+ */
+class Linear extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field int32 num_finite_buckets = 1;
+ */
+ protected $num_finite_buckets = 0;
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field double width = 2;
+ */
+ protected $width = 0.0;
+ /**
+ * Lower bound of the first bucket.
+ *
+ * Generated from protobuf field double offset = 3;
+ */
+ protected $offset = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $num_finite_buckets
+ * Must be greater than 0.
+ * @type float $width
+ * Must be greater than 0.
+ * @type float $offset
+ * Lower bound of the first bucket.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Distribution::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field int32 num_finite_buckets = 1;
+ * @return int
+ */
+ public function getNumFiniteBuckets()
+ {
+ return $this->num_finite_buckets;
+ }
+
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field int32 num_finite_buckets = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setNumFiniteBuckets($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->num_finite_buckets = $var;
+
+ return $this;
+ }
+
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field double width = 2;
+ * @return float
+ */
+ public function getWidth()
+ {
+ return $this->width;
+ }
+
+ /**
+ * Must be greater than 0.
+ *
+ * Generated from protobuf field double width = 2;
+ * @param float $var
+ * @return $this
+ */
+ public function setWidth($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->width = $var;
+
+ return $this;
+ }
+
+ /**
+ * Lower bound of the first bucket.
+ *
+ * Generated from protobuf field double offset = 3;
+ * @return float
+ */
+ public function getOffset()
+ {
+ return $this->offset;
+ }
+
+ /**
+ * Lower bound of the first bucket.
+ *
+ * Generated from protobuf field double offset = 3;
+ * @param float $var
+ * @return $this
+ */
+ public function setOffset($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->offset = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/Exemplar.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/Exemplar.php
new file mode 100644
index 0000000..5e7654a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/Exemplar.php
@@ -0,0 +1,178 @@
+google.api.Distribution.Exemplar
+ */
+class Exemplar extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Value of the exemplar point. This value determines to which bucket the
+ * exemplar belongs.
+ *
+ * Generated from protobuf field double value = 1;
+ */
+ protected $value = 0.0;
+ /**
+ * The observation (sampling) time of the above value.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp timestamp = 2;
+ */
+ protected $timestamp = null;
+ /**
+ * Contextual information about the example value. Examples are:
+ * Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+ * Literal string: type.googleapis.com/google.protobuf.StringValue
+ * Labels dropped during aggregation:
+ * type.googleapis.com/google.monitoring.v3.DroppedLabels
+ * There may be only a single attachment of any given message type in a
+ * single exemplar, and this is enforced by the system.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any attachments = 3;
+ */
+ private $attachments;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $value
+ * Value of the exemplar point. This value determines to which bucket the
+ * exemplar belongs.
+ * @type \Google\Protobuf\Timestamp $timestamp
+ * The observation (sampling) time of the above value.
+ * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $attachments
+ * Contextual information about the example value. Examples are:
+ * Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+ * Literal string: type.googleapis.com/google.protobuf.StringValue
+ * Labels dropped during aggregation:
+ * type.googleapis.com/google.monitoring.v3.DroppedLabels
+ * There may be only a single attachment of any given message type in a
+ * single exemplar, and this is enforced by the system.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Distribution::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Value of the exemplar point. This value determines to which bucket the
+ * exemplar belongs.
+ *
+ * Generated from protobuf field double value = 1;
+ * @return float
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Value of the exemplar point. This value determines to which bucket the
+ * exemplar belongs.
+ *
+ * Generated from protobuf field double value = 1;
+ * @param float $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+ /**
+ * The observation (sampling) time of the above value.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp timestamp = 2;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getTimestamp()
+ {
+ return $this->timestamp;
+ }
+
+ public function hasTimestamp()
+ {
+ return isset($this->timestamp);
+ }
+
+ public function clearTimestamp()
+ {
+ unset($this->timestamp);
+ }
+
+ /**
+ * The observation (sampling) time of the above value.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp timestamp = 2;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setTimestamp($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->timestamp = $var;
+
+ return $this;
+ }
+
+ /**
+ * Contextual information about the example value. Examples are:
+ * Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+ * Literal string: type.googleapis.com/google.protobuf.StringValue
+ * Labels dropped during aggregation:
+ * type.googleapis.com/google.monitoring.v3.DroppedLabels
+ * There may be only a single attachment of any given message type in a
+ * single exemplar, and this is enforced by the system.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any attachments = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttachments()
+ {
+ return $this->attachments;
+ }
+
+ /**
+ * Contextual information about the example value. Examples are:
+ * Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+ * Literal string: type.googleapis.com/google.protobuf.StringValue
+ * Labels dropped during aggregation:
+ * type.googleapis.com/google.monitoring.v3.DroppedLabels
+ * There may be only a single attachment of any given message type in a
+ * single exemplar, and this is enforced by the system.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any attachments = 3;
+ * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttachments($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class);
+ $this->attachments = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/Range.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/Range.php
new file mode 100644
index 0000000..8ace8a8
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Distribution/Range.php
@@ -0,0 +1,102 @@
+google.api.Distribution.Range
+ */
+class Range extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The minimum of the population values.
+ *
+ * Generated from protobuf field double min = 1;
+ */
+ protected $min = 0.0;
+ /**
+ * The maximum of the population values.
+ *
+ * Generated from protobuf field double max = 2;
+ */
+ protected $max = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $min
+ * The minimum of the population values.
+ * @type float $max
+ * The maximum of the population values.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Distribution::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The minimum of the population values.
+ *
+ * Generated from protobuf field double min = 1;
+ * @return float
+ */
+ public function getMin()
+ {
+ return $this->min;
+ }
+
+ /**
+ * The minimum of the population values.
+ *
+ * Generated from protobuf field double min = 1;
+ * @param float $var
+ * @return $this
+ */
+ public function setMin($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->min = $var;
+
+ return $this;
+ }
+
+ /**
+ * The maximum of the population values.
+ *
+ * Generated from protobuf field double max = 2;
+ * @return float
+ */
+ public function getMax()
+ {
+ return $this->max;
+ }
+
+ /**
+ * The maximum of the population values.
+ *
+ * Generated from protobuf field double max = 2;
+ * @param float $var
+ * @return $this
+ */
+ public function setMax($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->max = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Documentation.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Documentation.php
new file mode 100644
index 0000000..aced421
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Documentation.php
@@ -0,0 +1,362 @@
+documentation:
+ * summary: >
+ * The Google Calendar API gives access
+ * to most calendar features.
+ * pages:
+ * - name: Overview
+ * content: (== include google/foo/overview.md ==)
+ * - name: Tutorial
+ * content: (== include google/foo/tutorial.md ==)
+ * subpages:
+ * - name: Java
+ * content: (== include google/foo/tutorial_java.md ==)
+ * rules:
+ * - selector: google.calendar.Calendar.Get
+ * description: >
+ * ...
+ * - selector: google.calendar.Calendar.Put
+ * description: >
+ * ...
+ *
+ * Documentation is provided in markdown syntax. In addition to
+ * standard markdown features, definition lists, tables and fenced
+ * code blocks are supported. Section headers can be provided and are
+ * interpreted relative to the section nesting of the context where
+ * a documentation fragment is embedded.
+ * Documentation from the IDL is merged with documentation defined
+ * via the config at normalization time, where documentation provided
+ * by config rules overrides IDL provided.
+ * A number of constructs specific to the API platform are supported
+ * in documentation text.
+ * In order to reference a proto element, the following
+ * notation can be used:
+ *
[fully.qualified.proto.name][]
+ * To override the display text used for the link, this can be used:
+ *
[display text][fully.qualified.proto.name]
+ * Text can be excluded from doc using the following notation:
+ *
(-- internal comment --)
+ * A few directives are available in documentation. Note that
+ * directives must appear on a single line to be properly
+ * identified. The `include` directive includes a markdown file from
+ * an external source:
+ *
(== include path/to/file ==)
+ * The `resource_for` directive marks a message to be the resource of
+ * a collection in REST view. If it is not specified, tools attempt
+ * to infer the resource from the operations in a collection:
+ *
(== resource_for v1.shelves.books ==)
+ * The directive `suppress_warning` does not directly affect documentation
+ * and is documented together with service config validation.
+ *
+ * Generated from protobuf message google.api.Documentation
+ */
+class Documentation extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A short description of what the service does. The summary must be plain
+ * text. It becomes the overview of the service displayed in Google Cloud
+ * Console.
+ * NOTE: This field is equivalent to the standard field `description`.
+ *
+ * Generated from protobuf field string summary = 1;
+ */
+ protected $summary = '';
+ /**
+ * The top level pages for the documentation set.
+ *
+ * Generated from protobuf field repeated .google.api.Page pages = 5;
+ */
+ private $pages;
+ /**
+ * A list of documentation rules that apply to individual API elements.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.DocumentationRule rules = 3;
+ */
+ private $rules;
+ /**
+ * The URL to the root of documentation.
+ *
+ * Generated from protobuf field string documentation_root_url = 4;
+ */
+ protected $documentation_root_url = '';
+ /**
+ * Specifies the service root url if the default one (the service name
+ * from the yaml file) is not suitable. This can be seen in any fully
+ * specified service urls as well as sections that show a base that other
+ * urls are relative to.
+ *
+ * Generated from protobuf field string service_root_url = 6;
+ */
+ protected $service_root_url = '';
+ /**
+ * Declares a single overview page. For example:
+ *
+ * Note: you cannot specify both `overview` field and `pages` field.
+ *
+ * Generated from protobuf field string overview = 2;
+ */
+ protected $overview = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $summary
+ * A short description of what the service does. The summary must be plain
+ * text. It becomes the overview of the service displayed in Google Cloud
+ * Console.
+ * NOTE: This field is equivalent to the standard field `description`.
+ * @type array<\Google\Api\Page>|\Google\Protobuf\Internal\RepeatedField $pages
+ * The top level pages for the documentation set.
+ * @type array<\Google\Api\DocumentationRule>|\Google\Protobuf\Internal\RepeatedField $rules
+ * A list of documentation rules that apply to individual API elements.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ * @type string $documentation_root_url
+ * The URL to the root of documentation.
+ * @type string $service_root_url
+ * Specifies the service root url if the default one (the service name
+ * from the yaml file) is not suitable. This can be seen in any fully
+ * specified service urls as well as sections that show a base that other
+ * urls are relative to.
+ * @type string $overview
+ * Declares a single overview page. For example:
+ *
+ * Note: you cannot specify both `overview` field and `pages` field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Documentation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A short description of what the service does. The summary must be plain
+ * text. It becomes the overview of the service displayed in Google Cloud
+ * Console.
+ * NOTE: This field is equivalent to the standard field `description`.
+ *
+ * Generated from protobuf field string summary = 1;
+ * @return string
+ */
+ public function getSummary()
+ {
+ return $this->summary;
+ }
+
+ /**
+ * A short description of what the service does. The summary must be plain
+ * text. It becomes the overview of the service displayed in Google Cloud
+ * Console.
+ * NOTE: This field is equivalent to the standard field `description`.
+ *
+ * Generated from protobuf field string summary = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSummary($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->summary = $var;
+
+ return $this;
+ }
+
+ /**
+ * The top level pages for the documentation set.
+ *
+ * Generated from protobuf field repeated .google.api.Page pages = 5;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPages()
+ {
+ return $this->pages;
+ }
+
+ /**
+ * The top level pages for the documentation set.
+ *
+ * Generated from protobuf field repeated .google.api.Page pages = 5;
+ * @param array<\Google\Api\Page>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPages($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Page::class);
+ $this->pages = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A list of documentation rules that apply to individual API elements.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.DocumentationRule rules = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRules()
+ {
+ return $this->rules;
+ }
+
+ /**
+ * A list of documentation rules that apply to individual API elements.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.DocumentationRule rules = 3;
+ * @param array<\Google\Api\DocumentationRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\DocumentationRule::class);
+ $this->rules = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The URL to the root of documentation.
+ *
+ * Generated from protobuf field string documentation_root_url = 4;
+ * @return string
+ */
+ public function getDocumentationRootUrl()
+ {
+ return $this->documentation_root_url;
+ }
+
+ /**
+ * The URL to the root of documentation.
+ *
+ * Generated from protobuf field string documentation_root_url = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setDocumentationRootUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->documentation_root_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * Specifies the service root url if the default one (the service name
+ * from the yaml file) is not suitable. This can be seen in any fully
+ * specified service urls as well as sections that show a base that other
+ * urls are relative to.
+ *
+ * Generated from protobuf field string service_root_url = 6;
+ * @return string
+ */
+ public function getServiceRootUrl()
+ {
+ return $this->service_root_url;
+ }
+
+ /**
+ * Specifies the service root url if the default one (the service name
+ * from the yaml file) is not suitable. This can be seen in any fully
+ * specified service urls as well as sections that show a base that other
+ * urls are relative to.
+ *
+ * Generated from protobuf field string service_root_url = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setServiceRootUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service_root_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * Declares a single overview page. For example:
+ *
+ * Note: you cannot specify both `overview` field and `pages` field.
+ *
+ * Generated from protobuf field string overview = 2;
+ * @return string
+ */
+ public function getOverview()
+ {
+ return $this->overview;
+ }
+
+ /**
+ * Declares a single overview page. For example:
+ *
+ * Note: you cannot specify both `overview` field and `pages` field.
+ *
+ * Generated from protobuf field string overview = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setOverview($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->overview = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/DocumentationRule.php b/tests/php_test_files/vendor/google/common-protos/src/Api/DocumentationRule.php
new file mode 100644
index 0000000..c904d1a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/DocumentationRule.php
@@ -0,0 +1,171 @@
+google.api.DocumentationRule
+ */
+class DocumentationRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The selector is a comma-separated list of patterns for any element such as
+ * a method, a field, an enum value. Each pattern is a qualified name of the
+ * element which may end in "*", indicating a wildcard. Wildcards are only
+ * allowed at the end and for a whole component of the qualified name,
+ * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+ * one or more components. To specify a default for all applicable elements,
+ * the whole pattern "*" is used.
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * Description of the selected proto element (e.g. a message, a method, a
+ * 'service' definition, or a field). Defaults to leading & trailing comments
+ * taken from the proto source definition of the proto element.
+ *
+ * Generated from protobuf field string description = 2;
+ */
+ protected $description = '';
+ /**
+ * Deprecation description of the selected element(s). It can be provided if
+ * an element is marked as `deprecated`.
+ *
+ * Generated from protobuf field string deprecation_description = 3;
+ */
+ protected $deprecation_description = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * The selector is a comma-separated list of patterns for any element such as
+ * a method, a field, an enum value. Each pattern is a qualified name of the
+ * element which may end in "*", indicating a wildcard. Wildcards are only
+ * allowed at the end and for a whole component of the qualified name,
+ * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+ * one or more components. To specify a default for all applicable elements,
+ * the whole pattern "*" is used.
+ * @type string $description
+ * Description of the selected proto element (e.g. a message, a method, a
+ * 'service' definition, or a field). Defaults to leading & trailing comments
+ * taken from the proto source definition of the proto element.
+ * @type string $deprecation_description
+ * Deprecation description of the selected element(s). It can be provided if
+ * an element is marked as `deprecated`.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Documentation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The selector is a comma-separated list of patterns for any element such as
+ * a method, a field, an enum value. Each pattern is a qualified name of the
+ * element which may end in "*", indicating a wildcard. Wildcards are only
+ * allowed at the end and for a whole component of the qualified name,
+ * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+ * one or more components. To specify a default for all applicable elements,
+ * the whole pattern "*" is used.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * The selector is a comma-separated list of patterns for any element such as
+ * a method, a field, an enum value. Each pattern is a qualified name of the
+ * element which may end in "*", indicating a wildcard. Wildcards are only
+ * allowed at the end and for a whole component of the qualified name,
+ * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+ * one or more components. To specify a default for all applicable elements,
+ * the whole pattern "*" is used.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * Description of the selected proto element (e.g. a message, a method, a
+ * 'service' definition, or a field). Defaults to leading & trailing comments
+ * taken from the proto source definition of the proto element.
+ *
+ * Generated from protobuf field string description = 2;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * Description of the selected proto element (e.g. a message, a method, a
+ * 'service' definition, or a field). Defaults to leading & trailing comments
+ * taken from the proto source definition of the proto element.
+ *
+ * Generated from protobuf field string description = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * Deprecation description of the selected element(s). It can be provided if
+ * an element is marked as `deprecated`.
+ *
+ * Generated from protobuf field string deprecation_description = 3;
+ * @return string
+ */
+ public function getDeprecationDescription()
+ {
+ return $this->deprecation_description;
+ }
+
+ /**
+ * Deprecation description of the selected element(s). It can be provided if
+ * an element is marked as `deprecated`.
+ *
+ * Generated from protobuf field string deprecation_description = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setDeprecationDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->deprecation_description = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/DotnetSettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/DotnetSettings.php
new file mode 100644
index 0000000..de7672c
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/DotnetSettings.php
@@ -0,0 +1,307 @@
+google.api.DotnetSettings
+ */
+class DotnetSettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ */
+ protected $common = null;
+ /**
+ * Map from original service names to renamed versions.
+ * This is used when the default generated types
+ * would cause a naming conflict. (Neither name is
+ * fully-qualified.)
+ * Example: Subscriber to SubscriberServiceApi.
+ *
+ * Generated from protobuf field map renamed_services = 2;
+ */
+ private $renamed_services;
+ /**
+ * Map from full resource types to the effective short name
+ * for the resource. This is used when otherwise resource
+ * named from different services would cause naming collisions.
+ * Example entry:
+ * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+ *
+ * Generated from protobuf field map renamed_resources = 3;
+ */
+ private $renamed_resources;
+ /**
+ * List of full resource types to ignore during generation.
+ * This is typically used for API-specific Location resources,
+ * which should be handled by the generator as if they were actually
+ * the common Location resources.
+ * Example entry: "documentai.googleapis.com/Location"
+ *
+ * Generated from protobuf field repeated string ignored_resources = 4;
+ */
+ private $ignored_resources;
+ /**
+ * Namespaces which must be aliased in snippets due to
+ * a known (but non-generator-predictable) naming collision
+ *
+ * Generated from protobuf field repeated string forced_namespace_aliases = 5;
+ */
+ private $forced_namespace_aliases;
+ /**
+ * Method signatures (in the form "service.method(signature)")
+ * which are provided separately, so shouldn't be generated.
+ * Snippets *calling* these methods are still generated, however.
+ *
+ * Generated from protobuf field repeated string handwritten_signatures = 6;
+ */
+ private $handwritten_signatures;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Api\CommonLanguageSettings $common
+ * Some settings.
+ * @type array|\Google\Protobuf\Internal\MapField $renamed_services
+ * Map from original service names to renamed versions.
+ * This is used when the default generated types
+ * would cause a naming conflict. (Neither name is
+ * fully-qualified.)
+ * Example: Subscriber to SubscriberServiceApi.
+ * @type array|\Google\Protobuf\Internal\MapField $renamed_resources
+ * Map from full resource types to the effective short name
+ * for the resource. This is used when otherwise resource
+ * named from different services would cause naming collisions.
+ * Example entry:
+ * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+ * @type array|\Google\Protobuf\Internal\RepeatedField $ignored_resources
+ * List of full resource types to ignore during generation.
+ * This is typically used for API-specific Location resources,
+ * which should be handled by the generator as if they were actually
+ * the common Location resources.
+ * Example entry: "documentai.googleapis.com/Location"
+ * @type array|\Google\Protobuf\Internal\RepeatedField $forced_namespace_aliases
+ * Namespaces which must be aliased in snippets due to
+ * a known (but non-generator-predictable) naming collision
+ * @type array|\Google\Protobuf\Internal\RepeatedField $handwritten_signatures
+ * Method signatures (in the form "service.method(signature)")
+ * which are provided separately, so shouldn't be generated.
+ * Snippets *calling* these methods are still generated, however.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @return \Google\Api\CommonLanguageSettings|null
+ */
+ public function getCommon()
+ {
+ return $this->common;
+ }
+
+ public function hasCommon()
+ {
+ return isset($this->common);
+ }
+
+ public function clearCommon()
+ {
+ unset($this->common);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @param \Google\Api\CommonLanguageSettings $var
+ * @return $this
+ */
+ public function setCommon($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\CommonLanguageSettings::class);
+ $this->common = $var;
+
+ return $this;
+ }
+
+ /**
+ * Map from original service names to renamed versions.
+ * This is used when the default generated types
+ * would cause a naming conflict. (Neither name is
+ * fully-qualified.)
+ * Example: Subscriber to SubscriberServiceApi.
+ *
+ * Generated from protobuf field map renamed_services = 2;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getRenamedServices()
+ {
+ return $this->renamed_services;
+ }
+
+ /**
+ * Map from original service names to renamed versions.
+ * This is used when the default generated types
+ * would cause a naming conflict. (Neither name is
+ * fully-qualified.)
+ * Example: Subscriber to SubscriberServiceApi.
+ *
+ * Generated from protobuf field map renamed_services = 2;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setRenamedServices($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->renamed_services = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Map from full resource types to the effective short name
+ * for the resource. This is used when otherwise resource
+ * named from different services would cause naming collisions.
+ * Example entry:
+ * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+ *
+ * Generated from protobuf field map renamed_resources = 3;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getRenamedResources()
+ {
+ return $this->renamed_resources;
+ }
+
+ /**
+ * Map from full resource types to the effective short name
+ * for the resource. This is used when otherwise resource
+ * named from different services would cause naming collisions.
+ * Example entry:
+ * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+ *
+ * Generated from protobuf field map renamed_resources = 3;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setRenamedResources($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->renamed_resources = $arr;
+
+ return $this;
+ }
+
+ /**
+ * List of full resource types to ignore during generation.
+ * This is typically used for API-specific Location resources,
+ * which should be handled by the generator as if they were actually
+ * the common Location resources.
+ * Example entry: "documentai.googleapis.com/Location"
+ *
+ * Generated from protobuf field repeated string ignored_resources = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getIgnoredResources()
+ {
+ return $this->ignored_resources;
+ }
+
+ /**
+ * List of full resource types to ignore during generation.
+ * This is typically used for API-specific Location resources,
+ * which should be handled by the generator as if they were actually
+ * the common Location resources.
+ * Example entry: "documentai.googleapis.com/Location"
+ *
+ * Generated from protobuf field repeated string ignored_resources = 4;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setIgnoredResources($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->ignored_resources = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Namespaces which must be aliased in snippets due to
+ * a known (but non-generator-predictable) naming collision
+ *
+ * Generated from protobuf field repeated string forced_namespace_aliases = 5;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getForcedNamespaceAliases()
+ {
+ return $this->forced_namespace_aliases;
+ }
+
+ /**
+ * Namespaces which must be aliased in snippets due to
+ * a known (but non-generator-predictable) naming collision
+ *
+ * Generated from protobuf field repeated string forced_namespace_aliases = 5;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setForcedNamespaceAliases($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->forced_namespace_aliases = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Method signatures (in the form "service.method(signature)")
+ * which are provided separately, so shouldn't be generated.
+ * Snippets *calling* these methods are still generated, however.
+ *
+ * Generated from protobuf field repeated string handwritten_signatures = 6;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getHandwrittenSignatures()
+ {
+ return $this->handwritten_signatures;
+ }
+
+ /**
+ * Method signatures (in the form "service.method(signature)")
+ * which are provided separately, so shouldn't be generated.
+ * Snippets *calling* these methods are still generated, however.
+ *
+ * Generated from protobuf field repeated string handwritten_signatures = 6;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setHandwrittenSignatures($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->handwritten_signatures = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Endpoint.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Endpoint.php
new file mode 100644
index 0000000..41c1cbe
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Endpoint.php
@@ -0,0 +1,231 @@
+google.api.Endpoint
+ */
+class Endpoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The canonical name of this endpoint.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * Aliases for this endpoint, these will be served by the same UrlMap as the
+ * parent endpoint, and will be provisioned in the GCP stack for the Regional
+ * Endpoints.
+ *
+ * Generated from protobuf field repeated string aliases = 2;
+ */
+ private $aliases;
+ /**
+ * The specification of an Internet routable address of API frontend that will
+ * handle requests to this [API
+ * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+ * either a valid IPv4 address or a fully-qualified domain name. For example,
+ * "8.8.8.8" or "myservice.appspot.com".
+ *
+ * Generated from protobuf field string target = 101;
+ */
+ protected $target = '';
+ /**
+ * Allowing
+ * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
+ * cross-domain traffic, would allow the backends served from this endpoint to
+ * receive and respond to HTTP OPTIONS requests. The response will be used by
+ * the browser to determine whether the subsequent cross-origin request is
+ * allowed to proceed.
+ *
+ * Generated from protobuf field bool allow_cors = 5;
+ */
+ protected $allow_cors = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The canonical name of this endpoint.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $aliases
+ * Aliases for this endpoint, these will be served by the same UrlMap as the
+ * parent endpoint, and will be provisioned in the GCP stack for the Regional
+ * Endpoints.
+ * @type string $target
+ * The specification of an Internet routable address of API frontend that will
+ * handle requests to this [API
+ * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+ * either a valid IPv4 address or a fully-qualified domain name. For example,
+ * "8.8.8.8" or "myservice.appspot.com".
+ * @type bool $allow_cors
+ * Allowing
+ * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
+ * cross-domain traffic, would allow the backends served from this endpoint to
+ * receive and respond to HTTP OPTIONS requests. The response will be used by
+ * the browser to determine whether the subsequent cross-origin request is
+ * allowed to proceed.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Endpoint::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The canonical name of this endpoint.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The canonical name of this endpoint.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Aliases for this endpoint, these will be served by the same UrlMap as the
+ * parent endpoint, and will be provisioned in the GCP stack for the Regional
+ * Endpoints.
+ *
+ * Generated from protobuf field repeated string aliases = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAliases()
+ {
+ return $this->aliases;
+ }
+
+ /**
+ * Aliases for this endpoint, these will be served by the same UrlMap as the
+ * parent endpoint, and will be provisioned in the GCP stack for the Regional
+ * Endpoints.
+ *
+ * Generated from protobuf field repeated string aliases = 2;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAliases($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->aliases = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The specification of an Internet routable address of API frontend that will
+ * handle requests to this [API
+ * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+ * either a valid IPv4 address or a fully-qualified domain name. For example,
+ * "8.8.8.8" or "myservice.appspot.com".
+ *
+ * Generated from protobuf field string target = 101;
+ * @return string
+ */
+ public function getTarget()
+ {
+ return $this->target;
+ }
+
+ /**
+ * The specification of an Internet routable address of API frontend that will
+ * handle requests to this [API
+ * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+ * either a valid IPv4 address or a fully-qualified domain name. For example,
+ * "8.8.8.8" or "myservice.appspot.com".
+ *
+ * Generated from protobuf field string target = 101;
+ * @param string $var
+ * @return $this
+ */
+ public function setTarget($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->target = $var;
+
+ return $this;
+ }
+
+ /**
+ * Allowing
+ * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
+ * cross-domain traffic, would allow the backends served from this endpoint to
+ * receive and respond to HTTP OPTIONS requests. The response will be used by
+ * the browser to determine whether the subsequent cross-origin request is
+ * allowed to proceed.
+ *
+ * Generated from protobuf field bool allow_cors = 5;
+ * @return bool
+ */
+ public function getAllowCors()
+ {
+ return $this->allow_cors;
+ }
+
+ /**
+ * Allowing
+ * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
+ * cross-domain traffic, would allow the backends served from this endpoint to
+ * receive and respond to HTTP OPTIONS requests. The response will be used by
+ * the browser to determine whether the subsequent cross-origin request is
+ * allowed to proceed.
+ *
+ * Generated from protobuf field bool allow_cors = 5;
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowCors($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_cors = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ErrorReason.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ErrorReason.php
new file mode 100644
index 0000000..b582e36
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ErrorReason.php
@@ -0,0 +1,653 @@
+google.api.ErrorReason
+ */
+class ErrorReason
+{
+ /**
+ * Do not use this default value.
+ *
+ * Generated from protobuf enum ERROR_REASON_UNSPECIFIED = 0;
+ */
+ const ERROR_REASON_UNSPECIFIED = 0;
+ /**
+ * The request is calling a disabled service for a consumer.
+ * Example of an ErrorInfo when the consumer "projects/123" contacting
+ * "pubsub.googleapis.com" service which is disabled:
+ * { "reason": "SERVICE_DISABLED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "pubsub.googleapis.com"
+ * }
+ * }
+ * This response indicates the "pubsub.googleapis.com" has been disabled in
+ * "projects/123".
+ *
+ * Generated from protobuf enum SERVICE_DISABLED = 1;
+ */
+ const SERVICE_DISABLED = 1;
+ /**
+ * The request whose associated billing account is disabled.
+ * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+ * "pubsub.googleapis.com" service because the associated billing account is
+ * disabled:
+ * { "reason": "BILLING_DISABLED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "pubsub.googleapis.com"
+ * }
+ * }
+ * This response indicates the billing account associated has been disabled.
+ *
+ * Generated from protobuf enum BILLING_DISABLED = 2;
+ */
+ const BILLING_DISABLED = 2;
+ /**
+ * The request is denied because the provided [API
+ * key](https://cloud.google.com/docs/authentication/api-keys) is invalid. It
+ * may be in a bad format, cannot be found, or has been expired).
+ * Example of an ErrorInfo when the request is contacting
+ * "storage.googleapis.com" service with an invalid API key:
+ * { "reason": "API_KEY_INVALID",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "service": "storage.googleapis.com",
+ * }
+ * }
+ *
+ * Generated from protobuf enum API_KEY_INVALID = 3;
+ */
+ const API_KEY_INVALID = 3;
+ /**
+ * The request is denied because it violates [API key API
+ * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_api_restrictions).
+ * Example of an ErrorInfo when the consumer "projects/123" fails to call the
+ * "storage.googleapis.com" service because this service is restricted in the
+ * API key:
+ * { "reason": "API_KEY_SERVICE_BLOCKED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum API_KEY_SERVICE_BLOCKED = 4;
+ */
+ const API_KEY_SERVICE_BLOCKED = 4;
+ /**
+ * The request is denied because it violates [API key HTTP
+ * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_http_restrictions).
+ * Example of an ErrorInfo when the consumer "projects/123" fails to call
+ * "storage.googleapis.com" service because the http referrer of the request
+ * violates API key HTTP restrictions:
+ * { "reason": "API_KEY_HTTP_REFERRER_BLOCKED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com",
+ * }
+ * }
+ *
+ * Generated from protobuf enum API_KEY_HTTP_REFERRER_BLOCKED = 7;
+ */
+ const API_KEY_HTTP_REFERRER_BLOCKED = 7;
+ /**
+ * The request is denied because it violates [API key IP address
+ * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions).
+ * Example of an ErrorInfo when the consumer "projects/123" fails to call
+ * "storage.googleapis.com" service because the caller IP of the request
+ * violates API key IP address restrictions:
+ * { "reason": "API_KEY_IP_ADDRESS_BLOCKED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com",
+ * }
+ * }
+ *
+ * Generated from protobuf enum API_KEY_IP_ADDRESS_BLOCKED = 8;
+ */
+ const API_KEY_IP_ADDRESS_BLOCKED = 8;
+ /**
+ * The request is denied because it violates [API key Android application
+ * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions).
+ * Example of an ErrorInfo when the consumer "projects/123" fails to call
+ * "storage.googleapis.com" service because the request from the Android apps
+ * violates the API key Android application restrictions:
+ * { "reason": "API_KEY_ANDROID_APP_BLOCKED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum API_KEY_ANDROID_APP_BLOCKED = 9;
+ */
+ const API_KEY_ANDROID_APP_BLOCKED = 9;
+ /**
+ * The request is denied because it violates [API key iOS application
+ * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions).
+ * Example of an ErrorInfo when the consumer "projects/123" fails to call
+ * "storage.googleapis.com" service because the request from the iOS apps
+ * violates the API key iOS application restrictions:
+ * { "reason": "API_KEY_IOS_APP_BLOCKED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum API_KEY_IOS_APP_BLOCKED = 13;
+ */
+ const API_KEY_IOS_APP_BLOCKED = 13;
+ /**
+ * The request is denied because there is not enough rate quota for the
+ * consumer.
+ * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+ * "pubsub.googleapis.com" service because consumer's rate quota usage has
+ * reached the maximum value set for the quota limit
+ * "ReadsPerMinutePerProject" on the quota metric
+ * "pubsub.googleapis.com/read_requests":
+ * { "reason": "RATE_LIMIT_EXCEEDED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "pubsub.googleapis.com",
+ * "quota_metric": "pubsub.googleapis.com/read_requests",
+ * "quota_limit": "ReadsPerMinutePerProject"
+ * }
+ * }
+ * Example of an ErrorInfo when the consumer "projects/123" checks quota on
+ * the service "dataflow.googleapis.com" and hits the organization quota
+ * limit "DefaultRequestsPerMinutePerOrganization" on the metric
+ * "dataflow.googleapis.com/default_requests".
+ * { "reason": "RATE_LIMIT_EXCEEDED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "dataflow.googleapis.com",
+ * "quota_metric": "dataflow.googleapis.com/default_requests",
+ * "quota_limit": "DefaultRequestsPerMinutePerOrganization"
+ * }
+ * }
+ *
+ * Generated from protobuf enum RATE_LIMIT_EXCEEDED = 5;
+ */
+ const RATE_LIMIT_EXCEEDED = 5;
+ /**
+ * The request is denied because there is not enough resource quota for the
+ * consumer.
+ * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+ * "compute.googleapis.com" service because consumer's resource quota usage
+ * has reached the maximum value set for the quota limit "VMsPerProject"
+ * on the quota metric "compute.googleapis.com/vms":
+ * { "reason": "RESOURCE_QUOTA_EXCEEDED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "compute.googleapis.com",
+ * "quota_metric": "compute.googleapis.com/vms",
+ * "quota_limit": "VMsPerProject"
+ * }
+ * }
+ * Example of an ErrorInfo when the consumer "projects/123" checks resource
+ * quota on the service "dataflow.googleapis.com" and hits the organization
+ * quota limit "jobs-per-organization" on the metric
+ * "dataflow.googleapis.com/job_count".
+ * { "reason": "RESOURCE_QUOTA_EXCEEDED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "dataflow.googleapis.com",
+ * "quota_metric": "dataflow.googleapis.com/job_count",
+ * "quota_limit": "jobs-per-organization"
+ * }
+ * }
+ *
+ * Generated from protobuf enum RESOURCE_QUOTA_EXCEEDED = 6;
+ */
+ const RESOURCE_QUOTA_EXCEEDED = 6;
+ /**
+ * The request whose associated billing account address is in a tax restricted
+ * location, violates the local tax restrictions when creating resources in
+ * the restricted region.
+ * Example of an ErrorInfo when creating the Cloud Storage Bucket in the
+ * container "projects/123" under a tax restricted region
+ * "locations/asia-northeast3":
+ * { "reason": "LOCATION_TAX_POLICY_VIOLATED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com",
+ * "location": "locations/asia-northeast3"
+ * }
+ * }
+ * This response indicates creating the Cloud Storage Bucket in
+ * "locations/asia-northeast3" violates the location tax restriction.
+ *
+ * Generated from protobuf enum LOCATION_TAX_POLICY_VIOLATED = 10;
+ */
+ const LOCATION_TAX_POLICY_VIOLATED = 10;
+ /**
+ * The request is denied because the caller does not have required permission
+ * on the user project "projects/123" or the user project is invalid. For more
+ * information, check the [userProject System
+ * Parameters](https://cloud.google.com/apis/docs/system-parameters).
+ * Example of an ErrorInfo when the caller is calling Cloud Storage service
+ * with insufficient permissions on the user project:
+ * { "reason": "USER_PROJECT_DENIED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum USER_PROJECT_DENIED = 11;
+ */
+ const USER_PROJECT_DENIED = 11;
+ /**
+ * The request is denied because the consumer "projects/123" is suspended due
+ * to Terms of Service(Tos) violations. Check [Project suspension
+ * guidelines](https://cloud.google.com/resource-manager/docs/project-suspension-guidelines)
+ * for more information.
+ * Example of an ErrorInfo when calling Cloud Storage service with the
+ * suspended consumer "projects/123":
+ * { "reason": "CONSUMER_SUSPENDED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum CONSUMER_SUSPENDED = 12;
+ */
+ const CONSUMER_SUSPENDED = 12;
+ /**
+ * The request is denied because the associated consumer is invalid. It may be
+ * in a bad format, cannot be found, or have been deleted.
+ * Example of an ErrorInfo when calling Cloud Storage service with the
+ * invalid consumer "projects/123":
+ * { "reason": "CONSUMER_INVALID",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum CONSUMER_INVALID = 14;
+ */
+ const CONSUMER_INVALID = 14;
+ /**
+ * The request is denied because it violates [VPC Service
+ * Controls](https://cloud.google.com/vpc-service-controls/docs/overview).
+ * The 'uid' field is a random generated identifier that customer can use it
+ * to search the audit log for a request rejected by VPC Service Controls. For
+ * more information, please refer [VPC Service Controls
+ * Troubleshooting](https://cloud.google.com/vpc-service-controls/docs/troubleshooting#unique-id)
+ * Example of an ErrorInfo when the consumer "projects/123" fails to call
+ * Cloud Storage service because the request is prohibited by the VPC Service
+ * Controls.
+ * { "reason": "SECURITY_POLICY_VIOLATED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "uid": "123456789abcde",
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum SECURITY_POLICY_VIOLATED = 15;
+ */
+ const SECURITY_POLICY_VIOLATED = 15;
+ /**
+ * The request is denied because the provided access token has expired.
+ * Example of an ErrorInfo when the request is calling Cloud Storage service
+ * with an expired access token:
+ * { "reason": "ACCESS_TOKEN_EXPIRED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "service": "storage.googleapis.com",
+ * "method": "google.storage.v1.Storage.GetObject"
+ * }
+ * }
+ *
+ * Generated from protobuf enum ACCESS_TOKEN_EXPIRED = 16;
+ */
+ const ACCESS_TOKEN_EXPIRED = 16;
+ /**
+ * The request is denied because the provided access token doesn't have at
+ * least one of the acceptable scopes required for the API. Please check
+ * [OAuth 2.0 Scopes for Google
+ * APIs](https://developers.google.com/identity/protocols/oauth2/scopes) for
+ * the list of the OAuth 2.0 scopes that you might need to request to access
+ * the API.
+ * Example of an ErrorInfo when the request is calling Cloud Storage service
+ * with an access token that is missing required scopes:
+ * { "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "service": "storage.googleapis.com",
+ * "method": "google.storage.v1.Storage.GetObject"
+ * }
+ * }
+ *
+ * Generated from protobuf enum ACCESS_TOKEN_SCOPE_INSUFFICIENT = 17;
+ */
+ const ACCESS_TOKEN_SCOPE_INSUFFICIENT = 17;
+ /**
+ * The request is denied because the account associated with the provided
+ * access token is in an invalid state, such as disabled or deleted.
+ * For more information, see https://cloud.google.com/docs/authentication.
+ * Warning: For privacy reasons, the server may not be able to disclose the
+ * email address for some accounts. The client MUST NOT depend on the
+ * availability of the `email` attribute.
+ * Example of an ErrorInfo when the request is to the Cloud Storage API with
+ * an access token that is associated with a disabled or deleted [service
+ * account](http://cloud/iam/docs/service-accounts):
+ * { "reason": "ACCOUNT_STATE_INVALID",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "service": "storage.googleapis.com",
+ * "method": "google.storage.v1.Storage.GetObject",
+ * "email": "user@123.iam.gserviceaccount.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum ACCOUNT_STATE_INVALID = 18;
+ */
+ const ACCOUNT_STATE_INVALID = 18;
+ /**
+ * The request is denied because the type of the provided access token is not
+ * supported by the API being called.
+ * Example of an ErrorInfo when the request is to the Cloud Storage API with
+ * an unsupported token type.
+ * { "reason": "ACCESS_TOKEN_TYPE_UNSUPPORTED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "service": "storage.googleapis.com",
+ * "method": "google.storage.v1.Storage.GetObject"
+ * }
+ * }
+ *
+ * Generated from protobuf enum ACCESS_TOKEN_TYPE_UNSUPPORTED = 19;
+ */
+ const ACCESS_TOKEN_TYPE_UNSUPPORTED = 19;
+ /**
+ * The request is denied because the request doesn't have any authentication
+ * credentials. For more information regarding the supported authentication
+ * strategies for Google Cloud APIs, see
+ * https://cloud.google.com/docs/authentication.
+ * Example of an ErrorInfo when the request is to the Cloud Storage API
+ * without any authentication credentials.
+ * { "reason": "CREDENTIALS_MISSING",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "service": "storage.googleapis.com",
+ * "method": "google.storage.v1.Storage.GetObject"
+ * }
+ * }
+ *
+ * Generated from protobuf enum CREDENTIALS_MISSING = 20;
+ */
+ const CREDENTIALS_MISSING = 20;
+ /**
+ * The request is denied because the provided project owning the resource
+ * which acts as the [API
+ * consumer](https://cloud.google.com/apis/design/glossary#api_consumer) is
+ * invalid. It may be in a bad format or empty.
+ * Example of an ErrorInfo when the request is to the Cloud Functions API,
+ * but the offered resource project in the request in a bad format which can't
+ * perform the ListFunctions method.
+ * { "reason": "RESOURCE_PROJECT_INVALID",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "service": "cloudfunctions.googleapis.com",
+ * "method":
+ * "google.cloud.functions.v1.CloudFunctionsService.ListFunctions"
+ * }
+ * }
+ *
+ * Generated from protobuf enum RESOURCE_PROJECT_INVALID = 21;
+ */
+ const RESOURCE_PROJECT_INVALID = 21;
+ /**
+ * The request is denied because the provided session cookie is missing,
+ * invalid or failed to decode.
+ * Example of an ErrorInfo when the request is calling Cloud Storage service
+ * with a SID cookie which can't be decoded.
+ * { "reason": "SESSION_COOKIE_INVALID",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "service": "storage.googleapis.com",
+ * "method": "google.storage.v1.Storage.GetObject",
+ * "cookie": "SID"
+ * }
+ * }
+ *
+ * Generated from protobuf enum SESSION_COOKIE_INVALID = 23;
+ */
+ const SESSION_COOKIE_INVALID = 23;
+ /**
+ * The request is denied because the user is from a Google Workspace customer
+ * that blocks their users from accessing a particular service.
+ * Example scenario: https://support.google.com/a/answer/9197205?hl=en
+ * Example of an ErrorInfo when access to Google Cloud Storage service is
+ * blocked by the Google Workspace administrator:
+ * { "reason": "USER_BLOCKED_BY_ADMIN",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "service": "storage.googleapis.com",
+ * "method": "google.storage.v1.Storage.GetObject",
+ * }
+ * }
+ *
+ * Generated from protobuf enum USER_BLOCKED_BY_ADMIN = 24;
+ */
+ const USER_BLOCKED_BY_ADMIN = 24;
+ /**
+ * The request is denied because the resource service usage is restricted
+ * by administrators according to the organization policy constraint.
+ * For more information see
+ * https://cloud.google.com/resource-manager/docs/organization-policy/restricting-services.
+ * Example of an ErrorInfo when access to Google Cloud Storage service is
+ * restricted by Resource Usage Restriction policy:
+ * { "reason": "RESOURCE_USAGE_RESTRICTION_VIOLATED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/project-123",
+ * "service": "storage.googleapis.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum RESOURCE_USAGE_RESTRICTION_VIOLATED = 25;
+ */
+ const RESOURCE_USAGE_RESTRICTION_VIOLATED = 25;
+ /**
+ * Unimplemented. Do not use.
+ * The request is denied because it contains unsupported system parameters in
+ * URL query parameters or HTTP headers. For more information,
+ * see https://cloud.google.com/apis/docs/system-parameters
+ * Example of an ErrorInfo when access "pubsub.googleapis.com" service with
+ * a request header of "x-goog-user-ip":
+ * { "reason": "SYSTEM_PARAMETER_UNSUPPORTED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "service": "pubsub.googleapis.com"
+ * "parameter": "x-goog-user-ip"
+ * }
+ * }
+ *
+ * Generated from protobuf enum SYSTEM_PARAMETER_UNSUPPORTED = 26;
+ */
+ const SYSTEM_PARAMETER_UNSUPPORTED = 26;
+ /**
+ * The request is denied because it violates Org Restriction: the requested
+ * resource does not belong to allowed organizations specified in
+ * "X-Goog-Allowed-Resources" header.
+ * Example of an ErrorInfo when accessing a GCP resource that is restricted by
+ * Org Restriction for "pubsub.googleapis.com" service.
+ * {
+ * reason: "ORG_RESTRICTION_VIOLATION"
+ * domain: "googleapis.com"
+ * metadata {
+ * "consumer":"projects/123456"
+ * "service": "pubsub.googleapis.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum ORG_RESTRICTION_VIOLATION = 27;
+ */
+ const ORG_RESTRICTION_VIOLATION = 27;
+ /**
+ * The request is denied because "X-Goog-Allowed-Resources" header is in a bad
+ * format.
+ * Example of an ErrorInfo when
+ * accessing "pubsub.googleapis.com" service with an invalid
+ * "X-Goog-Allowed-Resources" request header.
+ * {
+ * reason: "ORG_RESTRICTION_HEADER_INVALID"
+ * domain: "googleapis.com"
+ * metadata {
+ * "consumer":"projects/123456"
+ * "service": "pubsub.googleapis.com"
+ * }
+ * }
+ *
+ * Generated from protobuf enum ORG_RESTRICTION_HEADER_INVALID = 28;
+ */
+ const ORG_RESTRICTION_HEADER_INVALID = 28;
+ /**
+ * Unimplemented. Do not use.
+ * The request is calling a service that is not visible to the consumer.
+ * Example of an ErrorInfo when the consumer "projects/123" contacting
+ * "pubsub.googleapis.com" service which is not visible to the consumer.
+ * { "reason": "SERVICE_NOT_VISIBLE",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "pubsub.googleapis.com"
+ * }
+ * }
+ * This response indicates the "pubsub.googleapis.com" is not visible to
+ * "projects/123" (or it may not exist).
+ *
+ * Generated from protobuf enum SERVICE_NOT_VISIBLE = 29;
+ */
+ const SERVICE_NOT_VISIBLE = 29;
+ /**
+ * The request is related to a project for which GCP access is suspended.
+ * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+ * "pubsub.googleapis.com" service because GCP access is suspended:
+ * { "reason": "GCP_SUSPENDED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "pubsub.googleapis.com"
+ * }
+ * }
+ * This response indicates the associated GCP account has been suspended.
+ *
+ * Generated from protobuf enum GCP_SUSPENDED = 30;
+ */
+ const GCP_SUSPENDED = 30;
+ /**
+ * The request violates the location policies when creating resources in
+ * the restricted region.
+ * Example of an ErrorInfo when creating the Cloud Storage Bucket by
+ * "projects/123" for service storage.googleapis.com:
+ * { "reason": "LOCATION_POLICY_VIOLATED",
+ * "domain": "googleapis.com",
+ * "metadata": {
+ * "consumer": "projects/123",
+ * "service": "storage.googleapis.com",
+ * }
+ * }
+ * This response indicates creating the Cloud Storage Bucket in
+ * "locations/asia-northeast3" violates at least one location policy.
+ * The troubleshooting guidance is provided in the Help links.
+ *
+ * Generated from protobuf enum LOCATION_POLICY_VIOLATED = 31;
+ */
+ const LOCATION_POLICY_VIOLATED = 31;
+
+ private static $valueToName = [
+ self::ERROR_REASON_UNSPECIFIED => 'ERROR_REASON_UNSPECIFIED',
+ self::SERVICE_DISABLED => 'SERVICE_DISABLED',
+ self::BILLING_DISABLED => 'BILLING_DISABLED',
+ self::API_KEY_INVALID => 'API_KEY_INVALID',
+ self::API_KEY_SERVICE_BLOCKED => 'API_KEY_SERVICE_BLOCKED',
+ self::API_KEY_HTTP_REFERRER_BLOCKED => 'API_KEY_HTTP_REFERRER_BLOCKED',
+ self::API_KEY_IP_ADDRESS_BLOCKED => 'API_KEY_IP_ADDRESS_BLOCKED',
+ self::API_KEY_ANDROID_APP_BLOCKED => 'API_KEY_ANDROID_APP_BLOCKED',
+ self::API_KEY_IOS_APP_BLOCKED => 'API_KEY_IOS_APP_BLOCKED',
+ self::RATE_LIMIT_EXCEEDED => 'RATE_LIMIT_EXCEEDED',
+ self::RESOURCE_QUOTA_EXCEEDED => 'RESOURCE_QUOTA_EXCEEDED',
+ self::LOCATION_TAX_POLICY_VIOLATED => 'LOCATION_TAX_POLICY_VIOLATED',
+ self::USER_PROJECT_DENIED => 'USER_PROJECT_DENIED',
+ self::CONSUMER_SUSPENDED => 'CONSUMER_SUSPENDED',
+ self::CONSUMER_INVALID => 'CONSUMER_INVALID',
+ self::SECURITY_POLICY_VIOLATED => 'SECURITY_POLICY_VIOLATED',
+ self::ACCESS_TOKEN_EXPIRED => 'ACCESS_TOKEN_EXPIRED',
+ self::ACCESS_TOKEN_SCOPE_INSUFFICIENT => 'ACCESS_TOKEN_SCOPE_INSUFFICIENT',
+ self::ACCOUNT_STATE_INVALID => 'ACCOUNT_STATE_INVALID',
+ self::ACCESS_TOKEN_TYPE_UNSUPPORTED => 'ACCESS_TOKEN_TYPE_UNSUPPORTED',
+ self::CREDENTIALS_MISSING => 'CREDENTIALS_MISSING',
+ self::RESOURCE_PROJECT_INVALID => 'RESOURCE_PROJECT_INVALID',
+ self::SESSION_COOKIE_INVALID => 'SESSION_COOKIE_INVALID',
+ self::USER_BLOCKED_BY_ADMIN => 'USER_BLOCKED_BY_ADMIN',
+ self::RESOURCE_USAGE_RESTRICTION_VIOLATED => 'RESOURCE_USAGE_RESTRICTION_VIOLATED',
+ self::SYSTEM_PARAMETER_UNSUPPORTED => 'SYSTEM_PARAMETER_UNSUPPORTED',
+ self::ORG_RESTRICTION_VIOLATION => 'ORG_RESTRICTION_VIOLATION',
+ self::ORG_RESTRICTION_HEADER_INVALID => 'ORG_RESTRICTION_HEADER_INVALID',
+ self::SERVICE_NOT_VISIBLE => 'SERVICE_NOT_VISIBLE',
+ self::GCP_SUSPENDED => 'GCP_SUSPENDED',
+ self::LOCATION_POLICY_VIOLATED => 'LOCATION_POLICY_VIOLATED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/FieldBehavior.php b/tests/php_test_files/vendor/google/common-protos/src/Api/FieldBehavior.php
new file mode 100644
index 0000000..4c57c50
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/FieldBehavior.php
@@ -0,0 +1,133 @@
+google.api.FieldBehavior
+ */
+class FieldBehavior
+{
+ /**
+ * Conventional default for enums. Do not use this.
+ *
+ * Generated from protobuf enum FIELD_BEHAVIOR_UNSPECIFIED = 0;
+ */
+ const FIELD_BEHAVIOR_UNSPECIFIED = 0;
+ /**
+ * Specifically denotes a field as optional.
+ * While all fields in protocol buffers are optional, this may be specified
+ * for emphasis if appropriate.
+ *
+ * Generated from protobuf enum OPTIONAL = 1;
+ */
+ const OPTIONAL = 1;
+ /**
+ * Denotes a field as required.
+ * This indicates that the field **must** be provided as part of the request,
+ * and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
+ *
+ * Generated from protobuf enum REQUIRED = 2;
+ */
+ const REQUIRED = 2;
+ /**
+ * Denotes a field as output only.
+ * This indicates that the field is provided in responses, but including the
+ * field in a request does nothing (the server *must* ignore it and
+ * *must not* throw an error as a result of the field's presence).
+ *
+ * Generated from protobuf enum OUTPUT_ONLY = 3;
+ */
+ const OUTPUT_ONLY = 3;
+ /**
+ * Denotes a field as input only.
+ * This indicates that the field is provided in requests, and the
+ * corresponding field is not included in output.
+ *
+ * Generated from protobuf enum INPUT_ONLY = 4;
+ */
+ const INPUT_ONLY = 4;
+ /**
+ * Denotes a field as immutable.
+ * This indicates that the field may be set once in a request to create a
+ * resource, but may not be changed thereafter.
+ *
+ * Generated from protobuf enum IMMUTABLE = 5;
+ */
+ const IMMUTABLE = 5;
+ /**
+ * Denotes that a (repeated) field is an unordered list.
+ * This indicates that the service may provide the elements of the list
+ * in any arbitrary order, rather than the order the user originally
+ * provided. Additionally, the list's order may or may not be stable.
+ *
+ * Generated from protobuf enum UNORDERED_LIST = 6;
+ */
+ const UNORDERED_LIST = 6;
+ /**
+ * Denotes that this field returns a non-empty default value if not set.
+ * This indicates that if the user provides the empty value in a request,
+ * a non-empty value will be returned. The user will not be aware of what
+ * non-empty value to expect.
+ *
+ * Generated from protobuf enum NON_EMPTY_DEFAULT = 7;
+ */
+ const NON_EMPTY_DEFAULT = 7;
+ /**
+ * Denotes that the field in a resource (a message annotated with
+ * google.api.resource) is used in the resource name to uniquely identify the
+ * resource. For AIP-compliant APIs, this should only be applied to the
+ * `name` field on the resource.
+ * This behavior should not be applied to references to other resources within
+ * the message.
+ * The identifier field of resources often have different field behavior
+ * depending on the request it is embedded in (e.g. for Create methods name
+ * is optional and unused, while for Update methods it is required). Instead
+ * of method-specific annotations, only `IDENTIFIER` is required.
+ *
+ * Generated from protobuf enum IDENTIFIER = 8;
+ */
+ const IDENTIFIER = 8;
+
+ private static $valueToName = [
+ self::FIELD_BEHAVIOR_UNSPECIFIED => 'FIELD_BEHAVIOR_UNSPECIFIED',
+ self::OPTIONAL => 'OPTIONAL',
+ self::REQUIRED => 'REQUIRED',
+ self::OUTPUT_ONLY => 'OUTPUT_ONLY',
+ self::INPUT_ONLY => 'INPUT_ONLY',
+ self::IMMUTABLE => 'IMMUTABLE',
+ self::UNORDERED_LIST => 'UNORDERED_LIST',
+ self::NON_EMPTY_DEFAULT => 'NON_EMPTY_DEFAULT',
+ self::IDENTIFIER => 'IDENTIFIER',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/FieldInfo.php b/tests/php_test_files/vendor/google/common-protos/src/Api/FieldInfo.php
new file mode 100644
index 0000000..617bf40
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/FieldInfo.php
@@ -0,0 +1,117 @@
+google.api.FieldInfo
+ */
+class FieldInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The standard format of a field value. This does not explicitly configure
+ * any API consumer, just documents the API's format for the field it is
+ * applied to.
+ *
+ * Generated from protobuf field .google.api.FieldInfo.Format format = 1;
+ */
+ protected $format = 0;
+ /**
+ * The type(s) that the annotated, generic field may represent.
+ * Currently, this must only be used on fields of type `google.protobuf.Any`.
+ * Supporting other generic types may be considered in the future.
+ *
+ * Generated from protobuf field repeated .google.api.TypeReference referenced_types = 2;
+ */
+ private $referenced_types;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $format
+ * The standard format of a field value. This does not explicitly configure
+ * any API consumer, just documents the API's format for the field it is
+ * applied to.
+ * @type array<\Google\Api\TypeReference>|\Google\Protobuf\Internal\RepeatedField $referenced_types
+ * The type(s) that the annotated, generic field may represent.
+ * Currently, this must only be used on fields of type `google.protobuf.Any`.
+ * Supporting other generic types may be considered in the future.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\FieldInfo::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The standard format of a field value. This does not explicitly configure
+ * any API consumer, just documents the API's format for the field it is
+ * applied to.
+ *
+ * Generated from protobuf field .google.api.FieldInfo.Format format = 1;
+ * @return int
+ */
+ public function getFormat()
+ {
+ return $this->format;
+ }
+
+ /**
+ * The standard format of a field value. This does not explicitly configure
+ * any API consumer, just documents the API's format for the field it is
+ * applied to.
+ *
+ * Generated from protobuf field .google.api.FieldInfo.Format format = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setFormat($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\FieldInfo\Format::class);
+ $this->format = $var;
+
+ return $this;
+ }
+
+ /**
+ * The type(s) that the annotated, generic field may represent.
+ * Currently, this must only be used on fields of type `google.protobuf.Any`.
+ * Supporting other generic types may be considered in the future.
+ *
+ * Generated from protobuf field repeated .google.api.TypeReference referenced_types = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReferencedTypes()
+ {
+ return $this->referenced_types;
+ }
+
+ /**
+ * The type(s) that the annotated, generic field may represent.
+ * Currently, this must only be used on fields of type `google.protobuf.Any`.
+ * Supporting other generic types may be considered in the future.
+ *
+ * Generated from protobuf field repeated .google.api.TypeReference referenced_types = 2;
+ * @param array<\Google\Api\TypeReference>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setReferencedTypes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\TypeReference::class);
+ $this->referenced_types = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/FieldInfo/Format.php b/tests/php_test_files/vendor/google/common-protos/src/Api/FieldInfo/Format.php
new file mode 100644
index 0000000..1977ca9
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/FieldInfo/Format.php
@@ -0,0 +1,90 @@
+google.api.FieldInfo.Format
+ */
+class Format
+{
+ /**
+ * Default, unspecified value.
+ *
+ * Generated from protobuf enum FORMAT_UNSPECIFIED = 0;
+ */
+ const FORMAT_UNSPECIFIED = 0;
+ /**
+ * Universally Unique Identifier, version 4, value as defined by
+ * https://datatracker.ietf.org/doc/html/rfc4122. The value may be
+ * normalized to entirely lowercase letters. For example, the value
+ * `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to
+ * `f47ac10b-58cc-0372-8567-0e02b2c3d479`.
+ *
+ * Generated from protobuf enum UUID4 = 1;
+ */
+ const UUID4 = 1;
+ /**
+ * Internet Protocol v4 value as defined by [RFC
+ * 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be
+ * condensed, with leading zeros in each octet stripped. For example,
+ * `001.022.233.040` would be condensed to `1.22.233.40`.
+ *
+ * Generated from protobuf enum IPV4 = 2;
+ */
+ const IPV4 = 2;
+ /**
+ * Internet Protocol v6 value as defined by [RFC
+ * 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be
+ * normalized to entirely lowercase letters with zeros compressed, following
+ * [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example,
+ * the value `2001:0DB8:0::0` would be normalized to `2001:db8::`.
+ *
+ * Generated from protobuf enum IPV6 = 3;
+ */
+ const IPV6 = 3;
+ /**
+ * An IP address in either v4 or v6 format as described by the individual
+ * values defined herein. See the comments on the IPV4 and IPV6 types for
+ * allowed normalizations of each.
+ *
+ * Generated from protobuf enum IPV4_OR_IPV6 = 4;
+ */
+ const IPV4_OR_IPV6 = 4;
+
+ private static $valueToName = [
+ self::FORMAT_UNSPECIFIED => 'FORMAT_UNSPECIFIED',
+ self::UUID4 => 'UUID4',
+ self::IPV4 => 'IPV4',
+ self::IPV6 => 'IPV6',
+ self::IPV4_OR_IPV6 => 'IPV4_OR_IPV6',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/FieldPolicy.php b/tests/php_test_files/vendor/google/common-protos/src/Api/FieldPolicy.php
new file mode 100644
index 0000000..53474a4
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/FieldPolicy.php
@@ -0,0 +1,181 @@
+google.api.FieldPolicy
+ */
+class FieldPolicy extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Selects one or more request or response message fields to apply this
+ * `FieldPolicy`.
+ * When a `FieldPolicy` is used in proto annotation, the selector must
+ * be left as empty. The service config generator will automatically fill
+ * the correct value.
+ * When a `FieldPolicy` is used in service config, the selector must be a
+ * comma-separated string with valid request or response field paths,
+ * such as "foo.bar" or "foo.bar,foo.baz".
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * Specifies the required permission(s) for the resource referred to by the
+ * field. It requires the field contains a valid resource reference, and
+ * the request must pass the permission checks to proceed. For example,
+ * "resourcemanager.projects.get".
+ *
+ * Generated from protobuf field string resource_permission = 2;
+ */
+ protected $resource_permission = '';
+ /**
+ * Specifies the resource type for the resource referred to by the field.
+ *
+ * Generated from protobuf field string resource_type = 3;
+ */
+ protected $resource_type = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * Selects one or more request or response message fields to apply this
+ * `FieldPolicy`.
+ * When a `FieldPolicy` is used in proto annotation, the selector must
+ * be left as empty. The service config generator will automatically fill
+ * the correct value.
+ * When a `FieldPolicy` is used in service config, the selector must be a
+ * comma-separated string with valid request or response field paths,
+ * such as "foo.bar" or "foo.bar,foo.baz".
+ * @type string $resource_permission
+ * Specifies the required permission(s) for the resource referred to by the
+ * field. It requires the field contains a valid resource reference, and
+ * the request must pass the permission checks to proceed. For example,
+ * "resourcemanager.projects.get".
+ * @type string $resource_type
+ * Specifies the resource type for the resource referred to by the field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Policy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Selects one or more request or response message fields to apply this
+ * `FieldPolicy`.
+ * When a `FieldPolicy` is used in proto annotation, the selector must
+ * be left as empty. The service config generator will automatically fill
+ * the correct value.
+ * When a `FieldPolicy` is used in service config, the selector must be a
+ * comma-separated string with valid request or response field paths,
+ * such as "foo.bar" or "foo.bar,foo.baz".
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * Selects one or more request or response message fields to apply this
+ * `FieldPolicy`.
+ * When a `FieldPolicy` is used in proto annotation, the selector must
+ * be left as empty. The service config generator will automatically fill
+ * the correct value.
+ * When a `FieldPolicy` is used in service config, the selector must be a
+ * comma-separated string with valid request or response field paths,
+ * such as "foo.bar" or "foo.bar,foo.baz".
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * Specifies the required permission(s) for the resource referred to by the
+ * field. It requires the field contains a valid resource reference, and
+ * the request must pass the permission checks to proceed. For example,
+ * "resourcemanager.projects.get".
+ *
+ * Generated from protobuf field string resource_permission = 2;
+ * @return string
+ */
+ public function getResourcePermission()
+ {
+ return $this->resource_permission;
+ }
+
+ /**
+ * Specifies the required permission(s) for the resource referred to by the
+ * field. It requires the field contains a valid resource reference, and
+ * the request must pass the permission checks to proceed. For example,
+ * "resourcemanager.projects.get".
+ *
+ * Generated from protobuf field string resource_permission = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setResourcePermission($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->resource_permission = $var;
+
+ return $this;
+ }
+
+ /**
+ * Specifies the resource type for the resource referred to by the field.
+ *
+ * Generated from protobuf field string resource_type = 3;
+ * @return string
+ */
+ public function getResourceType()
+ {
+ return $this->resource_type;
+ }
+
+ /**
+ * Specifies the resource type for the resource referred to by the field.
+ *
+ * Generated from protobuf field string resource_type = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setResourceType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->resource_type = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/GoSettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/GoSettings.php
new file mode 100644
index 0000000..10817e8
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/GoSettings.php
@@ -0,0 +1,77 @@
+google.api.GoSettings
+ */
+class GoSettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ */
+ protected $common = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Api\CommonLanguageSettings $common
+ * Some settings.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @return \Google\Api\CommonLanguageSettings|null
+ */
+ public function getCommon()
+ {
+ return $this->common;
+ }
+
+ public function hasCommon()
+ {
+ return isset($this->common);
+ }
+
+ public function clearCommon()
+ {
+ unset($this->common);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @param \Google\Api\CommonLanguageSettings $var
+ * @return $this
+ */
+ public function setCommon($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\CommonLanguageSettings::class);
+ $this->common = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Http.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Http.php
new file mode 100644
index 0000000..712894e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Http.php
@@ -0,0 +1,123 @@
+google.api.Http
+ */
+class Http extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A list of HTTP configuration rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.HttpRule rules = 1;
+ */
+ private $rules;
+ /**
+ * When set to true, URL path parameters will be fully URI-decoded except in
+ * cases of single segment matches in reserved expansion, where "%2F" will be
+ * left encoded.
+ * The default behavior is to not decode RFC 6570 reserved characters in multi
+ * segment matches.
+ *
+ * Generated from protobuf field bool fully_decode_reserved_expansion = 2;
+ */
+ protected $fully_decode_reserved_expansion = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\HttpRule>|\Google\Protobuf\Internal\RepeatedField $rules
+ * A list of HTTP configuration rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ * @type bool $fully_decode_reserved_expansion
+ * When set to true, URL path parameters will be fully URI-decoded except in
+ * cases of single segment matches in reserved expansion, where "%2F" will be
+ * left encoded.
+ * The default behavior is to not decode RFC 6570 reserved characters in multi
+ * segment matches.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Http::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A list of HTTP configuration rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.HttpRule rules = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRules()
+ {
+ return $this->rules;
+ }
+
+ /**
+ * A list of HTTP configuration rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.HttpRule rules = 1;
+ * @param array<\Google\Api\HttpRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\HttpRule::class);
+ $this->rules = $arr;
+
+ return $this;
+ }
+
+ /**
+ * When set to true, URL path parameters will be fully URI-decoded except in
+ * cases of single segment matches in reserved expansion, where "%2F" will be
+ * left encoded.
+ * The default behavior is to not decode RFC 6570 reserved characters in multi
+ * segment matches.
+ *
+ * Generated from protobuf field bool fully_decode_reserved_expansion = 2;
+ * @return bool
+ */
+ public function getFullyDecodeReservedExpansion()
+ {
+ return $this->fully_decode_reserved_expansion;
+ }
+
+ /**
+ * When set to true, URL path parameters will be fully URI-decoded except in
+ * cases of single segment matches in reserved expansion, where "%2F" will be
+ * left encoded.
+ * The default behavior is to not decode RFC 6570 reserved characters in multi
+ * segment matches.
+ *
+ * Generated from protobuf field bool fully_decode_reserved_expansion = 2;
+ * @param bool $var
+ * @return $this
+ */
+ public function setFullyDecodeReservedExpansion($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->fully_decode_reserved_expansion = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/HttpBody.php b/tests/php_test_files/vendor/google/common-protos/src/Api/HttpBody.php
new file mode 100644
index 0000000..c5626f1
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/HttpBody.php
@@ -0,0 +1,168 @@
+google.api.HttpBody
+ */
+class HttpBody extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The HTTP Content-Type header value specifying the content type of the body.
+ *
+ * Generated from protobuf field string content_type = 1;
+ */
+ protected $content_type = '';
+ /**
+ * The HTTP request/response body as raw binary.
+ *
+ * Generated from protobuf field bytes data = 2;
+ */
+ protected $data = '';
+ /**
+ * Application specific response metadata. Must be set in the first response
+ * for streaming APIs.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any extensions = 3;
+ */
+ private $extensions;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $content_type
+ * The HTTP Content-Type header value specifying the content type of the body.
+ * @type string $data
+ * The HTTP request/response body as raw binary.
+ * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $extensions
+ * Application specific response metadata. Must be set in the first response
+ * for streaming APIs.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Httpbody::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The HTTP Content-Type header value specifying the content type of the body.
+ *
+ * Generated from protobuf field string content_type = 1;
+ * @return string
+ */
+ public function getContentType()
+ {
+ return $this->content_type;
+ }
+
+ /**
+ * The HTTP Content-Type header value specifying the content type of the body.
+ *
+ * Generated from protobuf field string content_type = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setContentType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->content_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The HTTP request/response body as raw binary.
+ *
+ * Generated from protobuf field bytes data = 2;
+ * @return string
+ */
+ public function getData()
+ {
+ return $this->data;
+ }
+
+ /**
+ * The HTTP request/response body as raw binary.
+ *
+ * Generated from protobuf field bytes data = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setData($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->data = $var;
+
+ return $this;
+ }
+
+ /**
+ * Application specific response metadata. Must be set in the first response
+ * for streaming APIs.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any extensions = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExtensions()
+ {
+ return $this->extensions;
+ }
+
+ /**
+ * Application specific response metadata. Must be set in the first response
+ * for streaming APIs.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any extensions = 3;
+ * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExtensions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class);
+ $this->extensions = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/HttpRule.php b/tests/php_test_files/vendor/google/common-protos/src/Api/HttpRule.php
new file mode 100644
index 0000000..3b72f5a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/HttpRule.php
@@ -0,0 +1,651 @@
+google.api.HttpRule
+ */
+class HttpRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Selects a method to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * The name of the request field whose value is mapped to the HTTP request
+ * body, or `*` for mapping all request fields not captured by the path
+ * pattern to the HTTP body, or omitted for not having any HTTP request body.
+ * NOTE: the referred field must be present at the top-level of the request
+ * message type.
+ *
+ * Generated from protobuf field string body = 7;
+ */
+ protected $body = '';
+ /**
+ * Optional. The name of the response field whose value is mapped to the HTTP
+ * response body. When omitted, the entire response message will be used
+ * as the HTTP response body.
+ * NOTE: The referred field must be present at the top-level of the response
+ * message type.
+ *
+ * Generated from protobuf field string response_body = 12;
+ */
+ protected $response_body = '';
+ /**
+ * Additional HTTP bindings for the selector. Nested bindings must
+ * not contain an `additional_bindings` field themselves (that is,
+ * the nesting may only be one level deep).
+ *
+ * Generated from protobuf field repeated .google.api.HttpRule additional_bindings = 11;
+ */
+ private $additional_bindings;
+ protected $pattern;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * Selects a method to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * @type string $get
+ * Maps to HTTP GET. Used for listing and getting information about
+ * resources.
+ * @type string $put
+ * Maps to HTTP PUT. Used for replacing a resource.
+ * @type string $post
+ * Maps to HTTP POST. Used for creating a resource or performing an action.
+ * @type string $delete
+ * Maps to HTTP DELETE. Used for deleting a resource.
+ * @type string $patch
+ * Maps to HTTP PATCH. Used for updating a resource.
+ * @type \Google\Api\CustomHttpPattern $custom
+ * The custom pattern is used for specifying an HTTP method that is not
+ * included in the `pattern` field, such as HEAD, or "*" to leave the
+ * HTTP method unspecified for this rule. The wild-card rule is useful
+ * for services that provide content to Web (HTML) clients.
+ * @type string $body
+ * The name of the request field whose value is mapped to the HTTP request
+ * body, or `*` for mapping all request fields not captured by the path
+ * pattern to the HTTP body, or omitted for not having any HTTP request body.
+ * NOTE: the referred field must be present at the top-level of the request
+ * message type.
+ * @type string $response_body
+ * Optional. The name of the response field whose value is mapped to the HTTP
+ * response body. When omitted, the entire response message will be used
+ * as the HTTP response body.
+ * NOTE: The referred field must be present at the top-level of the response
+ * message type.
+ * @type array<\Google\Api\HttpRule>|\Google\Protobuf\Internal\RepeatedField $additional_bindings
+ * Additional HTTP bindings for the selector. Nested bindings must
+ * not contain an `additional_bindings` field themselves (that is,
+ * the nesting may only be one level deep).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Http::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Selects a method to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * Selects a method to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * Maps to HTTP GET. Used for listing and getting information about
+ * resources.
+ *
+ * Generated from protobuf field string get = 2;
+ * @return string
+ */
+ public function getGet()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasGet()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Maps to HTTP GET. Used for listing and getting information about
+ * resources.
+ *
+ * Generated from protobuf field string get = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setGet($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Maps to HTTP PUT. Used for replacing a resource.
+ *
+ * Generated from protobuf field string put = 3;
+ * @return string
+ */
+ public function getPut()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasPut()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Maps to HTTP PUT. Used for replacing a resource.
+ *
+ * Generated from protobuf field string put = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setPut($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * Maps to HTTP POST. Used for creating a resource or performing an action.
+ *
+ * Generated from protobuf field string post = 4;
+ * @return string
+ */
+ public function getPost()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasPost()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Maps to HTTP POST. Used for creating a resource or performing an action.
+ *
+ * Generated from protobuf field string post = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setPost($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * Maps to HTTP DELETE. Used for deleting a resource.
+ *
+ * Generated from protobuf field string delete = 5;
+ * @return string
+ */
+ public function getDelete()
+ {
+ return $this->readOneof(5);
+ }
+
+ public function hasDelete()
+ {
+ return $this->hasOneof(5);
+ }
+
+ /**
+ * Maps to HTTP DELETE. Used for deleting a resource.
+ *
+ * Generated from protobuf field string delete = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setDelete($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(5, $var);
+
+ return $this;
+ }
+
+ /**
+ * Maps to HTTP PATCH. Used for updating a resource.
+ *
+ * Generated from protobuf field string patch = 6;
+ * @return string
+ */
+ public function getPatch()
+ {
+ return $this->readOneof(6);
+ }
+
+ public function hasPatch()
+ {
+ return $this->hasOneof(6);
+ }
+
+ /**
+ * Maps to HTTP PATCH. Used for updating a resource.
+ *
+ * Generated from protobuf field string patch = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setPatch($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
+ /**
+ * The custom pattern is used for specifying an HTTP method that is not
+ * included in the `pattern` field, such as HEAD, or "*" to leave the
+ * HTTP method unspecified for this rule. The wild-card rule is useful
+ * for services that provide content to Web (HTML) clients.
+ *
+ * Generated from protobuf field .google.api.CustomHttpPattern custom = 8;
+ * @return \Google\Api\CustomHttpPattern|null
+ */
+ public function getCustom()
+ {
+ return $this->readOneof(8);
+ }
+
+ public function hasCustom()
+ {
+ return $this->hasOneof(8);
+ }
+
+ /**
+ * The custom pattern is used for specifying an HTTP method that is not
+ * included in the `pattern` field, such as HEAD, or "*" to leave the
+ * HTTP method unspecified for this rule. The wild-card rule is useful
+ * for services that provide content to Web (HTML) clients.
+ *
+ * Generated from protobuf field .google.api.CustomHttpPattern custom = 8;
+ * @param \Google\Api\CustomHttpPattern $var
+ * @return $this
+ */
+ public function setCustom($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\CustomHttpPattern::class);
+ $this->writeOneof(8, $var);
+
+ return $this;
+ }
+
+ /**
+ * The name of the request field whose value is mapped to the HTTP request
+ * body, or `*` for mapping all request fields not captured by the path
+ * pattern to the HTTP body, or omitted for not having any HTTP request body.
+ * NOTE: the referred field must be present at the top-level of the request
+ * message type.
+ *
+ * Generated from protobuf field string body = 7;
+ * @return string
+ */
+ public function getBody()
+ {
+ return $this->body;
+ }
+
+ /**
+ * The name of the request field whose value is mapped to the HTTP request
+ * body, or `*` for mapping all request fields not captured by the path
+ * pattern to the HTTP body, or omitted for not having any HTTP request body.
+ * NOTE: the referred field must be present at the top-level of the request
+ * message type.
+ *
+ * Generated from protobuf field string body = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setBody($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->body = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The name of the response field whose value is mapped to the HTTP
+ * response body. When omitted, the entire response message will be used
+ * as the HTTP response body.
+ * NOTE: The referred field must be present at the top-level of the response
+ * message type.
+ *
+ * Generated from protobuf field string response_body = 12;
+ * @return string
+ */
+ public function getResponseBody()
+ {
+ return $this->response_body;
+ }
+
+ /**
+ * Optional. The name of the response field whose value is mapped to the HTTP
+ * response body. When omitted, the entire response message will be used
+ * as the HTTP response body.
+ * NOTE: The referred field must be present at the top-level of the response
+ * message type.
+ *
+ * Generated from protobuf field string response_body = 12;
+ * @param string $var
+ * @return $this
+ */
+ public function setResponseBody($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->response_body = $var;
+
+ return $this;
+ }
+
+ /**
+ * Additional HTTP bindings for the selector. Nested bindings must
+ * not contain an `additional_bindings` field themselves (that is,
+ * the nesting may only be one level deep).
+ *
+ * Generated from protobuf field repeated .google.api.HttpRule additional_bindings = 11;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAdditionalBindings()
+ {
+ return $this->additional_bindings;
+ }
+
+ /**
+ * Additional HTTP bindings for the selector. Nested bindings must
+ * not contain an `additional_bindings` field themselves (that is,
+ * the nesting may only be one level deep).
+ *
+ * Generated from protobuf field repeated .google.api.HttpRule additional_bindings = 11;
+ * @param array<\Google\Api\HttpRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAdditionalBindings($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\HttpRule::class);
+ $this->additional_bindings = $arr;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPattern()
+ {
+ return $this->whichOneof("pattern");
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/JavaSettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/JavaSettings.php
new file mode 100644
index 0000000..cddb41b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/JavaSettings.php
@@ -0,0 +1,221 @@
+google.api.JavaSettings
+ */
+class JavaSettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The package name to use in Java. Clobbers the java_package option
+ * set in the protobuf. This should be used **only** by APIs
+ * who have already set the language_settings.java.package_name" field
+ * in gapic.yaml. API teams should use the protobuf java_package option
+ * where possible.
+ * Example of a YAML configuration::
+ * publishing:
+ * java_settings:
+ * library_package: com.google.cloud.pubsub.v1
+ *
+ * Generated from protobuf field string library_package = 1;
+ */
+ protected $library_package = '';
+ /**
+ * Configure the Java class name to use instead of the service's for its
+ * corresponding generated GAPIC client. Keys are fully-qualified
+ * service names as they appear in the protobuf (including the full
+ * the language_settings.java.interface_names" field in gapic.yaml. API
+ * teams should otherwise use the service name as it appears in the
+ * protobuf.
+ * Example of a YAML configuration::
+ * publishing:
+ * java_settings:
+ * service_class_names:
+ * - google.pubsub.v1.Publisher: TopicAdmin
+ * - google.pubsub.v1.Subscriber: SubscriptionAdmin
+ *
+ * Generated from protobuf field map service_class_names = 2;
+ */
+ private $service_class_names;
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 3;
+ */
+ protected $common = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $library_package
+ * The package name to use in Java. Clobbers the java_package option
+ * set in the protobuf. This should be used **only** by APIs
+ * who have already set the language_settings.java.package_name" field
+ * in gapic.yaml. API teams should use the protobuf java_package option
+ * where possible.
+ * Example of a YAML configuration::
+ * publishing:
+ * java_settings:
+ * library_package: com.google.cloud.pubsub.v1
+ * @type array|\Google\Protobuf\Internal\MapField $service_class_names
+ * Configure the Java class name to use instead of the service's for its
+ * corresponding generated GAPIC client. Keys are fully-qualified
+ * service names as they appear in the protobuf (including the full
+ * the language_settings.java.interface_names" field in gapic.yaml. API
+ * teams should otherwise use the service name as it appears in the
+ * protobuf.
+ * Example of a YAML configuration::
+ * publishing:
+ * java_settings:
+ * service_class_names:
+ * - google.pubsub.v1.Publisher: TopicAdmin
+ * - google.pubsub.v1.Subscriber: SubscriptionAdmin
+ * @type \Google\Api\CommonLanguageSettings $common
+ * Some settings.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The package name to use in Java. Clobbers the java_package option
+ * set in the protobuf. This should be used **only** by APIs
+ * who have already set the language_settings.java.package_name" field
+ * in gapic.yaml. API teams should use the protobuf java_package option
+ * where possible.
+ * Example of a YAML configuration::
+ * publishing:
+ * java_settings:
+ * library_package: com.google.cloud.pubsub.v1
+ *
+ * Generated from protobuf field string library_package = 1;
+ * @return string
+ */
+ public function getLibraryPackage()
+ {
+ return $this->library_package;
+ }
+
+ /**
+ * The package name to use in Java. Clobbers the java_package option
+ * set in the protobuf. This should be used **only** by APIs
+ * who have already set the language_settings.java.package_name" field
+ * in gapic.yaml. API teams should use the protobuf java_package option
+ * where possible.
+ * Example of a YAML configuration::
+ * publishing:
+ * java_settings:
+ * library_package: com.google.cloud.pubsub.v1
+ *
+ * Generated from protobuf field string library_package = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setLibraryPackage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->library_package = $var;
+
+ return $this;
+ }
+
+ /**
+ * Configure the Java class name to use instead of the service's for its
+ * corresponding generated GAPIC client. Keys are fully-qualified
+ * service names as they appear in the protobuf (including the full
+ * the language_settings.java.interface_names" field in gapic.yaml. API
+ * teams should otherwise use the service name as it appears in the
+ * protobuf.
+ * Example of a YAML configuration::
+ * publishing:
+ * java_settings:
+ * service_class_names:
+ * - google.pubsub.v1.Publisher: TopicAdmin
+ * - google.pubsub.v1.Subscriber: SubscriptionAdmin
+ *
+ * Generated from protobuf field map service_class_names = 2;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getServiceClassNames()
+ {
+ return $this->service_class_names;
+ }
+
+ /**
+ * Configure the Java class name to use instead of the service's for its
+ * corresponding generated GAPIC client. Keys are fully-qualified
+ * service names as they appear in the protobuf (including the full
+ * the language_settings.java.interface_names" field in gapic.yaml. API
+ * teams should otherwise use the service name as it appears in the
+ * protobuf.
+ * Example of a YAML configuration::
+ * publishing:
+ * java_settings:
+ * service_class_names:
+ * - google.pubsub.v1.Publisher: TopicAdmin
+ * - google.pubsub.v1.Subscriber: SubscriptionAdmin
+ *
+ * Generated from protobuf field map service_class_names = 2;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setServiceClassNames($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->service_class_names = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 3;
+ * @return \Google\Api\CommonLanguageSettings|null
+ */
+ public function getCommon()
+ {
+ return $this->common;
+ }
+
+ public function hasCommon()
+ {
+ return isset($this->common);
+ }
+
+ public function clearCommon()
+ {
+ unset($this->common);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 3;
+ * @param \Google\Api\CommonLanguageSettings $var
+ * @return $this
+ */
+ public function setCommon($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\CommonLanguageSettings::class);
+ $this->common = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/JwtLocation.php b/tests/php_test_files/vendor/google/common-protos/src/Api/JwtLocation.php
new file mode 100644
index 0000000..1bfbdd8
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/JwtLocation.php
@@ -0,0 +1,199 @@
+google.api.JwtLocation
+ */
+class JwtLocation extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The value prefix. The value format is "value_prefix{token}"
+ * Only applies to "in" header type. Must be empty for "in" query type.
+ * If not empty, the header value has to match (case sensitive) this prefix.
+ * If not matched, JWT will not be extracted. If matched, JWT will be
+ * extracted after the prefix is removed.
+ * For example, for "Authorization: Bearer {JWT}",
+ * value_prefix="Bearer " with a space at the end.
+ *
+ * Generated from protobuf field string value_prefix = 3;
+ */
+ protected $value_prefix = '';
+ protected $in;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $header
+ * Specifies HTTP header name to extract JWT token.
+ * @type string $query
+ * Specifies URL query parameter name to extract JWT token.
+ * @type string $cookie
+ * Specifies cookie name to extract JWT token.
+ * @type string $value_prefix
+ * The value prefix. The value format is "value_prefix{token}"
+ * Only applies to "in" header type. Must be empty for "in" query type.
+ * If not empty, the header value has to match (case sensitive) this prefix.
+ * If not matched, JWT will not be extracted. If matched, JWT will be
+ * extracted after the prefix is removed.
+ * For example, for "Authorization: Bearer {JWT}",
+ * value_prefix="Bearer " with a space at the end.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Auth::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Specifies HTTP header name to extract JWT token.
+ *
+ * Generated from protobuf field string header = 1;
+ * @return string
+ */
+ public function getHeader()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasHeader()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Specifies HTTP header name to extract JWT token.
+ *
+ * Generated from protobuf field string header = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setHeader($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * Specifies URL query parameter name to extract JWT token.
+ *
+ * Generated from protobuf field string query = 2;
+ * @return string
+ */
+ public function getQuery()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasQuery()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Specifies URL query parameter name to extract JWT token.
+ *
+ * Generated from protobuf field string query = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setQuery($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Specifies cookie name to extract JWT token.
+ *
+ * Generated from protobuf field string cookie = 4;
+ * @return string
+ */
+ public function getCookie()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasCookie()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Specifies cookie name to extract JWT token.
+ *
+ * Generated from protobuf field string cookie = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setCookie($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * The value prefix. The value format is "value_prefix{token}"
+ * Only applies to "in" header type. Must be empty for "in" query type.
+ * If not empty, the header value has to match (case sensitive) this prefix.
+ * If not matched, JWT will not be extracted. If matched, JWT will be
+ * extracted after the prefix is removed.
+ * For example, for "Authorization: Bearer {JWT}",
+ * value_prefix="Bearer " with a space at the end.
+ *
+ * Generated from protobuf field string value_prefix = 3;
+ * @return string
+ */
+ public function getValuePrefix()
+ {
+ return $this->value_prefix;
+ }
+
+ /**
+ * The value prefix. The value format is "value_prefix{token}"
+ * Only applies to "in" header type. Must be empty for "in" query type.
+ * If not empty, the header value has to match (case sensitive) this prefix.
+ * If not matched, JWT will not be extracted. If matched, JWT will be
+ * extracted after the prefix is removed.
+ * For example, for "Authorization: Bearer {JWT}",
+ * value_prefix="Bearer " with a space at the end.
+ *
+ * Generated from protobuf field string value_prefix = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setValuePrefix($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->value_prefix = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getIn()
+ {
+ return $this->whichOneof("in");
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/LabelDescriptor.php b/tests/php_test_files/vendor/google/common-protos/src/Api/LabelDescriptor.php
new file mode 100644
index 0000000..67fa39a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/LabelDescriptor.php
@@ -0,0 +1,135 @@
+google.api.LabelDescriptor
+ */
+class LabelDescriptor extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The label key.
+ *
+ * Generated from protobuf field string key = 1;
+ */
+ protected $key = '';
+ /**
+ * The type of data that can be assigned to the label.
+ *
+ * Generated from protobuf field .google.api.LabelDescriptor.ValueType value_type = 2;
+ */
+ protected $value_type = 0;
+ /**
+ * A human-readable description for the label.
+ *
+ * Generated from protobuf field string description = 3;
+ */
+ protected $description = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $key
+ * The label key.
+ * @type int $value_type
+ * The type of data that can be assigned to the label.
+ * @type string $description
+ * A human-readable description for the label.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Label::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The label key.
+ *
+ * Generated from protobuf field string key = 1;
+ * @return string
+ */
+ public function getKey()
+ {
+ return $this->key;
+ }
+
+ /**
+ * The label key.
+ *
+ * Generated from protobuf field string key = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->key = $var;
+
+ return $this;
+ }
+
+ /**
+ * The type of data that can be assigned to the label.
+ *
+ * Generated from protobuf field .google.api.LabelDescriptor.ValueType value_type = 2;
+ * @return int
+ */
+ public function getValueType()
+ {
+ return $this->value_type;
+ }
+
+ /**
+ * The type of data that can be assigned to the label.
+ *
+ * Generated from protobuf field .google.api.LabelDescriptor.ValueType value_type = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setValueType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\LabelDescriptor\ValueType::class);
+ $this->value_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * A human-readable description for the label.
+ *
+ * Generated from protobuf field string description = 3;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * A human-readable description for the label.
+ *
+ * Generated from protobuf field string description = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/LabelDescriptor/ValueType.php b/tests/php_test_files/vendor/google/common-protos/src/Api/LabelDescriptor/ValueType.php
new file mode 100644
index 0000000..044b29d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/LabelDescriptor/ValueType.php
@@ -0,0 +1,62 @@
+google.api.LabelDescriptor.ValueType
+ */
+class ValueType
+{
+ /**
+ * A variable-length string. This is the default.
+ *
+ * Generated from protobuf enum STRING = 0;
+ */
+ const STRING = 0;
+ /**
+ * Boolean; true or false.
+ *
+ * Generated from protobuf enum BOOL = 1;
+ */
+ const BOOL = 1;
+ /**
+ * A 64-bit signed integer.
+ *
+ * Generated from protobuf enum INT64 = 2;
+ */
+ const INT64 = 2;
+
+ private static $valueToName = [
+ self::STRING => 'STRING',
+ self::BOOL => 'BOOL',
+ self::INT64 => 'INT64',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/LaunchStage.php b/tests/php_test_files/vendor/google/common-protos/src/Api/LaunchStage.php
new file mode 100644
index 0000000..766aa79
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/LaunchStage.php
@@ -0,0 +1,118 @@
+google.api.LaunchStage
+ */
+class LaunchStage
+{
+ /**
+ * Do not use this default value.
+ *
+ * Generated from protobuf enum LAUNCH_STAGE_UNSPECIFIED = 0;
+ */
+ const LAUNCH_STAGE_UNSPECIFIED = 0;
+ /**
+ * The feature is not yet implemented. Users can not use it.
+ *
+ * Generated from protobuf enum UNIMPLEMENTED = 6;
+ */
+ const UNIMPLEMENTED = 6;
+ /**
+ * Prelaunch features are hidden from users and are only visible internally.
+ *
+ * Generated from protobuf enum PRELAUNCH = 7;
+ */
+ const PRELAUNCH = 7;
+ /**
+ * Early Access features are limited to a closed group of testers. To use
+ * these features, you must sign up in advance and sign a Trusted Tester
+ * agreement (which includes confidentiality provisions). These features may
+ * be unstable, changed in backward-incompatible ways, and are not
+ * guaranteed to be released.
+ *
+ * Generated from protobuf enum EARLY_ACCESS = 1;
+ */
+ const EARLY_ACCESS = 1;
+ /**
+ * Alpha is a limited availability test for releases before they are cleared
+ * for widespread use. By Alpha, all significant design issues are resolved
+ * and we are in the process of verifying functionality. Alpha customers
+ * need to apply for access, agree to applicable terms, and have their
+ * projects allowlisted. Alpha releases don't have to be feature complete,
+ * no SLAs are provided, and there are no technical support obligations, but
+ * they will be far enough along that customers can actually use them in
+ * test environments or for limited-use tests -- just like they would in
+ * normal production cases.
+ *
+ * Generated from protobuf enum ALPHA = 2;
+ */
+ const ALPHA = 2;
+ /**
+ * Beta is the point at which we are ready to open a release for any
+ * customer to use. There are no SLA or technical support obligations in a
+ * Beta release. Products will be complete from a feature perspective, but
+ * may have some open outstanding issues. Beta releases are suitable for
+ * limited production use cases.
+ *
+ * Generated from protobuf enum BETA = 3;
+ */
+ const BETA = 3;
+ /**
+ * GA features are open to all developers and are considered stable and
+ * fully qualified for production use.
+ *
+ * Generated from protobuf enum GA = 4;
+ */
+ const GA = 4;
+ /**
+ * Deprecated features are scheduled to be shut down and removed. For more
+ * information, see the "Deprecation Policy" section of our [Terms of
+ * Service](https://cloud.google.com/terms/)
+ * and the [Google Cloud Platform Subject to the Deprecation
+ * Policy](https://cloud.google.com/terms/deprecation) documentation.
+ *
+ * Generated from protobuf enum DEPRECATED = 5;
+ */
+ const DEPRECATED = 5;
+
+ private static $valueToName = [
+ self::LAUNCH_STAGE_UNSPECIFIED => 'LAUNCH_STAGE_UNSPECIFIED',
+ self::UNIMPLEMENTED => 'UNIMPLEMENTED',
+ self::PRELAUNCH => 'PRELAUNCH',
+ self::EARLY_ACCESS => 'EARLY_ACCESS',
+ self::ALPHA => 'ALPHA',
+ self::BETA => 'BETA',
+ self::GA => 'GA',
+ self::DEPRECATED => 'DEPRECATED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/LogDescriptor.php b/tests/php_test_files/vendor/google/common-protos/src/Api/LogDescriptor.php
new file mode 100644
index 0000000..bb48558
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/LogDescriptor.php
@@ -0,0 +1,203 @@
+google.api.LogDescriptor
+ */
+class LogDescriptor extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The name of the log. It must be less than 512 characters long and can
+ * include the following characters: upper- and lower-case alphanumeric
+ * characters [A-Za-z0-9], and punctuation characters including
+ * slash, underscore, hyphen, period [/_-.].
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The set of labels that are available to describe a specific log entry.
+ * Runtime requests that contain labels not specified here are
+ * considered invalid.
+ *
+ * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 2;
+ */
+ private $labels;
+ /**
+ * A human-readable description of this log. This information appears in
+ * the documentation and can contain details.
+ *
+ * Generated from protobuf field string description = 3;
+ */
+ protected $description = '';
+ /**
+ * The human-readable name for this log. This information appears on
+ * the user interface and should be concise.
+ *
+ * Generated from protobuf field string display_name = 4;
+ */
+ protected $display_name = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The name of the log. It must be less than 512 characters long and can
+ * include the following characters: upper- and lower-case alphanumeric
+ * characters [A-Za-z0-9], and punctuation characters including
+ * slash, underscore, hyphen, period [/_-.].
+ * @type array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $labels
+ * The set of labels that are available to describe a specific log entry.
+ * Runtime requests that contain labels not specified here are
+ * considered invalid.
+ * @type string $description
+ * A human-readable description of this log. This information appears in
+ * the documentation and can contain details.
+ * @type string $display_name
+ * The human-readable name for this log. This information appears on
+ * the user interface and should be concise.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Log::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The name of the log. It must be less than 512 characters long and can
+ * include the following characters: upper- and lower-case alphanumeric
+ * characters [A-Za-z0-9], and punctuation characters including
+ * slash, underscore, hyphen, period [/_-.].
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The name of the log. It must be less than 512 characters long and can
+ * include the following characters: upper- and lower-case alphanumeric
+ * characters [A-Za-z0-9], and punctuation characters including
+ * slash, underscore, hyphen, period [/_-.].
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The set of labels that are available to describe a specific log entry.
+ * Runtime requests that contain labels not specified here are
+ * considered invalid.
+ *
+ * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * The set of labels that are available to describe a specific log entry.
+ * Runtime requests that contain labels not specified here are
+ * considered invalid.
+ *
+ * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 2;
+ * @param array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\LabelDescriptor::class);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A human-readable description of this log. This information appears in
+ * the documentation and can contain details.
+ *
+ * Generated from protobuf field string description = 3;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * A human-readable description of this log. This information appears in
+ * the documentation and can contain details.
+ *
+ * Generated from protobuf field string description = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * The human-readable name for this log. This information appears on
+ * the user interface and should be concise.
+ *
+ * Generated from protobuf field string display_name = 4;
+ * @return string
+ */
+ public function getDisplayName()
+ {
+ return $this->display_name;
+ }
+
+ /**
+ * The human-readable name for this log. This information appears on
+ * the user interface and should be concise.
+ *
+ * Generated from protobuf field string display_name = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Logging.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Logging.php
new file mode 100644
index 0000000..52198c1
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Logging.php
@@ -0,0 +1,151 @@
+google.api.Logging
+ */
+class Logging extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Logging configurations for sending logs to the producer project.
+ * There can be multiple producer destinations, each one must have a
+ * different monitored resource type. A log can be used in at most
+ * one producer destination.
+ *
+ * Generated from protobuf field repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
+ */
+ private $producer_destinations;
+ /**
+ * Logging configurations for sending logs to the consumer project.
+ * There can be multiple consumer destinations, each one must have a
+ * different monitored resource type. A log can be used in at most
+ * one consumer destination.
+ *
+ * Generated from protobuf field repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
+ */
+ private $consumer_destinations;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\Logging\LoggingDestination>|\Google\Protobuf\Internal\RepeatedField $producer_destinations
+ * Logging configurations for sending logs to the producer project.
+ * There can be multiple producer destinations, each one must have a
+ * different monitored resource type. A log can be used in at most
+ * one producer destination.
+ * @type array<\Google\Api\Logging\LoggingDestination>|\Google\Protobuf\Internal\RepeatedField $consumer_destinations
+ * Logging configurations for sending logs to the consumer project.
+ * There can be multiple consumer destinations, each one must have a
+ * different monitored resource type. A log can be used in at most
+ * one consumer destination.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Logging::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Logging configurations for sending logs to the producer project.
+ * There can be multiple producer destinations, each one must have a
+ * different monitored resource type. A log can be used in at most
+ * one producer destination.
+ *
+ * Generated from protobuf field repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getProducerDestinations()
+ {
+ return $this->producer_destinations;
+ }
+
+ /**
+ * Logging configurations for sending logs to the producer project.
+ * There can be multiple producer destinations, each one must have a
+ * different monitored resource type. A log can be used in at most
+ * one producer destination.
+ *
+ * Generated from protobuf field repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
+ * @param array<\Google\Api\Logging\LoggingDestination>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setProducerDestinations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Logging\LoggingDestination::class);
+ $this->producer_destinations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Logging configurations for sending logs to the consumer project.
+ * There can be multiple consumer destinations, each one must have a
+ * different monitored resource type. A log can be used in at most
+ * one consumer destination.
+ *
+ * Generated from protobuf field repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getConsumerDestinations()
+ {
+ return $this->consumer_destinations;
+ }
+
+ /**
+ * Logging configurations for sending logs to the consumer project.
+ * There can be multiple consumer destinations, each one must have a
+ * different monitored resource type. A log can be used in at most
+ * one consumer destination.
+ *
+ * Generated from protobuf field repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
+ * @param array<\Google\Api\Logging\LoggingDestination>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setConsumerDestinations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Logging\LoggingDestination::class);
+ $this->consumer_destinations = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Logging/LoggingDestination.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Logging/LoggingDestination.php
new file mode 100644
index 0000000..22d2e91
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Logging/LoggingDestination.php
@@ -0,0 +1,123 @@
+google.api.Logging.LoggingDestination
+ */
+class LoggingDestination extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The monitored resource type. The type must be defined in the
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ *
+ * Generated from protobuf field string monitored_resource = 3;
+ */
+ protected $monitored_resource = '';
+ /**
+ * Names of the logs to be sent to this destination. Each name must
+ * be defined in the [Service.logs][google.api.Service.logs] section. If the
+ * log name is not a domain scoped name, it will be automatically prefixed
+ * with the service name followed by "/".
+ *
+ * Generated from protobuf field repeated string logs = 1;
+ */
+ private $logs;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $monitored_resource
+ * The monitored resource type. The type must be defined in the
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $logs
+ * Names of the logs to be sent to this destination. Each name must
+ * be defined in the [Service.logs][google.api.Service.logs] section. If the
+ * log name is not a domain scoped name, it will be automatically prefixed
+ * with the service name followed by "/".
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Logging::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The monitored resource type. The type must be defined in the
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ *
+ * Generated from protobuf field string monitored_resource = 3;
+ * @return string
+ */
+ public function getMonitoredResource()
+ {
+ return $this->monitored_resource;
+ }
+
+ /**
+ * The monitored resource type. The type must be defined in the
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ *
+ * Generated from protobuf field string monitored_resource = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setMonitoredResource($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->monitored_resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * Names of the logs to be sent to this destination. Each name must
+ * be defined in the [Service.logs][google.api.Service.logs] section. If the
+ * log name is not a domain scoped name, it will be automatically prefixed
+ * with the service name followed by "/".
+ *
+ * Generated from protobuf field repeated string logs = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLogs()
+ {
+ return $this->logs;
+ }
+
+ /**
+ * Names of the logs to be sent to this destination. Each name must
+ * be defined in the [Service.logs][google.api.Service.logs] section. If the
+ * log name is not a domain scoped name, it will be automatically prefixed
+ * with the service name followed by "/".
+ *
+ * Generated from protobuf field repeated string logs = 1;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLogs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->logs = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MethodPolicy.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MethodPolicy.php
new file mode 100644
index 0000000..faeb40a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MethodPolicy.php
@@ -0,0 +1,121 @@
+google.api.MethodPolicy
+ */
+class MethodPolicy extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Selects a method to which these policies should be enforced, for example,
+ * "google.pubsub.v1.Subscriber.CreateSubscription".
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * NOTE: This field must not be set in the proto annotation. It will be
+ * automatically filled by the service config compiler .
+ *
+ * Generated from protobuf field string selector = 9;
+ */
+ protected $selector = '';
+ /**
+ * Policies that are applicable to the request message.
+ *
+ * Generated from protobuf field repeated .google.api.FieldPolicy request_policies = 2;
+ */
+ private $request_policies;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * Selects a method to which these policies should be enforced, for example,
+ * "google.pubsub.v1.Subscriber.CreateSubscription".
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * NOTE: This field must not be set in the proto annotation. It will be
+ * automatically filled by the service config compiler .
+ * @type array<\Google\Api\FieldPolicy>|\Google\Protobuf\Internal\RepeatedField $request_policies
+ * Policies that are applicable to the request message.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Policy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Selects a method to which these policies should be enforced, for example,
+ * "google.pubsub.v1.Subscriber.CreateSubscription".
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * NOTE: This field must not be set in the proto annotation. It will be
+ * automatically filled by the service config compiler .
+ *
+ * Generated from protobuf field string selector = 9;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * Selects a method to which these policies should be enforced, for example,
+ * "google.pubsub.v1.Subscriber.CreateSubscription".
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * NOTE: This field must not be set in the proto annotation. It will be
+ * automatically filled by the service config compiler .
+ *
+ * Generated from protobuf field string selector = 9;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * Policies that are applicable to the request message.
+ *
+ * Generated from protobuf field repeated .google.api.FieldPolicy request_policies = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRequestPolicies()
+ {
+ return $this->request_policies;
+ }
+
+ /**
+ * Policies that are applicable to the request message.
+ *
+ * Generated from protobuf field repeated .google.api.FieldPolicy request_policies = 2;
+ * @param array<\Google\Api\FieldPolicy>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRequestPolicies($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\FieldPolicy::class);
+ $this->request_policies = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MethodSettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MethodSettings.php
new file mode 100644
index 0000000..0e95d50
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MethodSettings.php
@@ -0,0 +1,245 @@
+google.api.MethodSettings
+ */
+class MethodSettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The fully qualified name of the method, for which the options below apply.
+ * This is used to find the method to apply the options.
+ * Example:
+ * publishing:
+ * method_settings:
+ * - selector: google.storage.control.v2.StorageControl.CreateFolder
+ * # method settings for CreateFolder...
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * Describes settings to use for long-running operations when generating
+ * API methods for RPCs. Complements RPCs that use the annotations in
+ * google/longrunning/operations.proto.
+ * Example of a YAML configuration::
+ * publishing:
+ * method_settings:
+ * - selector: google.cloud.speech.v2.Speech.BatchRecognize
+ * long_running:
+ * initial_poll_delay: 60s # 1 minute
+ * poll_delay_multiplier: 1.5
+ * max_poll_delay: 360s # 6 minutes
+ * total_poll_timeout: 54000s # 90 minutes
+ *
+ * Generated from protobuf field .google.api.MethodSettings.LongRunning long_running = 2;
+ */
+ protected $long_running = null;
+ /**
+ * List of top-level fields of the request message, that should be
+ * automatically populated by the client libraries based on their
+ * (google.api.field_info).format. Currently supported format: UUID4.
+ * Example of a YAML configuration:
+ * publishing:
+ * method_settings:
+ * - selector: google.example.v1.ExampleService.CreateExample
+ * auto_populated_fields:
+ * - request_id
+ *
+ * Generated from protobuf field repeated string auto_populated_fields = 3;
+ */
+ private $auto_populated_fields;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * The fully qualified name of the method, for which the options below apply.
+ * This is used to find the method to apply the options.
+ * Example:
+ * publishing:
+ * method_settings:
+ * - selector: google.storage.control.v2.StorageControl.CreateFolder
+ * # method settings for CreateFolder...
+ * @type \Google\Api\MethodSettings\LongRunning $long_running
+ * Describes settings to use for long-running operations when generating
+ * API methods for RPCs. Complements RPCs that use the annotations in
+ * google/longrunning/operations.proto.
+ * Example of a YAML configuration::
+ * publishing:
+ * method_settings:
+ * - selector: google.cloud.speech.v2.Speech.BatchRecognize
+ * long_running:
+ * initial_poll_delay: 60s # 1 minute
+ * poll_delay_multiplier: 1.5
+ * max_poll_delay: 360s # 6 minutes
+ * total_poll_timeout: 54000s # 90 minutes
+ * @type array|\Google\Protobuf\Internal\RepeatedField $auto_populated_fields
+ * List of top-level fields of the request message, that should be
+ * automatically populated by the client libraries based on their
+ * (google.api.field_info).format. Currently supported format: UUID4.
+ * Example of a YAML configuration:
+ * publishing:
+ * method_settings:
+ * - selector: google.example.v1.ExampleService.CreateExample
+ * auto_populated_fields:
+ * - request_id
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The fully qualified name of the method, for which the options below apply.
+ * This is used to find the method to apply the options.
+ * Example:
+ * publishing:
+ * method_settings:
+ * - selector: google.storage.control.v2.StorageControl.CreateFolder
+ * # method settings for CreateFolder...
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * The fully qualified name of the method, for which the options below apply.
+ * This is used to find the method to apply the options.
+ * Example:
+ * publishing:
+ * method_settings:
+ * - selector: google.storage.control.v2.StorageControl.CreateFolder
+ * # method settings for CreateFolder...
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * Describes settings to use for long-running operations when generating
+ * API methods for RPCs. Complements RPCs that use the annotations in
+ * google/longrunning/operations.proto.
+ * Example of a YAML configuration::
+ * publishing:
+ * method_settings:
+ * - selector: google.cloud.speech.v2.Speech.BatchRecognize
+ * long_running:
+ * initial_poll_delay: 60s # 1 minute
+ * poll_delay_multiplier: 1.5
+ * max_poll_delay: 360s # 6 minutes
+ * total_poll_timeout: 54000s # 90 minutes
+ *
+ * Generated from protobuf field .google.api.MethodSettings.LongRunning long_running = 2;
+ * @return \Google\Api\MethodSettings\LongRunning|null
+ */
+ public function getLongRunning()
+ {
+ return $this->long_running;
+ }
+
+ public function hasLongRunning()
+ {
+ return isset($this->long_running);
+ }
+
+ public function clearLongRunning()
+ {
+ unset($this->long_running);
+ }
+
+ /**
+ * Describes settings to use for long-running operations when generating
+ * API methods for RPCs. Complements RPCs that use the annotations in
+ * google/longrunning/operations.proto.
+ * Example of a YAML configuration::
+ * publishing:
+ * method_settings:
+ * - selector: google.cloud.speech.v2.Speech.BatchRecognize
+ * long_running:
+ * initial_poll_delay: 60s # 1 minute
+ * poll_delay_multiplier: 1.5
+ * max_poll_delay: 360s # 6 minutes
+ * total_poll_timeout: 54000s # 90 minutes
+ *
+ * Generated from protobuf field .google.api.MethodSettings.LongRunning long_running = 2;
+ * @param \Google\Api\MethodSettings\LongRunning $var
+ * @return $this
+ */
+ public function setLongRunning($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\MethodSettings\LongRunning::class);
+ $this->long_running = $var;
+
+ return $this;
+ }
+
+ /**
+ * List of top-level fields of the request message, that should be
+ * automatically populated by the client libraries based on their
+ * (google.api.field_info).format. Currently supported format: UUID4.
+ * Example of a YAML configuration:
+ * publishing:
+ * method_settings:
+ * - selector: google.example.v1.ExampleService.CreateExample
+ * auto_populated_fields:
+ * - request_id
+ *
+ * Generated from protobuf field repeated string auto_populated_fields = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAutoPopulatedFields()
+ {
+ return $this->auto_populated_fields;
+ }
+
+ /**
+ * List of top-level fields of the request message, that should be
+ * automatically populated by the client libraries based on their
+ * (google.api.field_info).format. Currently supported format: UUID4.
+ * Example of a YAML configuration:
+ * publishing:
+ * method_settings:
+ * - selector: google.example.v1.ExampleService.CreateExample
+ * auto_populated_fields:
+ * - request_id
+ *
+ * Generated from protobuf field repeated string auto_populated_fields = 3;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAutoPopulatedFields($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->auto_populated_fields = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MethodSettings/LongRunning.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MethodSettings/LongRunning.php
new file mode 100644
index 0000000..eba2265
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MethodSettings/LongRunning.php
@@ -0,0 +1,224 @@
+google.api.MethodSettings.LongRunning
+ */
+class LongRunning extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Initial delay after which the first poll request will be made.
+ * Default value: 5 seconds.
+ *
+ * Generated from protobuf field .google.protobuf.Duration initial_poll_delay = 1;
+ */
+ protected $initial_poll_delay = null;
+ /**
+ * Multiplier to gradually increase delay between subsequent polls until it
+ * reaches max_poll_delay.
+ * Default value: 1.5.
+ *
+ * Generated from protobuf field float poll_delay_multiplier = 2;
+ */
+ protected $poll_delay_multiplier = 0.0;
+ /**
+ * Maximum time between two subsequent poll requests.
+ * Default value: 45 seconds.
+ *
+ * Generated from protobuf field .google.protobuf.Duration max_poll_delay = 3;
+ */
+ protected $max_poll_delay = null;
+ /**
+ * Total polling timeout.
+ * Default value: 5 minutes.
+ *
+ * Generated from protobuf field .google.protobuf.Duration total_poll_timeout = 4;
+ */
+ protected $total_poll_timeout = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Duration $initial_poll_delay
+ * Initial delay after which the first poll request will be made.
+ * Default value: 5 seconds.
+ * @type float $poll_delay_multiplier
+ * Multiplier to gradually increase delay between subsequent polls until it
+ * reaches max_poll_delay.
+ * Default value: 1.5.
+ * @type \Google\Protobuf\Duration $max_poll_delay
+ * Maximum time between two subsequent poll requests.
+ * Default value: 45 seconds.
+ * @type \Google\Protobuf\Duration $total_poll_timeout
+ * Total polling timeout.
+ * Default value: 5 minutes.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Initial delay after which the first poll request will be made.
+ * Default value: 5 seconds.
+ *
+ * Generated from protobuf field .google.protobuf.Duration initial_poll_delay = 1;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getInitialPollDelay()
+ {
+ return $this->initial_poll_delay;
+ }
+
+ public function hasInitialPollDelay()
+ {
+ return isset($this->initial_poll_delay);
+ }
+
+ public function clearInitialPollDelay()
+ {
+ unset($this->initial_poll_delay);
+ }
+
+ /**
+ * Initial delay after which the first poll request will be made.
+ * Default value: 5 seconds.
+ *
+ * Generated from protobuf field .google.protobuf.Duration initial_poll_delay = 1;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setInitialPollDelay($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->initial_poll_delay = $var;
+
+ return $this;
+ }
+
+ /**
+ * Multiplier to gradually increase delay between subsequent polls until it
+ * reaches max_poll_delay.
+ * Default value: 1.5.
+ *
+ * Generated from protobuf field float poll_delay_multiplier = 2;
+ * @return float
+ */
+ public function getPollDelayMultiplier()
+ {
+ return $this->poll_delay_multiplier;
+ }
+
+ /**
+ * Multiplier to gradually increase delay between subsequent polls until it
+ * reaches max_poll_delay.
+ * Default value: 1.5.
+ *
+ * Generated from protobuf field float poll_delay_multiplier = 2;
+ * @param float $var
+ * @return $this
+ */
+ public function setPollDelayMultiplier($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->poll_delay_multiplier = $var;
+
+ return $this;
+ }
+
+ /**
+ * Maximum time between two subsequent poll requests.
+ * Default value: 45 seconds.
+ *
+ * Generated from protobuf field .google.protobuf.Duration max_poll_delay = 3;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getMaxPollDelay()
+ {
+ return $this->max_poll_delay;
+ }
+
+ public function hasMaxPollDelay()
+ {
+ return isset($this->max_poll_delay);
+ }
+
+ public function clearMaxPollDelay()
+ {
+ unset($this->max_poll_delay);
+ }
+
+ /**
+ * Maximum time between two subsequent poll requests.
+ * Default value: 45 seconds.
+ *
+ * Generated from protobuf field .google.protobuf.Duration max_poll_delay = 3;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setMaxPollDelay($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->max_poll_delay = $var;
+
+ return $this;
+ }
+
+ /**
+ * Total polling timeout.
+ * Default value: 5 minutes.
+ *
+ * Generated from protobuf field .google.protobuf.Duration total_poll_timeout = 4;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getTotalPollTimeout()
+ {
+ return $this->total_poll_timeout;
+ }
+
+ public function hasTotalPollTimeout()
+ {
+ return isset($this->total_poll_timeout);
+ }
+
+ public function clearTotalPollTimeout()
+ {
+ unset($this->total_poll_timeout);
+ }
+
+ /**
+ * Total polling timeout.
+ * Default value: 5 minutes.
+ *
+ * Generated from protobuf field .google.protobuf.Duration total_poll_timeout = 4;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setTotalPollTimeout($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->total_poll_timeout = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Metric.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Metric.php
new file mode 100644
index 0000000..488552f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Metric.php
@@ -0,0 +1,114 @@
+google.api.Metric
+ */
+class Metric extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An existing metric type, see
+ * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+ * `custom.googleapis.com/invoice/paid/amount`.
+ *
+ * Generated from protobuf field string type = 3;
+ */
+ protected $type = '';
+ /**
+ * The set of label values that uniquely identify this metric. All
+ * labels listed in the `MetricDescriptor` must be assigned values.
+ *
+ * Generated from protobuf field map labels = 2;
+ */
+ private $labels;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $type
+ * An existing metric type, see
+ * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+ * `custom.googleapis.com/invoice/paid/amount`.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * The set of label values that uniquely identify this metric. All
+ * labels listed in the `MetricDescriptor` must be assigned values.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Metric::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An existing metric type, see
+ * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+ * `custom.googleapis.com/invoice/paid/amount`.
+ *
+ * Generated from protobuf field string type = 3;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * An existing metric type, see
+ * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+ * `custom.googleapis.com/invoice/paid/amount`.
+ *
+ * Generated from protobuf field string type = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The set of label values that uniquely identify this metric. All
+ * labels listed in the `MetricDescriptor` must be assigned values.
+ *
+ * Generated from protobuf field map labels = 2;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * The set of label values that uniquely identify this metric. All
+ * labels listed in the `MetricDescriptor` must be assigned values.
+ *
+ * Generated from protobuf field map labels = 2;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor.php
new file mode 100644
index 0000000..b8a39d6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor.php
@@ -0,0 +1,831 @@
+google.api.MetricDescriptor
+ */
+class MetricDescriptor extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The resource name of the metric descriptor.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The metric type, including its DNS name prefix. The type is not
+ * URL-encoded. All user-defined metric types have the DNS name
+ * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+ * use a natural hierarchical grouping. For example:
+ * "custom.googleapis.com/invoice/paid/amount"
+ * "external.googleapis.com/prometheus/up"
+ * "appengine.googleapis.com/http/server/response_latencies"
+ *
+ * Generated from protobuf field string type = 8;
+ */
+ protected $type = '';
+ /**
+ * The set of labels that can be used to describe a specific
+ * instance of this metric type. For example, the
+ * `appengine.googleapis.com/http/server/response_latencies` metric
+ * type has a label for the HTTP response code, `response_code`, so
+ * you can look at latencies for successful responses or just
+ * for responses that failed.
+ *
+ * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 2;
+ */
+ private $labels;
+ /**
+ * Whether the metric records instantaneous values, changes to a value, etc.
+ * Some combinations of `metric_kind` and `value_type` might not be supported.
+ *
+ * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3;
+ */
+ protected $metric_kind = 0;
+ /**
+ * Whether the measurement is an integer, a floating-point number, etc.
+ * Some combinations of `metric_kind` and `value_type` might not be supported.
+ *
+ * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 4;
+ */
+ protected $value_type = 0;
+ /**
+ * The units in which the metric value is reported. It is only applicable
+ * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+ * defines the representation of the stored metric values.
+ * Different systems might scale the values to be more easily displayed (so a
+ * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+ * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+ * `kBy`, then the value of the metric is always in thousands of bytes, no
+ * matter how it might be displayed.
+ * If you want a custom metric to record the exact number of CPU-seconds used
+ * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+ * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+ * CPU-seconds, then the value is written as `12005`.
+ * Alternatively, if you want a custom metric to record data in a more
+ * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+ * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+ * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+ * The supported units are a subset of [The Unified Code for Units of
+ * Measure](https://unitsofmeasure.org/ucum.html) standard:
+ * **Basic units (UNIT)**
+ * * `bit` bit
+ * * `By` byte
+ * * `s` second
+ * * `min` minute
+ * * `h` hour
+ * * `d` day
+ * * `1` dimensionless
+ * **Prefixes (PREFIX)**
+ * * `k` kilo (10^3)
+ * * `M` mega (10^6)
+ * * `G` giga (10^9)
+ * * `T` tera (10^12)
+ * * `P` peta (10^15)
+ * * `E` exa (10^18)
+ * * `Z` zetta (10^21)
+ * * `Y` yotta (10^24)
+ * * `m` milli (10^-3)
+ * * `u` micro (10^-6)
+ * * `n` nano (10^-9)
+ * * `p` pico (10^-12)
+ * * `f` femto (10^-15)
+ * * `a` atto (10^-18)
+ * * `z` zepto (10^-21)
+ * * `y` yocto (10^-24)
+ * * `Ki` kibi (2^10)
+ * * `Mi` mebi (2^20)
+ * * `Gi` gibi (2^30)
+ * * `Ti` tebi (2^40)
+ * * `Pi` pebi (2^50)
+ * **Grammar**
+ * The grammar also includes these connectors:
+ * * `/` division or ratio (as an infix operator). For examples,
+ * `kBy/{email}` or `MiBy/10ms` (although you should almost never
+ * have `/s` in a metric `unit`; rates should always be computed at
+ * query time from the underlying cumulative or delta value).
+ * * `.` multiplication or composition (as an infix operator). For
+ * examples, `GBy.d` or `k{watt}.h`.
+ * The grammar for a unit is as follows:
+ * Expression = Component { "." Component } { "/" Component } ;
+ * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+ * | Annotation
+ * | "1"
+ * ;
+ * Annotation = "{" NAME "}" ;
+ * Notes:
+ * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+ * is used alone, then the unit is equivalent to `1`. For examples,
+ * `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+ * * `NAME` is a sequence of non-blank printable ASCII characters not
+ * containing `{` or `}`.
+ * * `1` represents a unitary [dimensionless
+ * unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+ * as in `1/s`. It is typically used when none of the basic units are
+ * appropriate. For example, "new users per day" can be represented as
+ * `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+ * users). Alternatively, "thousands of page views per day" would be
+ * represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+ * value of `5.3` would mean "5300 page views per day").
+ * * `%` represents dimensionless value of 1/100, and annotates values giving
+ * a percentage (so the metric values are typically in the range of 0..100,
+ * and a metric value `3` means "3 percent").
+ * * `10^2.%` indicates a metric contains a ratio, typically in the range
+ * 0..1, that will be multiplied by 100 and displayed as a percentage
+ * (so a metric value `0.03` means "3 percent").
+ *
+ * Generated from protobuf field string unit = 5;
+ */
+ protected $unit = '';
+ /**
+ * A detailed description of the metric, which can be used in documentation.
+ *
+ * Generated from protobuf field string description = 6;
+ */
+ protected $description = '';
+ /**
+ * A concise name for the metric, which can be displayed in user interfaces.
+ * Use sentence case without an ending period, for example "Request count".
+ * This field is optional but it is recommended to be set for any metrics
+ * associated with user-visible concepts, such as Quota.
+ *
+ * Generated from protobuf field string display_name = 7;
+ */
+ protected $display_name = '';
+ /**
+ * Optional. Metadata which can be used to guide usage of the metric.
+ *
+ * Generated from protobuf field .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10;
+ */
+ protected $metadata = null;
+ /**
+ * Optional. The launch stage of the metric definition.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 12;
+ */
+ protected $launch_stage = 0;
+ /**
+ * Read-only. If present, then a [time
+ * series][google.monitoring.v3.TimeSeries], which is identified partially by
+ * a metric type and a
+ * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+ * is associated with this metric type can only be associated with one of the
+ * monitored resource types listed here.
+ *
+ * Generated from protobuf field repeated string monitored_resource_types = 13;
+ */
+ private $monitored_resource_types;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The resource name of the metric descriptor.
+ * @type string $type
+ * The metric type, including its DNS name prefix. The type is not
+ * URL-encoded. All user-defined metric types have the DNS name
+ * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+ * use a natural hierarchical grouping. For example:
+ * "custom.googleapis.com/invoice/paid/amount"
+ * "external.googleapis.com/prometheus/up"
+ * "appengine.googleapis.com/http/server/response_latencies"
+ * @type array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $labels
+ * The set of labels that can be used to describe a specific
+ * instance of this metric type. For example, the
+ * `appengine.googleapis.com/http/server/response_latencies` metric
+ * type has a label for the HTTP response code, `response_code`, so
+ * you can look at latencies for successful responses or just
+ * for responses that failed.
+ * @type int $metric_kind
+ * Whether the metric records instantaneous values, changes to a value, etc.
+ * Some combinations of `metric_kind` and `value_type` might not be supported.
+ * @type int $value_type
+ * Whether the measurement is an integer, a floating-point number, etc.
+ * Some combinations of `metric_kind` and `value_type` might not be supported.
+ * @type string $unit
+ * The units in which the metric value is reported. It is only applicable
+ * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+ * defines the representation of the stored metric values.
+ * Different systems might scale the values to be more easily displayed (so a
+ * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+ * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+ * `kBy`, then the value of the metric is always in thousands of bytes, no
+ * matter how it might be displayed.
+ * If you want a custom metric to record the exact number of CPU-seconds used
+ * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+ * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+ * CPU-seconds, then the value is written as `12005`.
+ * Alternatively, if you want a custom metric to record data in a more
+ * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+ * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+ * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+ * The supported units are a subset of [The Unified Code for Units of
+ * Measure](https://unitsofmeasure.org/ucum.html) standard:
+ * **Basic units (UNIT)**
+ * * `bit` bit
+ * * `By` byte
+ * * `s` second
+ * * `min` minute
+ * * `h` hour
+ * * `d` day
+ * * `1` dimensionless
+ * **Prefixes (PREFIX)**
+ * * `k` kilo (10^3)
+ * * `M` mega (10^6)
+ * * `G` giga (10^9)
+ * * `T` tera (10^12)
+ * * `P` peta (10^15)
+ * * `E` exa (10^18)
+ * * `Z` zetta (10^21)
+ * * `Y` yotta (10^24)
+ * * `m` milli (10^-3)
+ * * `u` micro (10^-6)
+ * * `n` nano (10^-9)
+ * * `p` pico (10^-12)
+ * * `f` femto (10^-15)
+ * * `a` atto (10^-18)
+ * * `z` zepto (10^-21)
+ * * `y` yocto (10^-24)
+ * * `Ki` kibi (2^10)
+ * * `Mi` mebi (2^20)
+ * * `Gi` gibi (2^30)
+ * * `Ti` tebi (2^40)
+ * * `Pi` pebi (2^50)
+ * **Grammar**
+ * The grammar also includes these connectors:
+ * * `/` division or ratio (as an infix operator). For examples,
+ * `kBy/{email}` or `MiBy/10ms` (although you should almost never
+ * have `/s` in a metric `unit`; rates should always be computed at
+ * query time from the underlying cumulative or delta value).
+ * * `.` multiplication or composition (as an infix operator). For
+ * examples, `GBy.d` or `k{watt}.h`.
+ * The grammar for a unit is as follows:
+ * Expression = Component { "." Component } { "/" Component } ;
+ * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+ * | Annotation
+ * | "1"
+ * ;
+ * Annotation = "{" NAME "}" ;
+ * Notes:
+ * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+ * is used alone, then the unit is equivalent to `1`. For examples,
+ * `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+ * * `NAME` is a sequence of non-blank printable ASCII characters not
+ * containing `{` or `}`.
+ * * `1` represents a unitary [dimensionless
+ * unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+ * as in `1/s`. It is typically used when none of the basic units are
+ * appropriate. For example, "new users per day" can be represented as
+ * `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+ * users). Alternatively, "thousands of page views per day" would be
+ * represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+ * value of `5.3` would mean "5300 page views per day").
+ * * `%` represents dimensionless value of 1/100, and annotates values giving
+ * a percentage (so the metric values are typically in the range of 0..100,
+ * and a metric value `3` means "3 percent").
+ * * `10^2.%` indicates a metric contains a ratio, typically in the range
+ * 0..1, that will be multiplied by 100 and displayed as a percentage
+ * (so a metric value `0.03` means "3 percent").
+ * @type string $description
+ * A detailed description of the metric, which can be used in documentation.
+ * @type string $display_name
+ * A concise name for the metric, which can be displayed in user interfaces.
+ * Use sentence case without an ending period, for example "Request count".
+ * This field is optional but it is recommended to be set for any metrics
+ * associated with user-visible concepts, such as Quota.
+ * @type \Google\Api\MetricDescriptor\MetricDescriptorMetadata $metadata
+ * Optional. Metadata which can be used to guide usage of the metric.
+ * @type int $launch_stage
+ * Optional. The launch stage of the metric definition.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $monitored_resource_types
+ * Read-only. If present, then a [time
+ * series][google.monitoring.v3.TimeSeries], which is identified partially by
+ * a metric type and a
+ * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+ * is associated with this metric type can only be associated with one of the
+ * monitored resource types listed here.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Metric::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The resource name of the metric descriptor.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The resource name of the metric descriptor.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The metric type, including its DNS name prefix. The type is not
+ * URL-encoded. All user-defined metric types have the DNS name
+ * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+ * use a natural hierarchical grouping. For example:
+ * "custom.googleapis.com/invoice/paid/amount"
+ * "external.googleapis.com/prometheus/up"
+ * "appengine.googleapis.com/http/server/response_latencies"
+ *
+ * Generated from protobuf field string type = 8;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * The metric type, including its DNS name prefix. The type is not
+ * URL-encoded. All user-defined metric types have the DNS name
+ * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+ * use a natural hierarchical grouping. For example:
+ * "custom.googleapis.com/invoice/paid/amount"
+ * "external.googleapis.com/prometheus/up"
+ * "appengine.googleapis.com/http/server/response_latencies"
+ *
+ * Generated from protobuf field string type = 8;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The set of labels that can be used to describe a specific
+ * instance of this metric type. For example, the
+ * `appengine.googleapis.com/http/server/response_latencies` metric
+ * type has a label for the HTTP response code, `response_code`, so
+ * you can look at latencies for successful responses or just
+ * for responses that failed.
+ *
+ * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * The set of labels that can be used to describe a specific
+ * instance of this metric type. For example, the
+ * `appengine.googleapis.com/http/server/response_latencies` metric
+ * type has a label for the HTTP response code, `response_code`, so
+ * you can look at latencies for successful responses or just
+ * for responses that failed.
+ *
+ * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 2;
+ * @param array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\LabelDescriptor::class);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Whether the metric records instantaneous values, changes to a value, etc.
+ * Some combinations of `metric_kind` and `value_type` might not be supported.
+ *
+ * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3;
+ * @return int
+ */
+ public function getMetricKind()
+ {
+ return $this->metric_kind;
+ }
+
+ /**
+ * Whether the metric records instantaneous values, changes to a value, etc.
+ * Some combinations of `metric_kind` and `value_type` might not be supported.
+ *
+ * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3;
+ * @param int $var
+ * @return $this
+ */
+ public function setMetricKind($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\MetricKind::class);
+ $this->metric_kind = $var;
+
+ return $this;
+ }
+
+ /**
+ * Whether the measurement is an integer, a floating-point number, etc.
+ * Some combinations of `metric_kind` and `value_type` might not be supported.
+ *
+ * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 4;
+ * @return int
+ */
+ public function getValueType()
+ {
+ return $this->value_type;
+ }
+
+ /**
+ * Whether the measurement is an integer, a floating-point number, etc.
+ * Some combinations of `metric_kind` and `value_type` might not be supported.
+ *
+ * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 4;
+ * @param int $var
+ * @return $this
+ */
+ public function setValueType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\ValueType::class);
+ $this->value_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The units in which the metric value is reported. It is only applicable
+ * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+ * defines the representation of the stored metric values.
+ * Different systems might scale the values to be more easily displayed (so a
+ * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+ * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+ * `kBy`, then the value of the metric is always in thousands of bytes, no
+ * matter how it might be displayed.
+ * If you want a custom metric to record the exact number of CPU-seconds used
+ * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+ * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+ * CPU-seconds, then the value is written as `12005`.
+ * Alternatively, if you want a custom metric to record data in a more
+ * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+ * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+ * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+ * The supported units are a subset of [The Unified Code for Units of
+ * Measure](https://unitsofmeasure.org/ucum.html) standard:
+ * **Basic units (UNIT)**
+ * * `bit` bit
+ * * `By` byte
+ * * `s` second
+ * * `min` minute
+ * * `h` hour
+ * * `d` day
+ * * `1` dimensionless
+ * **Prefixes (PREFIX)**
+ * * `k` kilo (10^3)
+ * * `M` mega (10^6)
+ * * `G` giga (10^9)
+ * * `T` tera (10^12)
+ * * `P` peta (10^15)
+ * * `E` exa (10^18)
+ * * `Z` zetta (10^21)
+ * * `Y` yotta (10^24)
+ * * `m` milli (10^-3)
+ * * `u` micro (10^-6)
+ * * `n` nano (10^-9)
+ * * `p` pico (10^-12)
+ * * `f` femto (10^-15)
+ * * `a` atto (10^-18)
+ * * `z` zepto (10^-21)
+ * * `y` yocto (10^-24)
+ * * `Ki` kibi (2^10)
+ * * `Mi` mebi (2^20)
+ * * `Gi` gibi (2^30)
+ * * `Ti` tebi (2^40)
+ * * `Pi` pebi (2^50)
+ * **Grammar**
+ * The grammar also includes these connectors:
+ * * `/` division or ratio (as an infix operator). For examples,
+ * `kBy/{email}` or `MiBy/10ms` (although you should almost never
+ * have `/s` in a metric `unit`; rates should always be computed at
+ * query time from the underlying cumulative or delta value).
+ * * `.` multiplication or composition (as an infix operator). For
+ * examples, `GBy.d` or `k{watt}.h`.
+ * The grammar for a unit is as follows:
+ * Expression = Component { "." Component } { "/" Component } ;
+ * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+ * | Annotation
+ * | "1"
+ * ;
+ * Annotation = "{" NAME "}" ;
+ * Notes:
+ * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+ * is used alone, then the unit is equivalent to `1`. For examples,
+ * `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+ * * `NAME` is a sequence of non-blank printable ASCII characters not
+ * containing `{` or `}`.
+ * * `1` represents a unitary [dimensionless
+ * unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+ * as in `1/s`. It is typically used when none of the basic units are
+ * appropriate. For example, "new users per day" can be represented as
+ * `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+ * users). Alternatively, "thousands of page views per day" would be
+ * represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+ * value of `5.3` would mean "5300 page views per day").
+ * * `%` represents dimensionless value of 1/100, and annotates values giving
+ * a percentage (so the metric values are typically in the range of 0..100,
+ * and a metric value `3` means "3 percent").
+ * * `10^2.%` indicates a metric contains a ratio, typically in the range
+ * 0..1, that will be multiplied by 100 and displayed as a percentage
+ * (so a metric value `0.03` means "3 percent").
+ *
+ * Generated from protobuf field string unit = 5;
+ * @return string
+ */
+ public function getUnit()
+ {
+ return $this->unit;
+ }
+
+ /**
+ * The units in which the metric value is reported. It is only applicable
+ * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+ * defines the representation of the stored metric values.
+ * Different systems might scale the values to be more easily displayed (so a
+ * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+ * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+ * `kBy`, then the value of the metric is always in thousands of bytes, no
+ * matter how it might be displayed.
+ * If you want a custom metric to record the exact number of CPU-seconds used
+ * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+ * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+ * CPU-seconds, then the value is written as `12005`.
+ * Alternatively, if you want a custom metric to record data in a more
+ * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+ * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+ * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+ * The supported units are a subset of [The Unified Code for Units of
+ * Measure](https://unitsofmeasure.org/ucum.html) standard:
+ * **Basic units (UNIT)**
+ * * `bit` bit
+ * * `By` byte
+ * * `s` second
+ * * `min` minute
+ * * `h` hour
+ * * `d` day
+ * * `1` dimensionless
+ * **Prefixes (PREFIX)**
+ * * `k` kilo (10^3)
+ * * `M` mega (10^6)
+ * * `G` giga (10^9)
+ * * `T` tera (10^12)
+ * * `P` peta (10^15)
+ * * `E` exa (10^18)
+ * * `Z` zetta (10^21)
+ * * `Y` yotta (10^24)
+ * * `m` milli (10^-3)
+ * * `u` micro (10^-6)
+ * * `n` nano (10^-9)
+ * * `p` pico (10^-12)
+ * * `f` femto (10^-15)
+ * * `a` atto (10^-18)
+ * * `z` zepto (10^-21)
+ * * `y` yocto (10^-24)
+ * * `Ki` kibi (2^10)
+ * * `Mi` mebi (2^20)
+ * * `Gi` gibi (2^30)
+ * * `Ti` tebi (2^40)
+ * * `Pi` pebi (2^50)
+ * **Grammar**
+ * The grammar also includes these connectors:
+ * * `/` division or ratio (as an infix operator). For examples,
+ * `kBy/{email}` or `MiBy/10ms` (although you should almost never
+ * have `/s` in a metric `unit`; rates should always be computed at
+ * query time from the underlying cumulative or delta value).
+ * * `.` multiplication or composition (as an infix operator). For
+ * examples, `GBy.d` or `k{watt}.h`.
+ * The grammar for a unit is as follows:
+ * Expression = Component { "." Component } { "/" Component } ;
+ * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+ * | Annotation
+ * | "1"
+ * ;
+ * Annotation = "{" NAME "}" ;
+ * Notes:
+ * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+ * is used alone, then the unit is equivalent to `1`. For examples,
+ * `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+ * * `NAME` is a sequence of non-blank printable ASCII characters not
+ * containing `{` or `}`.
+ * * `1` represents a unitary [dimensionless
+ * unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+ * as in `1/s`. It is typically used when none of the basic units are
+ * appropriate. For example, "new users per day" can be represented as
+ * `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+ * users). Alternatively, "thousands of page views per day" would be
+ * represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+ * value of `5.3` would mean "5300 page views per day").
+ * * `%` represents dimensionless value of 1/100, and annotates values giving
+ * a percentage (so the metric values are typically in the range of 0..100,
+ * and a metric value `3` means "3 percent").
+ * * `10^2.%` indicates a metric contains a ratio, typically in the range
+ * 0..1, that will be multiplied by 100 and displayed as a percentage
+ * (so a metric value `0.03` means "3 percent").
+ *
+ * Generated from protobuf field string unit = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setUnit($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->unit = $var;
+
+ return $this;
+ }
+
+ /**
+ * A detailed description of the metric, which can be used in documentation.
+ *
+ * Generated from protobuf field string description = 6;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * A detailed description of the metric, which can be used in documentation.
+ *
+ * Generated from protobuf field string description = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * A concise name for the metric, which can be displayed in user interfaces.
+ * Use sentence case without an ending period, for example "Request count".
+ * This field is optional but it is recommended to be set for any metrics
+ * associated with user-visible concepts, such as Quota.
+ *
+ * Generated from protobuf field string display_name = 7;
+ * @return string
+ */
+ public function getDisplayName()
+ {
+ return $this->display_name;
+ }
+
+ /**
+ * A concise name for the metric, which can be displayed in user interfaces.
+ * Use sentence case without an ending period, for example "Request count".
+ * This field is optional but it is recommended to be set for any metrics
+ * associated with user-visible concepts, such as Quota.
+ *
+ * Generated from protobuf field string display_name = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Metadata which can be used to guide usage of the metric.
+ *
+ * Generated from protobuf field .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10;
+ * @return \Google\Api\MetricDescriptor\MetricDescriptorMetadata|null
+ */
+ public function getMetadata()
+ {
+ return $this->metadata;
+ }
+
+ public function hasMetadata()
+ {
+ return isset($this->metadata);
+ }
+
+ public function clearMetadata()
+ {
+ unset($this->metadata);
+ }
+
+ /**
+ * Optional. Metadata which can be used to guide usage of the metric.
+ *
+ * Generated from protobuf field .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10;
+ * @param \Google\Api\MetricDescriptor\MetricDescriptorMetadata $var
+ * @return $this
+ */
+ public function setMetadata($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\MetricDescriptor\MetricDescriptorMetadata::class);
+ $this->metadata = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The launch stage of the metric definition.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 12;
+ * @return int
+ */
+ public function getLaunchStage()
+ {
+ return $this->launch_stage;
+ }
+
+ /**
+ * Optional. The launch stage of the metric definition.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 12;
+ * @param int $var
+ * @return $this
+ */
+ public function setLaunchStage($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class);
+ $this->launch_stage = $var;
+
+ return $this;
+ }
+
+ /**
+ * Read-only. If present, then a [time
+ * series][google.monitoring.v3.TimeSeries], which is identified partially by
+ * a metric type and a
+ * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+ * is associated with this metric type can only be associated with one of the
+ * monitored resource types listed here.
+ *
+ * Generated from protobuf field repeated string monitored_resource_types = 13;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMonitoredResourceTypes()
+ {
+ return $this->monitored_resource_types;
+ }
+
+ /**
+ * Read-only. If present, then a [time
+ * series][google.monitoring.v3.TimeSeries], which is identified partially by
+ * a metric type and a
+ * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+ * is associated with this metric type can only be associated with one of the
+ * monitored resource types listed here.
+ *
+ * Generated from protobuf field repeated string monitored_resource_types = 13;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMonitoredResourceTypes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->monitored_resource_types = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor/MetricDescriptorMetadata.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor/MetricDescriptorMetadata.php
new file mode 100644
index 0000000..e1fe49d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor/MetricDescriptorMetadata.php
@@ -0,0 +1,189 @@
+google.api.MetricDescriptor.MetricDescriptorMetadata
+ */
+class MetricDescriptorMetadata extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Deprecated. Must use the
+ * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+ * instead.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 1 [deprecated = true];
+ * @deprecated
+ */
+ protected $launch_stage = 0;
+ /**
+ * The sampling period of metric data points. For metrics which are written
+ * periodically, consecutive data points are stored at this time interval,
+ * excluding data loss due to errors. Metrics with a higher granularity have
+ * a smaller sampling period.
+ *
+ * Generated from protobuf field .google.protobuf.Duration sample_period = 2;
+ */
+ protected $sample_period = null;
+ /**
+ * The delay of data points caused by ingestion. Data points older than this
+ * age are guaranteed to be ingested and available to be read, excluding
+ * data loss due to errors.
+ *
+ * Generated from protobuf field .google.protobuf.Duration ingest_delay = 3;
+ */
+ protected $ingest_delay = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $launch_stage
+ * Deprecated. Must use the
+ * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+ * instead.
+ * @type \Google\Protobuf\Duration $sample_period
+ * The sampling period of metric data points. For metrics which are written
+ * periodically, consecutive data points are stored at this time interval,
+ * excluding data loss due to errors. Metrics with a higher granularity have
+ * a smaller sampling period.
+ * @type \Google\Protobuf\Duration $ingest_delay
+ * The delay of data points caused by ingestion. Data points older than this
+ * age are guaranteed to be ingested and available to be read, excluding
+ * data loss due to errors.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Metric::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Deprecated. Must use the
+ * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+ * instead.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 1 [deprecated = true];
+ * @return int
+ * @deprecated
+ */
+ public function getLaunchStage()
+ {
+ @trigger_error('launch_stage is deprecated.', E_USER_DEPRECATED);
+ return $this->launch_stage;
+ }
+
+ /**
+ * Deprecated. Must use the
+ * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+ * instead.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 1 [deprecated = true];
+ * @param int $var
+ * @return $this
+ * @deprecated
+ */
+ public function setLaunchStage($var)
+ {
+ @trigger_error('launch_stage is deprecated.', E_USER_DEPRECATED);
+ GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class);
+ $this->launch_stage = $var;
+
+ return $this;
+ }
+
+ /**
+ * The sampling period of metric data points. For metrics which are written
+ * periodically, consecutive data points are stored at this time interval,
+ * excluding data loss due to errors. Metrics with a higher granularity have
+ * a smaller sampling period.
+ *
+ * Generated from protobuf field .google.protobuf.Duration sample_period = 2;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getSamplePeriod()
+ {
+ return $this->sample_period;
+ }
+
+ public function hasSamplePeriod()
+ {
+ return isset($this->sample_period);
+ }
+
+ public function clearSamplePeriod()
+ {
+ unset($this->sample_period);
+ }
+
+ /**
+ * The sampling period of metric data points. For metrics which are written
+ * periodically, consecutive data points are stored at this time interval,
+ * excluding data loss due to errors. Metrics with a higher granularity have
+ * a smaller sampling period.
+ *
+ * Generated from protobuf field .google.protobuf.Duration sample_period = 2;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setSamplePeriod($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->sample_period = $var;
+
+ return $this;
+ }
+
+ /**
+ * The delay of data points caused by ingestion. Data points older than this
+ * age are guaranteed to be ingested and available to be read, excluding
+ * data loss due to errors.
+ *
+ * Generated from protobuf field .google.protobuf.Duration ingest_delay = 3;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getIngestDelay()
+ {
+ return $this->ingest_delay;
+ }
+
+ public function hasIngestDelay()
+ {
+ return isset($this->ingest_delay);
+ }
+
+ public function clearIngestDelay()
+ {
+ unset($this->ingest_delay);
+ }
+
+ /**
+ * The delay of data points caused by ingestion. Data points older than this
+ * age are guaranteed to be ingested and available to be read, excluding
+ * data loss due to errors.
+ *
+ * Generated from protobuf field .google.protobuf.Duration ingest_delay = 3;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setIngestDelay($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->ingest_delay = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor/MetricKind.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor/MetricKind.php
new file mode 100644
index 0000000..a486417
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor/MetricKind.php
@@ -0,0 +1,75 @@
+google.api.MetricDescriptor.MetricKind
+ */
+class MetricKind
+{
+ /**
+ * Do not use this default value.
+ *
+ * Generated from protobuf enum METRIC_KIND_UNSPECIFIED = 0;
+ */
+ const METRIC_KIND_UNSPECIFIED = 0;
+ /**
+ * An instantaneous measurement of a value.
+ *
+ * Generated from protobuf enum GAUGE = 1;
+ */
+ const GAUGE = 1;
+ /**
+ * The change in a value during a time interval.
+ *
+ * Generated from protobuf enum DELTA = 2;
+ */
+ const DELTA = 2;
+ /**
+ * A value accumulated over a time interval. Cumulative
+ * measurements in a time series should have the same start time
+ * and increasing end times, until an event resets the cumulative
+ * value to zero and sets a new start time for the following
+ * points.
+ *
+ * Generated from protobuf enum CUMULATIVE = 3;
+ */
+ const CUMULATIVE = 3;
+
+ private static $valueToName = [
+ self::METRIC_KIND_UNSPECIFIED => 'METRIC_KIND_UNSPECIFIED',
+ self::GAUGE => 'GAUGE',
+ self::DELTA => 'DELTA',
+ self::CUMULATIVE => 'CUMULATIVE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor/ValueType.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor/ValueType.php
new file mode 100644
index 0000000..d433d2e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MetricDescriptor/ValueType.php
@@ -0,0 +1,92 @@
+google.api.MetricDescriptor.ValueType
+ */
+class ValueType
+{
+ /**
+ * Do not use this default value.
+ *
+ * Generated from protobuf enum VALUE_TYPE_UNSPECIFIED = 0;
+ */
+ const VALUE_TYPE_UNSPECIFIED = 0;
+ /**
+ * The value is a boolean.
+ * This value type can be used only if the metric kind is `GAUGE`.
+ *
+ * Generated from protobuf enum BOOL = 1;
+ */
+ const BOOL = 1;
+ /**
+ * The value is a signed 64-bit integer.
+ *
+ * Generated from protobuf enum INT64 = 2;
+ */
+ const INT64 = 2;
+ /**
+ * The value is a double precision floating point number.
+ *
+ * Generated from protobuf enum DOUBLE = 3;
+ */
+ const DOUBLE = 3;
+ /**
+ * The value is a text string.
+ * This value type can be used only if the metric kind is `GAUGE`.
+ *
+ * Generated from protobuf enum STRING = 4;
+ */
+ const STRING = 4;
+ /**
+ * The value is a [`Distribution`][google.api.Distribution].
+ *
+ * Generated from protobuf enum DISTRIBUTION = 5;
+ */
+ const DISTRIBUTION = 5;
+ /**
+ * The value is money.
+ *
+ * Generated from protobuf enum MONEY = 6;
+ */
+ const MONEY = 6;
+
+ private static $valueToName = [
+ self::VALUE_TYPE_UNSPECIFIED => 'VALUE_TYPE_UNSPECIFIED',
+ self::BOOL => 'BOOL',
+ self::INT64 => 'INT64',
+ self::DOUBLE => 'DOUBLE',
+ self::STRING => 'STRING',
+ self::DISTRIBUTION => 'DISTRIBUTION',
+ self::MONEY => 'MONEY',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MetricRule.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MetricRule.php
new file mode 100644
index 0000000..f8eeccd
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MetricRule.php
@@ -0,0 +1,126 @@
+google.api.MetricRule
+ */
+class MetricRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * Metrics to update when the selected methods are called, and the associated
+ * cost applied to each metric.
+ * The key of the map is the metric name, and the values are the amount
+ * increased for the metric against which the quota limits are defined.
+ * The value must not be negative.
+ *
+ * Generated from protobuf field map metric_costs = 2;
+ */
+ private $metric_costs;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * @type array|\Google\Protobuf\Internal\MapField $metric_costs
+ * Metrics to update when the selected methods are called, and the associated
+ * cost applied to each metric.
+ * The key of the map is the metric name, and the values are the amount
+ * increased for the metric against which the quota limits are defined.
+ * The value must not be negative.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Quota::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * Selects the methods to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * Metrics to update when the selected methods are called, and the associated
+ * cost applied to each metric.
+ * The key of the map is the metric name, and the values are the amount
+ * increased for the metric against which the quota limits are defined.
+ * The value must not be negative.
+ *
+ * Generated from protobuf field map metric_costs = 2;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getMetricCosts()
+ {
+ return $this->metric_costs;
+ }
+
+ /**
+ * Metrics to update when the selected methods are called, and the associated
+ * cost applied to each metric.
+ * The key of the map is the metric name, and the values are the amount
+ * increased for the metric against which the quota limits are defined.
+ * The value must not be negative.
+ *
+ * Generated from protobuf field map metric_costs = 2;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setMetricCosts($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64);
+ $this->metric_costs = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MonitoredResource.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MonitoredResource.php
new file mode 100644
index 0000000..7af0f6d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MonitoredResource.php
@@ -0,0 +1,147 @@
+google.api.MonitoredResource
+ */
+class MonitoredResource extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The monitored resource type. This field must match
+ * the `type` field of a
+ * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+ * object. For example, the type of a Compute Engine VM instance is
+ * `gce_instance`. Some descriptors include the service name in the type; for
+ * example, the type of a Datastream stream is
+ * `datastream.googleapis.com/Stream`.
+ *
+ * Generated from protobuf field string type = 1;
+ */
+ protected $type = '';
+ /**
+ * Required. Values for all of the labels listed in the associated monitored
+ * resource descriptor. For example, Compute Engine VM instances use the
+ * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+ *
+ * Generated from protobuf field map labels = 2;
+ */
+ private $labels;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $type
+ * Required. The monitored resource type. This field must match
+ * the `type` field of a
+ * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+ * object. For example, the type of a Compute Engine VM instance is
+ * `gce_instance`. Some descriptors include the service name in the type; for
+ * example, the type of a Datastream stream is
+ * `datastream.googleapis.com/Stream`.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Required. Values for all of the labels listed in the associated monitored
+ * resource descriptor. For example, Compute Engine VM instances use the
+ * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\MonitoredResource::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The monitored resource type. This field must match
+ * the `type` field of a
+ * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+ * object. For example, the type of a Compute Engine VM instance is
+ * `gce_instance`. Some descriptors include the service name in the type; for
+ * example, the type of a Datastream stream is
+ * `datastream.googleapis.com/Stream`.
+ *
+ * Generated from protobuf field string type = 1;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * Required. The monitored resource type. This field must match
+ * the `type` field of a
+ * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+ * object. For example, the type of a Compute Engine VM instance is
+ * `gce_instance`. Some descriptors include the service name in the type; for
+ * example, the type of a Datastream stream is
+ * `datastream.googleapis.com/Stream`.
+ *
+ * Generated from protobuf field string type = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Values for all of the labels listed in the associated monitored
+ * resource descriptor. For example, Compute Engine VM instances use the
+ * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+ *
+ * Generated from protobuf field map labels = 2;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Required. Values for all of the labels listed in the associated monitored
+ * resource descriptor. For example, Compute Engine VM instances use the
+ * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+ *
+ * Generated from protobuf field map labels = 2;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MonitoredResourceDescriptor.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MonitoredResourceDescriptor.php
new file mode 100644
index 0000000..c6727e2
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MonitoredResourceDescriptor.php
@@ -0,0 +1,309 @@
+google.api.MonitoredResourceDescriptor
+ */
+class MonitoredResourceDescriptor extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The resource name of the monitored resource descriptor:
+ * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+ * {type} is the value of the `type` field in this object and
+ * {project_id} is a project ID that provides API-specific context for
+ * accessing the type. APIs that do not use project information can use the
+ * resource name format `"monitoredResourceDescriptors/{type}"`.
+ *
+ * Generated from protobuf field string name = 5;
+ */
+ protected $name = '';
+ /**
+ * Required. The monitored resource type. For example, the type
+ * `"cloudsql_database"` represents databases in Google Cloud SQL.
+ * For a list of types, see [Monitored resource
+ * types](https://cloud.google.com/monitoring/api/resources)
+ * and [Logging resource
+ * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+ *
+ * Generated from protobuf field string type = 1;
+ */
+ protected $type = '';
+ /**
+ * Optional. A concise name for the monitored resource type that might be
+ * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+ * without any article or other determiners. For example,
+ * `"Google Cloud SQL Database"`.
+ *
+ * Generated from protobuf field string display_name = 2;
+ */
+ protected $display_name = '';
+ /**
+ * Optional. A detailed description of the monitored resource type that might
+ * be used in documentation.
+ *
+ * Generated from protobuf field string description = 3;
+ */
+ protected $description = '';
+ /**
+ * Required. A set of labels used to describe instances of this monitored
+ * resource type. For example, an individual Google Cloud SQL database is
+ * identified by values for the labels `"database_id"` and `"zone"`.
+ *
+ * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 4;
+ */
+ private $labels;
+ /**
+ * Optional. The launch stage of the monitored resource definition.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 7;
+ */
+ protected $launch_stage = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Optional. The resource name of the monitored resource descriptor:
+ * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+ * {type} is the value of the `type` field in this object and
+ * {project_id} is a project ID that provides API-specific context for
+ * accessing the type. APIs that do not use project information can use the
+ * resource name format `"monitoredResourceDescriptors/{type}"`.
+ * @type string $type
+ * Required. The monitored resource type. For example, the type
+ * `"cloudsql_database"` represents databases in Google Cloud SQL.
+ * For a list of types, see [Monitored resource
+ * types](https://cloud.google.com/monitoring/api/resources)
+ * and [Logging resource
+ * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+ * @type string $display_name
+ * Optional. A concise name for the monitored resource type that might be
+ * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+ * without any article or other determiners. For example,
+ * `"Google Cloud SQL Database"`.
+ * @type string $description
+ * Optional. A detailed description of the monitored resource type that might
+ * be used in documentation.
+ * @type array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $labels
+ * Required. A set of labels used to describe instances of this monitored
+ * resource type. For example, an individual Google Cloud SQL database is
+ * identified by values for the labels `"database_id"` and `"zone"`.
+ * @type int $launch_stage
+ * Optional. The launch stage of the monitored resource definition.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\MonitoredResource::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The resource name of the monitored resource descriptor:
+ * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+ * {type} is the value of the `type` field in this object and
+ * {project_id} is a project ID that provides API-specific context for
+ * accessing the type. APIs that do not use project information can use the
+ * resource name format `"monitoredResourceDescriptors/{type}"`.
+ *
+ * Generated from protobuf field string name = 5;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Optional. The resource name of the monitored resource descriptor:
+ * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+ * {type} is the value of the `type` field in this object and
+ * {project_id} is a project ID that provides API-specific context for
+ * accessing the type. APIs that do not use project information can use the
+ * resource name format `"monitoredResourceDescriptors/{type}"`.
+ *
+ * Generated from protobuf field string name = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The monitored resource type. For example, the type
+ * `"cloudsql_database"` represents databases in Google Cloud SQL.
+ * For a list of types, see [Monitored resource
+ * types](https://cloud.google.com/monitoring/api/resources)
+ * and [Logging resource
+ * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+ *
+ * Generated from protobuf field string type = 1;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * Required. The monitored resource type. For example, the type
+ * `"cloudsql_database"` represents databases in Google Cloud SQL.
+ * For a list of types, see [Monitored resource
+ * types](https://cloud.google.com/monitoring/api/resources)
+ * and [Logging resource
+ * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+ *
+ * Generated from protobuf field string type = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A concise name for the monitored resource type that might be
+ * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+ * without any article or other determiners. For example,
+ * `"Google Cloud SQL Database"`.
+ *
+ * Generated from protobuf field string display_name = 2;
+ * @return string
+ */
+ public function getDisplayName()
+ {
+ return $this->display_name;
+ }
+
+ /**
+ * Optional. A concise name for the monitored resource type that might be
+ * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+ * without any article or other determiners. For example,
+ * `"Google Cloud SQL Database"`.
+ *
+ * Generated from protobuf field string display_name = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A detailed description of the monitored resource type that might
+ * be used in documentation.
+ *
+ * Generated from protobuf field string description = 3;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * Optional. A detailed description of the monitored resource type that might
+ * be used in documentation.
+ *
+ * Generated from protobuf field string description = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. A set of labels used to describe instances of this monitored
+ * resource type. For example, an individual Google Cloud SQL database is
+ * identified by values for the labels `"database_id"` and `"zone"`.
+ *
+ * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Required. A set of labels used to describe instances of this monitored
+ * resource type. For example, an individual Google Cloud SQL database is
+ * identified by values for the labels `"database_id"` and `"zone"`.
+ *
+ * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 4;
+ * @param array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\LabelDescriptor::class);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The launch stage of the monitored resource definition.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 7;
+ * @return int
+ */
+ public function getLaunchStage()
+ {
+ return $this->launch_stage;
+ }
+
+ /**
+ * Optional. The launch stage of the monitored resource definition.
+ *
+ * Generated from protobuf field .google.api.LaunchStage launch_stage = 7;
+ * @param int $var
+ * @return $this
+ */
+ public function setLaunchStage($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class);
+ $this->launch_stage = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/MonitoredResourceMetadata.php b/tests/php_test_files/vendor/google/common-protos/src/Api/MonitoredResourceMetadata.php
new file mode 100644
index 0000000..da6dc4b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/MonitoredResourceMetadata.php
@@ -0,0 +1,148 @@
+google.api.MonitoredResourceMetadata
+ */
+class MonitoredResourceMetadata extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. Values for predefined system metadata labels.
+ * System labels are a kind of metadata extracted by Google, including
+ * "machine_image", "vpc", "subnet_id",
+ * "security_group", "name", etc.
+ * System label values can be only strings, Boolean values, or a list of
+ * strings. For example:
+ * { "name": "my-test-instance",
+ * "security_group": ["a", "b", "c"],
+ * "spot_instance": false }
+ *
+ * Generated from protobuf field .google.protobuf.Struct system_labels = 1;
+ */
+ protected $system_labels = null;
+ /**
+ * Output only. A map of user-defined metadata labels.
+ *
+ * Generated from protobuf field map user_labels = 2;
+ */
+ private $user_labels;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Struct $system_labels
+ * Output only. Values for predefined system metadata labels.
+ * System labels are a kind of metadata extracted by Google, including
+ * "machine_image", "vpc", "subnet_id",
+ * "security_group", "name", etc.
+ * System label values can be only strings, Boolean values, or a list of
+ * strings. For example:
+ * { "name": "my-test-instance",
+ * "security_group": ["a", "b", "c"],
+ * "spot_instance": false }
+ * @type array|\Google\Protobuf\Internal\MapField $user_labels
+ * Output only. A map of user-defined metadata labels.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\MonitoredResource::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. Values for predefined system metadata labels.
+ * System labels are a kind of metadata extracted by Google, including
+ * "machine_image", "vpc", "subnet_id",
+ * "security_group", "name", etc.
+ * System label values can be only strings, Boolean values, or a list of
+ * strings. For example:
+ * { "name": "my-test-instance",
+ * "security_group": ["a", "b", "c"],
+ * "spot_instance": false }
+ *
+ * Generated from protobuf field .google.protobuf.Struct system_labels = 1;
+ * @return \Google\Protobuf\Struct|null
+ */
+ public function getSystemLabels()
+ {
+ return $this->system_labels;
+ }
+
+ public function hasSystemLabels()
+ {
+ return isset($this->system_labels);
+ }
+
+ public function clearSystemLabels()
+ {
+ unset($this->system_labels);
+ }
+
+ /**
+ * Output only. Values for predefined system metadata labels.
+ * System labels are a kind of metadata extracted by Google, including
+ * "machine_image", "vpc", "subnet_id",
+ * "security_group", "name", etc.
+ * System label values can be only strings, Boolean values, or a list of
+ * strings. For example:
+ * { "name": "my-test-instance",
+ * "security_group": ["a", "b", "c"],
+ * "spot_instance": false }
+ *
+ * Generated from protobuf field .google.protobuf.Struct system_labels = 1;
+ * @param \Google\Protobuf\Struct $var
+ * @return $this
+ */
+ public function setSystemLabels($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
+ $this->system_labels = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. A map of user-defined metadata labels.
+ *
+ * Generated from protobuf field map user_labels = 2;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getUserLabels()
+ {
+ return $this->user_labels;
+ }
+
+ /**
+ * Output only. A map of user-defined metadata labels.
+ *
+ * Generated from protobuf field map user_labels = 2;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setUserLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->user_labels = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Monitoring.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Monitoring.php
new file mode 100644
index 0000000..5415b64
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Monitoring.php
@@ -0,0 +1,190 @@
+google.api.Monitoring
+ */
+class Monitoring extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Monitoring configurations for sending metrics to the producer project.
+ * There can be multiple producer destinations. A monitored resource type may
+ * appear in multiple monitoring destinations if different aggregations are
+ * needed for different sets of metrics associated with that monitored
+ * resource type. A monitored resource and metric pair may only be used once
+ * in the Monitoring configuration.
+ *
+ * Generated from protobuf field repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;
+ */
+ private $producer_destinations;
+ /**
+ * Monitoring configurations for sending metrics to the consumer project.
+ * There can be multiple consumer destinations. A monitored resource type may
+ * appear in multiple monitoring destinations if different aggregations are
+ * needed for different sets of metrics associated with that monitored
+ * resource type. A monitored resource and metric pair may only be used once
+ * in the Monitoring configuration.
+ *
+ * Generated from protobuf field repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;
+ */
+ private $consumer_destinations;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\Monitoring\MonitoringDestination>|\Google\Protobuf\Internal\RepeatedField $producer_destinations
+ * Monitoring configurations for sending metrics to the producer project.
+ * There can be multiple producer destinations. A monitored resource type may
+ * appear in multiple monitoring destinations if different aggregations are
+ * needed for different sets of metrics associated with that monitored
+ * resource type. A monitored resource and metric pair may only be used once
+ * in the Monitoring configuration.
+ * @type array<\Google\Api\Monitoring\MonitoringDestination>|\Google\Protobuf\Internal\RepeatedField $consumer_destinations
+ * Monitoring configurations for sending metrics to the consumer project.
+ * There can be multiple consumer destinations. A monitored resource type may
+ * appear in multiple monitoring destinations if different aggregations are
+ * needed for different sets of metrics associated with that monitored
+ * resource type. A monitored resource and metric pair may only be used once
+ * in the Monitoring configuration.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Monitoring::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Monitoring configurations for sending metrics to the producer project.
+ * There can be multiple producer destinations. A monitored resource type may
+ * appear in multiple monitoring destinations if different aggregations are
+ * needed for different sets of metrics associated with that monitored
+ * resource type. A monitored resource and metric pair may only be used once
+ * in the Monitoring configuration.
+ *
+ * Generated from protobuf field repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getProducerDestinations()
+ {
+ return $this->producer_destinations;
+ }
+
+ /**
+ * Monitoring configurations for sending metrics to the producer project.
+ * There can be multiple producer destinations. A monitored resource type may
+ * appear in multiple monitoring destinations if different aggregations are
+ * needed for different sets of metrics associated with that monitored
+ * resource type. A monitored resource and metric pair may only be used once
+ * in the Monitoring configuration.
+ *
+ * Generated from protobuf field repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;
+ * @param array<\Google\Api\Monitoring\MonitoringDestination>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setProducerDestinations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Monitoring\MonitoringDestination::class);
+ $this->producer_destinations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Monitoring configurations for sending metrics to the consumer project.
+ * There can be multiple consumer destinations. A monitored resource type may
+ * appear in multiple monitoring destinations if different aggregations are
+ * needed for different sets of metrics associated with that monitored
+ * resource type. A monitored resource and metric pair may only be used once
+ * in the Monitoring configuration.
+ *
+ * Generated from protobuf field repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getConsumerDestinations()
+ {
+ return $this->consumer_destinations;
+ }
+
+ /**
+ * Monitoring configurations for sending metrics to the consumer project.
+ * There can be multiple consumer destinations. A monitored resource type may
+ * appear in multiple monitoring destinations if different aggregations are
+ * needed for different sets of metrics associated with that monitored
+ * resource type. A monitored resource and metric pair may only be used once
+ * in the Monitoring configuration.
+ *
+ * Generated from protobuf field repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;
+ * @param array<\Google\Api\Monitoring\MonitoringDestination>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setConsumerDestinations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Monitoring\MonitoringDestination::class);
+ $this->consumer_destinations = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Monitoring/MonitoringDestination.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Monitoring/MonitoringDestination.php
new file mode 100644
index 0000000..050620e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Monitoring/MonitoringDestination.php
@@ -0,0 +1,119 @@
+google.api.Monitoring.MonitoringDestination
+ */
+class MonitoringDestination extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The monitored resource type. The type must be defined in
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ *
+ * Generated from protobuf field string monitored_resource = 1;
+ */
+ protected $monitored_resource = '';
+ /**
+ * Types of the metrics to report to this monitoring destination.
+ * Each type must be defined in
+ * [Service.metrics][google.api.Service.metrics] section.
+ *
+ * Generated from protobuf field repeated string metrics = 2;
+ */
+ private $metrics;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $monitored_resource
+ * The monitored resource type. The type must be defined in
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $metrics
+ * Types of the metrics to report to this monitoring destination.
+ * Each type must be defined in
+ * [Service.metrics][google.api.Service.metrics] section.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Monitoring::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The monitored resource type. The type must be defined in
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ *
+ * Generated from protobuf field string monitored_resource = 1;
+ * @return string
+ */
+ public function getMonitoredResource()
+ {
+ return $this->monitored_resource;
+ }
+
+ /**
+ * The monitored resource type. The type must be defined in
+ * [Service.monitored_resources][google.api.Service.monitored_resources]
+ * section.
+ *
+ * Generated from protobuf field string monitored_resource = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setMonitoredResource($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->monitored_resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * Types of the metrics to report to this monitoring destination.
+ * Each type must be defined in
+ * [Service.metrics][google.api.Service.metrics] section.
+ *
+ * Generated from protobuf field repeated string metrics = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMetrics()
+ {
+ return $this->metrics;
+ }
+
+ /**
+ * Types of the metrics to report to this monitoring destination.
+ * Each type must be defined in
+ * [Service.metrics][google.api.Service.metrics] section.
+ *
+ * Generated from protobuf field repeated string metrics = 2;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->metrics = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/NodeSettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/NodeSettings.php
new file mode 100644
index 0000000..54b8ccb
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/NodeSettings.php
@@ -0,0 +1,77 @@
+google.api.NodeSettings
+ */
+class NodeSettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ */
+ protected $common = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Api\CommonLanguageSettings $common
+ * Some settings.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @return \Google\Api\CommonLanguageSettings|null
+ */
+ public function getCommon()
+ {
+ return $this->common;
+ }
+
+ public function hasCommon()
+ {
+ return isset($this->common);
+ }
+
+ public function clearCommon()
+ {
+ unset($this->common);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @param \Google\Api\CommonLanguageSettings $var
+ * @return $this
+ */
+ public function setCommon($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\CommonLanguageSettings::class);
+ $this->common = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/OAuthRequirements.php b/tests/php_test_files/vendor/google/common-protos/src/Api/OAuthRequirements.php
new file mode 100644
index 0000000..842640c
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/OAuthRequirements.php
@@ -0,0 +1,96 @@
+google.api.OAuthRequirements
+ */
+class OAuthRequirements extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The list of publicly documented OAuth scopes that are allowed access. An
+ * OAuth token containing any of these scopes will be accepted.
+ * Example:
+ * canonical_scopes: https://www.googleapis.com/auth/calendar,
+ * https://www.googleapis.com/auth/calendar.read
+ *
+ * Generated from protobuf field string canonical_scopes = 1;
+ */
+ protected $canonical_scopes = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $canonical_scopes
+ * The list of publicly documented OAuth scopes that are allowed access. An
+ * OAuth token containing any of these scopes will be accepted.
+ * Example:
+ * canonical_scopes: https://www.googleapis.com/auth/calendar,
+ * https://www.googleapis.com/auth/calendar.read
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Auth::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The list of publicly documented OAuth scopes that are allowed access. An
+ * OAuth token containing any of these scopes will be accepted.
+ * Example:
+ * canonical_scopes: https://www.googleapis.com/auth/calendar,
+ * https://www.googleapis.com/auth/calendar.read
+ *
+ * Generated from protobuf field string canonical_scopes = 1;
+ * @return string
+ */
+ public function getCanonicalScopes()
+ {
+ return $this->canonical_scopes;
+ }
+
+ /**
+ * The list of publicly documented OAuth scopes that are allowed access. An
+ * OAuth token containing any of these scopes will be accepted.
+ * Example:
+ * canonical_scopes: https://www.googleapis.com/auth/calendar,
+ * https://www.googleapis.com/auth/calendar.read
+ *
+ * Generated from protobuf field string canonical_scopes = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setCanonicalScopes($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->canonical_scopes = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Page.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Page.php
new file mode 100644
index 0000000..2812764
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Page.php
@@ -0,0 +1,200 @@
+google.api.Page
+ */
+class Page extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The name of the page. It will be used as an identity of the page to
+ * generate URI of the page, text of the link to this page in navigation,
+ * etc. The full page name (start from the root page name to this page
+ * concatenated with `.`) can be used as reference to the page in your
+ * documentation. For example:
+ *
+ * You can reference `Java` page using Markdown reference link syntax:
+ * `[Java][Tutorial.Java]`.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The Markdown content of the page. You can use (== include {path}
+ * ==) to include content from a Markdown file. The content can be
+ * used to produce the documentation page such as HTML format page.
+ *
+ * Generated from protobuf field string content = 2;
+ */
+ protected $content = '';
+ /**
+ * Subpages of this page. The order of subpages specified here will be
+ * honored in the generated docset.
+ *
+ * Generated from protobuf field repeated .google.api.Page subpages = 3;
+ */
+ private $subpages;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The name of the page. It will be used as an identity of the page to
+ * generate URI of the page, text of the link to this page in navigation,
+ * etc. The full page name (start from the root page name to this page
+ * concatenated with `.`) can be used as reference to the page in your
+ * documentation. For example:
+ *
+ * You can reference `Java` page using Markdown reference link syntax:
+ * `[Java][Tutorial.Java]`.
+ * @type string $content
+ * The Markdown content of the page. You can use (== include {path}
+ * ==) to include content from a Markdown file. The content can be
+ * used to produce the documentation page such as HTML format page.
+ * @type array<\Google\Api\Page>|\Google\Protobuf\Internal\RepeatedField $subpages
+ * Subpages of this page. The order of subpages specified here will be
+ * honored in the generated docset.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Documentation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The name of the page. It will be used as an identity of the page to
+ * generate URI of the page, text of the link to this page in navigation,
+ * etc. The full page name (start from the root page name to this page
+ * concatenated with `.`) can be used as reference to the page in your
+ * documentation. For example:
+ *
+ * You can reference `Java` page using Markdown reference link syntax:
+ * `[Java][Tutorial.Java]`.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The name of the page. It will be used as an identity of the page to
+ * generate URI of the page, text of the link to this page in navigation,
+ * etc. The full page name (start from the root page name to this page
+ * concatenated with `.`) can be used as reference to the page in your
+ * documentation. For example:
+ *
+ * You can reference `Java` page using Markdown reference link syntax:
+ * `[Java][Tutorial.Java]`.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The Markdown content of the page. You can use (== include {path}
+ * ==) to include content from a Markdown file. The content can be
+ * used to produce the documentation page such as HTML format page.
+ *
+ * Generated from protobuf field string content = 2;
+ * @return string
+ */
+ public function getContent()
+ {
+ return $this->content;
+ }
+
+ /**
+ * The Markdown content of the page. You can use (== include {path}
+ * ==) to include content from a Markdown file. The content can be
+ * used to produce the documentation page such as HTML format page.
+ *
+ * Generated from protobuf field string content = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setContent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->content = $var;
+
+ return $this;
+ }
+
+ /**
+ * Subpages of this page. The order of subpages specified here will be
+ * honored in the generated docset.
+ *
+ * Generated from protobuf field repeated .google.api.Page subpages = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getSubpages()
+ {
+ return $this->subpages;
+ }
+
+ /**
+ * Subpages of this page. The order of subpages specified here will be
+ * honored in the generated docset.
+ *
+ * Generated from protobuf field repeated .google.api.Page subpages = 3;
+ * @param array<\Google\Api\Page>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setSubpages($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Page::class);
+ $this->subpages = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/PhpSettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/PhpSettings.php
new file mode 100644
index 0000000..06486ac
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/PhpSettings.php
@@ -0,0 +1,77 @@
+google.api.PhpSettings
+ */
+class PhpSettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ */
+ protected $common = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Api\CommonLanguageSettings $common
+ * Some settings.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @return \Google\Api\CommonLanguageSettings|null
+ */
+ public function getCommon()
+ {
+ return $this->common;
+ }
+
+ public function hasCommon()
+ {
+ return isset($this->common);
+ }
+
+ public function clearCommon()
+ {
+ unset($this->common);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @param \Google\Api\CommonLanguageSettings $var
+ * @return $this
+ */
+ public function setCommon($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\CommonLanguageSettings::class);
+ $this->common = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ProjectProperties.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ProjectProperties.php
new file mode 100644
index 0000000..122688d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ProjectProperties.php
@@ -0,0 +1,80 @@
+google.api.ProjectProperties
+ */
+class ProjectProperties extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * List of per consumer project-specific properties.
+ *
+ * Generated from protobuf field repeated .google.api.Property properties = 1;
+ */
+ private $properties;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\Property>|\Google\Protobuf\Internal\RepeatedField $properties
+ * List of per consumer project-specific properties.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Consumer::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * List of per consumer project-specific properties.
+ *
+ * Generated from protobuf field repeated .google.api.Property properties = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getProperties()
+ {
+ return $this->properties;
+ }
+
+ /**
+ * List of per consumer project-specific properties.
+ *
+ * Generated from protobuf field repeated .google.api.Property properties = 1;
+ * @param array<\Google\Api\Property>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setProperties($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Property::class);
+ $this->properties = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Property.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Property.php
new file mode 100644
index 0000000..6212e63
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Property.php
@@ -0,0 +1,142 @@
+google.api.Property
+ */
+class Property extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The name of the property (a.k.a key).
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The type of this property.
+ *
+ * Generated from protobuf field .google.api.Property.PropertyType type = 2;
+ */
+ protected $type = 0;
+ /**
+ * The description of the property
+ *
+ * Generated from protobuf field string description = 3;
+ */
+ protected $description = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The name of the property (a.k.a key).
+ * @type int $type
+ * The type of this property.
+ * @type string $description
+ * The description of the property
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Consumer::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The name of the property (a.k.a key).
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The name of the property (a.k.a key).
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The type of this property.
+ *
+ * Generated from protobuf field .google.api.Property.PropertyType type = 2;
+ * @return int
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * The type of this property.
+ *
+ * Generated from protobuf field .google.api.Property.PropertyType type = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\Property\PropertyType::class);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The description of the property
+ *
+ * Generated from protobuf field string description = 3;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * The description of the property
+ *
+ * Generated from protobuf field string description = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Property/PropertyType.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Property/PropertyType.php
new file mode 100644
index 0000000..b4b6cd7
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Property/PropertyType.php
@@ -0,0 +1,76 @@
+google.api.Property.PropertyType
+ */
+class PropertyType
+{
+ /**
+ * The type is unspecified, and will result in an error.
+ *
+ * Generated from protobuf enum UNSPECIFIED = 0;
+ */
+ const UNSPECIFIED = 0;
+ /**
+ * The type is `int64`.
+ *
+ * Generated from protobuf enum INT64 = 1;
+ */
+ const INT64 = 1;
+ /**
+ * The type is `bool`.
+ *
+ * Generated from protobuf enum BOOL = 2;
+ */
+ const BOOL = 2;
+ /**
+ * The type is `string`.
+ *
+ * Generated from protobuf enum STRING = 3;
+ */
+ const STRING = 3;
+ /**
+ * The type is 'double'.
+ *
+ * Generated from protobuf enum DOUBLE = 4;
+ */
+ const DOUBLE = 4;
+
+ private static $valueToName = [
+ self::UNSPECIFIED => 'UNSPECIFIED',
+ self::INT64 => 'INT64',
+ self::BOOL => 'BOOL',
+ self::STRING => 'STRING',
+ self::DOUBLE => 'DOUBLE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Publishing.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Publishing.php
new file mode 100644
index 0000000..6618617
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Publishing.php
@@ -0,0 +1,453 @@
+google.api.Publishing
+ */
+class Publishing extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A list of API method settings, e.g. the behavior for methods that use the
+ * long-running operation pattern.
+ *
+ * Generated from protobuf field repeated .google.api.MethodSettings method_settings = 2;
+ */
+ private $method_settings;
+ /**
+ * Link to a *public* URI where users can report issues. Example:
+ * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+ *
+ * Generated from protobuf field string new_issue_uri = 101;
+ */
+ protected $new_issue_uri = '';
+ /**
+ * Link to product home page. Example:
+ * https://cloud.google.com/asset-inventory/docs/overview
+ *
+ * Generated from protobuf field string documentation_uri = 102;
+ */
+ protected $documentation_uri = '';
+ /**
+ * Used as a tracking tag when collecting data about the APIs developer
+ * relations artifacts like docs, packages delivered to package managers,
+ * etc. Example: "speech".
+ *
+ * Generated from protobuf field string api_short_name = 103;
+ */
+ protected $api_short_name = '';
+ /**
+ * GitHub label to apply to issues and pull requests opened for this API.
+ *
+ * Generated from protobuf field string github_label = 104;
+ */
+ protected $github_label = '';
+ /**
+ * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+ * containing source code for the client libraries for this API.
+ *
+ * Generated from protobuf field repeated string codeowner_github_teams = 105;
+ */
+ private $codeowner_github_teams;
+ /**
+ * A prefix used in sample code when demarking regions to be included in
+ * documentation.
+ *
+ * Generated from protobuf field string doc_tag_prefix = 106;
+ */
+ protected $doc_tag_prefix = '';
+ /**
+ * For whom the client library is being published.
+ *
+ * Generated from protobuf field .google.api.ClientLibraryOrganization organization = 107;
+ */
+ protected $organization = 0;
+ /**
+ * Client library settings. If the same version string appears multiple
+ * times in this list, then the last one wins. Settings from earlier
+ * settings with the same version string are discarded.
+ *
+ * Generated from protobuf field repeated .google.api.ClientLibrarySettings library_settings = 109;
+ */
+ private $library_settings;
+ /**
+ * Optional link to proto reference documentation. Example:
+ * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+ *
+ * Generated from protobuf field string proto_reference_documentation_uri = 110;
+ */
+ protected $proto_reference_documentation_uri = '';
+ /**
+ * Optional link to REST reference documentation. Example:
+ * https://cloud.google.com/pubsub/lite/docs/reference/rest
+ *
+ * Generated from protobuf field string rest_reference_documentation_uri = 111;
+ */
+ protected $rest_reference_documentation_uri = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\MethodSettings>|\Google\Protobuf\Internal\RepeatedField $method_settings
+ * A list of API method settings, e.g. the behavior for methods that use the
+ * long-running operation pattern.
+ * @type string $new_issue_uri
+ * Link to a *public* URI where users can report issues. Example:
+ * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+ * @type string $documentation_uri
+ * Link to product home page. Example:
+ * https://cloud.google.com/asset-inventory/docs/overview
+ * @type string $api_short_name
+ * Used as a tracking tag when collecting data about the APIs developer
+ * relations artifacts like docs, packages delivered to package managers,
+ * etc. Example: "speech".
+ * @type string $github_label
+ * GitHub label to apply to issues and pull requests opened for this API.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $codeowner_github_teams
+ * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+ * containing source code for the client libraries for this API.
+ * @type string $doc_tag_prefix
+ * A prefix used in sample code when demarking regions to be included in
+ * documentation.
+ * @type int $organization
+ * For whom the client library is being published.
+ * @type array<\Google\Api\ClientLibrarySettings>|\Google\Protobuf\Internal\RepeatedField $library_settings
+ * Client library settings. If the same version string appears multiple
+ * times in this list, then the last one wins. Settings from earlier
+ * settings with the same version string are discarded.
+ * @type string $proto_reference_documentation_uri
+ * Optional link to proto reference documentation. Example:
+ * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+ * @type string $rest_reference_documentation_uri
+ * Optional link to REST reference documentation. Example:
+ * https://cloud.google.com/pubsub/lite/docs/reference/rest
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A list of API method settings, e.g. the behavior for methods that use the
+ * long-running operation pattern.
+ *
+ * Generated from protobuf field repeated .google.api.MethodSettings method_settings = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMethodSettings()
+ {
+ return $this->method_settings;
+ }
+
+ /**
+ * A list of API method settings, e.g. the behavior for methods that use the
+ * long-running operation pattern.
+ *
+ * Generated from protobuf field repeated .google.api.MethodSettings method_settings = 2;
+ * @param array<\Google\Api\MethodSettings>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMethodSettings($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MethodSettings::class);
+ $this->method_settings = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Link to a *public* URI where users can report issues. Example:
+ * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+ *
+ * Generated from protobuf field string new_issue_uri = 101;
+ * @return string
+ */
+ public function getNewIssueUri()
+ {
+ return $this->new_issue_uri;
+ }
+
+ /**
+ * Link to a *public* URI where users can report issues. Example:
+ * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+ *
+ * Generated from protobuf field string new_issue_uri = 101;
+ * @param string $var
+ * @return $this
+ */
+ public function setNewIssueUri($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->new_issue_uri = $var;
+
+ return $this;
+ }
+
+ /**
+ * Link to product home page. Example:
+ * https://cloud.google.com/asset-inventory/docs/overview
+ *
+ * Generated from protobuf field string documentation_uri = 102;
+ * @return string
+ */
+ public function getDocumentationUri()
+ {
+ return $this->documentation_uri;
+ }
+
+ /**
+ * Link to product home page. Example:
+ * https://cloud.google.com/asset-inventory/docs/overview
+ *
+ * Generated from protobuf field string documentation_uri = 102;
+ * @param string $var
+ * @return $this
+ */
+ public function setDocumentationUri($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->documentation_uri = $var;
+
+ return $this;
+ }
+
+ /**
+ * Used as a tracking tag when collecting data about the APIs developer
+ * relations artifacts like docs, packages delivered to package managers,
+ * etc. Example: "speech".
+ *
+ * Generated from protobuf field string api_short_name = 103;
+ * @return string
+ */
+ public function getApiShortName()
+ {
+ return $this->api_short_name;
+ }
+
+ /**
+ * Used as a tracking tag when collecting data about the APIs developer
+ * relations artifacts like docs, packages delivered to package managers,
+ * etc. Example: "speech".
+ *
+ * Generated from protobuf field string api_short_name = 103;
+ * @param string $var
+ * @return $this
+ */
+ public function setApiShortName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->api_short_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * GitHub label to apply to issues and pull requests opened for this API.
+ *
+ * Generated from protobuf field string github_label = 104;
+ * @return string
+ */
+ public function getGithubLabel()
+ {
+ return $this->github_label;
+ }
+
+ /**
+ * GitHub label to apply to issues and pull requests opened for this API.
+ *
+ * Generated from protobuf field string github_label = 104;
+ * @param string $var
+ * @return $this
+ */
+ public function setGithubLabel($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->github_label = $var;
+
+ return $this;
+ }
+
+ /**
+ * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+ * containing source code for the client libraries for this API.
+ *
+ * Generated from protobuf field repeated string codeowner_github_teams = 105;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getCodeownerGithubTeams()
+ {
+ return $this->codeowner_github_teams;
+ }
+
+ /**
+ * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+ * containing source code for the client libraries for this API.
+ *
+ * Generated from protobuf field repeated string codeowner_github_teams = 105;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setCodeownerGithubTeams($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->codeowner_github_teams = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A prefix used in sample code when demarking regions to be included in
+ * documentation.
+ *
+ * Generated from protobuf field string doc_tag_prefix = 106;
+ * @return string
+ */
+ public function getDocTagPrefix()
+ {
+ return $this->doc_tag_prefix;
+ }
+
+ /**
+ * A prefix used in sample code when demarking regions to be included in
+ * documentation.
+ *
+ * Generated from protobuf field string doc_tag_prefix = 106;
+ * @param string $var
+ * @return $this
+ */
+ public function setDocTagPrefix($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->doc_tag_prefix = $var;
+
+ return $this;
+ }
+
+ /**
+ * For whom the client library is being published.
+ *
+ * Generated from protobuf field .google.api.ClientLibraryOrganization organization = 107;
+ * @return int
+ */
+ public function getOrganization()
+ {
+ return $this->organization;
+ }
+
+ /**
+ * For whom the client library is being published.
+ *
+ * Generated from protobuf field .google.api.ClientLibraryOrganization organization = 107;
+ * @param int $var
+ * @return $this
+ */
+ public function setOrganization($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\ClientLibraryOrganization::class);
+ $this->organization = $var;
+
+ return $this;
+ }
+
+ /**
+ * Client library settings. If the same version string appears multiple
+ * times in this list, then the last one wins. Settings from earlier
+ * settings with the same version string are discarded.
+ *
+ * Generated from protobuf field repeated .google.api.ClientLibrarySettings library_settings = 109;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLibrarySettings()
+ {
+ return $this->library_settings;
+ }
+
+ /**
+ * Client library settings. If the same version string appears multiple
+ * times in this list, then the last one wins. Settings from earlier
+ * settings with the same version string are discarded.
+ *
+ * Generated from protobuf field repeated .google.api.ClientLibrarySettings library_settings = 109;
+ * @param array<\Google\Api\ClientLibrarySettings>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLibrarySettings($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\ClientLibrarySettings::class);
+ $this->library_settings = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional link to proto reference documentation. Example:
+ * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+ *
+ * Generated from protobuf field string proto_reference_documentation_uri = 110;
+ * @return string
+ */
+ public function getProtoReferenceDocumentationUri()
+ {
+ return $this->proto_reference_documentation_uri;
+ }
+
+ /**
+ * Optional link to proto reference documentation. Example:
+ * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+ *
+ * Generated from protobuf field string proto_reference_documentation_uri = 110;
+ * @param string $var
+ * @return $this
+ */
+ public function setProtoReferenceDocumentationUri($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->proto_reference_documentation_uri = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional link to REST reference documentation. Example:
+ * https://cloud.google.com/pubsub/lite/docs/reference/rest
+ *
+ * Generated from protobuf field string rest_reference_documentation_uri = 111;
+ * @return string
+ */
+ public function getRestReferenceDocumentationUri()
+ {
+ return $this->rest_reference_documentation_uri;
+ }
+
+ /**
+ * Optional link to REST reference documentation. Example:
+ * https://cloud.google.com/pubsub/lite/docs/reference/rest
+ *
+ * Generated from protobuf field string rest_reference_documentation_uri = 111;
+ * @param string $var
+ * @return $this
+ */
+ public function setRestReferenceDocumentationUri($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->rest_reference_documentation_uri = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/PythonSettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/PythonSettings.php
new file mode 100644
index 0000000..a86a022
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/PythonSettings.php
@@ -0,0 +1,77 @@
+google.api.PythonSettings
+ */
+class PythonSettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ */
+ protected $common = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Api\CommonLanguageSettings $common
+ * Some settings.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @return \Google\Api\CommonLanguageSettings|null
+ */
+ public function getCommon()
+ {
+ return $this->common;
+ }
+
+ public function hasCommon()
+ {
+ return isset($this->common);
+ }
+
+ public function clearCommon()
+ {
+ unset($this->common);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @param \Google\Api\CommonLanguageSettings $var
+ * @return $this
+ */
+ public function setCommon($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\CommonLanguageSettings::class);
+ $this->common = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Quota.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Quota.php
new file mode 100644
index 0000000..a4d5db9
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Quota.php
@@ -0,0 +1,144 @@
+google.api.Quota
+ */
+class Quota extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * List of QuotaLimit definitions for the service.
+ *
+ * Generated from protobuf field repeated .google.api.QuotaLimit limits = 3;
+ */
+ private $limits;
+ /**
+ * List of MetricRule definitions, each one mapping a selected method to one
+ * or more metrics.
+ *
+ * Generated from protobuf field repeated .google.api.MetricRule metric_rules = 4;
+ */
+ private $metric_rules;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\QuotaLimit>|\Google\Protobuf\Internal\RepeatedField $limits
+ * List of QuotaLimit definitions for the service.
+ * @type array<\Google\Api\MetricRule>|\Google\Protobuf\Internal\RepeatedField $metric_rules
+ * List of MetricRule definitions, each one mapping a selected method to one
+ * or more metrics.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Quota::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * List of QuotaLimit definitions for the service.
+ *
+ * Generated from protobuf field repeated .google.api.QuotaLimit limits = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLimits()
+ {
+ return $this->limits;
+ }
+
+ /**
+ * List of QuotaLimit definitions for the service.
+ *
+ * Generated from protobuf field repeated .google.api.QuotaLimit limits = 3;
+ * @param array<\Google\Api\QuotaLimit>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLimits($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\QuotaLimit::class);
+ $this->limits = $arr;
+
+ return $this;
+ }
+
+ /**
+ * List of MetricRule definitions, each one mapping a selected method to one
+ * or more metrics.
+ *
+ * Generated from protobuf field repeated .google.api.MetricRule metric_rules = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMetricRules()
+ {
+ return $this->metric_rules;
+ }
+
+ /**
+ * List of MetricRule definitions, each one mapping a selected method to one
+ * or more metrics.
+ *
+ * Generated from protobuf field repeated .google.api.MetricRule metric_rules = 4;
+ * @param array<\Google\Api\MetricRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMetricRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MetricRule::class);
+ $this->metric_rules = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/QuotaLimit.php b/tests/php_test_files/vendor/google/common-protos/src/Api/QuotaLimit.php
new file mode 100644
index 0000000..f34ffb4
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/QuotaLimit.php
@@ -0,0 +1,527 @@
+google.api.QuotaLimit
+ */
+class QuotaLimit extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Name of the quota limit.
+ * The name must be provided, and it must be unique within the service. The
+ * name can only include alphanumeric characters as well as '-'.
+ * The maximum length of the limit name is 64 characters.
+ *
+ * Generated from protobuf field string name = 6;
+ */
+ protected $name = '';
+ /**
+ * Optional. User-visible, extended description for this quota limit.
+ * Should be used only when more context is needed to understand this limit
+ * than provided by the limit's display name (see: `display_name`).
+ *
+ * Generated from protobuf field string description = 2;
+ */
+ protected $description = '';
+ /**
+ * Default number of tokens that can be consumed during the specified
+ * duration. This is the number of tokens assigned when a client
+ * application developer activates the service for his/her project.
+ * Specifying a value of 0 will block all requests. This can be used if you
+ * are provisioning quota to selected consumers and blocking others.
+ * Similarly, a value of -1 will indicate an unlimited quota. No other
+ * negative values are allowed.
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field int64 default_limit = 3;
+ */
+ protected $default_limit = 0;
+ /**
+ * Maximum number of tokens that can be consumed during the specified
+ * duration. Client application developers can override the default limit up
+ * to this maximum. If specified, this value cannot be set to a value less
+ * than the default limit. If not specified, it is set to the default limit.
+ * To allow clients to apply overrides with no upper bound, set this to -1,
+ * indicating unlimited maximum quota.
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field int64 max_limit = 4;
+ */
+ protected $max_limit = 0;
+ /**
+ * Free tier value displayed in the Developers Console for this limit.
+ * The free tier is the number of tokens that will be subtracted from the
+ * billed amount when billing is enabled.
+ * This field can only be set on a limit with duration "1d", in a billable
+ * group; it is invalid on any other limit. If this field is not set, it
+ * defaults to 0, indicating that there is no free tier for this service.
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field int64 free_tier = 7;
+ */
+ protected $free_tier = 0;
+ /**
+ * Duration of this limit in textual notation. Must be "100s" or "1d".
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field string duration = 5;
+ */
+ protected $duration = '';
+ /**
+ * The name of the metric this quota limit applies to. The quota limits with
+ * the same metric will be checked together during runtime. The metric must be
+ * defined within the service config.
+ *
+ * Generated from protobuf field string metric = 8;
+ */
+ protected $metric = '';
+ /**
+ * Specify the unit of the quota limit. It uses the same syntax as
+ * [Metric.unit][]. The supported unit kinds are determined by the quota
+ * backend system.
+ * Here are some examples:
+ * * "1/min/{project}" for quota per minute per project.
+ * Note: the order of unit components is insignificant.
+ * The "1" at the beginning is required to follow the metric unit syntax.
+ *
+ * Generated from protobuf field string unit = 9;
+ */
+ protected $unit = '';
+ /**
+ * Tiered limit values. You must specify this as a key:value pair, with an
+ * integer value that is the maximum number of requests allowed for the
+ * specified unit. Currently only STANDARD is supported.
+ *
+ * Generated from protobuf field map values = 10;
+ */
+ private $values;
+ /**
+ * User-visible display name for this limit.
+ * Optional. If not set, the UI will provide a default display name based on
+ * the quota configuration. This field can be used to override the default
+ * display name generated from the configuration.
+ *
+ * Generated from protobuf field string display_name = 12;
+ */
+ protected $display_name = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Name of the quota limit.
+ * The name must be provided, and it must be unique within the service. The
+ * name can only include alphanumeric characters as well as '-'.
+ * The maximum length of the limit name is 64 characters.
+ * @type string $description
+ * Optional. User-visible, extended description for this quota limit.
+ * Should be used only when more context is needed to understand this limit
+ * than provided by the limit's display name (see: `display_name`).
+ * @type int|string $default_limit
+ * Default number of tokens that can be consumed during the specified
+ * duration. This is the number of tokens assigned when a client
+ * application developer activates the service for his/her project.
+ * Specifying a value of 0 will block all requests. This can be used if you
+ * are provisioning quota to selected consumers and blocking others.
+ * Similarly, a value of -1 will indicate an unlimited quota. No other
+ * negative values are allowed.
+ * Used by group-based quotas only.
+ * @type int|string $max_limit
+ * Maximum number of tokens that can be consumed during the specified
+ * duration. Client application developers can override the default limit up
+ * to this maximum. If specified, this value cannot be set to a value less
+ * than the default limit. If not specified, it is set to the default limit.
+ * To allow clients to apply overrides with no upper bound, set this to -1,
+ * indicating unlimited maximum quota.
+ * Used by group-based quotas only.
+ * @type int|string $free_tier
+ * Free tier value displayed in the Developers Console for this limit.
+ * The free tier is the number of tokens that will be subtracted from the
+ * billed amount when billing is enabled.
+ * This field can only be set on a limit with duration "1d", in a billable
+ * group; it is invalid on any other limit. If this field is not set, it
+ * defaults to 0, indicating that there is no free tier for this service.
+ * Used by group-based quotas only.
+ * @type string $duration
+ * Duration of this limit in textual notation. Must be "100s" or "1d".
+ * Used by group-based quotas only.
+ * @type string $metric
+ * The name of the metric this quota limit applies to. The quota limits with
+ * the same metric will be checked together during runtime. The metric must be
+ * defined within the service config.
+ * @type string $unit
+ * Specify the unit of the quota limit. It uses the same syntax as
+ * [Metric.unit][]. The supported unit kinds are determined by the quota
+ * backend system.
+ * Here are some examples:
+ * * "1/min/{project}" for quota per minute per project.
+ * Note: the order of unit components is insignificant.
+ * The "1" at the beginning is required to follow the metric unit syntax.
+ * @type array|\Google\Protobuf\Internal\MapField $values
+ * Tiered limit values. You must specify this as a key:value pair, with an
+ * integer value that is the maximum number of requests allowed for the
+ * specified unit. Currently only STANDARD is supported.
+ * @type string $display_name
+ * User-visible display name for this limit.
+ * Optional. If not set, the UI will provide a default display name based on
+ * the quota configuration. This field can be used to override the default
+ * display name generated from the configuration.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Quota::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Name of the quota limit.
+ * The name must be provided, and it must be unique within the service. The
+ * name can only include alphanumeric characters as well as '-'.
+ * The maximum length of the limit name is 64 characters.
+ *
+ * Generated from protobuf field string name = 6;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Name of the quota limit.
+ * The name must be provided, and it must be unique within the service. The
+ * name can only include alphanumeric characters as well as '-'.
+ * The maximum length of the limit name is 64 characters.
+ *
+ * Generated from protobuf field string name = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. User-visible, extended description for this quota limit.
+ * Should be used only when more context is needed to understand this limit
+ * than provided by the limit's display name (see: `display_name`).
+ *
+ * Generated from protobuf field string description = 2;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * Optional. User-visible, extended description for this quota limit.
+ * Should be used only when more context is needed to understand this limit
+ * than provided by the limit's display name (see: `display_name`).
+ *
+ * Generated from protobuf field string description = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * Default number of tokens that can be consumed during the specified
+ * duration. This is the number of tokens assigned when a client
+ * application developer activates the service for his/her project.
+ * Specifying a value of 0 will block all requests. This can be used if you
+ * are provisioning quota to selected consumers and blocking others.
+ * Similarly, a value of -1 will indicate an unlimited quota. No other
+ * negative values are allowed.
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field int64 default_limit = 3;
+ * @return int|string
+ */
+ public function getDefaultLimit()
+ {
+ return $this->default_limit;
+ }
+
+ /**
+ * Default number of tokens that can be consumed during the specified
+ * duration. This is the number of tokens assigned when a client
+ * application developer activates the service for his/her project.
+ * Specifying a value of 0 will block all requests. This can be used if you
+ * are provisioning quota to selected consumers and blocking others.
+ * Similarly, a value of -1 will indicate an unlimited quota. No other
+ * negative values are allowed.
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field int64 default_limit = 3;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setDefaultLimit($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->default_limit = $var;
+
+ return $this;
+ }
+
+ /**
+ * Maximum number of tokens that can be consumed during the specified
+ * duration. Client application developers can override the default limit up
+ * to this maximum. If specified, this value cannot be set to a value less
+ * than the default limit. If not specified, it is set to the default limit.
+ * To allow clients to apply overrides with no upper bound, set this to -1,
+ * indicating unlimited maximum quota.
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field int64 max_limit = 4;
+ * @return int|string
+ */
+ public function getMaxLimit()
+ {
+ return $this->max_limit;
+ }
+
+ /**
+ * Maximum number of tokens that can be consumed during the specified
+ * duration. Client application developers can override the default limit up
+ * to this maximum. If specified, this value cannot be set to a value less
+ * than the default limit. If not specified, it is set to the default limit.
+ * To allow clients to apply overrides with no upper bound, set this to -1,
+ * indicating unlimited maximum quota.
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field int64 max_limit = 4;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxLimit($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_limit = $var;
+
+ return $this;
+ }
+
+ /**
+ * Free tier value displayed in the Developers Console for this limit.
+ * The free tier is the number of tokens that will be subtracted from the
+ * billed amount when billing is enabled.
+ * This field can only be set on a limit with duration "1d", in a billable
+ * group; it is invalid on any other limit. If this field is not set, it
+ * defaults to 0, indicating that there is no free tier for this service.
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field int64 free_tier = 7;
+ * @return int|string
+ */
+ public function getFreeTier()
+ {
+ return $this->free_tier;
+ }
+
+ /**
+ * Free tier value displayed in the Developers Console for this limit.
+ * The free tier is the number of tokens that will be subtracted from the
+ * billed amount when billing is enabled.
+ * This field can only be set on a limit with duration "1d", in a billable
+ * group; it is invalid on any other limit. If this field is not set, it
+ * defaults to 0, indicating that there is no free tier for this service.
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field int64 free_tier = 7;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setFreeTier($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->free_tier = $var;
+
+ return $this;
+ }
+
+ /**
+ * Duration of this limit in textual notation. Must be "100s" or "1d".
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field string duration = 5;
+ * @return string
+ */
+ public function getDuration()
+ {
+ return $this->duration;
+ }
+
+ /**
+ * Duration of this limit in textual notation. Must be "100s" or "1d".
+ * Used by group-based quotas only.
+ *
+ * Generated from protobuf field string duration = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setDuration($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->duration = $var;
+
+ return $this;
+ }
+
+ /**
+ * The name of the metric this quota limit applies to. The quota limits with
+ * the same metric will be checked together during runtime. The metric must be
+ * defined within the service config.
+ *
+ * Generated from protobuf field string metric = 8;
+ * @return string
+ */
+ public function getMetric()
+ {
+ return $this->metric;
+ }
+
+ /**
+ * The name of the metric this quota limit applies to. The quota limits with
+ * the same metric will be checked together during runtime. The metric must be
+ * defined within the service config.
+ *
+ * Generated from protobuf field string metric = 8;
+ * @param string $var
+ * @return $this
+ */
+ public function setMetric($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->metric = $var;
+
+ return $this;
+ }
+
+ /**
+ * Specify the unit of the quota limit. It uses the same syntax as
+ * [Metric.unit][]. The supported unit kinds are determined by the quota
+ * backend system.
+ * Here are some examples:
+ * * "1/min/{project}" for quota per minute per project.
+ * Note: the order of unit components is insignificant.
+ * The "1" at the beginning is required to follow the metric unit syntax.
+ *
+ * Generated from protobuf field string unit = 9;
+ * @return string
+ */
+ public function getUnit()
+ {
+ return $this->unit;
+ }
+
+ /**
+ * Specify the unit of the quota limit. It uses the same syntax as
+ * [Metric.unit][]. The supported unit kinds are determined by the quota
+ * backend system.
+ * Here are some examples:
+ * * "1/min/{project}" for quota per minute per project.
+ * Note: the order of unit components is insignificant.
+ * The "1" at the beginning is required to follow the metric unit syntax.
+ *
+ * Generated from protobuf field string unit = 9;
+ * @param string $var
+ * @return $this
+ */
+ public function setUnit($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->unit = $var;
+
+ return $this;
+ }
+
+ /**
+ * Tiered limit values. You must specify this as a key:value pair, with an
+ * integer value that is the maximum number of requests allowed for the
+ * specified unit. Currently only STANDARD is supported.
+ *
+ * Generated from protobuf field map values = 10;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * Tiered limit values. You must specify this as a key:value pair, with an
+ * integer value that is the maximum number of requests allowed for the
+ * specified unit. Currently only STANDARD is supported.
+ *
+ * Generated from protobuf field map values = 10;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setValues($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64);
+ $this->values = $arr;
+
+ return $this;
+ }
+
+ /**
+ * User-visible display name for this limit.
+ * Optional. If not set, the UI will provide a default display name based on
+ * the quota configuration. This field can be used to override the default
+ * display name generated from the configuration.
+ *
+ * Generated from protobuf field string display_name = 12;
+ * @return string
+ */
+ public function getDisplayName()
+ {
+ return $this->display_name;
+ }
+
+ /**
+ * User-visible display name for this limit.
+ * Optional. If not set, the UI will provide a default display name based on
+ * the quota configuration. This field can be used to override the default
+ * display name generated from the configuration.
+ *
+ * Generated from protobuf field string display_name = 12;
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceDescriptor.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceDescriptor.php
new file mode 100644
index 0000000..f2c9f73
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceDescriptor.php
@@ -0,0 +1,495 @@
+google.api.ResourceDescriptor
+ */
+class ResourceDescriptor extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The resource type. It must be in the format of
+ * {service_name}/{resource_type_kind}. The `resource_type_kind` must be
+ * singular and must not include version numbers.
+ * Example: `storage.googleapis.com/Bucket`
+ * The value of the resource_type_kind must follow the regular expression
+ * /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
+ * should use PascalCase (UpperCamelCase). The maximum number of
+ * characters allowed for the `resource_type_kind` is 100.
+ *
+ * Generated from protobuf field string type = 1;
+ */
+ protected $type = '';
+ /**
+ * Optional. The relative resource name pattern associated with this resource
+ * type. The DNS prefix of the full resource name shouldn't be specified here.
+ * The path pattern must follow the syntax, which aligns with HTTP binding
+ * syntax:
+ * Template = Segment { "/" Segment } ;
+ * Segment = LITERAL | Variable ;
+ * Variable = "{" LITERAL "}" ;
+ * Examples:
+ * - "projects/{project}/topics/{topic}"
+ * - "projects/{project}/knowledgeBases/{knowledge_base}"
+ * The components in braces correspond to the IDs for each resource in the
+ * hierarchy. It is expected that, if multiple patterns are provided,
+ * the same component name (e.g. "project") refers to IDs of the same
+ * type of resource.
+ *
+ * Generated from protobuf field repeated string pattern = 2;
+ */
+ private $pattern;
+ /**
+ * Optional. The field on the resource that designates the resource name
+ * field. If omitted, this is assumed to be "name".
+ *
+ * Generated from protobuf field string name_field = 3;
+ */
+ protected $name_field = '';
+ /**
+ * Optional. The historical or future-looking state of the resource pattern.
+ * Example:
+ * // The InspectTemplate message originally only supported resource
+ * // names with organization, and project was added later.
+ * message InspectTemplate {
+ * option (google.api.resource) = {
+ * type: "dlp.googleapis.com/InspectTemplate"
+ * pattern:
+ * "organizations/{organization}/inspectTemplates/{inspect_template}"
+ * pattern: "projects/{project}/inspectTemplates/{inspect_template}"
+ * history: ORIGINALLY_SINGLE_PATTERN
+ * };
+ * }
+ *
+ * Generated from protobuf field .google.api.ResourceDescriptor.History history = 4;
+ */
+ protected $history = 0;
+ /**
+ * The plural name used in the resource name and permission names, such as
+ * 'projects' for the resource name of 'projects/{project}' and the permission
+ * name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
+ * to this is for Nested Collections that have stuttering names, as defined
+ * in [AIP-122](https://google.aip.dev/122#nested-collections), where the
+ * collection ID in the resource name pattern does not necessarily directly
+ * match the `plural` value.
+ * It is the same concept of the `plural` field in k8s CRD spec
+ * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
+ * Note: The plural form is required even for singleton resources. See
+ * https://aip.dev/156
+ *
+ * Generated from protobuf field string plural = 5;
+ */
+ protected $plural = '';
+ /**
+ * The same concept of the `singular` field in k8s CRD spec
+ * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
+ * Such as "project" for the `resourcemanager.googleapis.com/Project` type.
+ *
+ * Generated from protobuf field string singular = 6;
+ */
+ protected $singular = '';
+ /**
+ * Style flag(s) for this resource.
+ * These indicate that a resource is expected to conform to a given
+ * style. See the specific style flags for additional information.
+ *
+ * Generated from protobuf field repeated .google.api.ResourceDescriptor.Style style = 10;
+ */
+ private $style;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $type
+ * The resource type. It must be in the format of
+ * {service_name}/{resource_type_kind}. The `resource_type_kind` must be
+ * singular and must not include version numbers.
+ * Example: `storage.googleapis.com/Bucket`
+ * The value of the resource_type_kind must follow the regular expression
+ * /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
+ * should use PascalCase (UpperCamelCase). The maximum number of
+ * characters allowed for the `resource_type_kind` is 100.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $pattern
+ * Optional. The relative resource name pattern associated with this resource
+ * type. The DNS prefix of the full resource name shouldn't be specified here.
+ * The path pattern must follow the syntax, which aligns with HTTP binding
+ * syntax:
+ * Template = Segment { "/" Segment } ;
+ * Segment = LITERAL | Variable ;
+ * Variable = "{" LITERAL "}" ;
+ * Examples:
+ * - "projects/{project}/topics/{topic}"
+ * - "projects/{project}/knowledgeBases/{knowledge_base}"
+ * The components in braces correspond to the IDs for each resource in the
+ * hierarchy. It is expected that, if multiple patterns are provided,
+ * the same component name (e.g. "project") refers to IDs of the same
+ * type of resource.
+ * @type string $name_field
+ * Optional. The field on the resource that designates the resource name
+ * field. If omitted, this is assumed to be "name".
+ * @type int $history
+ * Optional. The historical or future-looking state of the resource pattern.
+ * Example:
+ * // The InspectTemplate message originally only supported resource
+ * // names with organization, and project was added later.
+ * message InspectTemplate {
+ * option (google.api.resource) = {
+ * type: "dlp.googleapis.com/InspectTemplate"
+ * pattern:
+ * "organizations/{organization}/inspectTemplates/{inspect_template}"
+ * pattern: "projects/{project}/inspectTemplates/{inspect_template}"
+ * history: ORIGINALLY_SINGLE_PATTERN
+ * };
+ * }
+ * @type string $plural
+ * The plural name used in the resource name and permission names, such as
+ * 'projects' for the resource name of 'projects/{project}' and the permission
+ * name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
+ * to this is for Nested Collections that have stuttering names, as defined
+ * in [AIP-122](https://google.aip.dev/122#nested-collections), where the
+ * collection ID in the resource name pattern does not necessarily directly
+ * match the `plural` value.
+ * It is the same concept of the `plural` field in k8s CRD spec
+ * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
+ * Note: The plural form is required even for singleton resources. See
+ * https://aip.dev/156
+ * @type string $singular
+ * The same concept of the `singular` field in k8s CRD spec
+ * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
+ * Such as "project" for the `resourcemanager.googleapis.com/Project` type.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $style
+ * Style flag(s) for this resource.
+ * These indicate that a resource is expected to conform to a given
+ * style. See the specific style flags for additional information.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Resource::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The resource type. It must be in the format of
+ * {service_name}/{resource_type_kind}. The `resource_type_kind` must be
+ * singular and must not include version numbers.
+ * Example: `storage.googleapis.com/Bucket`
+ * The value of the resource_type_kind must follow the regular expression
+ * /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
+ * should use PascalCase (UpperCamelCase). The maximum number of
+ * characters allowed for the `resource_type_kind` is 100.
+ *
+ * Generated from protobuf field string type = 1;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * The resource type. It must be in the format of
+ * {service_name}/{resource_type_kind}. The `resource_type_kind` must be
+ * singular and must not include version numbers.
+ * Example: `storage.googleapis.com/Bucket`
+ * The value of the resource_type_kind must follow the regular expression
+ * /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
+ * should use PascalCase (UpperCamelCase). The maximum number of
+ * characters allowed for the `resource_type_kind` is 100.
+ *
+ * Generated from protobuf field string type = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The relative resource name pattern associated with this resource
+ * type. The DNS prefix of the full resource name shouldn't be specified here.
+ * The path pattern must follow the syntax, which aligns with HTTP binding
+ * syntax:
+ * Template = Segment { "/" Segment } ;
+ * Segment = LITERAL | Variable ;
+ * Variable = "{" LITERAL "}" ;
+ * Examples:
+ * - "projects/{project}/topics/{topic}"
+ * - "projects/{project}/knowledgeBases/{knowledge_base}"
+ * The components in braces correspond to the IDs for each resource in the
+ * hierarchy. It is expected that, if multiple patterns are provided,
+ * the same component name (e.g. "project") refers to IDs of the same
+ * type of resource.
+ *
+ * Generated from protobuf field repeated string pattern = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPattern()
+ {
+ return $this->pattern;
+ }
+
+ /**
+ * Optional. The relative resource name pattern associated with this resource
+ * type. The DNS prefix of the full resource name shouldn't be specified here.
+ * The path pattern must follow the syntax, which aligns with HTTP binding
+ * syntax:
+ * Template = Segment { "/" Segment } ;
+ * Segment = LITERAL | Variable ;
+ * Variable = "{" LITERAL "}" ;
+ * Examples:
+ * - "projects/{project}/topics/{topic}"
+ * - "projects/{project}/knowledgeBases/{knowledge_base}"
+ * The components in braces correspond to the IDs for each resource in the
+ * hierarchy. It is expected that, if multiple patterns are provided,
+ * the same component name (e.g. "project") refers to IDs of the same
+ * type of resource.
+ *
+ * Generated from protobuf field repeated string pattern = 2;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPattern($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->pattern = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The field on the resource that designates the resource name
+ * field. If omitted, this is assumed to be "name".
+ *
+ * Generated from protobuf field string name_field = 3;
+ * @return string
+ */
+ public function getNameField()
+ {
+ return $this->name_field;
+ }
+
+ /**
+ * Optional. The field on the resource that designates the resource name
+ * field. If omitted, this is assumed to be "name".
+ *
+ * Generated from protobuf field string name_field = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setNameField($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name_field = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The historical or future-looking state of the resource pattern.
+ * Example:
+ * // The InspectTemplate message originally only supported resource
+ * // names with organization, and project was added later.
+ * message InspectTemplate {
+ * option (google.api.resource) = {
+ * type: "dlp.googleapis.com/InspectTemplate"
+ * pattern:
+ * "organizations/{organization}/inspectTemplates/{inspect_template}"
+ * pattern: "projects/{project}/inspectTemplates/{inspect_template}"
+ * history: ORIGINALLY_SINGLE_PATTERN
+ * };
+ * }
+ *
+ * Generated from protobuf field .google.api.ResourceDescriptor.History history = 4;
+ * @return int
+ */
+ public function getHistory()
+ {
+ return $this->history;
+ }
+
+ /**
+ * Optional. The historical or future-looking state of the resource pattern.
+ * Example:
+ * // The InspectTemplate message originally only supported resource
+ * // names with organization, and project was added later.
+ * message InspectTemplate {
+ * option (google.api.resource) = {
+ * type: "dlp.googleapis.com/InspectTemplate"
+ * pattern:
+ * "organizations/{organization}/inspectTemplates/{inspect_template}"
+ * pattern: "projects/{project}/inspectTemplates/{inspect_template}"
+ * history: ORIGINALLY_SINGLE_PATTERN
+ * };
+ * }
+ *
+ * Generated from protobuf field .google.api.ResourceDescriptor.History history = 4;
+ * @param int $var
+ * @return $this
+ */
+ public function setHistory($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Api\ResourceDescriptor\History::class);
+ $this->history = $var;
+
+ return $this;
+ }
+
+ /**
+ * The plural name used in the resource name and permission names, such as
+ * 'projects' for the resource name of 'projects/{project}' and the permission
+ * name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
+ * to this is for Nested Collections that have stuttering names, as defined
+ * in [AIP-122](https://google.aip.dev/122#nested-collections), where the
+ * collection ID in the resource name pattern does not necessarily directly
+ * match the `plural` value.
+ * It is the same concept of the `plural` field in k8s CRD spec
+ * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
+ * Note: The plural form is required even for singleton resources. See
+ * https://aip.dev/156
+ *
+ * Generated from protobuf field string plural = 5;
+ * @return string
+ */
+ public function getPlural()
+ {
+ return $this->plural;
+ }
+
+ /**
+ * The plural name used in the resource name and permission names, such as
+ * 'projects' for the resource name of 'projects/{project}' and the permission
+ * name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
+ * to this is for Nested Collections that have stuttering names, as defined
+ * in [AIP-122](https://google.aip.dev/122#nested-collections), where the
+ * collection ID in the resource name pattern does not necessarily directly
+ * match the `plural` value.
+ * It is the same concept of the `plural` field in k8s CRD spec
+ * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
+ * Note: The plural form is required even for singleton resources. See
+ * https://aip.dev/156
+ *
+ * Generated from protobuf field string plural = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setPlural($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->plural = $var;
+
+ return $this;
+ }
+
+ /**
+ * The same concept of the `singular` field in k8s CRD spec
+ * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
+ * Such as "project" for the `resourcemanager.googleapis.com/Project` type.
+ *
+ * Generated from protobuf field string singular = 6;
+ * @return string
+ */
+ public function getSingular()
+ {
+ return $this->singular;
+ }
+
+ /**
+ * The same concept of the `singular` field in k8s CRD spec
+ * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
+ * Such as "project" for the `resourcemanager.googleapis.com/Project` type.
+ *
+ * Generated from protobuf field string singular = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setSingular($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->singular = $var;
+
+ return $this;
+ }
+
+ /**
+ * Style flag(s) for this resource.
+ * These indicate that a resource is expected to conform to a given
+ * style. See the specific style flags for additional information.
+ *
+ * Generated from protobuf field repeated .google.api.ResourceDescriptor.Style style = 10;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getStyle()
+ {
+ return $this->style;
+ }
+
+ /**
+ * Style flag(s) for this resource.
+ * These indicate that a resource is expected to conform to a given
+ * style. See the specific style flags for additional information.
+ *
+ * Generated from protobuf field repeated .google.api.ResourceDescriptor.Style style = 10;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setStyle($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Api\ResourceDescriptor\Style::class);
+ $this->style = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceDescriptor/History.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceDescriptor/History.php
new file mode 100644
index 0000000..5005eb2
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceDescriptor/History.php
@@ -0,0 +1,66 @@
+google.api.ResourceDescriptor.History
+ */
+class History
+{
+ /**
+ * The "unset" value.
+ *
+ * Generated from protobuf enum HISTORY_UNSPECIFIED = 0;
+ */
+ const HISTORY_UNSPECIFIED = 0;
+ /**
+ * The resource originally had one pattern and launched as such, and
+ * additional patterns were added later.
+ *
+ * Generated from protobuf enum ORIGINALLY_SINGLE_PATTERN = 1;
+ */
+ const ORIGINALLY_SINGLE_PATTERN = 1;
+ /**
+ * The resource has one pattern, but the API owner expects to add more
+ * later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
+ * that from being necessary once there are multiple patterns.)
+ *
+ * Generated from protobuf enum FUTURE_MULTI_PATTERN = 2;
+ */
+ const FUTURE_MULTI_PATTERN = 2;
+
+ private static $valueToName = [
+ self::HISTORY_UNSPECIFIED => 'HISTORY_UNSPECIFIED',
+ self::ORIGINALLY_SINGLE_PATTERN => 'ORIGINALLY_SINGLE_PATTERN',
+ self::FUTURE_MULTI_PATTERN => 'FUTURE_MULTI_PATTERN',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceDescriptor/Style.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceDescriptor/Style.php
new file mode 100644
index 0000000..4d0c56e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceDescriptor/Style.php
@@ -0,0 +1,60 @@
+google.api.ResourceDescriptor.Style
+ */
+class Style
+{
+ /**
+ * The unspecified value. Do not use.
+ *
+ * Generated from protobuf enum STYLE_UNSPECIFIED = 0;
+ */
+ const STYLE_UNSPECIFIED = 0;
+ /**
+ * This resource is intended to be "declarative-friendly".
+ * Declarative-friendly resources must be more strictly consistent, and
+ * setting this to true communicates to tools that this resource should
+ * adhere to declarative-friendly expectations.
+ * Note: This is used by the API linter (linter.aip.dev) to enable
+ * additional checks.
+ *
+ * Generated from protobuf enum DECLARATIVE_FRIENDLY = 1;
+ */
+ const DECLARATIVE_FRIENDLY = 1;
+
+ private static $valueToName = [
+ self::STYLE_UNSPECIFIED => 'STYLE_UNSPECIFIED',
+ self::DECLARATIVE_FRIENDLY => 'DECLARATIVE_FRIENDLY',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceReference.php b/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceReference.php
new file mode 100644
index 0000000..c4c282d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/ResourceReference.php
@@ -0,0 +1,190 @@
+google.api.ResourceReference
+ */
+class ResourceReference extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The resource type that the annotated field references.
+ * Example:
+ * message Subscription {
+ * string topic = 2 [(google.api.resource_reference) = {
+ * type: "pubsub.googleapis.com/Topic"
+ * }];
+ * }
+ * Occasionally, a field may reference an arbitrary resource. In this case,
+ * APIs use the special value * in their resource reference.
+ * Example:
+ * message GetIamPolicyRequest {
+ * string resource = 2 [(google.api.resource_reference) = {
+ * type: "*"
+ * }];
+ * }
+ *
+ * Generated from protobuf field string type = 1;
+ */
+ protected $type = '';
+ /**
+ * The resource type of a child collection that the annotated field
+ * references. This is useful for annotating the `parent` field that
+ * doesn't have a fixed resource type.
+ * Example:
+ * message ListLogEntriesRequest {
+ * string parent = 1 [(google.api.resource_reference) = {
+ * child_type: "logging.googleapis.com/LogEntry"
+ * };
+ * }
+ *
+ * Generated from protobuf field string child_type = 2;
+ */
+ protected $child_type = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $type
+ * The resource type that the annotated field references.
+ * Example:
+ * message Subscription {
+ * string topic = 2 [(google.api.resource_reference) = {
+ * type: "pubsub.googleapis.com/Topic"
+ * }];
+ * }
+ * Occasionally, a field may reference an arbitrary resource. In this case,
+ * APIs use the special value * in their resource reference.
+ * Example:
+ * message GetIamPolicyRequest {
+ * string resource = 2 [(google.api.resource_reference) = {
+ * type: "*"
+ * }];
+ * }
+ * @type string $child_type
+ * The resource type of a child collection that the annotated field
+ * references. This is useful for annotating the `parent` field that
+ * doesn't have a fixed resource type.
+ * Example:
+ * message ListLogEntriesRequest {
+ * string parent = 1 [(google.api.resource_reference) = {
+ * child_type: "logging.googleapis.com/LogEntry"
+ * };
+ * }
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Resource::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The resource type that the annotated field references.
+ * Example:
+ * message Subscription {
+ * string topic = 2 [(google.api.resource_reference) = {
+ * type: "pubsub.googleapis.com/Topic"
+ * }];
+ * }
+ * Occasionally, a field may reference an arbitrary resource. In this case,
+ * APIs use the special value * in their resource reference.
+ * Example:
+ * message GetIamPolicyRequest {
+ * string resource = 2 [(google.api.resource_reference) = {
+ * type: "*"
+ * }];
+ * }
+ *
+ * Generated from protobuf field string type = 1;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * The resource type that the annotated field references.
+ * Example:
+ * message Subscription {
+ * string topic = 2 [(google.api.resource_reference) = {
+ * type: "pubsub.googleapis.com/Topic"
+ * }];
+ * }
+ * Occasionally, a field may reference an arbitrary resource. In this case,
+ * APIs use the special value * in their resource reference.
+ * Example:
+ * message GetIamPolicyRequest {
+ * string resource = 2 [(google.api.resource_reference) = {
+ * type: "*"
+ * }];
+ * }
+ *
+ * Generated from protobuf field string type = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The resource type of a child collection that the annotated field
+ * references. This is useful for annotating the `parent` field that
+ * doesn't have a fixed resource type.
+ * Example:
+ * message ListLogEntriesRequest {
+ * string parent = 1 [(google.api.resource_reference) = {
+ * child_type: "logging.googleapis.com/LogEntry"
+ * };
+ * }
+ *
+ * Generated from protobuf field string child_type = 2;
+ * @return string
+ */
+ public function getChildType()
+ {
+ return $this->child_type;
+ }
+
+ /**
+ * The resource type of a child collection that the annotated field
+ * references. This is useful for annotating the `parent` field that
+ * doesn't have a fixed resource type.
+ * Example:
+ * message ListLogEntriesRequest {
+ * string parent = 1 [(google.api.resource_reference) = {
+ * child_type: "logging.googleapis.com/LogEntry"
+ * };
+ * }
+ *
+ * Generated from protobuf field string child_type = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setChildType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->child_type = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/RoutingParameter.php b/tests/php_test_files/vendor/google/common-protos/src/Api/RoutingParameter.php
new file mode 100644
index 0000000..1b32a8f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/RoutingParameter.php
@@ -0,0 +1,281 @@
+google.api.RoutingParameter
+ */
+class RoutingParameter extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A request field to extract the header key-value pair from.
+ *
+ * Generated from protobuf field string field = 1;
+ */
+ protected $field = '';
+ /**
+ * A pattern matching the key-value field. Optional.
+ * If not specified, the whole field specified in the `field` field will be
+ * taken as value, and its name used as key. If specified, it MUST contain
+ * exactly one named segment (along with any number of unnamed segments) The
+ * pattern will be matched over the field specified in the `field` field, then
+ * if the match is successful:
+ * - the name of the single named segment will be used as a header name,
+ * - the match value of the segment will be used as a header value;
+ * if the match is NOT successful, nothing will be sent.
+ * Example:
+ * -- This is a field in the request message
+ * | that the header value will be extracted from.
+ * |
+ * | -- This is the key name in the
+ * | | routing header.
+ * V |
+ * field: "table_name" v
+ * path_template: "projects/*/{table_location=instances/*}/tables/*"
+ * ^ ^
+ * | |
+ * In the {} brackets is the pattern that -- |
+ * specifies what to extract from the |
+ * field as a value to be sent. |
+ * |
+ * The string in the field must match the whole pattern --
+ * before brackets, inside brackets, after brackets.
+ * When looking at this specific example, we can see that:
+ * - A key-value pair with the key `table_location`
+ * and the value matching `instances/*` should be added
+ * to the x-goog-request-params routing header.
+ * - The value is extracted from the request message's `table_name` field
+ * if it matches the full pattern specified:
+ * `projects/*/instances/*/tables/*`.
+ * **NB:** If the `path_template` field is not provided, the key name is
+ * equal to the field name, and the whole field should be sent as a value.
+ * This makes the pattern for the field and the value functionally equivalent
+ * to `**`, and the configuration
+ * {
+ * field: "table_name"
+ * }
+ * is a functionally equivalent shorthand to:
+ * {
+ * field: "table_name"
+ * path_template: "{table_name=**}"
+ * }
+ * See Example 1 for more details.
+ *
+ * Generated from protobuf field string path_template = 2;
+ */
+ protected $path_template = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $field
+ * A request field to extract the header key-value pair from.
+ * @type string $path_template
+ * A pattern matching the key-value field. Optional.
+ * If not specified, the whole field specified in the `field` field will be
+ * taken as value, and its name used as key. If specified, it MUST contain
+ * exactly one named segment (along with any number of unnamed segments) The
+ * pattern will be matched over the field specified in the `field` field, then
+ * if the match is successful:
+ * - the name of the single named segment will be used as a header name,
+ * - the match value of the segment will be used as a header value;
+ * if the match is NOT successful, nothing will be sent.
+ * Example:
+ * -- This is a field in the request message
+ * | that the header value will be extracted from.
+ * |
+ * | -- This is the key name in the
+ * | | routing header.
+ * V |
+ * field: "table_name" v
+ * path_template: "projects/*/{table_location=instances/*}/tables/*"
+ * ^ ^
+ * | |
+ * In the {} brackets is the pattern that -- |
+ * specifies what to extract from the |
+ * field as a value to be sent. |
+ * |
+ * The string in the field must match the whole pattern --
+ * before brackets, inside brackets, after brackets.
+ * When looking at this specific example, we can see that:
+ * - A key-value pair with the key `table_location`
+ * and the value matching `instances/*` should be added
+ * to the x-goog-request-params routing header.
+ * - The value is extracted from the request message's `table_name` field
+ * if it matches the full pattern specified:
+ * `projects/*/instances/*/tables/*`.
+ * **NB:** If the `path_template` field is not provided, the key name is
+ * equal to the field name, and the whole field should be sent as a value.
+ * This makes the pattern for the field and the value functionally equivalent
+ * to `**`, and the configuration
+ * {
+ * field: "table_name"
+ * }
+ * is a functionally equivalent shorthand to:
+ * {
+ * field: "table_name"
+ * path_template: "{table_name=**}"
+ * }
+ * See Example 1 for more details.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Routing::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A request field to extract the header key-value pair from.
+ *
+ * Generated from protobuf field string field = 1;
+ * @return string
+ */
+ public function getField()
+ {
+ return $this->field;
+ }
+
+ /**
+ * A request field to extract the header key-value pair from.
+ *
+ * Generated from protobuf field string field = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setField($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->field = $var;
+
+ return $this;
+ }
+
+ /**
+ * A pattern matching the key-value field. Optional.
+ * If not specified, the whole field specified in the `field` field will be
+ * taken as value, and its name used as key. If specified, it MUST contain
+ * exactly one named segment (along with any number of unnamed segments) The
+ * pattern will be matched over the field specified in the `field` field, then
+ * if the match is successful:
+ * - the name of the single named segment will be used as a header name,
+ * - the match value of the segment will be used as a header value;
+ * if the match is NOT successful, nothing will be sent.
+ * Example:
+ * -- This is a field in the request message
+ * | that the header value will be extracted from.
+ * |
+ * | -- This is the key name in the
+ * | | routing header.
+ * V |
+ * field: "table_name" v
+ * path_template: "projects/*/{table_location=instances/*}/tables/*"
+ * ^ ^
+ * | |
+ * In the {} brackets is the pattern that -- |
+ * specifies what to extract from the |
+ * field as a value to be sent. |
+ * |
+ * The string in the field must match the whole pattern --
+ * before brackets, inside brackets, after brackets.
+ * When looking at this specific example, we can see that:
+ * - A key-value pair with the key `table_location`
+ * and the value matching `instances/*` should be added
+ * to the x-goog-request-params routing header.
+ * - The value is extracted from the request message's `table_name` field
+ * if it matches the full pattern specified:
+ * `projects/*/instances/*/tables/*`.
+ * **NB:** If the `path_template` field is not provided, the key name is
+ * equal to the field name, and the whole field should be sent as a value.
+ * This makes the pattern for the field and the value functionally equivalent
+ * to `**`, and the configuration
+ * {
+ * field: "table_name"
+ * }
+ * is a functionally equivalent shorthand to:
+ * {
+ * field: "table_name"
+ * path_template: "{table_name=**}"
+ * }
+ * See Example 1 for more details.
+ *
+ * Generated from protobuf field string path_template = 2;
+ * @return string
+ */
+ public function getPathTemplate()
+ {
+ return $this->path_template;
+ }
+
+ /**
+ * A pattern matching the key-value field. Optional.
+ * If not specified, the whole field specified in the `field` field will be
+ * taken as value, and its name used as key. If specified, it MUST contain
+ * exactly one named segment (along with any number of unnamed segments) The
+ * pattern will be matched over the field specified in the `field` field, then
+ * if the match is successful:
+ * - the name of the single named segment will be used as a header name,
+ * - the match value of the segment will be used as a header value;
+ * if the match is NOT successful, nothing will be sent.
+ * Example:
+ * -- This is a field in the request message
+ * | that the header value will be extracted from.
+ * |
+ * | -- This is the key name in the
+ * | | routing header.
+ * V |
+ * field: "table_name" v
+ * path_template: "projects/*/{table_location=instances/*}/tables/*"
+ * ^ ^
+ * | |
+ * In the {} brackets is the pattern that -- |
+ * specifies what to extract from the |
+ * field as a value to be sent. |
+ * |
+ * The string in the field must match the whole pattern --
+ * before brackets, inside brackets, after brackets.
+ * When looking at this specific example, we can see that:
+ * - A key-value pair with the key `table_location`
+ * and the value matching `instances/*` should be added
+ * to the x-goog-request-params routing header.
+ * - The value is extracted from the request message's `table_name` field
+ * if it matches the full pattern specified:
+ * `projects/*/instances/*/tables/*`.
+ * **NB:** If the `path_template` field is not provided, the key name is
+ * equal to the field name, and the whole field should be sent as a value.
+ * This makes the pattern for the field and the value functionally equivalent
+ * to `**`, and the configuration
+ * {
+ * field: "table_name"
+ * }
+ * is a functionally equivalent shorthand to:
+ * {
+ * field: "table_name"
+ * path_template: "{table_name=**}"
+ * }
+ * See Example 1 for more details.
+ *
+ * Generated from protobuf field string path_template = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setPathTemplate($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->path_template = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/RoutingRule.php b/tests/php_test_files/vendor/google/common-protos/src/Api/RoutingRule.php
new file mode 100644
index 0000000..c47012d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/RoutingRule.php
@@ -0,0 +1,353 @@
+/tables/
`
+ * // - `projects//instances//tables/
`
+ * // - `region//zones//tables/
`
+ * string table_name = 1;
+ * // This value specifies routing for replication.
+ * // It can be in the following formats:
+ * // - `profiles/`
+ * // - a legacy `profile_id` that can be any string
+ * string app_profile_id = 2;
+ * }
+ * Example message:
+ * {
+ * table_name: projects/proj_foo/instances/instance_bar/table/table_baz,
+ * app_profile_id: profiles/prof_qux
+ * }
+ * The routing header consists of one or multiple key-value pairs. Every key
+ * and value must be percent-encoded, and joined together in the format of
+ * `key1=value1&key2=value2`.
+ * In the examples below I am skipping the percent-encoding for readablity.
+ * Example 1
+ * Extracting a field from the request to put into the routing header
+ * unchanged, with the key equal to the field name.
+ * annotation:
+ * option (google.api.routing) = {
+ * // Take the `app_profile_id`.
+ * routing_parameters {
+ * field: "app_profile_id"
+ * }
+ * };
+ * result:
+ * x-goog-request-params: app_profile_id=profiles/prof_qux
+ * Example 2
+ * Extracting a field from the request to put into the routing header
+ * unchanged, with the key different from the field name.
+ * annotation:
+ * option (google.api.routing) = {
+ * // Take the `app_profile_id`, but name it `routing_id` in the header.
+ * routing_parameters {
+ * field: "app_profile_id"
+ * path_template: "{routing_id=**}"
+ * }
+ * };
+ * result:
+ * x-goog-request-params: routing_id=profiles/prof_qux
+ * Example 3
+ * Extracting a field from the request to put into the routing
+ * header, while matching a path template syntax on the field's value.
+ * NB: it is more useful to send nothing than to send garbage for the purpose
+ * of dynamic routing, since garbage pollutes cache. Thus the matching.
+ * Sub-example 3a
+ * The field matches the template.
+ * annotation:
+ * option (google.api.routing) = {
+ * // Take the `table_name`, if it's well-formed (with project-based
+ * // syntax).
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{table_name=projects/*/instances/*/**}"
+ * }
+ * };
+ * result:
+ * x-goog-request-params:
+ * table_name=projects/proj_foo/instances/instance_bar/table/table_baz
+ * Sub-example 3b
+ * The field does not match the template.
+ * annotation:
+ * option (google.api.routing) = {
+ * // Take the `table_name`, if it's well-formed (with region-based
+ * // syntax).
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{table_name=regions/*/zones/*/**}"
+ * }
+ * };
+ * result:
+ *
+ * Sub-example 3c
+ * Multiple alternative conflictingly named path templates are
+ * specified. The one that matches is used to construct the header.
+ * annotation:
+ * option (google.api.routing) = {
+ * // Take the `table_name`, if it's well-formed, whether
+ * // using the region- or projects-based syntax.
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{table_name=regions/*/zones/*/**}"
+ * }
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{table_name=projects/*/instances/*/**}"
+ * }
+ * };
+ * result:
+ * x-goog-request-params:
+ * table_name=projects/proj_foo/instances/instance_bar/table/table_baz
+ * Example 4
+ * Extracting a single routing header key-value pair by matching a
+ * template syntax on (a part of) a single request field.
+ * annotation:
+ * option (google.api.routing) = {
+ * // Take just the project id from the `table_name` field.
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{routing_id=projects/*}/**"
+ * }
+ * };
+ * result:
+ * x-goog-request-params: routing_id=projects/proj_foo
+ * Example 5
+ * Extracting a single routing header key-value pair by matching
+ * several conflictingly named path templates on (parts of) a single request
+ * field. The last template to match "wins" the conflict.
+ * annotation:
+ * option (google.api.routing) = {
+ * // If the `table_name` does not have instances information,
+ * // take just the project id for routing.
+ * // Otherwise take project + instance.
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{routing_id=projects/*}/**"
+ * }
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{routing_id=projects/*/instances/*}/**"
+ * }
+ * };
+ * result:
+ * x-goog-request-params:
+ * routing_id=projects/proj_foo/instances/instance_bar
+ * Example 6
+ * Extracting multiple routing header key-value pairs by matching
+ * several non-conflicting path templates on (parts of) a single request field.
+ * Sub-example 6a
+ * Make the templates strict, so that if the `table_name` does not
+ * have an instance information, nothing is sent.
+ * annotation:
+ * option (google.api.routing) = {
+ * // The routing code needs two keys instead of one composite
+ * // but works only for the tables with the "project-instance" name
+ * // syntax.
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{project_id=projects/*}/instances/*/**"
+ * }
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "projects/*/{instance_id=instances/*}/**"
+ * }
+ * };
+ * result:
+ * x-goog-request-params:
+ * project_id=projects/proj_foo&instance_id=instances/instance_bar
+ * Sub-example 6b
+ * Make the templates loose, so that if the `table_name` does not
+ * have an instance information, just the project id part is sent.
+ * annotation:
+ * option (google.api.routing) = {
+ * // The routing code wants two keys instead of one composite
+ * // but will work with just the `project_id` for tables without
+ * // an instance in the `table_name`.
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{project_id=projects/*}/**"
+ * }
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "projects/*/{instance_id=instances/*}/**"
+ * }
+ * };
+ * result (is the same as 6a for our example message because it has the instance
+ * information):
+ * x-goog-request-params:
+ * project_id=projects/proj_foo&instance_id=instances/instance_bar
+ * Example 7
+ * Extracting multiple routing header key-value pairs by matching
+ * several path templates on multiple request fields.
+ * NB: note that here there is no way to specify sending nothing if one of the
+ * fields does not match its template. E.g. if the `table_name` is in the wrong
+ * format, the `project_id` will not be sent, but the `routing_id` will be.
+ * The backend routing code has to be aware of that and be prepared to not
+ * receive a full complement of keys if it expects multiple.
+ * annotation:
+ * option (google.api.routing) = {
+ * // The routing needs both `project_id` and `routing_id`
+ * // (from the `app_profile_id` field) for routing.
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{project_id=projects/*}/**"
+ * }
+ * routing_parameters {
+ * field: "app_profile_id"
+ * path_template: "{routing_id=**}"
+ * }
+ * };
+ * result:
+ * x-goog-request-params:
+ * project_id=projects/proj_foo&routing_id=profiles/prof_qux
+ * Example 8
+ * Extracting a single routing header key-value pair by matching
+ * several conflictingly named path templates on several request fields. The
+ * last template to match "wins" the conflict.
+ * annotation:
+ * option (google.api.routing) = {
+ * // The `routing_id` can be a project id or a region id depending on
+ * // the table name format, but only if the `app_profile_id` is not set.
+ * // If `app_profile_id` is set it should be used instead.
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{routing_id=projects/*}/**"
+ * }
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{routing_id=regions/*}/**"
+ * }
+ * routing_parameters {
+ * field: "app_profile_id"
+ * path_template: "{routing_id=**}"
+ * }
+ * };
+ * result:
+ * x-goog-request-params: routing_id=profiles/prof_qux
+ * Example 9
+ * Bringing it all together.
+ * annotation:
+ * option (google.api.routing) = {
+ * // For routing both `table_location` and a `routing_id` are needed.
+ * //
+ * // table_location can be either an instance id or a region+zone id.
+ * //
+ * // For `routing_id`, take the value of `app_profile_id`
+ * // - If it's in the format `profiles/`, send
+ * // just the `` part.
+ * // - If it's any other literal, send it as is.
+ * // If the `app_profile_id` is empty, and the `table_name` starts with
+ * // the project_id, send that instead.
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "projects/*/{table_location=instances/*}/tables/*"
+ * }
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{table_location=regions/*/zones/*}/tables/*"
+ * }
+ * routing_parameters {
+ * field: "table_name"
+ * path_template: "{routing_id=projects/*}/**"
+ * }
+ * routing_parameters {
+ * field: "app_profile_id"
+ * path_template: "{routing_id=**}"
+ * }
+ * routing_parameters {
+ * field: "app_profile_id"
+ * path_template: "profiles/{routing_id=*}"
+ * }
+ * };
+ * result:
+ * x-goog-request-params:
+ * table_location=instances/instance_bar&routing_id=prof_qux
+ *
+ * Generated from protobuf message google.api.RoutingRule
+ */
+class RoutingRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A collection of Routing Parameter specifications.
+ * **NOTE:** If multiple Routing Parameters describe the same key
+ * (via the `path_template` field or via the `field` field when
+ * `path_template` is not provided), "last one wins" rule
+ * determines which Parameter gets used.
+ * See the examples for more details.
+ *
+ * Generated from protobuf field repeated .google.api.RoutingParameter routing_parameters = 2;
+ */
+ private $routing_parameters;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\RoutingParameter>|\Google\Protobuf\Internal\RepeatedField $routing_parameters
+ * A collection of Routing Parameter specifications.
+ * **NOTE:** If multiple Routing Parameters describe the same key
+ * (via the `path_template` field or via the `field` field when
+ * `path_template` is not provided), "last one wins" rule
+ * determines which Parameter gets used.
+ * See the examples for more details.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Routing::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A collection of Routing Parameter specifications.
+ * **NOTE:** If multiple Routing Parameters describe the same key
+ * (via the `path_template` field or via the `field` field when
+ * `path_template` is not provided), "last one wins" rule
+ * determines which Parameter gets used.
+ * See the examples for more details.
+ *
+ * Generated from protobuf field repeated .google.api.RoutingParameter routing_parameters = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRoutingParameters()
+ {
+ return $this->routing_parameters;
+ }
+
+ /**
+ * A collection of Routing Parameter specifications.
+ * **NOTE:** If multiple Routing Parameters describe the same key
+ * (via the `path_template` field or via the `field` field when
+ * `path_template` is not provided), "last one wins" rule
+ * determines which Parameter gets used.
+ * See the examples for more details.
+ *
+ * Generated from protobuf field repeated .google.api.RoutingParameter routing_parameters = 2;
+ * @param array<\Google\Api\RoutingParameter>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRoutingParameters($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\RoutingParameter::class);
+ $this->routing_parameters = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/RubySettings.php b/tests/php_test_files/vendor/google/common-protos/src/Api/RubySettings.php
new file mode 100644
index 0000000..2ca343c
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/RubySettings.php
@@ -0,0 +1,77 @@
+google.api.RubySettings
+ */
+class RubySettings extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ */
+ protected $common = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Api\CommonLanguageSettings $common
+ * Some settings.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Client::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @return \Google\Api\CommonLanguageSettings|null
+ */
+ public function getCommon()
+ {
+ return $this->common;
+ }
+
+ public function hasCommon()
+ {
+ return isset($this->common);
+ }
+
+ public function clearCommon()
+ {
+ unset($this->common);
+ }
+
+ /**
+ * Some settings.
+ *
+ * Generated from protobuf field .google.api.CommonLanguageSettings common = 1;
+ * @param \Google\Api\CommonLanguageSettings $var
+ * @return $this
+ */
+ public function setCommon($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\CommonLanguageSettings::class);
+ $this->common = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Service.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Service.php
new file mode 100644
index 0000000..c7ec18e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Service.php
@@ -0,0 +1,1246 @@
+google.api.Service
+ */
+class Service extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The service name, which is a DNS-like logical identifier for the
+ * service, such as `calendar.googleapis.com`. The service name
+ * typically goes through DNS verification to make sure the owner
+ * of the service also owns the DNS name.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The product title for this service, it is the name displayed in Google
+ * Cloud Console.
+ *
+ * Generated from protobuf field string title = 2;
+ */
+ protected $title = '';
+ /**
+ * The Google project that owns this service.
+ *
+ * Generated from protobuf field string producer_project_id = 22;
+ */
+ protected $producer_project_id = '';
+ /**
+ * A unique ID for a specific instance of this message, typically assigned
+ * by the client for tracking purpose. Must be no longer than 63 characters
+ * and only lower case letters, digits, '.', '_' and '-' are allowed. If
+ * empty, the server may choose to generate one instead.
+ *
+ * Generated from protobuf field string id = 33;
+ */
+ protected $id = '';
+ /**
+ * A list of API interfaces exported by this service. Only the `name` field
+ * of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by
+ * the configuration author, as the remaining fields will be derived from the
+ * IDL during the normalization process. It is an error to specify an API
+ * interface here which cannot be resolved against the associated IDL files.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Api apis = 3;
+ */
+ private $apis;
+ /**
+ * A list of all proto message types included in this API service.
+ * Types referenced directly or indirectly by the `apis` are automatically
+ * included. Messages which are not referenced but shall be included, such as
+ * types used by the `google.protobuf.Any` type, should be listed here by
+ * name by the configuration author. Example:
+ * types:
+ * - name: google.protobuf.Int32
+ *
+ * Generated from protobuf field repeated .google.protobuf.Type types = 4;
+ */
+ private $types;
+ /**
+ * A list of all enum types included in this API service. Enums referenced
+ * directly or indirectly by the `apis` are automatically included. Enums
+ * which are not referenced but shall be included should be listed here by
+ * name by the configuration author. Example:
+ * enums:
+ * - name: google.someapi.v1.SomeEnum
+ *
+ * Generated from protobuf field repeated .google.protobuf.Enum enums = 5;
+ */
+ private $enums;
+ /**
+ * Additional API documentation.
+ *
+ * Generated from protobuf field .google.api.Documentation documentation = 6;
+ */
+ protected $documentation = null;
+ /**
+ * API backend configuration.
+ *
+ * Generated from protobuf field .google.api.Backend backend = 8;
+ */
+ protected $backend = null;
+ /**
+ * HTTP configuration.
+ *
+ * Generated from protobuf field .google.api.Http http = 9;
+ */
+ protected $http = null;
+ /**
+ * Quota configuration.
+ *
+ * Generated from protobuf field .google.api.Quota quota = 10;
+ */
+ protected $quota = null;
+ /**
+ * Auth configuration.
+ *
+ * Generated from protobuf field .google.api.Authentication authentication = 11;
+ */
+ protected $authentication = null;
+ /**
+ * Context configuration.
+ *
+ * Generated from protobuf field .google.api.Context context = 12;
+ */
+ protected $context = null;
+ /**
+ * Configuration controlling usage of this service.
+ *
+ * Generated from protobuf field .google.api.Usage usage = 15;
+ */
+ protected $usage = null;
+ /**
+ * Configuration for network endpoints. If this is empty, then an endpoint
+ * with the same name as the service is automatically generated to service all
+ * defined APIs.
+ *
+ * Generated from protobuf field repeated .google.api.Endpoint endpoints = 18;
+ */
+ private $endpoints;
+ /**
+ * Configuration for the service control plane.
+ *
+ * Generated from protobuf field .google.api.Control control = 21;
+ */
+ protected $control = null;
+ /**
+ * Defines the logs used by this service.
+ *
+ * Generated from protobuf field repeated .google.api.LogDescriptor logs = 23;
+ */
+ private $logs;
+ /**
+ * Defines the metrics used by this service.
+ *
+ * Generated from protobuf field repeated .google.api.MetricDescriptor metrics = 24;
+ */
+ private $metrics;
+ /**
+ * Defines the monitored resources used by this service. This is required
+ * by the [Service.monitoring][google.api.Service.monitoring] and
+ * [Service.logging][google.api.Service.logging] configurations.
+ *
+ * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25;
+ */
+ private $monitored_resources;
+ /**
+ * Billing configuration.
+ *
+ * Generated from protobuf field .google.api.Billing billing = 26;
+ */
+ protected $billing = null;
+ /**
+ * Logging configuration.
+ *
+ * Generated from protobuf field .google.api.Logging logging = 27;
+ */
+ protected $logging = null;
+ /**
+ * Monitoring configuration.
+ *
+ * Generated from protobuf field .google.api.Monitoring monitoring = 28;
+ */
+ protected $monitoring = null;
+ /**
+ * System parameter configuration.
+ *
+ * Generated from protobuf field .google.api.SystemParameters system_parameters = 29;
+ */
+ protected $system_parameters = null;
+ /**
+ * Output only. The source information for this configuration if available.
+ *
+ * Generated from protobuf field .google.api.SourceInfo source_info = 37;
+ */
+ protected $source_info = null;
+ /**
+ * Settings for [Google Cloud Client
+ * libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
+ * generated from APIs defined as protocol buffers.
+ *
+ * Generated from protobuf field .google.api.Publishing publishing = 45;
+ */
+ protected $publishing = null;
+ /**
+ * Obsolete. Do not use.
+ * This field has no semantic meaning. The service config compiler always
+ * sets this field to `3`.
+ *
+ * Generated from protobuf field .google.protobuf.UInt32Value config_version = 20;
+ */
+ protected $config_version = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The service name, which is a DNS-like logical identifier for the
+ * service, such as `calendar.googleapis.com`. The service name
+ * typically goes through DNS verification to make sure the owner
+ * of the service also owns the DNS name.
+ * @type string $title
+ * The product title for this service, it is the name displayed in Google
+ * Cloud Console.
+ * @type string $producer_project_id
+ * The Google project that owns this service.
+ * @type string $id
+ * A unique ID for a specific instance of this message, typically assigned
+ * by the client for tracking purpose. Must be no longer than 63 characters
+ * and only lower case letters, digits, '.', '_' and '-' are allowed. If
+ * empty, the server may choose to generate one instead.
+ * @type array<\Google\Protobuf\Api>|\Google\Protobuf\Internal\RepeatedField $apis
+ * A list of API interfaces exported by this service. Only the `name` field
+ * of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by
+ * the configuration author, as the remaining fields will be derived from the
+ * IDL during the normalization process. It is an error to specify an API
+ * interface here which cannot be resolved against the associated IDL files.
+ * @type array<\Google\Protobuf\Type>|\Google\Protobuf\Internal\RepeatedField $types
+ * A list of all proto message types included in this API service.
+ * Types referenced directly or indirectly by the `apis` are automatically
+ * included. Messages which are not referenced but shall be included, such as
+ * types used by the `google.protobuf.Any` type, should be listed here by
+ * name by the configuration author. Example:
+ * types:
+ * - name: google.protobuf.Int32
+ * @type array<\Google\Protobuf\Enum>|\Google\Protobuf\Internal\RepeatedField $enums
+ * A list of all enum types included in this API service. Enums referenced
+ * directly or indirectly by the `apis` are automatically included. Enums
+ * which are not referenced but shall be included should be listed here by
+ * name by the configuration author. Example:
+ * enums:
+ * - name: google.someapi.v1.SomeEnum
+ * @type \Google\Api\Documentation $documentation
+ * Additional API documentation.
+ * @type \Google\Api\Backend $backend
+ * API backend configuration.
+ * @type \Google\Api\Http $http
+ * HTTP configuration.
+ * @type \Google\Api\Quota $quota
+ * Quota configuration.
+ * @type \Google\Api\Authentication $authentication
+ * Auth configuration.
+ * @type \Google\Api\Context $context
+ * Context configuration.
+ * @type \Google\Api\Usage $usage
+ * Configuration controlling usage of this service.
+ * @type array<\Google\Api\Endpoint>|\Google\Protobuf\Internal\RepeatedField $endpoints
+ * Configuration for network endpoints. If this is empty, then an endpoint
+ * with the same name as the service is automatically generated to service all
+ * defined APIs.
+ * @type \Google\Api\Control $control
+ * Configuration for the service control plane.
+ * @type array<\Google\Api\LogDescriptor>|\Google\Protobuf\Internal\RepeatedField $logs
+ * Defines the logs used by this service.
+ * @type array<\Google\Api\MetricDescriptor>|\Google\Protobuf\Internal\RepeatedField $metrics
+ * Defines the metrics used by this service.
+ * @type array<\Google\Api\MonitoredResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $monitored_resources
+ * Defines the monitored resources used by this service. This is required
+ * by the [Service.monitoring][google.api.Service.monitoring] and
+ * [Service.logging][google.api.Service.logging] configurations.
+ * @type \Google\Api\Billing $billing
+ * Billing configuration.
+ * @type \Google\Api\Logging $logging
+ * Logging configuration.
+ * @type \Google\Api\Monitoring $monitoring
+ * Monitoring configuration.
+ * @type \Google\Api\SystemParameters $system_parameters
+ * System parameter configuration.
+ * @type \Google\Api\SourceInfo $source_info
+ * Output only. The source information for this configuration if available.
+ * @type \Google\Api\Publishing $publishing
+ * Settings for [Google Cloud Client
+ * libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
+ * generated from APIs defined as protocol buffers.
+ * @type \Google\Protobuf\UInt32Value $config_version
+ * Obsolete. Do not use.
+ * This field has no semantic meaning. The service config compiler always
+ * sets this field to `3`.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Service::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The service name, which is a DNS-like logical identifier for the
+ * service, such as `calendar.googleapis.com`. The service name
+ * typically goes through DNS verification to make sure the owner
+ * of the service also owns the DNS name.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The service name, which is a DNS-like logical identifier for the
+ * service, such as `calendar.googleapis.com`. The service name
+ * typically goes through DNS verification to make sure the owner
+ * of the service also owns the DNS name.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The product title for this service, it is the name displayed in Google
+ * Cloud Console.
+ *
+ * Generated from protobuf field string title = 2;
+ * @return string
+ */
+ public function getTitle()
+ {
+ return $this->title;
+ }
+
+ /**
+ * The product title for this service, it is the name displayed in Google
+ * Cloud Console.
+ *
+ * Generated from protobuf field string title = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setTitle($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->title = $var;
+
+ return $this;
+ }
+
+ /**
+ * The Google project that owns this service.
+ *
+ * Generated from protobuf field string producer_project_id = 22;
+ * @return string
+ */
+ public function getProducerProjectId()
+ {
+ return $this->producer_project_id;
+ }
+
+ /**
+ * The Google project that owns this service.
+ *
+ * Generated from protobuf field string producer_project_id = 22;
+ * @param string $var
+ * @return $this
+ */
+ public function setProducerProjectId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->producer_project_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * A unique ID for a specific instance of this message, typically assigned
+ * by the client for tracking purpose. Must be no longer than 63 characters
+ * and only lower case letters, digits, '.', '_' and '-' are allowed. If
+ * empty, the server may choose to generate one instead.
+ *
+ * Generated from protobuf field string id = 33;
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * A unique ID for a specific instance of this message, typically assigned
+ * by the client for tracking purpose. Must be no longer than 63 characters
+ * and only lower case letters, digits, '.', '_' and '-' are allowed. If
+ * empty, the server may choose to generate one instead.
+ *
+ * Generated from protobuf field string id = 33;
+ * @param string $var
+ * @return $this
+ */
+ public function setId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->id = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of API interfaces exported by this service. Only the `name` field
+ * of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by
+ * the configuration author, as the remaining fields will be derived from the
+ * IDL during the normalization process. It is an error to specify an API
+ * interface here which cannot be resolved against the associated IDL files.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Api apis = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getApis()
+ {
+ return $this->apis;
+ }
+
+ /**
+ * A list of API interfaces exported by this service. Only the `name` field
+ * of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by
+ * the configuration author, as the remaining fields will be derived from the
+ * IDL during the normalization process. It is an error to specify an API
+ * interface here which cannot be resolved against the associated IDL files.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Api apis = 3;
+ * @param array<\Google\Protobuf\Api>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setApis($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Api::class);
+ $this->apis = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A list of all proto message types included in this API service.
+ * Types referenced directly or indirectly by the `apis` are automatically
+ * included. Messages which are not referenced but shall be included, such as
+ * types used by the `google.protobuf.Any` type, should be listed here by
+ * name by the configuration author. Example:
+ * types:
+ * - name: google.protobuf.Int32
+ *
+ * Generated from protobuf field repeated .google.protobuf.Type types = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getTypes()
+ {
+ return $this->types;
+ }
+
+ /**
+ * A list of all proto message types included in this API service.
+ * Types referenced directly or indirectly by the `apis` are automatically
+ * included. Messages which are not referenced but shall be included, such as
+ * types used by the `google.protobuf.Any` type, should be listed here by
+ * name by the configuration author. Example:
+ * types:
+ * - name: google.protobuf.Int32
+ *
+ * Generated from protobuf field repeated .google.protobuf.Type types = 4;
+ * @param array<\Google\Protobuf\Type>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setTypes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Type::class);
+ $this->types = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A list of all enum types included in this API service. Enums referenced
+ * directly or indirectly by the `apis` are automatically included. Enums
+ * which are not referenced but shall be included should be listed here by
+ * name by the configuration author. Example:
+ * enums:
+ * - name: google.someapi.v1.SomeEnum
+ *
+ * Generated from protobuf field repeated .google.protobuf.Enum enums = 5;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnums()
+ {
+ return $this->enums;
+ }
+
+ /**
+ * A list of all enum types included in this API service. Enums referenced
+ * directly or indirectly by the `apis` are automatically included. Enums
+ * which are not referenced but shall be included should be listed here by
+ * name by the configuration author. Example:
+ * enums:
+ * - name: google.someapi.v1.SomeEnum
+ *
+ * Generated from protobuf field repeated .google.protobuf.Enum enums = 5;
+ * @param array<\Google\Protobuf\Enum>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEnums($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Enum::class);
+ $this->enums = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Additional API documentation.
+ *
+ * Generated from protobuf field .google.api.Documentation documentation = 6;
+ * @return \Google\Api\Documentation|null
+ */
+ public function getDocumentation()
+ {
+ return $this->documentation;
+ }
+
+ public function hasDocumentation()
+ {
+ return isset($this->documentation);
+ }
+
+ public function clearDocumentation()
+ {
+ unset($this->documentation);
+ }
+
+ /**
+ * Additional API documentation.
+ *
+ * Generated from protobuf field .google.api.Documentation documentation = 6;
+ * @param \Google\Api\Documentation $var
+ * @return $this
+ */
+ public function setDocumentation($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Documentation::class);
+ $this->documentation = $var;
+
+ return $this;
+ }
+
+ /**
+ * API backend configuration.
+ *
+ * Generated from protobuf field .google.api.Backend backend = 8;
+ * @return \Google\Api\Backend|null
+ */
+ public function getBackend()
+ {
+ return $this->backend;
+ }
+
+ public function hasBackend()
+ {
+ return isset($this->backend);
+ }
+
+ public function clearBackend()
+ {
+ unset($this->backend);
+ }
+
+ /**
+ * API backend configuration.
+ *
+ * Generated from protobuf field .google.api.Backend backend = 8;
+ * @param \Google\Api\Backend $var
+ * @return $this
+ */
+ public function setBackend($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Backend::class);
+ $this->backend = $var;
+
+ return $this;
+ }
+
+ /**
+ * HTTP configuration.
+ *
+ * Generated from protobuf field .google.api.Http http = 9;
+ * @return \Google\Api\Http|null
+ */
+ public function getHttp()
+ {
+ return $this->http;
+ }
+
+ public function hasHttp()
+ {
+ return isset($this->http);
+ }
+
+ public function clearHttp()
+ {
+ unset($this->http);
+ }
+
+ /**
+ * HTTP configuration.
+ *
+ * Generated from protobuf field .google.api.Http http = 9;
+ * @param \Google\Api\Http $var
+ * @return $this
+ */
+ public function setHttp($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Http::class);
+ $this->http = $var;
+
+ return $this;
+ }
+
+ /**
+ * Quota configuration.
+ *
+ * Generated from protobuf field .google.api.Quota quota = 10;
+ * @return \Google\Api\Quota|null
+ */
+ public function getQuota()
+ {
+ return $this->quota;
+ }
+
+ public function hasQuota()
+ {
+ return isset($this->quota);
+ }
+
+ public function clearQuota()
+ {
+ unset($this->quota);
+ }
+
+ /**
+ * Quota configuration.
+ *
+ * Generated from protobuf field .google.api.Quota quota = 10;
+ * @param \Google\Api\Quota $var
+ * @return $this
+ */
+ public function setQuota($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Quota::class);
+ $this->quota = $var;
+
+ return $this;
+ }
+
+ /**
+ * Auth configuration.
+ *
+ * Generated from protobuf field .google.api.Authentication authentication = 11;
+ * @return \Google\Api\Authentication|null
+ */
+ public function getAuthentication()
+ {
+ return $this->authentication;
+ }
+
+ public function hasAuthentication()
+ {
+ return isset($this->authentication);
+ }
+
+ public function clearAuthentication()
+ {
+ unset($this->authentication);
+ }
+
+ /**
+ * Auth configuration.
+ *
+ * Generated from protobuf field .google.api.Authentication authentication = 11;
+ * @param \Google\Api\Authentication $var
+ * @return $this
+ */
+ public function setAuthentication($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Authentication::class);
+ $this->authentication = $var;
+
+ return $this;
+ }
+
+ /**
+ * Context configuration.
+ *
+ * Generated from protobuf field .google.api.Context context = 12;
+ * @return \Google\Api\Context|null
+ */
+ public function getContext()
+ {
+ return $this->context;
+ }
+
+ public function hasContext()
+ {
+ return isset($this->context);
+ }
+
+ public function clearContext()
+ {
+ unset($this->context);
+ }
+
+ /**
+ * Context configuration.
+ *
+ * Generated from protobuf field .google.api.Context context = 12;
+ * @param \Google\Api\Context $var
+ * @return $this
+ */
+ public function setContext($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Context::class);
+ $this->context = $var;
+
+ return $this;
+ }
+
+ /**
+ * Configuration controlling usage of this service.
+ *
+ * Generated from protobuf field .google.api.Usage usage = 15;
+ * @return \Google\Api\Usage|null
+ */
+ public function getUsage()
+ {
+ return $this->usage;
+ }
+
+ public function hasUsage()
+ {
+ return isset($this->usage);
+ }
+
+ public function clearUsage()
+ {
+ unset($this->usage);
+ }
+
+ /**
+ * Configuration controlling usage of this service.
+ *
+ * Generated from protobuf field .google.api.Usage usage = 15;
+ * @param \Google\Api\Usage $var
+ * @return $this
+ */
+ public function setUsage($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Usage::class);
+ $this->usage = $var;
+
+ return $this;
+ }
+
+ /**
+ * Configuration for network endpoints. If this is empty, then an endpoint
+ * with the same name as the service is automatically generated to service all
+ * defined APIs.
+ *
+ * Generated from protobuf field repeated .google.api.Endpoint endpoints = 18;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEndpoints()
+ {
+ return $this->endpoints;
+ }
+
+ /**
+ * Configuration for network endpoints. If this is empty, then an endpoint
+ * with the same name as the service is automatically generated to service all
+ * defined APIs.
+ *
+ * Generated from protobuf field repeated .google.api.Endpoint endpoints = 18;
+ * @param array<\Google\Api\Endpoint>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEndpoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Endpoint::class);
+ $this->endpoints = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Configuration for the service control plane.
+ *
+ * Generated from protobuf field .google.api.Control control = 21;
+ * @return \Google\Api\Control|null
+ */
+ public function getControl()
+ {
+ return $this->control;
+ }
+
+ public function hasControl()
+ {
+ return isset($this->control);
+ }
+
+ public function clearControl()
+ {
+ unset($this->control);
+ }
+
+ /**
+ * Configuration for the service control plane.
+ *
+ * Generated from protobuf field .google.api.Control control = 21;
+ * @param \Google\Api\Control $var
+ * @return $this
+ */
+ public function setControl($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Control::class);
+ $this->control = $var;
+
+ return $this;
+ }
+
+ /**
+ * Defines the logs used by this service.
+ *
+ * Generated from protobuf field repeated .google.api.LogDescriptor logs = 23;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLogs()
+ {
+ return $this->logs;
+ }
+
+ /**
+ * Defines the logs used by this service.
+ *
+ * Generated from protobuf field repeated .google.api.LogDescriptor logs = 23;
+ * @param array<\Google\Api\LogDescriptor>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLogs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\LogDescriptor::class);
+ $this->logs = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Defines the metrics used by this service.
+ *
+ * Generated from protobuf field repeated .google.api.MetricDescriptor metrics = 24;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMetrics()
+ {
+ return $this->metrics;
+ }
+
+ /**
+ * Defines the metrics used by this service.
+ *
+ * Generated from protobuf field repeated .google.api.MetricDescriptor metrics = 24;
+ * @param array<\Google\Api\MetricDescriptor>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MetricDescriptor::class);
+ $this->metrics = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Defines the monitored resources used by this service. This is required
+ * by the [Service.monitoring][google.api.Service.monitoring] and
+ * [Service.logging][google.api.Service.logging] configurations.
+ *
+ * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMonitoredResources()
+ {
+ return $this->monitored_resources;
+ }
+
+ /**
+ * Defines the monitored resources used by this service. This is required
+ * by the [Service.monitoring][google.api.Service.monitoring] and
+ * [Service.logging][google.api.Service.logging] configurations.
+ *
+ * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25;
+ * @param array<\Google\Api\MonitoredResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMonitoredResources($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MonitoredResourceDescriptor::class);
+ $this->monitored_resources = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Billing configuration.
+ *
+ * Generated from protobuf field .google.api.Billing billing = 26;
+ * @return \Google\Api\Billing|null
+ */
+ public function getBilling()
+ {
+ return $this->billing;
+ }
+
+ public function hasBilling()
+ {
+ return isset($this->billing);
+ }
+
+ public function clearBilling()
+ {
+ unset($this->billing);
+ }
+
+ /**
+ * Billing configuration.
+ *
+ * Generated from protobuf field .google.api.Billing billing = 26;
+ * @param \Google\Api\Billing $var
+ * @return $this
+ */
+ public function setBilling($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Billing::class);
+ $this->billing = $var;
+
+ return $this;
+ }
+
+ /**
+ * Logging configuration.
+ *
+ * Generated from protobuf field .google.api.Logging logging = 27;
+ * @return \Google\Api\Logging|null
+ */
+ public function getLogging()
+ {
+ return $this->logging;
+ }
+
+ public function hasLogging()
+ {
+ return isset($this->logging);
+ }
+
+ public function clearLogging()
+ {
+ unset($this->logging);
+ }
+
+ /**
+ * Logging configuration.
+ *
+ * Generated from protobuf field .google.api.Logging logging = 27;
+ * @param \Google\Api\Logging $var
+ * @return $this
+ */
+ public function setLogging($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Logging::class);
+ $this->logging = $var;
+
+ return $this;
+ }
+
+ /**
+ * Monitoring configuration.
+ *
+ * Generated from protobuf field .google.api.Monitoring monitoring = 28;
+ * @return \Google\Api\Monitoring|null
+ */
+ public function getMonitoring()
+ {
+ return $this->monitoring;
+ }
+
+ public function hasMonitoring()
+ {
+ return isset($this->monitoring);
+ }
+
+ public function clearMonitoring()
+ {
+ unset($this->monitoring);
+ }
+
+ /**
+ * Monitoring configuration.
+ *
+ * Generated from protobuf field .google.api.Monitoring monitoring = 28;
+ * @param \Google\Api\Monitoring $var
+ * @return $this
+ */
+ public function setMonitoring($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Monitoring::class);
+ $this->monitoring = $var;
+
+ return $this;
+ }
+
+ /**
+ * System parameter configuration.
+ *
+ * Generated from protobuf field .google.api.SystemParameters system_parameters = 29;
+ * @return \Google\Api\SystemParameters|null
+ */
+ public function getSystemParameters()
+ {
+ return $this->system_parameters;
+ }
+
+ public function hasSystemParameters()
+ {
+ return isset($this->system_parameters);
+ }
+
+ public function clearSystemParameters()
+ {
+ unset($this->system_parameters);
+ }
+
+ /**
+ * System parameter configuration.
+ *
+ * Generated from protobuf field .google.api.SystemParameters system_parameters = 29;
+ * @param \Google\Api\SystemParameters $var
+ * @return $this
+ */
+ public function setSystemParameters($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\SystemParameters::class);
+ $this->system_parameters = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The source information for this configuration if available.
+ *
+ * Generated from protobuf field .google.api.SourceInfo source_info = 37;
+ * @return \Google\Api\SourceInfo|null
+ */
+ public function getSourceInfo()
+ {
+ return $this->source_info;
+ }
+
+ public function hasSourceInfo()
+ {
+ return isset($this->source_info);
+ }
+
+ public function clearSourceInfo()
+ {
+ unset($this->source_info);
+ }
+
+ /**
+ * Output only. The source information for this configuration if available.
+ *
+ * Generated from protobuf field .google.api.SourceInfo source_info = 37;
+ * @param \Google\Api\SourceInfo $var
+ * @return $this
+ */
+ public function setSourceInfo($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\SourceInfo::class);
+ $this->source_info = $var;
+
+ return $this;
+ }
+
+ /**
+ * Settings for [Google Cloud Client
+ * libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
+ * generated from APIs defined as protocol buffers.
+ *
+ * Generated from protobuf field .google.api.Publishing publishing = 45;
+ * @return \Google\Api\Publishing|null
+ */
+ public function getPublishing()
+ {
+ return $this->publishing;
+ }
+
+ public function hasPublishing()
+ {
+ return isset($this->publishing);
+ }
+
+ public function clearPublishing()
+ {
+ unset($this->publishing);
+ }
+
+ /**
+ * Settings for [Google Cloud Client
+ * libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
+ * generated from APIs defined as protocol buffers.
+ *
+ * Generated from protobuf field .google.api.Publishing publishing = 45;
+ * @param \Google\Api\Publishing $var
+ * @return $this
+ */
+ public function setPublishing($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Api\Publishing::class);
+ $this->publishing = $var;
+
+ return $this;
+ }
+
+ /**
+ * Obsolete. Do not use.
+ * This field has no semantic meaning. The service config compiler always
+ * sets this field to `3`.
+ *
+ * Generated from protobuf field .google.protobuf.UInt32Value config_version = 20;
+ * @return \Google\Protobuf\UInt32Value|null
+ */
+ public function getConfigVersion()
+ {
+ return $this->config_version;
+ }
+
+ public function hasConfigVersion()
+ {
+ return isset($this->config_version);
+ }
+
+ public function clearConfigVersion()
+ {
+ unset($this->config_version);
+ }
+
+ /**
+ * Returns the unboxed value from getConfigVersion()
+
+ * Obsolete. Do not use.
+ * This field has no semantic meaning. The service config compiler always
+ * sets this field to `3`.
+ *
+ * Generated from protobuf field .google.protobuf.UInt32Value config_version = 20;
+ * @return int|null
+ */
+ public function getConfigVersionUnwrapped()
+ {
+ return $this->readWrapperValue("config_version");
+ }
+
+ /**
+ * Obsolete. Do not use.
+ * This field has no semantic meaning. The service config compiler always
+ * sets this field to `3`.
+ *
+ * Generated from protobuf field .google.protobuf.UInt32Value config_version = 20;
+ * @param \Google\Protobuf\UInt32Value $var
+ * @return $this
+ */
+ public function setConfigVersion($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\UInt32Value::class);
+ $this->config_version = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the field by wrapping a primitive type in a Google\Protobuf\UInt32Value object.
+
+ * Obsolete. Do not use.
+ * This field has no semantic meaning. The service config compiler always
+ * sets this field to `3`.
+ *
+ * Generated from protobuf field .google.protobuf.UInt32Value config_version = 20;
+ * @param int|null $var
+ * @return $this
+ */
+ public function setConfigVersionUnwrapped($var)
+ {
+ $this->writeWrapperValue("config_version", $var);
+ return $this;}
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/SourceInfo.php b/tests/php_test_files/vendor/google/common-protos/src/Api/SourceInfo.php
new file mode 100644
index 0000000..503f317
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/SourceInfo.php
@@ -0,0 +1,67 @@
+google.api.SourceInfo
+ */
+class SourceInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * All files used during config generation.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any source_files = 1;
+ */
+ private $source_files;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $source_files
+ * All files used during config generation.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\SourceInfo::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * All files used during config generation.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any source_files = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getSourceFiles()
+ {
+ return $this->source_files;
+ }
+
+ /**
+ * All files used during config generation.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any source_files = 1;
+ * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setSourceFiles($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class);
+ $this->source_files = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/SystemParameter.php b/tests/php_test_files/vendor/google/common-protos/src/Api/SystemParameter.php
new file mode 100644
index 0000000..e6828a2
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/SystemParameter.php
@@ -0,0 +1,145 @@
+google.api.SystemParameter
+ */
+class SystemParameter extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Define the name of the parameter, such as "api_key" . It is case sensitive.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * Define the HTTP header name to use for the parameter. It is case
+ * insensitive.
+ *
+ * Generated from protobuf field string http_header = 2;
+ */
+ protected $http_header = '';
+ /**
+ * Define the URL query parameter name to use for the parameter. It is case
+ * sensitive.
+ *
+ * Generated from protobuf field string url_query_parameter = 3;
+ */
+ protected $url_query_parameter = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Define the name of the parameter, such as "api_key" . It is case sensitive.
+ * @type string $http_header
+ * Define the HTTP header name to use for the parameter. It is case
+ * insensitive.
+ * @type string $url_query_parameter
+ * Define the URL query parameter name to use for the parameter. It is case
+ * sensitive.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\SystemParameter::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Define the name of the parameter, such as "api_key" . It is case sensitive.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Define the name of the parameter, such as "api_key" . It is case sensitive.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Define the HTTP header name to use for the parameter. It is case
+ * insensitive.
+ *
+ * Generated from protobuf field string http_header = 2;
+ * @return string
+ */
+ public function getHttpHeader()
+ {
+ return $this->http_header;
+ }
+
+ /**
+ * Define the HTTP header name to use for the parameter. It is case
+ * insensitive.
+ *
+ * Generated from protobuf field string http_header = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setHttpHeader($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->http_header = $var;
+
+ return $this;
+ }
+
+ /**
+ * Define the URL query parameter name to use for the parameter. It is case
+ * sensitive.
+ *
+ * Generated from protobuf field string url_query_parameter = 3;
+ * @return string
+ */
+ public function getUrlQueryParameter()
+ {
+ return $this->url_query_parameter;
+ }
+
+ /**
+ * Define the URL query parameter name to use for the parameter. It is case
+ * sensitive.
+ *
+ * Generated from protobuf field string url_query_parameter = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setUrlQueryParameter($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->url_query_parameter = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/SystemParameterRule.php b/tests/php_test_files/vendor/google/common-protos/src/Api/SystemParameterRule.php
new file mode 100644
index 0000000..b2b475c
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/SystemParameterRule.php
@@ -0,0 +1,130 @@
+google.api.SystemParameterRule
+ */
+class SystemParameterRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Selects the methods to which this rule applies. Use '*' to indicate all
+ * methods in all APIs.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * Define parameters. Multiple names may be defined for a parameter.
+ * For a given method call, only one of them should be used. If multiple
+ * names are used the behavior is implementation-dependent.
+ * If none of the specified names are present the behavior is
+ * parameter-dependent.
+ *
+ * Generated from protobuf field repeated .google.api.SystemParameter parameters = 2;
+ */
+ private $parameters;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * Selects the methods to which this rule applies. Use '*' to indicate all
+ * methods in all APIs.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * @type array<\Google\Api\SystemParameter>|\Google\Protobuf\Internal\RepeatedField $parameters
+ * Define parameters. Multiple names may be defined for a parameter.
+ * For a given method call, only one of them should be used. If multiple
+ * names are used the behavior is implementation-dependent.
+ * If none of the specified names are present the behavior is
+ * parameter-dependent.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\SystemParameter::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Selects the methods to which this rule applies. Use '*' to indicate all
+ * methods in all APIs.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * Selects the methods to which this rule applies. Use '*' to indicate all
+ * methods in all APIs.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * Define parameters. Multiple names may be defined for a parameter.
+ * For a given method call, only one of them should be used. If multiple
+ * names are used the behavior is implementation-dependent.
+ * If none of the specified names are present the behavior is
+ * parameter-dependent.
+ *
+ * Generated from protobuf field repeated .google.api.SystemParameter parameters = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getParameters()
+ {
+ return $this->parameters;
+ }
+
+ /**
+ * Define parameters. Multiple names may be defined for a parameter.
+ * For a given method call, only one of them should be used. If multiple
+ * names are used the behavior is implementation-dependent.
+ * If none of the specified names are present the behavior is
+ * parameter-dependent.
+ *
+ * Generated from protobuf field repeated .google.api.SystemParameter parameters = 2;
+ * @param array<\Google\Api\SystemParameter>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setParameters($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\SystemParameter::class);
+ $this->parameters = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/SystemParameters.php b/tests/php_test_files/vendor/google/common-protos/src/Api/SystemParameters.php
new file mode 100644
index 0000000..04a674c
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/SystemParameters.php
@@ -0,0 +1,155 @@
+google.api.SystemParameters
+ */
+class SystemParameters extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Define system parameters.
+ * The parameters defined here will override the default parameters
+ * implemented by the system. If this field is missing from the service
+ * config, default system parameters will be used. Default system parameters
+ * and names is implementation-dependent.
+ * Example: define api key for all methods
+ * system_parameters
+ * rules:
+ * - selector: "*"
+ * parameters:
+ * - name: api_key
+ * url_query_parameter: api_key
+ * Example: define 2 api key names for a specific method.
+ * system_parameters
+ * rules:
+ * - selector: "/ListShelves"
+ * parameters:
+ * - name: api_key
+ * http_header: Api-Key1
+ * - name: api_key
+ * http_header: Api-Key2
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.SystemParameterRule rules = 1;
+ */
+ private $rules;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\SystemParameterRule>|\Google\Protobuf\Internal\RepeatedField $rules
+ * Define system parameters.
+ * The parameters defined here will override the default parameters
+ * implemented by the system. If this field is missing from the service
+ * config, default system parameters will be used. Default system parameters
+ * and names is implementation-dependent.
+ * Example: define api key for all methods
+ * system_parameters
+ * rules:
+ * - selector: "*"
+ * parameters:
+ * - name: api_key
+ * url_query_parameter: api_key
+ * Example: define 2 api key names for a specific method.
+ * system_parameters
+ * rules:
+ * - selector: "/ListShelves"
+ * parameters:
+ * - name: api_key
+ * http_header: Api-Key1
+ * - name: api_key
+ * http_header: Api-Key2
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\SystemParameter::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Define system parameters.
+ * The parameters defined here will override the default parameters
+ * implemented by the system. If this field is missing from the service
+ * config, default system parameters will be used. Default system parameters
+ * and names is implementation-dependent.
+ * Example: define api key for all methods
+ * system_parameters
+ * rules:
+ * - selector: "*"
+ * parameters:
+ * - name: api_key
+ * url_query_parameter: api_key
+ * Example: define 2 api key names for a specific method.
+ * system_parameters
+ * rules:
+ * - selector: "/ListShelves"
+ * parameters:
+ * - name: api_key
+ * http_header: Api-Key1
+ * - name: api_key
+ * http_header: Api-Key2
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.SystemParameterRule rules = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRules()
+ {
+ return $this->rules;
+ }
+
+ /**
+ * Define system parameters.
+ * The parameters defined here will override the default parameters
+ * implemented by the system. If this field is missing from the service
+ * config, default system parameters will be used. Default system parameters
+ * and names is implementation-dependent.
+ * Example: define api key for all methods
+ * system_parameters
+ * rules:
+ * - selector: "*"
+ * parameters:
+ * - name: api_key
+ * url_query_parameter: api_key
+ * Example: define 2 api key names for a specific method.
+ * system_parameters
+ * rules:
+ * - selector: "/ListShelves"
+ * parameters:
+ * - name: api_key
+ * http_header: Api-Key1
+ * - name: api_key
+ * http_header: Api-Key2
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.SystemParameterRule rules = 1;
+ * @param array<\Google\Api\SystemParameterRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\SystemParameterRule::class);
+ $this->rules = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/TypeReference.php b/tests/php_test_files/vendor/google/common-protos/src/Api/TypeReference.php
new file mode 100644
index 0000000..1ce287b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/TypeReference.php
@@ -0,0 +1,91 @@
+google.api.TypeReference
+ */
+class TypeReference extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The name of the type that the annotated, generic field may represent.
+ * If the type is in the same protobuf package, the value can be the simple
+ * message name e.g., `"MyMessage"`. Otherwise, the value must be the
+ * fully-qualified message name e.g., `"google.library.v1.Book"`.
+ * If the type(s) are unknown to the service (e.g. the field accepts generic
+ * user input), use the wildcard `"*"` to denote this behavior.
+ * See [AIP-202](https://google.aip.dev/202#type-references) for more details.
+ *
+ * Generated from protobuf field string type_name = 1;
+ */
+ protected $type_name = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $type_name
+ * The name of the type that the annotated, generic field may represent.
+ * If the type is in the same protobuf package, the value can be the simple
+ * message name e.g., `"MyMessage"`. Otherwise, the value must be the
+ * fully-qualified message name e.g., `"google.library.v1.Book"`.
+ * If the type(s) are unknown to the service (e.g. the field accepts generic
+ * user input), use the wildcard `"*"` to denote this behavior.
+ * See [AIP-202](https://google.aip.dev/202#type-references) for more details.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\FieldInfo::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The name of the type that the annotated, generic field may represent.
+ * If the type is in the same protobuf package, the value can be the simple
+ * message name e.g., `"MyMessage"`. Otherwise, the value must be the
+ * fully-qualified message name e.g., `"google.library.v1.Book"`.
+ * If the type(s) are unknown to the service (e.g. the field accepts generic
+ * user input), use the wildcard `"*"` to denote this behavior.
+ * See [AIP-202](https://google.aip.dev/202#type-references) for more details.
+ *
+ * Generated from protobuf field string type_name = 1;
+ * @return string
+ */
+ public function getTypeName()
+ {
+ return $this->type_name;
+ }
+
+ /**
+ * The name of the type that the annotated, generic field may represent.
+ * If the type is in the same protobuf package, the value can be the simple
+ * message name e.g., `"MyMessage"`. Otherwise, the value must be the
+ * fully-qualified message name e.g., `"google.library.v1.Book"`.
+ * If the type(s) are unknown to the service (e.g. the field accepts generic
+ * user input), use the wildcard `"*"` to denote this behavior.
+ * See [AIP-202](https://google.aip.dev/202#type-references) for more details.
+ *
+ * Generated from protobuf field string type_name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setTypeName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type_name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Usage.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Usage.php
new file mode 100644
index 0000000..0ebe664
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Usage.php
@@ -0,0 +1,191 @@
+google.api.Usage
+ */
+class Usage extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Requirements that must be satisfied before a consumer project can use the
+ * service. Each requirement is of the form /;
+ * for example 'serviceusage.googleapis.com/billing-enabled'.
+ * For Google APIs, a Terms of Service requirement must be included here.
+ * Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud".
+ * Other Google APIs should include
+ * "serviceusage.googleapis.com/tos/universal". Additional ToS can be
+ * included based on the business needs.
+ *
+ * Generated from protobuf field repeated string requirements = 1;
+ */
+ private $requirements;
+ /**
+ * A list of usage rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.UsageRule rules = 6;
+ */
+ private $rules;
+ /**
+ * The full resource name of a channel used for sending notifications to the
+ * service producer.
+ * Google Service Management currently only supports
+ * [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
+ * channel. To use Google Cloud Pub/Sub as the channel, this must be the name
+ * of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
+ * documented in https://cloud.google.com/pubsub/docs/overview.
+ *
+ * Generated from protobuf field string producer_notification_channel = 7;
+ */
+ protected $producer_notification_channel = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\RepeatedField $requirements
+ * Requirements that must be satisfied before a consumer project can use the
+ * service. Each requirement is of the form /;
+ * for example 'serviceusage.googleapis.com/billing-enabled'.
+ * For Google APIs, a Terms of Service requirement must be included here.
+ * Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud".
+ * Other Google APIs should include
+ * "serviceusage.googleapis.com/tos/universal". Additional ToS can be
+ * included based on the business needs.
+ * @type array<\Google\Api\UsageRule>|\Google\Protobuf\Internal\RepeatedField $rules
+ * A list of usage rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ * @type string $producer_notification_channel
+ * The full resource name of a channel used for sending notifications to the
+ * service producer.
+ * Google Service Management currently only supports
+ * [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
+ * channel. To use Google Cloud Pub/Sub as the channel, this must be the name
+ * of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
+ * documented in https://cloud.google.com/pubsub/docs/overview.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Usage::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Requirements that must be satisfied before a consumer project can use the
+ * service. Each requirement is of the form /;
+ * for example 'serviceusage.googleapis.com/billing-enabled'.
+ * For Google APIs, a Terms of Service requirement must be included here.
+ * Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud".
+ * Other Google APIs should include
+ * "serviceusage.googleapis.com/tos/universal". Additional ToS can be
+ * included based on the business needs.
+ *
+ * Generated from protobuf field repeated string requirements = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRequirements()
+ {
+ return $this->requirements;
+ }
+
+ /**
+ * Requirements that must be satisfied before a consumer project can use the
+ * service. Each requirement is of the form /;
+ * for example 'serviceusage.googleapis.com/billing-enabled'.
+ * For Google APIs, a Terms of Service requirement must be included here.
+ * Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud".
+ * Other Google APIs should include
+ * "serviceusage.googleapis.com/tos/universal". Additional ToS can be
+ * included based on the business needs.
+ *
+ * Generated from protobuf field repeated string requirements = 1;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRequirements($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->requirements = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A list of usage rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.UsageRule rules = 6;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRules()
+ {
+ return $this->rules;
+ }
+
+ /**
+ * A list of usage rules that apply to individual API methods.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.UsageRule rules = 6;
+ * @param array<\Google\Api\UsageRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\UsageRule::class);
+ $this->rules = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The full resource name of a channel used for sending notifications to the
+ * service producer.
+ * Google Service Management currently only supports
+ * [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
+ * channel. To use Google Cloud Pub/Sub as the channel, this must be the name
+ * of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
+ * documented in https://cloud.google.com/pubsub/docs/overview.
+ *
+ * Generated from protobuf field string producer_notification_channel = 7;
+ * @return string
+ */
+ public function getProducerNotificationChannel()
+ {
+ return $this->producer_notification_channel;
+ }
+
+ /**
+ * The full resource name of a channel used for sending notifications to the
+ * service producer.
+ * Google Service Management currently only supports
+ * [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
+ * channel. To use Google Cloud Pub/Sub as the channel, this must be the name
+ * of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
+ * documented in https://cloud.google.com/pubsub/docs/overview.
+ *
+ * Generated from protobuf field string producer_notification_channel = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setProducerNotificationChannel($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->producer_notification_channel = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/UsageRule.php b/tests/php_test_files/vendor/google/common-protos/src/Api/UsageRule.php
new file mode 100644
index 0000000..fcd4f54
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/UsageRule.php
@@ -0,0 +1,180 @@
+google.api.UsageRule
+ */
+class UsageRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Selects the methods to which this rule applies. Use '*' to indicate all
+ * methods in all APIs.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * If true, the selected method allows unregistered calls, e.g. calls
+ * that don't identify any user or application.
+ *
+ * Generated from protobuf field bool allow_unregistered_calls = 2;
+ */
+ protected $allow_unregistered_calls = false;
+ /**
+ * If true, the selected method should skip service control and the control
+ * plane features, such as quota and billing, will not be available.
+ * This flag is used by Google Cloud Endpoints to bypass checks for internal
+ * methods, such as service health check methods.
+ *
+ * Generated from protobuf field bool skip_service_control = 3;
+ */
+ protected $skip_service_control = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * Selects the methods to which this rule applies. Use '*' to indicate all
+ * methods in all APIs.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * @type bool $allow_unregistered_calls
+ * If true, the selected method allows unregistered calls, e.g. calls
+ * that don't identify any user or application.
+ * @type bool $skip_service_control
+ * If true, the selected method should skip service control and the control
+ * plane features, such as quota and billing, will not be available.
+ * This flag is used by Google Cloud Endpoints to bypass checks for internal
+ * methods, such as service health check methods.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Usage::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Selects the methods to which this rule applies. Use '*' to indicate all
+ * methods in all APIs.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * Selects the methods to which this rule applies. Use '*' to indicate all
+ * methods in all APIs.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * If true, the selected method allows unregistered calls, e.g. calls
+ * that don't identify any user or application.
+ *
+ * Generated from protobuf field bool allow_unregistered_calls = 2;
+ * @return bool
+ */
+ public function getAllowUnregisteredCalls()
+ {
+ return $this->allow_unregistered_calls;
+ }
+
+ /**
+ * If true, the selected method allows unregistered calls, e.g. calls
+ * that don't identify any user or application.
+ *
+ * Generated from protobuf field bool allow_unregistered_calls = 2;
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowUnregisteredCalls($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_unregistered_calls = $var;
+
+ return $this;
+ }
+
+ /**
+ * If true, the selected method should skip service control and the control
+ * plane features, such as quota and billing, will not be available.
+ * This flag is used by Google Cloud Endpoints to bypass checks for internal
+ * methods, such as service health check methods.
+ *
+ * Generated from protobuf field bool skip_service_control = 3;
+ * @return bool
+ */
+ public function getSkipServiceControl()
+ {
+ return $this->skip_service_control;
+ }
+
+ /**
+ * If true, the selected method should skip service control and the control
+ * plane features, such as quota and billing, will not be available.
+ * This flag is used by Google Cloud Endpoints to bypass checks for internal
+ * methods, such as service health check methods.
+ *
+ * Generated from protobuf field bool skip_service_control = 3;
+ * @param bool $var
+ * @return $this
+ */
+ public function setSkipServiceControl($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->skip_service_control = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/Visibility.php b/tests/php_test_files/vendor/google/common-protos/src/Api/Visibility.php
new file mode 100644
index 0000000..b232df6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/Visibility.php
@@ -0,0 +1,88 @@
+google.api.Visibility
+ */
+class Visibility extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A list of visibility rules that apply to individual API elements.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.VisibilityRule rules = 1;
+ */
+ private $rules;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Api\VisibilityRule>|\Google\Protobuf\Internal\RepeatedField $rules
+ * A list of visibility rules that apply to individual API elements.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Visibility::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A list of visibility rules that apply to individual API elements.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.VisibilityRule rules = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRules()
+ {
+ return $this->rules;
+ }
+
+ /**
+ * A list of visibility rules that apply to individual API elements.
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ *
+ * Generated from protobuf field repeated .google.api.VisibilityRule rules = 1;
+ * @param array<\Google\Api\VisibilityRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\VisibilityRule::class);
+ $this->rules = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Api/VisibilityRule.php b/tests/php_test_files/vendor/google/common-protos/src/Api/VisibilityRule.php
new file mode 100644
index 0000000..74c522f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Api/VisibilityRule.php
@@ -0,0 +1,150 @@
+google.api.VisibilityRule
+ */
+class VisibilityRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Selects methods, messages, fields, enums, etc. to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ */
+ protected $selector = '';
+ /**
+ * A comma-separated list of visibility labels that apply to the `selector`.
+ * Any of the listed labels can be used to grant the visibility.
+ * If a rule has multiple labels, removing one of the labels but not all of
+ * them can break clients.
+ * Example:
+ * visibility:
+ * rules:
+ * - selector: google.calendar.Calendar.EnhancedSearch
+ * restriction: INTERNAL, PREVIEW
+ * Removing INTERNAL from this restriction will break clients that rely on
+ * this method and only had access to it through INTERNAL.
+ *
+ * Generated from protobuf field string restriction = 2;
+ */
+ protected $restriction = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $selector
+ * Selects methods, messages, fields, enums, etc. to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ * @type string $restriction
+ * A comma-separated list of visibility labels that apply to the `selector`.
+ * Any of the listed labels can be used to grant the visibility.
+ * If a rule has multiple labels, removing one of the labels but not all of
+ * them can break clients.
+ * Example:
+ * visibility:
+ * rules:
+ * - selector: google.calendar.Calendar.EnhancedSearch
+ * restriction: INTERNAL, PREVIEW
+ * Removing INTERNAL from this restriction will break clients that rely on
+ * this method and only had access to it through INTERNAL.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Api\Visibility::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Selects methods, messages, fields, enums, etc. to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @return string
+ */
+ public function getSelector()
+ {
+ return $this->selector;
+ }
+
+ /**
+ * Selects methods, messages, fields, enums, etc. to which this rule applies.
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+ * details.
+ *
+ * Generated from protobuf field string selector = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSelector($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->selector = $var;
+
+ return $this;
+ }
+
+ /**
+ * A comma-separated list of visibility labels that apply to the `selector`.
+ * Any of the listed labels can be used to grant the visibility.
+ * If a rule has multiple labels, removing one of the labels but not all of
+ * them can break clients.
+ * Example:
+ * visibility:
+ * rules:
+ * - selector: google.calendar.Calendar.EnhancedSearch
+ * restriction: INTERNAL, PREVIEW
+ * Removing INTERNAL from this restriction will break clients that rely on
+ * this method and only had access to it through INTERNAL.
+ *
+ * Generated from protobuf field string restriction = 2;
+ * @return string
+ */
+ public function getRestriction()
+ {
+ return $this->restriction;
+ }
+
+ /**
+ * A comma-separated list of visibility labels that apply to the `selector`.
+ * Any of the listed labels can be used to grant the visibility.
+ * If a rule has multiple labels, removing one of the labels but not all of
+ * them can break clients.
+ * Example:
+ * visibility:
+ * rules:
+ * - selector: google.calendar.Calendar.EnhancedSearch
+ * restriction: INTERNAL, PREVIEW
+ * Removing INTERNAL from this restriction will break clients that rely on
+ * this method and only had access to it through INTERNAL.
+ *
+ * Generated from protobuf field string restriction = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setRestriction($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->restriction = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditConfig.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditConfig.php
new file mode 100644
index 0000000..b259431
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditConfig.php
@@ -0,0 +1,155 @@
+google.iam.v1.AuditConfig
+ */
+class AuditConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Specifies a service that will be enabled for audit logging.
+ * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+ * `allServices` is a special value that covers all services.
+ *
+ * Generated from protobuf field string service = 1;
+ */
+ protected $service = '';
+ /**
+ * The configuration for logging of each type of permission.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
+ */
+ private $audit_log_configs;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $service
+ * Specifies a service that will be enabled for audit logging.
+ * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+ * `allServices` is a special value that covers all services.
+ * @type array<\Google\Cloud\Iam\V1\AuditLogConfig>|\Google\Protobuf\Internal\RepeatedField $audit_log_configs
+ * The configuration for logging of each type of permission.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\Policy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Specifies a service that will be enabled for audit logging.
+ * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+ * `allServices` is a special value that covers all services.
+ *
+ * Generated from protobuf field string service = 1;
+ * @return string
+ */
+ public function getService()
+ {
+ return $this->service;
+ }
+
+ /**
+ * Specifies a service that will be enabled for audit logging.
+ * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+ * `allServices` is a special value that covers all services.
+ *
+ * Generated from protobuf field string service = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setService($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service = $var;
+
+ return $this;
+ }
+
+ /**
+ * The configuration for logging of each type of permission.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAuditLogConfigs()
+ {
+ return $this->audit_log_configs;
+ }
+
+ /**
+ * The configuration for logging of each type of permission.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3;
+ * @param array<\Google\Cloud\Iam\V1\AuditLogConfig>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAuditLogConfigs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V1\AuditLogConfig::class);
+ $this->audit_log_configs = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditConfigDelta.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditConfigDelta.php
new file mode 100644
index 0000000..02c622e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditConfigDelta.php
@@ -0,0 +1,202 @@
+google.iam.v1.AuditConfigDelta
+ */
+class AuditConfigDelta extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The action that was performed on an audit configuration in a policy.
+ * Required
+ *
+ * Generated from protobuf field .google.iam.v1.AuditConfigDelta.Action action = 1;
+ */
+ protected $action = 0;
+ /**
+ * Specifies a service that was configured for Cloud Audit Logging.
+ * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+ * `allServices` is a special value that covers all services.
+ * Required
+ *
+ * Generated from protobuf field string service = 2;
+ */
+ protected $service = '';
+ /**
+ * A single identity that is exempted from "data access" audit
+ * logging for the `service` specified above.
+ * Follows the same format of Binding.members.
+ *
+ * Generated from protobuf field string exempted_member = 3;
+ */
+ protected $exempted_member = '';
+ /**
+ * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+ * enabled, and cannot be configured.
+ * Required
+ *
+ * Generated from protobuf field string log_type = 4;
+ */
+ protected $log_type = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $action
+ * The action that was performed on an audit configuration in a policy.
+ * Required
+ * @type string $service
+ * Specifies a service that was configured for Cloud Audit Logging.
+ * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+ * `allServices` is a special value that covers all services.
+ * Required
+ * @type string $exempted_member
+ * A single identity that is exempted from "data access" audit
+ * logging for the `service` specified above.
+ * Follows the same format of Binding.members.
+ * @type string $log_type
+ * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+ * enabled, and cannot be configured.
+ * Required
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\Policy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The action that was performed on an audit configuration in a policy.
+ * Required
+ *
+ * Generated from protobuf field .google.iam.v1.AuditConfigDelta.Action action = 1;
+ * @return int
+ */
+ public function getAction()
+ {
+ return $this->action;
+ }
+
+ /**
+ * The action that was performed on an audit configuration in a policy.
+ * Required
+ *
+ * Generated from protobuf field .google.iam.v1.AuditConfigDelta.Action action = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setAction($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Iam\V1\AuditConfigDelta\Action::class);
+ $this->action = $var;
+
+ return $this;
+ }
+
+ /**
+ * Specifies a service that was configured for Cloud Audit Logging.
+ * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+ * `allServices` is a special value that covers all services.
+ * Required
+ *
+ * Generated from protobuf field string service = 2;
+ * @return string
+ */
+ public function getService()
+ {
+ return $this->service;
+ }
+
+ /**
+ * Specifies a service that was configured for Cloud Audit Logging.
+ * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+ * `allServices` is a special value that covers all services.
+ * Required
+ *
+ * Generated from protobuf field string service = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setService($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service = $var;
+
+ return $this;
+ }
+
+ /**
+ * A single identity that is exempted from "data access" audit
+ * logging for the `service` specified above.
+ * Follows the same format of Binding.members.
+ *
+ * Generated from protobuf field string exempted_member = 3;
+ * @return string
+ */
+ public function getExemptedMember()
+ {
+ return $this->exempted_member;
+ }
+
+ /**
+ * A single identity that is exempted from "data access" audit
+ * logging for the `service` specified above.
+ * Follows the same format of Binding.members.
+ *
+ * Generated from protobuf field string exempted_member = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setExemptedMember($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->exempted_member = $var;
+
+ return $this;
+ }
+
+ /**
+ * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+ * enabled, and cannot be configured.
+ * Required
+ *
+ * Generated from protobuf field string log_type = 4;
+ * @return string
+ */
+ public function getLogType()
+ {
+ return $this->log_type;
+ }
+
+ /**
+ * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
+ * enabled, and cannot be configured.
+ * Required
+ *
+ * Generated from protobuf field string log_type = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setLogType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->log_type = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditConfigDelta/Action.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditConfigDelta/Action.php
new file mode 100644
index 0000000..ffce349
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditConfigDelta/Action.php
@@ -0,0 +1,62 @@
+google.iam.v1.AuditConfigDelta.Action
+ */
+class Action
+{
+ /**
+ * Unspecified.
+ *
+ * Generated from protobuf enum ACTION_UNSPECIFIED = 0;
+ */
+ const ACTION_UNSPECIFIED = 0;
+ /**
+ * Addition of an audit configuration.
+ *
+ * Generated from protobuf enum ADD = 1;
+ */
+ const ADD = 1;
+ /**
+ * Removal of an audit configuration.
+ *
+ * Generated from protobuf enum REMOVE = 2;
+ */
+ const REMOVE = 2;
+
+ private static $valueToName = [
+ self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED',
+ self::ADD => 'ADD',
+ self::REMOVE => 'REMOVE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditLogConfig.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditLogConfig.php
new file mode 100644
index 0000000..83b9940
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditLogConfig.php
@@ -0,0 +1,129 @@
+google.iam.v1.AuditLogConfig
+ */
+class AuditLogConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The log type that this config enables.
+ *
+ * Generated from protobuf field .google.iam.v1.AuditLogConfig.LogType log_type = 1;
+ */
+ protected $log_type = 0;
+ /**
+ * Specifies the identities that do not cause logging for this type of
+ * permission.
+ * Follows the same format of
+ * [Binding.members][google.iam.v1.Binding.members].
+ *
+ * Generated from protobuf field repeated string exempted_members = 2;
+ */
+ private $exempted_members;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $log_type
+ * The log type that this config enables.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $exempted_members
+ * Specifies the identities that do not cause logging for this type of
+ * permission.
+ * Follows the same format of
+ * [Binding.members][google.iam.v1.Binding.members].
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\Policy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The log type that this config enables.
+ *
+ * Generated from protobuf field .google.iam.v1.AuditLogConfig.LogType log_type = 1;
+ * @return int
+ */
+ public function getLogType()
+ {
+ return $this->log_type;
+ }
+
+ /**
+ * The log type that this config enables.
+ *
+ * Generated from protobuf field .google.iam.v1.AuditLogConfig.LogType log_type = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setLogType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Iam\V1\AuditLogConfig\LogType::class);
+ $this->log_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Specifies the identities that do not cause logging for this type of
+ * permission.
+ * Follows the same format of
+ * [Binding.members][google.iam.v1.Binding.members].
+ *
+ * Generated from protobuf field repeated string exempted_members = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemptedMembers()
+ {
+ return $this->exempted_members;
+ }
+
+ /**
+ * Specifies the identities that do not cause logging for this type of
+ * permission.
+ * Follows the same format of
+ * [Binding.members][google.iam.v1.Binding.members].
+ *
+ * Generated from protobuf field repeated string exempted_members = 2;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemptedMembers($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->exempted_members = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditLogConfig/LogType.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditLogConfig/LogType.php
new file mode 100644
index 0000000..f78a01b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/AuditLogConfig/LogType.php
@@ -0,0 +1,70 @@
+google.iam.v1.AuditLogConfig.LogType
+ */
+class LogType
+{
+ /**
+ * Default case. Should never be this.
+ *
+ * Generated from protobuf enum LOG_TYPE_UNSPECIFIED = 0;
+ */
+ const LOG_TYPE_UNSPECIFIED = 0;
+ /**
+ * Admin reads. Example: CloudIAM getIamPolicy
+ *
+ * Generated from protobuf enum ADMIN_READ = 1;
+ */
+ const ADMIN_READ = 1;
+ /**
+ * Data writes. Example: CloudSQL Users create
+ *
+ * Generated from protobuf enum DATA_WRITE = 2;
+ */
+ const DATA_WRITE = 2;
+ /**
+ * Data reads. Example: CloudSQL Users list
+ *
+ * Generated from protobuf enum DATA_READ = 3;
+ */
+ const DATA_READ = 3;
+
+ private static $valueToName = [
+ self::LOG_TYPE_UNSPECIFIED => 'LOG_TYPE_UNSPECIFIED',
+ self::ADMIN_READ => 'ADMIN_READ',
+ self::DATA_WRITE => 'DATA_WRITE',
+ self::DATA_READ => 'DATA_READ',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/Binding.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/Binding.php
new file mode 100644
index 0000000..af64546
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/Binding.php
@@ -0,0 +1,301 @@
+google.iam.v1.Binding
+ */
+class Binding extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Role that is assigned to the list of `members`, or principals.
+ * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ *
+ * Generated from protobuf field string role = 1;
+ */
+ protected $role = '';
+ /**
+ * Specifies the principals requesting access for a Google Cloud resource.
+ * `members` can have the following values:
+ * * `allUsers`: A special identifier that represents anyone who is
+ * on the internet; with or without a Google account.
+ * * `allAuthenticatedUsers`: A special identifier that represents anyone
+ * who is authenticated with a Google account or a service account.
+ * * `user:{emailid}`: An email address that represents a specific Google
+ * account. For example, `alice@example.com` .
+ * * `serviceAccount:{emailid}`: An email address that represents a service
+ * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+ * * `group:{emailid}`: An email address that represents a Google group.
+ * For example, `admins@example.com`.
+ * * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
+ * identifier) representing a user that has been recently deleted. For
+ * example, `alice@example.com?uid=123456789012345678901`. If the user is
+ * recovered, this value reverts to `user:{emailid}` and the recovered user
+ * retains the role in the binding.
+ * * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
+ * unique identifier) representing a service account that has been recently
+ * deleted. For example,
+ * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
+ * If the service account is undeleted, this value reverts to
+ * `serviceAccount:{emailid}` and the undeleted service account retains the
+ * role in the binding.
+ * * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
+ * identifier) representing a Google group that has been recently
+ * deleted. For example, `admins@example.com?uid=123456789012345678901`. If
+ * the group is recovered, this value reverts to `group:{emailid}` and the
+ * recovered group retains the role in the binding.
+ * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+ * users of that domain. For example, `google.com` or `example.com`.
+ *
+ * Generated from protobuf field repeated string members = 2;
+ */
+ private $members;
+ /**
+ * The condition that is associated with this binding.
+ * If the condition evaluates to `true`, then this binding applies to the
+ * current request.
+ * If the condition evaluates to `false`, then this binding does not apply to
+ * the current request. However, a different role binding might grant the same
+ * role to one or more of the principals in this binding.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ *
+ * Generated from protobuf field .google.type.Expr condition = 3;
+ */
+ protected $condition = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $role
+ * Role that is assigned to the list of `members`, or principals.
+ * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $members
+ * Specifies the principals requesting access for a Google Cloud resource.
+ * `members` can have the following values:
+ * * `allUsers`: A special identifier that represents anyone who is
+ * on the internet; with or without a Google account.
+ * * `allAuthenticatedUsers`: A special identifier that represents anyone
+ * who is authenticated with a Google account or a service account.
+ * * `user:{emailid}`: An email address that represents a specific Google
+ * account. For example, `alice@example.com` .
+ * * `serviceAccount:{emailid}`: An email address that represents a service
+ * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+ * * `group:{emailid}`: An email address that represents a Google group.
+ * For example, `admins@example.com`.
+ * * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
+ * identifier) representing a user that has been recently deleted. For
+ * example, `alice@example.com?uid=123456789012345678901`. If the user is
+ * recovered, this value reverts to `user:{emailid}` and the recovered user
+ * retains the role in the binding.
+ * * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
+ * unique identifier) representing a service account that has been recently
+ * deleted. For example,
+ * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
+ * If the service account is undeleted, this value reverts to
+ * `serviceAccount:{emailid}` and the undeleted service account retains the
+ * role in the binding.
+ * * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
+ * identifier) representing a Google group that has been recently
+ * deleted. For example, `admins@example.com?uid=123456789012345678901`. If
+ * the group is recovered, this value reverts to `group:{emailid}` and the
+ * recovered group retains the role in the binding.
+ * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+ * users of that domain. For example, `google.com` or `example.com`.
+ * @type \Google\Type\Expr $condition
+ * The condition that is associated with this binding.
+ * If the condition evaluates to `true`, then this binding applies to the
+ * current request.
+ * If the condition evaluates to `false`, then this binding does not apply to
+ * the current request. However, a different role binding might grant the same
+ * role to one or more of the principals in this binding.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\Policy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Role that is assigned to the list of `members`, or principals.
+ * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ *
+ * Generated from protobuf field string role = 1;
+ * @return string
+ */
+ public function getRole()
+ {
+ return $this->role;
+ }
+
+ /**
+ * Role that is assigned to the list of `members`, or principals.
+ * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ *
+ * Generated from protobuf field string role = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setRole($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->role = $var;
+
+ return $this;
+ }
+
+ /**
+ * Specifies the principals requesting access for a Google Cloud resource.
+ * `members` can have the following values:
+ * * `allUsers`: A special identifier that represents anyone who is
+ * on the internet; with or without a Google account.
+ * * `allAuthenticatedUsers`: A special identifier that represents anyone
+ * who is authenticated with a Google account or a service account.
+ * * `user:{emailid}`: An email address that represents a specific Google
+ * account. For example, `alice@example.com` .
+ * * `serviceAccount:{emailid}`: An email address that represents a service
+ * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+ * * `group:{emailid}`: An email address that represents a Google group.
+ * For example, `admins@example.com`.
+ * * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
+ * identifier) representing a user that has been recently deleted. For
+ * example, `alice@example.com?uid=123456789012345678901`. If the user is
+ * recovered, this value reverts to `user:{emailid}` and the recovered user
+ * retains the role in the binding.
+ * * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
+ * unique identifier) representing a service account that has been recently
+ * deleted. For example,
+ * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
+ * If the service account is undeleted, this value reverts to
+ * `serviceAccount:{emailid}` and the undeleted service account retains the
+ * role in the binding.
+ * * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
+ * identifier) representing a Google group that has been recently
+ * deleted. For example, `admins@example.com?uid=123456789012345678901`. If
+ * the group is recovered, this value reverts to `group:{emailid}` and the
+ * recovered group retains the role in the binding.
+ * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+ * users of that domain. For example, `google.com` or `example.com`.
+ *
+ * Generated from protobuf field repeated string members = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMembers()
+ {
+ return $this->members;
+ }
+
+ /**
+ * Specifies the principals requesting access for a Google Cloud resource.
+ * `members` can have the following values:
+ * * `allUsers`: A special identifier that represents anyone who is
+ * on the internet; with or without a Google account.
+ * * `allAuthenticatedUsers`: A special identifier that represents anyone
+ * who is authenticated with a Google account or a service account.
+ * * `user:{emailid}`: An email address that represents a specific Google
+ * account. For example, `alice@example.com` .
+ * * `serviceAccount:{emailid}`: An email address that represents a service
+ * account. For example, `my-other-app@appspot.gserviceaccount.com`.
+ * * `group:{emailid}`: An email address that represents a Google group.
+ * For example, `admins@example.com`.
+ * * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
+ * identifier) representing a user that has been recently deleted. For
+ * example, `alice@example.com?uid=123456789012345678901`. If the user is
+ * recovered, this value reverts to `user:{emailid}` and the recovered user
+ * retains the role in the binding.
+ * * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
+ * unique identifier) representing a service account that has been recently
+ * deleted. For example,
+ * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
+ * If the service account is undeleted, this value reverts to
+ * `serviceAccount:{emailid}` and the undeleted service account retains the
+ * role in the binding.
+ * * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
+ * identifier) representing a Google group that has been recently
+ * deleted. For example, `admins@example.com?uid=123456789012345678901`. If
+ * the group is recovered, this value reverts to `group:{emailid}` and the
+ * recovered group retains the role in the binding.
+ * * `domain:{domain}`: The G Suite domain (primary) that represents all the
+ * users of that domain. For example, `google.com` or `example.com`.
+ *
+ * Generated from protobuf field repeated string members = 2;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMembers($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->members = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The condition that is associated with this binding.
+ * If the condition evaluates to `true`, then this binding applies to the
+ * current request.
+ * If the condition evaluates to `false`, then this binding does not apply to
+ * the current request. However, a different role binding might grant the same
+ * role to one or more of the principals in this binding.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ *
+ * Generated from protobuf field .google.type.Expr condition = 3;
+ * @return \Google\Type\Expr|null
+ */
+ public function getCondition()
+ {
+ return $this->condition;
+ }
+
+ public function hasCondition()
+ {
+ return isset($this->condition);
+ }
+
+ public function clearCondition()
+ {
+ unset($this->condition);
+ }
+
+ /**
+ * The condition that is associated with this binding.
+ * If the condition evaluates to `true`, then this binding applies to the
+ * current request.
+ * If the condition evaluates to `false`, then this binding does not apply to
+ * the current request. However, a different role binding might grant the same
+ * role to one or more of the principals in this binding.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ *
+ * Generated from protobuf field .google.type.Expr condition = 3;
+ * @param \Google\Type\Expr $var
+ * @return $this
+ */
+ public function setCondition($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Type\Expr::class);
+ $this->condition = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/BindingDelta.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/BindingDelta.php
new file mode 100644
index 0000000..3993a7f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/BindingDelta.php
@@ -0,0 +1,200 @@
+google.iam.v1.BindingDelta
+ */
+class BindingDelta extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The action that was performed on a Binding.
+ * Required
+ *
+ * Generated from protobuf field .google.iam.v1.BindingDelta.Action action = 1;
+ */
+ protected $action = 0;
+ /**
+ * Role that is assigned to `members`.
+ * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ * Required
+ *
+ * Generated from protobuf field string role = 2;
+ */
+ protected $role = '';
+ /**
+ * A single identity requesting access for a Google Cloud resource.
+ * Follows the same format of Binding.members.
+ * Required
+ *
+ * Generated from protobuf field string member = 3;
+ */
+ protected $member = '';
+ /**
+ * The condition that is associated with this binding.
+ *
+ * Generated from protobuf field .google.type.Expr condition = 4;
+ */
+ protected $condition = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $action
+ * The action that was performed on a Binding.
+ * Required
+ * @type string $role
+ * Role that is assigned to `members`.
+ * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ * Required
+ * @type string $member
+ * A single identity requesting access for a Google Cloud resource.
+ * Follows the same format of Binding.members.
+ * Required
+ * @type \Google\Type\Expr $condition
+ * The condition that is associated with this binding.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\Policy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The action that was performed on a Binding.
+ * Required
+ *
+ * Generated from protobuf field .google.iam.v1.BindingDelta.Action action = 1;
+ * @return int
+ */
+ public function getAction()
+ {
+ return $this->action;
+ }
+
+ /**
+ * The action that was performed on a Binding.
+ * Required
+ *
+ * Generated from protobuf field .google.iam.v1.BindingDelta.Action action = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setAction($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Iam\V1\BindingDelta\Action::class);
+ $this->action = $var;
+
+ return $this;
+ }
+
+ /**
+ * Role that is assigned to `members`.
+ * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ * Required
+ *
+ * Generated from protobuf field string role = 2;
+ * @return string
+ */
+ public function getRole()
+ {
+ return $this->role;
+ }
+
+ /**
+ * Role that is assigned to `members`.
+ * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ * Required
+ *
+ * Generated from protobuf field string role = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setRole($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->role = $var;
+
+ return $this;
+ }
+
+ /**
+ * A single identity requesting access for a Google Cloud resource.
+ * Follows the same format of Binding.members.
+ * Required
+ *
+ * Generated from protobuf field string member = 3;
+ * @return string
+ */
+ public function getMember()
+ {
+ return $this->member;
+ }
+
+ /**
+ * A single identity requesting access for a Google Cloud resource.
+ * Follows the same format of Binding.members.
+ * Required
+ *
+ * Generated from protobuf field string member = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setMember($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->member = $var;
+
+ return $this;
+ }
+
+ /**
+ * The condition that is associated with this binding.
+ *
+ * Generated from protobuf field .google.type.Expr condition = 4;
+ * @return \Google\Type\Expr|null
+ */
+ public function getCondition()
+ {
+ return $this->condition;
+ }
+
+ public function hasCondition()
+ {
+ return isset($this->condition);
+ }
+
+ public function clearCondition()
+ {
+ unset($this->condition);
+ }
+
+ /**
+ * The condition that is associated with this binding.
+ *
+ * Generated from protobuf field .google.type.Expr condition = 4;
+ * @param \Google\Type\Expr $var
+ * @return $this
+ */
+ public function setCondition($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Type\Expr::class);
+ $this->condition = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/BindingDelta/Action.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/BindingDelta/Action.php
new file mode 100644
index 0000000..f119696
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/BindingDelta/Action.php
@@ -0,0 +1,62 @@
+google.iam.v1.BindingDelta.Action
+ */
+class Action
+{
+ /**
+ * Unspecified.
+ *
+ * Generated from protobuf enum ACTION_UNSPECIFIED = 0;
+ */
+ const ACTION_UNSPECIFIED = 0;
+ /**
+ * Addition of a Binding.
+ *
+ * Generated from protobuf enum ADD = 1;
+ */
+ const ADD = 1;
+ /**
+ * Removal of a Binding.
+ *
+ * Generated from protobuf enum REMOVE = 2;
+ */
+ const REMOVE = 2;
+
+ private static $valueToName = [
+ self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED',
+ self::ADD => 'ADD',
+ self::REMOVE => 'REMOVE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/GetIamPolicyRequest.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/GetIamPolicyRequest.php
new file mode 100644
index 0000000..d74e0e8
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/GetIamPolicyRequest.php
@@ -0,0 +1,119 @@
+google.iam.v1.GetIamPolicyRequest
+ */
+class GetIamPolicyRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * REQUIRED: The resource for which the policy is being requested.
+ * See the operation documentation for the appropriate value for this field.
+ *
+ * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $resource = '';
+ /**
+ * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+ * `GetIamPolicy`.
+ *
+ * Generated from protobuf field .google.iam.v1.GetPolicyOptions options = 2;
+ */
+ protected $options = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $resource
+ * REQUIRED: The resource for which the policy is being requested.
+ * See the operation documentation for the appropriate value for this field.
+ * @type \Google\Cloud\Iam\V1\GetPolicyOptions $options
+ * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+ * `GetIamPolicy`.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\IamPolicy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * REQUIRED: The resource for which the policy is being requested.
+ * See the operation documentation for the appropriate value for this field.
+ *
+ * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * REQUIRED: The resource for which the policy is being requested.
+ * See the operation documentation for the appropriate value for this field.
+ *
+ * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+ * `GetIamPolicy`.
+ *
+ * Generated from protobuf field .google.iam.v1.GetPolicyOptions options = 2;
+ * @return \Google\Cloud\Iam\V1\GetPolicyOptions|null
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public function hasOptions()
+ {
+ return isset($this->options);
+ }
+
+ public function clearOptions()
+ {
+ unset($this->options);
+ }
+
+ /**
+ * OPTIONAL: A `GetPolicyOptions` object for specifying options to
+ * `GetIamPolicy`.
+ *
+ * Generated from protobuf field .google.iam.v1.GetPolicyOptions options = 2;
+ * @param \Google\Cloud\Iam\V1\GetPolicyOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Iam\V1\GetPolicyOptions::class);
+ $this->options = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/GetPolicyOptions.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/GetPolicyOptions.php
new file mode 100644
index 0000000..a2600d0
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/GetPolicyOptions.php
@@ -0,0 +1,119 @@
+google.iam.v1.GetPolicyOptions
+ */
+class GetPolicyOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The maximum policy version that will be used to format the
+ * policy.
+ * Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * rejected.
+ * Requests for policies with any conditional role bindings must specify
+ * version 3. Policies with no conditional role bindings may specify any valid
+ * value or leave the field unset.
+ * The policy in the response might use the policy version that you specified,
+ * or it might use a lower policy version. For example, if you specify version
+ * 3, but the policy has no conditional role bindings, the response uses
+ * version 1.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ *
+ * Generated from protobuf field int32 requested_policy_version = 1;
+ */
+ protected $requested_policy_version = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $requested_policy_version
+ * Optional. The maximum policy version that will be used to format the
+ * policy.
+ * Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * rejected.
+ * Requests for policies with any conditional role bindings must specify
+ * version 3. Policies with no conditional role bindings may specify any valid
+ * value or leave the field unset.
+ * The policy in the response might use the policy version that you specified,
+ * or it might use a lower policy version. For example, if you specify version
+ * 3, but the policy has no conditional role bindings, the response uses
+ * version 1.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\Options::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The maximum policy version that will be used to format the
+ * policy.
+ * Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * rejected.
+ * Requests for policies with any conditional role bindings must specify
+ * version 3. Policies with no conditional role bindings may specify any valid
+ * value or leave the field unset.
+ * The policy in the response might use the policy version that you specified,
+ * or it might use a lower policy version. For example, if you specify version
+ * 3, but the policy has no conditional role bindings, the response uses
+ * version 1.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ *
+ * Generated from protobuf field int32 requested_policy_version = 1;
+ * @return int
+ */
+ public function getRequestedPolicyVersion()
+ {
+ return $this->requested_policy_version;
+ }
+
+ /**
+ * Optional. The maximum policy version that will be used to format the
+ * policy.
+ * Valid values are 0, 1, and 3. Requests specifying an invalid value will be
+ * rejected.
+ * Requests for policies with any conditional role bindings must specify
+ * version 3. Policies with no conditional role bindings may specify any valid
+ * value or leave the field unset.
+ * The policy in the response might use the policy version that you specified,
+ * or it might use a lower policy version. For example, if you specify version
+ * 3, but the policy has no conditional role bindings, the response uses
+ * version 1.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ *
+ * Generated from protobuf field int32 requested_policy_version = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setRequestedPolicyVersion($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->requested_policy_version = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/Policy.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/Policy.php
new file mode 100644
index 0000000..8b4633b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/Policy.php
@@ -0,0 +1,377 @@
+google.iam.v1.Policy
+ */
+class Policy extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Specifies the format of the policy.
+ * Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
+ * are rejected.
+ * Any operation that affects conditional role bindings must specify version
+ * `3`. This requirement applies to the following operations:
+ * * Getting a policy that includes a conditional role binding
+ * * Adding a conditional role binding to a policy
+ * * Changing a conditional role binding in a policy
+ * * Removing any role binding, with or without a condition, from a policy
+ * that includes conditions
+ * **Important:** If you use IAM Conditions, you must include the `etag` field
+ * whenever you call `setIamPolicy`. If you omit this field, then IAM allows
+ * you to overwrite a version `3` policy with a version `1` policy, and all of
+ * the conditions in the version `3` policy are lost.
+ * If a policy does not include any conditions, operations on that policy may
+ * specify any valid version or leave the field unset.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ *
+ * Generated from protobuf field int32 version = 1;
+ */
+ protected $version = 0;
+ /**
+ * Associates a list of `members`, or principals, with a `role`. Optionally,
+ * may specify a `condition` that determines how and when the `bindings` are
+ * applied. Each of the `bindings` must contain at least one principal.
+ * The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
+ * of these principals can be Google groups. Each occurrence of a principal
+ * counts towards these limits. For example, if the `bindings` grant 50
+ * different roles to `user:alice@example.com`, and not to any other
+ * principal, then you can add another 1,450 principals to the `bindings` in
+ * the `Policy`.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.Binding bindings = 4;
+ */
+ private $bindings;
+ /**
+ * Specifies cloud audit logging configuration for this policy.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.AuditConfig audit_configs = 6;
+ */
+ private $audit_configs;
+ /**
+ * `etag` is used for optimistic concurrency control as a way to help
+ * prevent simultaneous updates of a policy from overwriting each other.
+ * It is strongly suggested that systems make use of the `etag` in the
+ * read-modify-write cycle to perform policy updates in order to avoid race
+ * conditions: An `etag` is returned in the response to `getIamPolicy`, and
+ * systems are expected to put that etag in the request to `setIamPolicy` to
+ * ensure that their change will be applied to the same version of the policy.
+ * **Important:** If you use IAM Conditions, you must include the `etag` field
+ * whenever you call `setIamPolicy`. If you omit this field, then IAM allows
+ * you to overwrite a version `3` policy with a version `1` policy, and all of
+ * the conditions in the version `3` policy are lost.
+ *
+ * Generated from protobuf field bytes etag = 3;
+ */
+ protected $etag = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $version
+ * Specifies the format of the policy.
+ * Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
+ * are rejected.
+ * Any operation that affects conditional role bindings must specify version
+ * `3`. This requirement applies to the following operations:
+ * * Getting a policy that includes a conditional role binding
+ * * Adding a conditional role binding to a policy
+ * * Changing a conditional role binding in a policy
+ * * Removing any role binding, with or without a condition, from a policy
+ * that includes conditions
+ * **Important:** If you use IAM Conditions, you must include the `etag` field
+ * whenever you call `setIamPolicy`. If you omit this field, then IAM allows
+ * you to overwrite a version `3` policy with a version `1` policy, and all of
+ * the conditions in the version `3` policy are lost.
+ * If a policy does not include any conditions, operations on that policy may
+ * specify any valid version or leave the field unset.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ * @type array<\Google\Cloud\Iam\V1\Binding>|\Google\Protobuf\Internal\RepeatedField $bindings
+ * Associates a list of `members`, or principals, with a `role`. Optionally,
+ * may specify a `condition` that determines how and when the `bindings` are
+ * applied. Each of the `bindings` must contain at least one principal.
+ * The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
+ * of these principals can be Google groups. Each occurrence of a principal
+ * counts towards these limits. For example, if the `bindings` grant 50
+ * different roles to `user:alice@example.com`, and not to any other
+ * principal, then you can add another 1,450 principals to the `bindings` in
+ * the `Policy`.
+ * @type array<\Google\Cloud\Iam\V1\AuditConfig>|\Google\Protobuf\Internal\RepeatedField $audit_configs
+ * Specifies cloud audit logging configuration for this policy.
+ * @type string $etag
+ * `etag` is used for optimistic concurrency control as a way to help
+ * prevent simultaneous updates of a policy from overwriting each other.
+ * It is strongly suggested that systems make use of the `etag` in the
+ * read-modify-write cycle to perform policy updates in order to avoid race
+ * conditions: An `etag` is returned in the response to `getIamPolicy`, and
+ * systems are expected to put that etag in the request to `setIamPolicy` to
+ * ensure that their change will be applied to the same version of the policy.
+ * **Important:** If you use IAM Conditions, you must include the `etag` field
+ * whenever you call `setIamPolicy`. If you omit this field, then IAM allows
+ * you to overwrite a version `3` policy with a version `1` policy, and all of
+ * the conditions in the version `3` policy are lost.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\Policy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Specifies the format of the policy.
+ * Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
+ * are rejected.
+ * Any operation that affects conditional role bindings must specify version
+ * `3`. This requirement applies to the following operations:
+ * * Getting a policy that includes a conditional role binding
+ * * Adding a conditional role binding to a policy
+ * * Changing a conditional role binding in a policy
+ * * Removing any role binding, with or without a condition, from a policy
+ * that includes conditions
+ * **Important:** If you use IAM Conditions, you must include the `etag` field
+ * whenever you call `setIamPolicy`. If you omit this field, then IAM allows
+ * you to overwrite a version `3` policy with a version `1` policy, and all of
+ * the conditions in the version `3` policy are lost.
+ * If a policy does not include any conditions, operations on that policy may
+ * specify any valid version or leave the field unset.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ *
+ * Generated from protobuf field int32 version = 1;
+ * @return int
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * Specifies the format of the policy.
+ * Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
+ * are rejected.
+ * Any operation that affects conditional role bindings must specify version
+ * `3`. This requirement applies to the following operations:
+ * * Getting a policy that includes a conditional role binding
+ * * Adding a conditional role binding to a policy
+ * * Changing a conditional role binding in a policy
+ * * Removing any role binding, with or without a condition, from a policy
+ * that includes conditions
+ * **Important:** If you use IAM Conditions, you must include the `etag` field
+ * whenever you call `setIamPolicy`. If you omit this field, then IAM allows
+ * you to overwrite a version `3` policy with a version `1` policy, and all of
+ * the conditions in the version `3` policy are lost.
+ * If a policy does not include any conditions, operations on that policy may
+ * specify any valid version or leave the field unset.
+ * To learn which resources support conditions in their IAM policies, see the
+ * [IAM
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ *
+ * Generated from protobuf field int32 version = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setVersion($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->version = $var;
+
+ return $this;
+ }
+
+ /**
+ * Associates a list of `members`, or principals, with a `role`. Optionally,
+ * may specify a `condition` that determines how and when the `bindings` are
+ * applied. Each of the `bindings` must contain at least one principal.
+ * The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
+ * of these principals can be Google groups. Each occurrence of a principal
+ * counts towards these limits. For example, if the `bindings` grant 50
+ * different roles to `user:alice@example.com`, and not to any other
+ * principal, then you can add another 1,450 principals to the `bindings` in
+ * the `Policy`.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.Binding bindings = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBindings()
+ {
+ return $this->bindings;
+ }
+
+ /**
+ * Associates a list of `members`, or principals, with a `role`. Optionally,
+ * may specify a `condition` that determines how and when the `bindings` are
+ * applied. Each of the `bindings` must contain at least one principal.
+ * The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
+ * of these principals can be Google groups. Each occurrence of a principal
+ * counts towards these limits. For example, if the `bindings` grant 50
+ * different roles to `user:alice@example.com`, and not to any other
+ * principal, then you can add another 1,450 principals to the `bindings` in
+ * the `Policy`.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.Binding bindings = 4;
+ * @param array<\Google\Cloud\Iam\V1\Binding>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBindings($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V1\Binding::class);
+ $this->bindings = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Specifies cloud audit logging configuration for this policy.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.AuditConfig audit_configs = 6;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAuditConfigs()
+ {
+ return $this->audit_configs;
+ }
+
+ /**
+ * Specifies cloud audit logging configuration for this policy.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.AuditConfig audit_configs = 6;
+ * @param array<\Google\Cloud\Iam\V1\AuditConfig>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAuditConfigs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V1\AuditConfig::class);
+ $this->audit_configs = $arr;
+
+ return $this;
+ }
+
+ /**
+ * `etag` is used for optimistic concurrency control as a way to help
+ * prevent simultaneous updates of a policy from overwriting each other.
+ * It is strongly suggested that systems make use of the `etag` in the
+ * read-modify-write cycle to perform policy updates in order to avoid race
+ * conditions: An `etag` is returned in the response to `getIamPolicy`, and
+ * systems are expected to put that etag in the request to `setIamPolicy` to
+ * ensure that their change will be applied to the same version of the policy.
+ * **Important:** If you use IAM Conditions, you must include the `etag` field
+ * whenever you call `setIamPolicy`. If you omit this field, then IAM allows
+ * you to overwrite a version `3` policy with a version `1` policy, and all of
+ * the conditions in the version `3` policy are lost.
+ *
+ * Generated from protobuf field bytes etag = 3;
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * `etag` is used for optimistic concurrency control as a way to help
+ * prevent simultaneous updates of a policy from overwriting each other.
+ * It is strongly suggested that systems make use of the `etag` in the
+ * read-modify-write cycle to perform policy updates in order to avoid race
+ * conditions: An `etag` is returned in the response to `getIamPolicy`, and
+ * systems are expected to put that etag in the request to `setIamPolicy` to
+ * ensure that their change will be applied to the same version of the policy.
+ * **Important:** If you use IAM Conditions, you must include the `etag` field
+ * whenever you call `setIamPolicy`. If you omit this field, then IAM allows
+ * you to overwrite a version `3` policy with a version `1` policy, and all of
+ * the conditions in the version `3` policy are lost.
+ *
+ * Generated from protobuf field bytes etag = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/PolicyDelta.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/PolicyDelta.php
new file mode 100644
index 0000000..dde1c0f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/PolicyDelta.php
@@ -0,0 +1,101 @@
+google.iam.v1.PolicyDelta
+ */
+class PolicyDelta extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The delta for Bindings between two policies.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.BindingDelta binding_deltas = 1;
+ */
+ private $binding_deltas;
+ /**
+ * The delta for AuditConfigs between two policies.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2;
+ */
+ private $audit_config_deltas;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\Iam\V1\BindingDelta>|\Google\Protobuf\Internal\RepeatedField $binding_deltas
+ * The delta for Bindings between two policies.
+ * @type array<\Google\Cloud\Iam\V1\AuditConfigDelta>|\Google\Protobuf\Internal\RepeatedField $audit_config_deltas
+ * The delta for AuditConfigs between two policies.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\Policy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The delta for Bindings between two policies.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.BindingDelta binding_deltas = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBindingDeltas()
+ {
+ return $this->binding_deltas;
+ }
+
+ /**
+ * The delta for Bindings between two policies.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.BindingDelta binding_deltas = 1;
+ * @param array<\Google\Cloud\Iam\V1\BindingDelta>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBindingDeltas($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V1\BindingDelta::class);
+ $this->binding_deltas = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The delta for AuditConfigs between two policies.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAuditConfigDeltas()
+ {
+ return $this->audit_config_deltas;
+ }
+
+ /**
+ * The delta for AuditConfigs between two policies.
+ *
+ * Generated from protobuf field repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2;
+ * @param array<\Google\Cloud\Iam\V1\AuditConfigDelta>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAuditConfigDeltas($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V1\AuditConfigDelta::class);
+ $this->audit_config_deltas = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/SetIamPolicyRequest.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/SetIamPolicyRequest.php
new file mode 100644
index 0000000..3bc7a5a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/SetIamPolicyRequest.php
@@ -0,0 +1,183 @@
+google.iam.v1.SetIamPolicyRequest
+ */
+class SetIamPolicyRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * REQUIRED: The resource for which the policy is being specified.
+ * See the operation documentation for the appropriate value for this field.
+ *
+ * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $resource = '';
+ /**
+ * REQUIRED: The complete policy to be applied to the `resource`. The size of
+ * the policy is limited to a few 10s of KB. An empty policy is a
+ * valid policy but certain Cloud Platform services (such as Projects)
+ * might reject them.
+ *
+ * Generated from protobuf field .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $policy = null;
+ /**
+ * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
+ * the fields in the mask will be modified. If no mask is provided, the
+ * following default mask is used:
+ * `paths: "bindings, etag"`
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3;
+ */
+ protected $update_mask = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $resource
+ * REQUIRED: The resource for which the policy is being specified.
+ * See the operation documentation for the appropriate value for this field.
+ * @type \Google\Cloud\Iam\V1\Policy $policy
+ * REQUIRED: The complete policy to be applied to the `resource`. The size of
+ * the policy is limited to a few 10s of KB. An empty policy is a
+ * valid policy but certain Cloud Platform services (such as Projects)
+ * might reject them.
+ * @type \Google\Protobuf\FieldMask $update_mask
+ * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
+ * the fields in the mask will be modified. If no mask is provided, the
+ * following default mask is used:
+ * `paths: "bindings, etag"`
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\IamPolicy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * REQUIRED: The resource for which the policy is being specified.
+ * See the operation documentation for the appropriate value for this field.
+ *
+ * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * REQUIRED: The resource for which the policy is being specified.
+ * See the operation documentation for the appropriate value for this field.
+ *
+ * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * REQUIRED: The complete policy to be applied to the `resource`. The size of
+ * the policy is limited to a few 10s of KB. An empty policy is a
+ * valid policy but certain Cloud Platform services (such as Projects)
+ * might reject them.
+ *
+ * Generated from protobuf field .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\Iam\V1\Policy|null
+ */
+ public function getPolicy()
+ {
+ return $this->policy;
+ }
+
+ public function hasPolicy()
+ {
+ return isset($this->policy);
+ }
+
+ public function clearPolicy()
+ {
+ unset($this->policy);
+ }
+
+ /**
+ * REQUIRED: The complete policy to be applied to the `resource`. The size of
+ * the policy is limited to a few 10s of KB. An empty policy is a
+ * valid policy but certain Cloud Platform services (such as Projects)
+ * might reject them.
+ *
+ * Generated from protobuf field .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\Iam\V1\Policy $var
+ * @return $this
+ */
+ public function setPolicy($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Iam\V1\Policy::class);
+ $this->policy = $var;
+
+ return $this;
+ }
+
+ /**
+ * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
+ * the fields in the mask will be modified. If no mask is provided, the
+ * following default mask is used:
+ * `paths: "bindings, etag"`
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3;
+ * @return \Google\Protobuf\FieldMask|null
+ */
+ public function getUpdateMask()
+ {
+ return $this->update_mask;
+ }
+
+ public function hasUpdateMask()
+ {
+ return isset($this->update_mask);
+ }
+
+ public function clearUpdateMask()
+ {
+ unset($this->update_mask);
+ }
+
+ /**
+ * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
+ * the fields in the mask will be modified. If no mask is provided, the
+ * following default mask is used:
+ * `paths: "bindings, etag"`
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3;
+ * @param \Google\Protobuf\FieldMask $var
+ * @return $this
+ */
+ public function setUpdateMask($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
+ $this->update_mask = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/TestIamPermissionsRequest.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/TestIamPermissionsRequest.php
new file mode 100644
index 0000000..dba237c
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/TestIamPermissionsRequest.php
@@ -0,0 +1,117 @@
+google.iam.v1.TestIamPermissionsRequest
+ */
+class TestIamPermissionsRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * REQUIRED: The resource for which the policy detail is being requested.
+ * See the operation documentation for the appropriate value for this field.
+ *
+ * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $resource = '';
+ /**
+ * The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more
+ * information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ *
+ * Generated from protobuf field repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $permissions;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $resource
+ * REQUIRED: The resource for which the policy detail is being requested.
+ * See the operation documentation for the appropriate value for this field.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $permissions
+ * The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more
+ * information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\IamPolicy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * REQUIRED: The resource for which the policy detail is being requested.
+ * See the operation documentation for the appropriate value for this field.
+ *
+ * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * REQUIRED: The resource for which the policy detail is being requested.
+ * See the operation documentation for the appropriate value for this field.
+ *
+ * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more
+ * information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ *
+ * Generated from protobuf field repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPermissions()
+ {
+ return $this->permissions;
+ }
+
+ /**
+ * The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more
+ * information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ *
+ * Generated from protobuf field repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPermissions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->permissions = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/TestIamPermissionsResponse.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/TestIamPermissionsResponse.php
new file mode 100644
index 0000000..fe3a85e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Iam/V1/TestIamPermissionsResponse.php
@@ -0,0 +1,71 @@
+google.iam.v1.TestIamPermissionsResponse
+ */
+class TestIamPermissionsResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A subset of `TestPermissionsRequest.permissions` that the caller is
+ * allowed.
+ *
+ * Generated from protobuf field repeated string permissions = 1;
+ */
+ private $permissions;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\RepeatedField $permissions
+ * A subset of `TestPermissionsRequest.permissions` that the caller is
+ * allowed.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\IamPolicy::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A subset of `TestPermissionsRequest.permissions` that the caller is
+ * allowed.
+ *
+ * Generated from protobuf field repeated string permissions = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPermissions()
+ {
+ return $this->permissions;
+ }
+
+ /**
+ * A subset of `TestPermissionsRequest.permissions` that the caller is
+ * allowed.
+ *
+ * Generated from protobuf field repeated string permissions = 1;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPermissions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->permissions = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/GetLocationRequest.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/GetLocationRequest.php
new file mode 100644
index 0000000..cb43058
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/GetLocationRequest.php
@@ -0,0 +1,67 @@
+google.cloud.location.GetLocationRequest
+ */
+class GetLocationRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Resource name for the location.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Resource name for the location.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Location\Locations::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Resource name for the location.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Resource name for the location.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/ListLocationsRequest.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/ListLocationsRequest.php
new file mode 100644
index 0000000..9279872
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/ListLocationsRequest.php
@@ -0,0 +1,169 @@
+google.cloud.location.ListLocationsRequest
+ */
+class ListLocationsRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The resource that owns the locations collection, if applicable.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The standard list filter.
+ *
+ * Generated from protobuf field string filter = 2;
+ */
+ protected $filter = '';
+ /**
+ * The standard list page size.
+ *
+ * Generated from protobuf field int32 page_size = 3;
+ */
+ protected $page_size = 0;
+ /**
+ * The standard list page token.
+ *
+ * Generated from protobuf field string page_token = 4;
+ */
+ protected $page_token = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The resource that owns the locations collection, if applicable.
+ * @type string $filter
+ * The standard list filter.
+ * @type int $page_size
+ * The standard list page size.
+ * @type string $page_token
+ * The standard list page token.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Location\Locations::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The resource that owns the locations collection, if applicable.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The resource that owns the locations collection, if applicable.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The standard list filter.
+ *
+ * Generated from protobuf field string filter = 2;
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * The standard list filter.
+ *
+ * Generated from protobuf field string filter = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setFilter($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->filter = $var;
+
+ return $this;
+ }
+
+ /**
+ * The standard list page size.
+ *
+ * Generated from protobuf field int32 page_size = 3;
+ * @return int
+ */
+ public function getPageSize()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * The standard list page size.
+ *
+ * Generated from protobuf field int32 page_size = 3;
+ * @param int $var
+ * @return $this
+ */
+ public function setPageSize($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->page_size = $var;
+
+ return $this;
+ }
+
+ /**
+ * The standard list page token.
+ *
+ * Generated from protobuf field string page_token = 4;
+ * @return string
+ */
+ public function getPageToken()
+ {
+ return $this->page_token;
+ }
+
+ /**
+ * The standard list page token.
+ *
+ * Generated from protobuf field string page_token = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->page_token = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/ListLocationsResponse.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/ListLocationsResponse.php
new file mode 100644
index 0000000..169a8e7
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/ListLocationsResponse.php
@@ -0,0 +1,101 @@
+google.cloud.location.ListLocationsResponse
+ */
+class ListLocationsResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A list of locations that matches the specified filter in the request.
+ *
+ * Generated from protobuf field repeated .google.cloud.location.Location locations = 1;
+ */
+ private $locations;
+ /**
+ * The standard List next-page token.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\Location\Location>|\Google\Protobuf\Internal\RepeatedField $locations
+ * A list of locations that matches the specified filter in the request.
+ * @type string $next_page_token
+ * The standard List next-page token.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Location\Locations::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A list of locations that matches the specified filter in the request.
+ *
+ * Generated from protobuf field repeated .google.cloud.location.Location locations = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLocations()
+ {
+ return $this->locations;
+ }
+
+ /**
+ * A list of locations that matches the specified filter in the request.
+ *
+ * Generated from protobuf field repeated .google.cloud.location.Location locations = 1;
+ * @param array<\Google\Cloud\Location\Location>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLocations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Location\Location::class);
+ $this->locations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The standard List next-page token.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * The standard List next-page token.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/Location.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/Location.php
new file mode 100644
index 0000000..f953e2e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Location/Location.php
@@ -0,0 +1,229 @@
+google.cloud.location.Location
+ */
+class Location extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ * Generated from protobuf field string location_id = 4;
+ */
+ protected $location_id = '';
+ /**
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ * Generated from protobuf field string display_name = 5;
+ */
+ protected $display_name = '';
+ /**
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ * Generated from protobuf field map labels = 2;
+ */
+ private $labels;
+ /**
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ * Generated from protobuf field .google.protobuf.Any metadata = 3;
+ */
+ protected $metadata = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ * @type string $location_id
+ * The canonical id for this location. For example: `"us-east1"`.
+ * @type string $display_name
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ * @type \Google\Protobuf\Any $metadata
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Location\Locations::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Resource name for the location, which may vary between implementations.
+ * For example: `"projects/example-project/locations/us-east1"`
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ * Generated from protobuf field string location_id = 4;
+ * @return string
+ */
+ public function getLocationId()
+ {
+ return $this->location_id;
+ }
+
+ /**
+ * The canonical id for this location. For example: `"us-east1"`.
+ *
+ * Generated from protobuf field string location_id = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setLocationId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->location_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ * Generated from protobuf field string display_name = 5;
+ * @return string
+ */
+ public function getDisplayName()
+ {
+ return $this->display_name;
+ }
+
+ /**
+ * The friendly name for this location, typically a nearby city name.
+ * For example, "Tokyo".
+ *
+ * Generated from protobuf field string display_name = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ * Generated from protobuf field map labels = 2;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Cross-service attributes for the location. For example
+ * {"cloud.googleapis.com/region": "us-east1"}
+ *
+ * Generated from protobuf field map labels = 2;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ * Generated from protobuf field .google.protobuf.Any metadata = 3;
+ * @return \Google\Protobuf\Any|null
+ */
+ public function getMetadata()
+ {
+ return $this->metadata;
+ }
+
+ public function hasMetadata()
+ {
+ return isset($this->metadata);
+ }
+
+ public function clearMetadata()
+ {
+ unset($this->metadata);
+ }
+
+ /**
+ * Service-specific metadata. For example the available capacity at the given
+ * location.
+ *
+ * Generated from protobuf field .google.protobuf.Any metadata = 3;
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setMetadata($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->metadata = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Logging/Type/HttpRequest.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Logging/Type/HttpRequest.php
new file mode 100644
index 0000000..0907340
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Logging/Type/HttpRequest.php
@@ -0,0 +1,627 @@
+google.logging.type.HttpRequest
+ */
+class HttpRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
+ *
+ * Generated from protobuf field string request_method = 1;
+ */
+ protected $request_method = '';
+ /**
+ * The scheme (http, https), the host name, the path and the query
+ * portion of the URL that was requested.
+ * Example: `"http://example.com/some/info?color=red"`.
+ *
+ * Generated from protobuf field string request_url = 2;
+ */
+ protected $request_url = '';
+ /**
+ * The size of the HTTP request message in bytes, including the request
+ * headers and the request body.
+ *
+ * Generated from protobuf field int64 request_size = 3;
+ */
+ protected $request_size = 0;
+ /**
+ * The response code indicating the status of response.
+ * Examples: 200, 404.
+ *
+ * Generated from protobuf field int32 status = 4;
+ */
+ protected $status = 0;
+ /**
+ * The size of the HTTP response message sent back to the client, in bytes,
+ * including the response headers and the response body.
+ *
+ * Generated from protobuf field int64 response_size = 5;
+ */
+ protected $response_size = 0;
+ /**
+ * The user agent sent by the client. Example:
+ * `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
+ * CLR 1.0.3705)"`.
+ *
+ * Generated from protobuf field string user_agent = 6;
+ */
+ protected $user_agent = '';
+ /**
+ * The IP address (IPv4 or IPv6) of the client that issued the HTTP
+ * request. This field can include port information. Examples:
+ * `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
+ *
+ * Generated from protobuf field string remote_ip = 7;
+ */
+ protected $remote_ip = '';
+ /**
+ * The IP address (IPv4 or IPv6) of the origin server that the request was
+ * sent to. This field can include port information. Examples:
+ * `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
+ *
+ * Generated from protobuf field string server_ip = 13;
+ */
+ protected $server_ip = '';
+ /**
+ * The referer URL of the request, as defined in
+ * [HTTP/1.1 Header Field
+ * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
+ *
+ * Generated from protobuf field string referer = 8;
+ */
+ protected $referer = '';
+ /**
+ * The request processing latency on the server, from the time the request was
+ * received until the response was sent.
+ *
+ * Generated from protobuf field .google.protobuf.Duration latency = 14;
+ */
+ protected $latency = null;
+ /**
+ * Whether or not a cache lookup was attempted.
+ *
+ * Generated from protobuf field bool cache_lookup = 11;
+ */
+ protected $cache_lookup = false;
+ /**
+ * Whether or not an entity was served from cache
+ * (with or without validation).
+ *
+ * Generated from protobuf field bool cache_hit = 9;
+ */
+ protected $cache_hit = false;
+ /**
+ * Whether or not the response was validated with the origin server before
+ * being served from cache. This field is only meaningful if `cache_hit` is
+ * True.
+ *
+ * Generated from protobuf field bool cache_validated_with_origin_server = 10;
+ */
+ protected $cache_validated_with_origin_server = false;
+ /**
+ * The number of HTTP response bytes inserted into cache. Set only when a
+ * cache fill was attempted.
+ *
+ * Generated from protobuf field int64 cache_fill_bytes = 12;
+ */
+ protected $cache_fill_bytes = 0;
+ /**
+ * Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
+ *
+ * Generated from protobuf field string protocol = 15;
+ */
+ protected $protocol = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $request_method
+ * The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
+ * @type string $request_url
+ * The scheme (http, https), the host name, the path and the query
+ * portion of the URL that was requested.
+ * Example: `"http://example.com/some/info?color=red"`.
+ * @type int|string $request_size
+ * The size of the HTTP request message in bytes, including the request
+ * headers and the request body.
+ * @type int $status
+ * The response code indicating the status of response.
+ * Examples: 200, 404.
+ * @type int|string $response_size
+ * The size of the HTTP response message sent back to the client, in bytes,
+ * including the response headers and the response body.
+ * @type string $user_agent
+ * The user agent sent by the client. Example:
+ * `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
+ * CLR 1.0.3705)"`.
+ * @type string $remote_ip
+ * The IP address (IPv4 or IPv6) of the client that issued the HTTP
+ * request. This field can include port information. Examples:
+ * `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
+ * @type string $server_ip
+ * The IP address (IPv4 or IPv6) of the origin server that the request was
+ * sent to. This field can include port information. Examples:
+ * `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
+ * @type string $referer
+ * The referer URL of the request, as defined in
+ * [HTTP/1.1 Header Field
+ * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
+ * @type \Google\Protobuf\Duration $latency
+ * The request processing latency on the server, from the time the request was
+ * received until the response was sent.
+ * @type bool $cache_lookup
+ * Whether or not a cache lookup was attempted.
+ * @type bool $cache_hit
+ * Whether or not an entity was served from cache
+ * (with or without validation).
+ * @type bool $cache_validated_with_origin_server
+ * Whether or not the response was validated with the origin server before
+ * being served from cache. This field is only meaningful if `cache_hit` is
+ * True.
+ * @type int|string $cache_fill_bytes
+ * The number of HTTP response bytes inserted into cache. Set only when a
+ * cache fill was attempted.
+ * @type string $protocol
+ * Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Logging\Type\HttpRequest::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
+ *
+ * Generated from protobuf field string request_method = 1;
+ * @return string
+ */
+ public function getRequestMethod()
+ {
+ return $this->request_method;
+ }
+
+ /**
+ * The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
+ *
+ * Generated from protobuf field string request_method = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestMethod($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_method = $var;
+
+ return $this;
+ }
+
+ /**
+ * The scheme (http, https), the host name, the path and the query
+ * portion of the URL that was requested.
+ * Example: `"http://example.com/some/info?color=red"`.
+ *
+ * Generated from protobuf field string request_url = 2;
+ * @return string
+ */
+ public function getRequestUrl()
+ {
+ return $this->request_url;
+ }
+
+ /**
+ * The scheme (http, https), the host name, the path and the query
+ * portion of the URL that was requested.
+ * Example: `"http://example.com/some/info?color=red"`.
+ *
+ * Generated from protobuf field string request_url = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * The size of the HTTP request message in bytes, including the request
+ * headers and the request body.
+ *
+ * Generated from protobuf field int64 request_size = 3;
+ * @return int|string
+ */
+ public function getRequestSize()
+ {
+ return $this->request_size;
+ }
+
+ /**
+ * The size of the HTTP request message in bytes, including the request
+ * headers and the request body.
+ *
+ * Generated from protobuf field int64 request_size = 3;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setRequestSize($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->request_size = $var;
+
+ return $this;
+ }
+
+ /**
+ * The response code indicating the status of response.
+ * Examples: 200, 404.
+ *
+ * Generated from protobuf field int32 status = 4;
+ * @return int
+ */
+ public function getStatus()
+ {
+ return $this->status;
+ }
+
+ /**
+ * The response code indicating the status of response.
+ * Examples: 200, 404.
+ *
+ * Generated from protobuf field int32 status = 4;
+ * @param int $var
+ * @return $this
+ */
+ public function setStatus($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->status = $var;
+
+ return $this;
+ }
+
+ /**
+ * The size of the HTTP response message sent back to the client, in bytes,
+ * including the response headers and the response body.
+ *
+ * Generated from protobuf field int64 response_size = 5;
+ * @return int|string
+ */
+ public function getResponseSize()
+ {
+ return $this->response_size;
+ }
+
+ /**
+ * The size of the HTTP response message sent back to the client, in bytes,
+ * including the response headers and the response body.
+ *
+ * Generated from protobuf field int64 response_size = 5;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setResponseSize($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->response_size = $var;
+
+ return $this;
+ }
+
+ /**
+ * The user agent sent by the client. Example:
+ * `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
+ * CLR 1.0.3705)"`.
+ *
+ * Generated from protobuf field string user_agent = 6;
+ * @return string
+ */
+ public function getUserAgent()
+ {
+ return $this->user_agent;
+ }
+
+ /**
+ * The user agent sent by the client. Example:
+ * `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
+ * CLR 1.0.3705)"`.
+ *
+ * Generated from protobuf field string user_agent = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setUserAgent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->user_agent = $var;
+
+ return $this;
+ }
+
+ /**
+ * The IP address (IPv4 or IPv6) of the client that issued the HTTP
+ * request. This field can include port information. Examples:
+ * `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
+ *
+ * Generated from protobuf field string remote_ip = 7;
+ * @return string
+ */
+ public function getRemoteIp()
+ {
+ return $this->remote_ip;
+ }
+
+ /**
+ * The IP address (IPv4 or IPv6) of the client that issued the HTTP
+ * request. This field can include port information. Examples:
+ * `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
+ *
+ * Generated from protobuf field string remote_ip = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setRemoteIp($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->remote_ip = $var;
+
+ return $this;
+ }
+
+ /**
+ * The IP address (IPv4 or IPv6) of the origin server that the request was
+ * sent to. This field can include port information. Examples:
+ * `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
+ *
+ * Generated from protobuf field string server_ip = 13;
+ * @return string
+ */
+ public function getServerIp()
+ {
+ return $this->server_ip;
+ }
+
+ /**
+ * The IP address (IPv4 or IPv6) of the origin server that the request was
+ * sent to. This field can include port information. Examples:
+ * `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
+ *
+ * Generated from protobuf field string server_ip = 13;
+ * @param string $var
+ * @return $this
+ */
+ public function setServerIp($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->server_ip = $var;
+
+ return $this;
+ }
+
+ /**
+ * The referer URL of the request, as defined in
+ * [HTTP/1.1 Header Field
+ * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
+ *
+ * Generated from protobuf field string referer = 8;
+ * @return string
+ */
+ public function getReferer()
+ {
+ return $this->referer;
+ }
+
+ /**
+ * The referer URL of the request, as defined in
+ * [HTTP/1.1 Header Field
+ * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
+ *
+ * Generated from protobuf field string referer = 8;
+ * @param string $var
+ * @return $this
+ */
+ public function setReferer($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->referer = $var;
+
+ return $this;
+ }
+
+ /**
+ * The request processing latency on the server, from the time the request was
+ * received until the response was sent.
+ *
+ * Generated from protobuf field .google.protobuf.Duration latency = 14;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getLatency()
+ {
+ return $this->latency;
+ }
+
+ public function hasLatency()
+ {
+ return isset($this->latency);
+ }
+
+ public function clearLatency()
+ {
+ unset($this->latency);
+ }
+
+ /**
+ * The request processing latency on the server, from the time the request was
+ * received until the response was sent.
+ *
+ * Generated from protobuf field .google.protobuf.Duration latency = 14;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setLatency($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->latency = $var;
+
+ return $this;
+ }
+
+ /**
+ * Whether or not a cache lookup was attempted.
+ *
+ * Generated from protobuf field bool cache_lookup = 11;
+ * @return bool
+ */
+ public function getCacheLookup()
+ {
+ return $this->cache_lookup;
+ }
+
+ /**
+ * Whether or not a cache lookup was attempted.
+ *
+ * Generated from protobuf field bool cache_lookup = 11;
+ * @param bool $var
+ * @return $this
+ */
+ public function setCacheLookup($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->cache_lookup = $var;
+
+ return $this;
+ }
+
+ /**
+ * Whether or not an entity was served from cache
+ * (with or without validation).
+ *
+ * Generated from protobuf field bool cache_hit = 9;
+ * @return bool
+ */
+ public function getCacheHit()
+ {
+ return $this->cache_hit;
+ }
+
+ /**
+ * Whether or not an entity was served from cache
+ * (with or without validation).
+ *
+ * Generated from protobuf field bool cache_hit = 9;
+ * @param bool $var
+ * @return $this
+ */
+ public function setCacheHit($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->cache_hit = $var;
+
+ return $this;
+ }
+
+ /**
+ * Whether or not the response was validated with the origin server before
+ * being served from cache. This field is only meaningful if `cache_hit` is
+ * True.
+ *
+ * Generated from protobuf field bool cache_validated_with_origin_server = 10;
+ * @return bool
+ */
+ public function getCacheValidatedWithOriginServer()
+ {
+ return $this->cache_validated_with_origin_server;
+ }
+
+ /**
+ * Whether or not the response was validated with the origin server before
+ * being served from cache. This field is only meaningful if `cache_hit` is
+ * True.
+ *
+ * Generated from protobuf field bool cache_validated_with_origin_server = 10;
+ * @param bool $var
+ * @return $this
+ */
+ public function setCacheValidatedWithOriginServer($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->cache_validated_with_origin_server = $var;
+
+ return $this;
+ }
+
+ /**
+ * The number of HTTP response bytes inserted into cache. Set only when a
+ * cache fill was attempted.
+ *
+ * Generated from protobuf field int64 cache_fill_bytes = 12;
+ * @return int|string
+ */
+ public function getCacheFillBytes()
+ {
+ return $this->cache_fill_bytes;
+ }
+
+ /**
+ * The number of HTTP response bytes inserted into cache. Set only when a
+ * cache fill was attempted.
+ *
+ * Generated from protobuf field int64 cache_fill_bytes = 12;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCacheFillBytes($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->cache_fill_bytes = $var;
+
+ return $this;
+ }
+
+ /**
+ * Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
+ *
+ * Generated from protobuf field string protocol = 15;
+ * @return string
+ */
+ public function getProtocol()
+ {
+ return $this->protocol;
+ }
+
+ /**
+ * Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
+ *
+ * Generated from protobuf field string protocol = 15;
+ * @param string $var
+ * @return $this
+ */
+ public function setProtocol($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->protocol = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/Logging/Type/LogSeverity.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Logging/Type/LogSeverity.php
new file mode 100644
index 0000000..dc64792
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/Logging/Type/LogSeverity.php
@@ -0,0 +1,119 @@
+ DEBUG AND severity <= WARNING
+ * If you are writing log entries, you should map other severity encodings to
+ * one of these standard levels. For example, you might map all of Java's FINE,
+ * FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the
+ * original severity level in the log entry payload if you wish.
+ *
+ * Protobuf type google.logging.type.LogSeverity
+ */
+class LogSeverity
+{
+ /**
+ * (0) The log entry has no assigned severity level.
+ *
+ * Generated from protobuf enum DEFAULT = 0;
+ */
+ const PBDEFAULT = 0;
+ /**
+ * (100) Debug or trace information.
+ *
+ * Generated from protobuf enum DEBUG = 100;
+ */
+ const DEBUG = 100;
+ /**
+ * (200) Routine information, such as ongoing status or performance.
+ *
+ * Generated from protobuf enum INFO = 200;
+ */
+ const INFO = 200;
+ /**
+ * (300) Normal but significant events, such as start up, shut down, or
+ * a configuration change.
+ *
+ * Generated from protobuf enum NOTICE = 300;
+ */
+ const NOTICE = 300;
+ /**
+ * (400) Warning events might cause problems.
+ *
+ * Generated from protobuf enum WARNING = 400;
+ */
+ const WARNING = 400;
+ /**
+ * (500) Error events are likely to cause problems.
+ *
+ * Generated from protobuf enum ERROR = 500;
+ */
+ const ERROR = 500;
+ /**
+ * (600) Critical events cause more severe problems or outages.
+ *
+ * Generated from protobuf enum CRITICAL = 600;
+ */
+ const CRITICAL = 600;
+ /**
+ * (700) A person must take an action immediately.
+ *
+ * Generated from protobuf enum ALERT = 700;
+ */
+ const ALERT = 700;
+ /**
+ * (800) One or more systems are unusable.
+ *
+ * Generated from protobuf enum EMERGENCY = 800;
+ */
+ const EMERGENCY = 800;
+
+ private static $valueToName = [
+ self::PBDEFAULT => 'DEFAULT',
+ self::DEBUG => 'DEBUG',
+ self::INFO => 'INFO',
+ self::NOTICE => 'NOTICE',
+ self::WARNING => 'WARNING',
+ self::ERROR => 'ERROR',
+ self::CRITICAL => 'CRITICAL',
+ self::ALERT => 'ALERT',
+ self::EMERGENCY => 'EMERGENCY',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ $pbconst = __CLASS__. '::PB' . strtoupper($name);
+ if (!defined($pbconst)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($pbconst);
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Cloud/OperationResponseMapping.php b/tests/php_test_files/vendor/google/common-protos/src/Cloud/OperationResponseMapping.php
new file mode 100644
index 0000000..c21c294
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Cloud/OperationResponseMapping.php
@@ -0,0 +1,86 @@
+google.cloud.OperationResponseMapping
+ */
+class OperationResponseMapping
+{
+ /**
+ * Do not use.
+ *
+ * Generated from protobuf enum UNDEFINED = 0;
+ */
+ const UNDEFINED = 0;
+ /**
+ * A field in an API-specific (custom) Operation object which carries the same
+ * meaning as google.longrunning.Operation.name.
+ *
+ * Generated from protobuf enum NAME = 1;
+ */
+ const NAME = 1;
+ /**
+ * A field in an API-specific (custom) Operation object which carries the same
+ * meaning as google.longrunning.Operation.done. If the annotated field is of
+ * an enum type, `annotated_field_name == EnumType.DONE` semantics should be
+ * equivalent to `Operation.done == true`. If the annotated field is of type
+ * boolean, then it should follow the same semantics as Operation.done.
+ * Otherwise, a non-empty value should be treated as `Operation.done == true`.
+ *
+ * Generated from protobuf enum STATUS = 2;
+ */
+ const STATUS = 2;
+ /**
+ * A field in an API-specific (custom) Operation object which carries the same
+ * meaning as google.longrunning.Operation.error.code.
+ *
+ * Generated from protobuf enum ERROR_CODE = 3;
+ */
+ const ERROR_CODE = 3;
+ /**
+ * A field in an API-specific (custom) Operation object which carries the same
+ * meaning as google.longrunning.Operation.error.message.
+ *
+ * Generated from protobuf enum ERROR_MESSAGE = 4;
+ */
+ const ERROR_MESSAGE = 4;
+
+ private static $valueToName = [
+ self::UNDEFINED => 'UNDEFINED',
+ self::NAME => 'NAME',
+ self::STATUS => 'STATUS',
+ self::ERROR_CODE => 'ERROR_CODE',
+ self::ERROR_MESSAGE => 'ERROR_MESSAGE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Iam/V1/Logging/AuditData.php b/tests/php_test_files/vendor/google/common-protos/src/Iam/V1/Logging/AuditData.php
new file mode 100644
index 0000000..447ed72
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Iam/V1/Logging/AuditData.php
@@ -0,0 +1,79 @@
+google.iam.v1.logging.AuditData
+ */
+class AuditData extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Policy delta between the original policy and the newly set policy.
+ *
+ * Generated from protobuf field .google.iam.v1.PolicyDelta policy_delta = 2;
+ */
+ protected $policy_delta = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Iam\V1\PolicyDelta $policy_delta
+ * Policy delta between the original policy and the newly set policy.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Iam\V1\Logging\AuditData::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Policy delta between the original policy and the newly set policy.
+ *
+ * Generated from protobuf field .google.iam.v1.PolicyDelta policy_delta = 2;
+ * @return \Google\Cloud\Iam\V1\PolicyDelta|null
+ */
+ public function getPolicyDelta()
+ {
+ return $this->policy_delta;
+ }
+
+ public function hasPolicyDelta()
+ {
+ return isset($this->policy_delta);
+ }
+
+ public function clearPolicyDelta()
+ {
+ unset($this->policy_delta);
+ }
+
+ /**
+ * Policy delta between the original policy and the newly set policy.
+ *
+ * Generated from protobuf field .google.iam.v1.PolicyDelta policy_delta = 2;
+ * @param \Google\Cloud\Iam\V1\PolicyDelta $var
+ * @return $this
+ */
+ public function setPolicyDelta($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Iam\V1\PolicyDelta::class);
+ $this->policy_delta = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/BadRequest.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/BadRequest.php
new file mode 100644
index 0000000..03e55d6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/BadRequest.php
@@ -0,0 +1,68 @@
+google.rpc.BadRequest
+ */
+class BadRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Describes all violations in a client request.
+ *
+ * Generated from protobuf field repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
+ */
+ private $field_violations;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Rpc\BadRequest\FieldViolation>|\Google\Protobuf\Internal\RepeatedField $field_violations
+ * Describes all violations in a client request.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Describes all violations in a client request.
+ *
+ * Generated from protobuf field repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getFieldViolations()
+ {
+ return $this->field_violations;
+ }
+
+ /**
+ * Describes all violations in a client request.
+ *
+ * Generated from protobuf field repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
+ * @param array<\Google\Rpc\BadRequest\FieldViolation>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setFieldViolations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\BadRequest\FieldViolation::class);
+ $this->field_violations = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/BadRequest/FieldViolation.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/BadRequest/FieldViolation.php
new file mode 100644
index 0000000..fd245f6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/BadRequest/FieldViolation.php
@@ -0,0 +1,214 @@
+google.rpc.BadRequest.FieldViolation
+ */
+class FieldViolation extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A path that leads to a field in the request body. The value will be a
+ * sequence of dot-separated identifiers that identify a protocol buffer
+ * field.
+ * Consider the following:
+ * message CreateContactRequest {
+ * message EmailAddress {
+ * enum Type {
+ * TYPE_UNSPECIFIED = 0;
+ * HOME = 1;
+ * WORK = 2;
+ * }
+ * optional string email = 1;
+ * repeated EmailType type = 2;
+ * }
+ * string full_name = 1;
+ * repeated EmailAddress email_addresses = 2;
+ * }
+ * In this example, in proto `field` could take one of the following values:
+ * * `full_name` for a violation in the `full_name` value
+ * * `email_addresses[1].email` for a violation in the `email` field of the
+ * first `email_addresses` message
+ * * `email_addresses[3].type[2]` for a violation in the second `type`
+ * value in the third `email_addresses` message.
+ * In JSON, the same values are represented as:
+ * * `fullName` for a violation in the `fullName` value
+ * * `emailAddresses[1].email` for a violation in the `email` field of the
+ * first `emailAddresses` message
+ * * `emailAddresses[3].type[2]` for a violation in the second `type`
+ * value in the third `emailAddresses` message.
+ *
+ * Generated from protobuf field string field = 1;
+ */
+ protected $field = '';
+ /**
+ * A description of why the request element is bad.
+ *
+ * Generated from protobuf field string description = 2;
+ */
+ protected $description = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $field
+ * A path that leads to a field in the request body. The value will be a
+ * sequence of dot-separated identifiers that identify a protocol buffer
+ * field.
+ * Consider the following:
+ * message CreateContactRequest {
+ * message EmailAddress {
+ * enum Type {
+ * TYPE_UNSPECIFIED = 0;
+ * HOME = 1;
+ * WORK = 2;
+ * }
+ * optional string email = 1;
+ * repeated EmailType type = 2;
+ * }
+ * string full_name = 1;
+ * repeated EmailAddress email_addresses = 2;
+ * }
+ * In this example, in proto `field` could take one of the following values:
+ * * `full_name` for a violation in the `full_name` value
+ * * `email_addresses[1].email` for a violation in the `email` field of the
+ * first `email_addresses` message
+ * * `email_addresses[3].type[2]` for a violation in the second `type`
+ * value in the third `email_addresses` message.
+ * In JSON, the same values are represented as:
+ * * `fullName` for a violation in the `fullName` value
+ * * `emailAddresses[1].email` for a violation in the `email` field of the
+ * first `emailAddresses` message
+ * * `emailAddresses[3].type[2]` for a violation in the second `type`
+ * value in the third `emailAddresses` message.
+ * @type string $description
+ * A description of why the request element is bad.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A path that leads to a field in the request body. The value will be a
+ * sequence of dot-separated identifiers that identify a protocol buffer
+ * field.
+ * Consider the following:
+ * message CreateContactRequest {
+ * message EmailAddress {
+ * enum Type {
+ * TYPE_UNSPECIFIED = 0;
+ * HOME = 1;
+ * WORK = 2;
+ * }
+ * optional string email = 1;
+ * repeated EmailType type = 2;
+ * }
+ * string full_name = 1;
+ * repeated EmailAddress email_addresses = 2;
+ * }
+ * In this example, in proto `field` could take one of the following values:
+ * * `full_name` for a violation in the `full_name` value
+ * * `email_addresses[1].email` for a violation in the `email` field of the
+ * first `email_addresses` message
+ * * `email_addresses[3].type[2]` for a violation in the second `type`
+ * value in the third `email_addresses` message.
+ * In JSON, the same values are represented as:
+ * * `fullName` for a violation in the `fullName` value
+ * * `emailAddresses[1].email` for a violation in the `email` field of the
+ * first `emailAddresses` message
+ * * `emailAddresses[3].type[2]` for a violation in the second `type`
+ * value in the third `emailAddresses` message.
+ *
+ * Generated from protobuf field string field = 1;
+ * @return string
+ */
+ public function getField()
+ {
+ return $this->field;
+ }
+
+ /**
+ * A path that leads to a field in the request body. The value will be a
+ * sequence of dot-separated identifiers that identify a protocol buffer
+ * field.
+ * Consider the following:
+ * message CreateContactRequest {
+ * message EmailAddress {
+ * enum Type {
+ * TYPE_UNSPECIFIED = 0;
+ * HOME = 1;
+ * WORK = 2;
+ * }
+ * optional string email = 1;
+ * repeated EmailType type = 2;
+ * }
+ * string full_name = 1;
+ * repeated EmailAddress email_addresses = 2;
+ * }
+ * In this example, in proto `field` could take one of the following values:
+ * * `full_name` for a violation in the `full_name` value
+ * * `email_addresses[1].email` for a violation in the `email` field of the
+ * first `email_addresses` message
+ * * `email_addresses[3].type[2]` for a violation in the second `type`
+ * value in the third `email_addresses` message.
+ * In JSON, the same values are represented as:
+ * * `fullName` for a violation in the `fullName` value
+ * * `emailAddresses[1].email` for a violation in the `email` field of the
+ * first `emailAddresses` message
+ * * `emailAddresses[3].type[2]` for a violation in the second `type`
+ * value in the third `emailAddresses` message.
+ *
+ * Generated from protobuf field string field = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setField($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->field = $var;
+
+ return $this;
+ }
+
+ /**
+ * A description of why the request element is bad.
+ *
+ * Generated from protobuf field string description = 2;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * A description of why the request element is bad.
+ *
+ * Generated from protobuf field string description = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Code.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Code.php
new file mode 100644
index 0000000..b82e88f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Code.php
@@ -0,0 +1,243 @@
+google.rpc.Code
+ */
+class Code
+{
+ /**
+ * Not an error; returned on success.
+ * HTTP Mapping: 200 OK
+ *
+ * Generated from protobuf enum OK = 0;
+ */
+ const OK = 0;
+ /**
+ * The operation was cancelled, typically by the caller.
+ * HTTP Mapping: 499 Client Closed Request
+ *
+ * Generated from protobuf enum CANCELLED = 1;
+ */
+ const CANCELLED = 1;
+ /**
+ * Unknown error. For example, this error may be returned when
+ * a `Status` value received from another address space belongs to
+ * an error space that is not known in this address space. Also
+ * errors raised by APIs that do not return enough error information
+ * may be converted to this error.
+ * HTTP Mapping: 500 Internal Server Error
+ *
+ * Generated from protobuf enum UNKNOWN = 2;
+ */
+ const UNKNOWN = 2;
+ /**
+ * The client specified an invalid argument. Note that this differs
+ * from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
+ * that are problematic regardless of the state of the system
+ * (e.g., a malformed file name).
+ * HTTP Mapping: 400 Bad Request
+ *
+ * Generated from protobuf enum INVALID_ARGUMENT = 3;
+ */
+ const INVALID_ARGUMENT = 3;
+ /**
+ * The deadline expired before the operation could complete. For operations
+ * that change the state of the system, this error may be returned
+ * even if the operation has completed successfully. For example, a
+ * successful response from a server could have been delayed long
+ * enough for the deadline to expire.
+ * HTTP Mapping: 504 Gateway Timeout
+ *
+ * Generated from protobuf enum DEADLINE_EXCEEDED = 4;
+ */
+ const DEADLINE_EXCEEDED = 4;
+ /**
+ * Some requested entity (e.g., file or directory) was not found.
+ * Note to server developers: if a request is denied for an entire class
+ * of users, such as gradual feature rollout or undocumented allowlist,
+ * `NOT_FOUND` may be used. If a request is denied for some users within
+ * a class of users, such as user-based access control, `PERMISSION_DENIED`
+ * must be used.
+ * HTTP Mapping: 404 Not Found
+ *
+ * Generated from protobuf enum NOT_FOUND = 5;
+ */
+ const NOT_FOUND = 5;
+ /**
+ * The entity that a client attempted to create (e.g., file or directory)
+ * already exists.
+ * HTTP Mapping: 409 Conflict
+ *
+ * Generated from protobuf enum ALREADY_EXISTS = 6;
+ */
+ const ALREADY_EXISTS = 6;
+ /**
+ * The caller does not have permission to execute the specified
+ * operation. `PERMISSION_DENIED` must not be used for rejections
+ * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
+ * instead for those errors). `PERMISSION_DENIED` must not be
+ * used if the caller can not be identified (use `UNAUTHENTICATED`
+ * instead for those errors). This error code does not imply the
+ * request is valid or the requested entity exists or satisfies
+ * other pre-conditions.
+ * HTTP Mapping: 403 Forbidden
+ *
+ * Generated from protobuf enum PERMISSION_DENIED = 7;
+ */
+ const PERMISSION_DENIED = 7;
+ /**
+ * The request does not have valid authentication credentials for the
+ * operation.
+ * HTTP Mapping: 401 Unauthorized
+ *
+ * Generated from protobuf enum UNAUTHENTICATED = 16;
+ */
+ const UNAUTHENTICATED = 16;
+ /**
+ * Some resource has been exhausted, perhaps a per-user quota, or
+ * perhaps the entire file system is out of space.
+ * HTTP Mapping: 429 Too Many Requests
+ *
+ * Generated from protobuf enum RESOURCE_EXHAUSTED = 8;
+ */
+ const RESOURCE_EXHAUSTED = 8;
+ /**
+ * The operation was rejected because the system is not in a state
+ * required for the operation's execution. For example, the directory
+ * to be deleted is non-empty, an rmdir operation is applied to
+ * a non-directory, etc.
+ * Service implementors can use the following guidelines to decide
+ * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
+ * (a) Use `UNAVAILABLE` if the client can retry just the failing call.
+ * (b) Use `ABORTED` if the client should retry at a higher level. For
+ * example, when a client-specified test-and-set fails, indicating the
+ * client should restart a read-modify-write sequence.
+ * (c) Use `FAILED_PRECONDITION` if the client should not retry until
+ * the system state has been explicitly fixed. For example, if an "rmdir"
+ * fails because the directory is non-empty, `FAILED_PRECONDITION`
+ * should be returned since the client should not retry unless
+ * the files are deleted from the directory.
+ * HTTP Mapping: 400 Bad Request
+ *
+ * Generated from protobuf enum FAILED_PRECONDITION = 9;
+ */
+ const FAILED_PRECONDITION = 9;
+ /**
+ * The operation was aborted, typically due to a concurrency issue such as
+ * a sequencer check failure or transaction abort.
+ * See the guidelines above for deciding between `FAILED_PRECONDITION`,
+ * `ABORTED`, and `UNAVAILABLE`.
+ * HTTP Mapping: 409 Conflict
+ *
+ * Generated from protobuf enum ABORTED = 10;
+ */
+ const ABORTED = 10;
+ /**
+ * The operation was attempted past the valid range. E.g., seeking or
+ * reading past end-of-file.
+ * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
+ * be fixed if the system state changes. For example, a 32-bit file
+ * system will generate `INVALID_ARGUMENT` if asked to read at an
+ * offset that is not in the range [0,2^32-1], but it will generate
+ * `OUT_OF_RANGE` if asked to read from an offset past the current
+ * file size.
+ * There is a fair bit of overlap between `FAILED_PRECONDITION` and
+ * `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
+ * error) when it applies so that callers who are iterating through
+ * a space can easily look for an `OUT_OF_RANGE` error to detect when
+ * they are done.
+ * HTTP Mapping: 400 Bad Request
+ *
+ * Generated from protobuf enum OUT_OF_RANGE = 11;
+ */
+ const OUT_OF_RANGE = 11;
+ /**
+ * The operation is not implemented or is not supported/enabled in this
+ * service.
+ * HTTP Mapping: 501 Not Implemented
+ *
+ * Generated from protobuf enum UNIMPLEMENTED = 12;
+ */
+ const UNIMPLEMENTED = 12;
+ /**
+ * Internal errors. This means that some invariants expected by the
+ * underlying system have been broken. This error code is reserved
+ * for serious errors.
+ * HTTP Mapping: 500 Internal Server Error
+ *
+ * Generated from protobuf enum INTERNAL = 13;
+ */
+ const INTERNAL = 13;
+ /**
+ * The service is currently unavailable. This is most likely a
+ * transient condition, which can be corrected by retrying with
+ * a backoff. Note that it is not always safe to retry
+ * non-idempotent operations.
+ * See the guidelines above for deciding between `FAILED_PRECONDITION`,
+ * `ABORTED`, and `UNAVAILABLE`.
+ * HTTP Mapping: 503 Service Unavailable
+ *
+ * Generated from protobuf enum UNAVAILABLE = 14;
+ */
+ const UNAVAILABLE = 14;
+ /**
+ * Unrecoverable data loss or corruption.
+ * HTTP Mapping: 500 Internal Server Error
+ *
+ * Generated from protobuf enum DATA_LOSS = 15;
+ */
+ const DATA_LOSS = 15;
+
+ private static $valueToName = [
+ self::OK => 'OK',
+ self::CANCELLED => 'CANCELLED',
+ self::UNKNOWN => 'UNKNOWN',
+ self::INVALID_ARGUMENT => 'INVALID_ARGUMENT',
+ self::DEADLINE_EXCEEDED => 'DEADLINE_EXCEEDED',
+ self::NOT_FOUND => 'NOT_FOUND',
+ self::ALREADY_EXISTS => 'ALREADY_EXISTS',
+ self::PERMISSION_DENIED => 'PERMISSION_DENIED',
+ self::UNAUTHENTICATED => 'UNAUTHENTICATED',
+ self::RESOURCE_EXHAUSTED => 'RESOURCE_EXHAUSTED',
+ self::FAILED_PRECONDITION => 'FAILED_PRECONDITION',
+ self::ABORTED => 'ABORTED',
+ self::OUT_OF_RANGE => 'OUT_OF_RANGE',
+ self::UNIMPLEMENTED => 'UNIMPLEMENTED',
+ self::INTERNAL => 'INTERNAL',
+ self::UNAVAILABLE => 'UNAVAILABLE',
+ self::DATA_LOSS => 'DATA_LOSS',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext.php
new file mode 100644
index 0000000..a18f303
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext.php
@@ -0,0 +1,419 @@
+google.rpc.context.AttributeContext
+ */
+class AttributeContext extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The origin of a network activity. In a multi hop network activity,
+ * the origin represents the sender of the first hop. For the first hop,
+ * the `source` and the `origin` must have the same content.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Peer origin = 7;
+ */
+ protected $origin = null;
+ /**
+ * The source of a network activity, such as starting a TCP connection.
+ * In a multi hop network activity, the source represents the sender of the
+ * last hop.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Peer source = 1;
+ */
+ protected $source = null;
+ /**
+ * The destination of a network activity, such as accepting a TCP connection.
+ * In a multi hop network activity, the destination represents the receiver of
+ * the last hop.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Peer destination = 2;
+ */
+ protected $destination = null;
+ /**
+ * Represents a network request, such as an HTTP request.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Request request = 3;
+ */
+ protected $request = null;
+ /**
+ * Represents a network response, such as an HTTP response.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Response response = 4;
+ */
+ protected $response = null;
+ /**
+ * Represents a target resource that is involved with a network activity.
+ * If multiple resources are involved with an activity, this must be the
+ * primary one.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Resource resource = 5;
+ */
+ protected $resource = null;
+ /**
+ * Represents an API operation that is involved to a network activity.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Api api = 6;
+ */
+ protected $api = null;
+ /**
+ * Supports extensions for advanced use cases, such as logs and metrics.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any extensions = 8;
+ */
+ private $extensions;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Rpc\Context\AttributeContext\Peer $origin
+ * The origin of a network activity. In a multi hop network activity,
+ * the origin represents the sender of the first hop. For the first hop,
+ * the `source` and the `origin` must have the same content.
+ * @type \Google\Rpc\Context\AttributeContext\Peer $source
+ * The source of a network activity, such as starting a TCP connection.
+ * In a multi hop network activity, the source represents the sender of the
+ * last hop.
+ * @type \Google\Rpc\Context\AttributeContext\Peer $destination
+ * The destination of a network activity, such as accepting a TCP connection.
+ * In a multi hop network activity, the destination represents the receiver of
+ * the last hop.
+ * @type \Google\Rpc\Context\AttributeContext\Request $request
+ * Represents a network request, such as an HTTP request.
+ * @type \Google\Rpc\Context\AttributeContext\Response $response
+ * Represents a network response, such as an HTTP response.
+ * @type \Google\Rpc\Context\AttributeContext\Resource $resource
+ * Represents a target resource that is involved with a network activity.
+ * If multiple resources are involved with an activity, this must be the
+ * primary one.
+ * @type \Google\Rpc\Context\AttributeContext\Api $api
+ * Represents an API operation that is involved to a network activity.
+ * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $extensions
+ * Supports extensions for advanced use cases, such as logs and metrics.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\Context\AttributeContext::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The origin of a network activity. In a multi hop network activity,
+ * the origin represents the sender of the first hop. For the first hop,
+ * the `source` and the `origin` must have the same content.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Peer origin = 7;
+ * @return \Google\Rpc\Context\AttributeContext\Peer|null
+ */
+ public function getOrigin()
+ {
+ return $this->origin;
+ }
+
+ public function hasOrigin()
+ {
+ return isset($this->origin);
+ }
+
+ public function clearOrigin()
+ {
+ unset($this->origin);
+ }
+
+ /**
+ * The origin of a network activity. In a multi hop network activity,
+ * the origin represents the sender of the first hop. For the first hop,
+ * the `source` and the `origin` must have the same content.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Peer origin = 7;
+ * @param \Google\Rpc\Context\AttributeContext\Peer $var
+ * @return $this
+ */
+ public function setOrigin($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Rpc\Context\AttributeContext\Peer::class);
+ $this->origin = $var;
+
+ return $this;
+ }
+
+ /**
+ * The source of a network activity, such as starting a TCP connection.
+ * In a multi hop network activity, the source represents the sender of the
+ * last hop.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Peer source = 1;
+ * @return \Google\Rpc\Context\AttributeContext\Peer|null
+ */
+ public function getSource()
+ {
+ return $this->source;
+ }
+
+ public function hasSource()
+ {
+ return isset($this->source);
+ }
+
+ public function clearSource()
+ {
+ unset($this->source);
+ }
+
+ /**
+ * The source of a network activity, such as starting a TCP connection.
+ * In a multi hop network activity, the source represents the sender of the
+ * last hop.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Peer source = 1;
+ * @param \Google\Rpc\Context\AttributeContext\Peer $var
+ * @return $this
+ */
+ public function setSource($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Rpc\Context\AttributeContext\Peer::class);
+ $this->source = $var;
+
+ return $this;
+ }
+
+ /**
+ * The destination of a network activity, such as accepting a TCP connection.
+ * In a multi hop network activity, the destination represents the receiver of
+ * the last hop.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Peer destination = 2;
+ * @return \Google\Rpc\Context\AttributeContext\Peer|null
+ */
+ public function getDestination()
+ {
+ return $this->destination;
+ }
+
+ public function hasDestination()
+ {
+ return isset($this->destination);
+ }
+
+ public function clearDestination()
+ {
+ unset($this->destination);
+ }
+
+ /**
+ * The destination of a network activity, such as accepting a TCP connection.
+ * In a multi hop network activity, the destination represents the receiver of
+ * the last hop.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Peer destination = 2;
+ * @param \Google\Rpc\Context\AttributeContext\Peer $var
+ * @return $this
+ */
+ public function setDestination($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Rpc\Context\AttributeContext\Peer::class);
+ $this->destination = $var;
+
+ return $this;
+ }
+
+ /**
+ * Represents a network request, such as an HTTP request.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Request request = 3;
+ * @return \Google\Rpc\Context\AttributeContext\Request|null
+ */
+ public function getRequest()
+ {
+ return $this->request;
+ }
+
+ public function hasRequest()
+ {
+ return isset($this->request);
+ }
+
+ public function clearRequest()
+ {
+ unset($this->request);
+ }
+
+ /**
+ * Represents a network request, such as an HTTP request.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Request request = 3;
+ * @param \Google\Rpc\Context\AttributeContext\Request $var
+ * @return $this
+ */
+ public function setRequest($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Rpc\Context\AttributeContext\Request::class);
+ $this->request = $var;
+
+ return $this;
+ }
+
+ /**
+ * Represents a network response, such as an HTTP response.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Response response = 4;
+ * @return \Google\Rpc\Context\AttributeContext\Response|null
+ */
+ public function getResponse()
+ {
+ return $this->response;
+ }
+
+ public function hasResponse()
+ {
+ return isset($this->response);
+ }
+
+ public function clearResponse()
+ {
+ unset($this->response);
+ }
+
+ /**
+ * Represents a network response, such as an HTTP response.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Response response = 4;
+ * @param \Google\Rpc\Context\AttributeContext\Response $var
+ * @return $this
+ */
+ public function setResponse($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Rpc\Context\AttributeContext\Response::class);
+ $this->response = $var;
+
+ return $this;
+ }
+
+ /**
+ * Represents a target resource that is involved with a network activity.
+ * If multiple resources are involved with an activity, this must be the
+ * primary one.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Resource resource = 5;
+ * @return \Google\Rpc\Context\AttributeContext\Resource|null
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ public function hasResource()
+ {
+ return isset($this->resource);
+ }
+
+ public function clearResource()
+ {
+ unset($this->resource);
+ }
+
+ /**
+ * Represents a target resource that is involved with a network activity.
+ * If multiple resources are involved with an activity, this must be the
+ * primary one.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Resource resource = 5;
+ * @param \Google\Rpc\Context\AttributeContext\Resource $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Rpc\Context\AttributeContext\Resource::class);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * Represents an API operation that is involved to a network activity.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Api api = 6;
+ * @return \Google\Rpc\Context\AttributeContext\Api|null
+ */
+ public function getApi()
+ {
+ return $this->api;
+ }
+
+ public function hasApi()
+ {
+ return isset($this->api);
+ }
+
+ public function clearApi()
+ {
+ unset($this->api);
+ }
+
+ /**
+ * Represents an API operation that is involved to a network activity.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Api api = 6;
+ * @param \Google\Rpc\Context\AttributeContext\Api $var
+ * @return $this
+ */
+ public function setApi($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Rpc\Context\AttributeContext\Api::class);
+ $this->api = $var;
+
+ return $this;
+ }
+
+ /**
+ * Supports extensions for advanced use cases, such as logs and metrics.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any extensions = 8;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExtensions()
+ {
+ return $this->extensions;
+ }
+
+ /**
+ * Supports extensions for advanced use cases, such as logs and metrics.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any extensions = 8;
+ * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExtensions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class);
+ $this->extensions = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Api.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Api.php
new file mode 100644
index 0000000..5cba422
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Api.php
@@ -0,0 +1,196 @@
+google.rpc.context.AttributeContext.Api
+ */
+class Api extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The API service name. It is a logical identifier for a networked API,
+ * such as "pubsub.googleapis.com". The naming syntax depends on the
+ * API management system being used for handling the request.
+ *
+ * Generated from protobuf field string service = 1;
+ */
+ protected $service = '';
+ /**
+ * The API operation name. For gRPC requests, it is the fully qualified API
+ * method name, such as "google.pubsub.v1.Publisher.Publish". For OpenAPI
+ * requests, it is the `operationId`, such as "getPet".
+ *
+ * Generated from protobuf field string operation = 2;
+ */
+ protected $operation = '';
+ /**
+ * The API protocol used for sending the request, such as "http", "https",
+ * "grpc", or "internal".
+ *
+ * Generated from protobuf field string protocol = 3;
+ */
+ protected $protocol = '';
+ /**
+ * The API version associated with the API operation above, such as "v1" or
+ * "v1alpha1".
+ *
+ * Generated from protobuf field string version = 4;
+ */
+ protected $version = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $service
+ * The API service name. It is a logical identifier for a networked API,
+ * such as "pubsub.googleapis.com". The naming syntax depends on the
+ * API management system being used for handling the request.
+ * @type string $operation
+ * The API operation name. For gRPC requests, it is the fully qualified API
+ * method name, such as "google.pubsub.v1.Publisher.Publish". For OpenAPI
+ * requests, it is the `operationId`, such as "getPet".
+ * @type string $protocol
+ * The API protocol used for sending the request, such as "http", "https",
+ * "grpc", or "internal".
+ * @type string $version
+ * The API version associated with the API operation above, such as "v1" or
+ * "v1alpha1".
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\Context\AttributeContext::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The API service name. It is a logical identifier for a networked API,
+ * such as "pubsub.googleapis.com". The naming syntax depends on the
+ * API management system being used for handling the request.
+ *
+ * Generated from protobuf field string service = 1;
+ * @return string
+ */
+ public function getService()
+ {
+ return $this->service;
+ }
+
+ /**
+ * The API service name. It is a logical identifier for a networked API,
+ * such as "pubsub.googleapis.com". The naming syntax depends on the
+ * API management system being used for handling the request.
+ *
+ * Generated from protobuf field string service = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setService($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service = $var;
+
+ return $this;
+ }
+
+ /**
+ * The API operation name. For gRPC requests, it is the fully qualified API
+ * method name, such as "google.pubsub.v1.Publisher.Publish". For OpenAPI
+ * requests, it is the `operationId`, such as "getPet".
+ *
+ * Generated from protobuf field string operation = 2;
+ * @return string
+ */
+ public function getOperation()
+ {
+ return $this->operation;
+ }
+
+ /**
+ * The API operation name. For gRPC requests, it is the fully qualified API
+ * method name, such as "google.pubsub.v1.Publisher.Publish". For OpenAPI
+ * requests, it is the `operationId`, such as "getPet".
+ *
+ * Generated from protobuf field string operation = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setOperation($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->operation = $var;
+
+ return $this;
+ }
+
+ /**
+ * The API protocol used for sending the request, such as "http", "https",
+ * "grpc", or "internal".
+ *
+ * Generated from protobuf field string protocol = 3;
+ * @return string
+ */
+ public function getProtocol()
+ {
+ return $this->protocol;
+ }
+
+ /**
+ * The API protocol used for sending the request, such as "http", "https",
+ * "grpc", or "internal".
+ *
+ * Generated from protobuf field string protocol = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setProtocol($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->protocol = $var;
+
+ return $this;
+ }
+
+ /**
+ * The API version associated with the API operation above, such as "v1" or
+ * "v1alpha1".
+ *
+ * Generated from protobuf field string version = 4;
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * The API version associated with the API operation above, such as "v1" or
+ * "v1alpha1".
+ *
+ * Generated from protobuf field string version = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->version = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Auth.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Auth.php
new file mode 100644
index 0000000..dd42490
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Auth.php
@@ -0,0 +1,356 @@
+google.rpc.context.AttributeContext.Auth
+ */
+class Auth extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The authenticated principal. Reflects the issuer (`iss`) and subject
+ * (`sub`) claims within a JWT. The issuer and subject should be `/`
+ * delimited, with `/` percent-encoded within the subject fragment. For
+ * Google accounts, the principal format is:
+ * "https://accounts.google.com/{id}"
+ *
+ * Generated from protobuf field string principal = 1;
+ */
+ protected $principal = '';
+ /**
+ * The intended audience(s) for this authentication information. Reflects
+ * the audience (`aud`) claim within a JWT. The audience
+ * value(s) depends on the `issuer`, but typically include one or more of
+ * the following pieces of information:
+ * * The services intended to receive the credential. For example,
+ * ["https://pubsub.googleapis.com/", "https://storage.googleapis.com/"].
+ * * A set of service-based scopes. For example,
+ * ["https://www.googleapis.com/auth/cloud-platform"].
+ * * The client id of an app, such as the Firebase project id for JWTs
+ * from Firebase Auth.
+ * Consult the documentation for the credential issuer to determine the
+ * information provided.
+ *
+ * Generated from protobuf field repeated string audiences = 2;
+ */
+ private $audiences;
+ /**
+ * The authorized presenter of the credential. Reflects the optional
+ * Authorized Presenter (`azp`) claim within a JWT or the
+ * OAuth client id. For example, a Google Cloud Platform client id looks
+ * as follows: "123456789012.apps.googleusercontent.com".
+ *
+ * Generated from protobuf field string presenter = 3;
+ */
+ protected $presenter = '';
+ /**
+ * Structured claims presented with the credential. JWTs include
+ * `{key: value}` pairs for standard and private claims. The following
+ * is a subset of the standard required and optional claims that would
+ * typically be presented for a Google-based JWT:
+ * {'iss': 'accounts.google.com',
+ * 'sub': '113289723416554971153',
+ * 'aud': ['123456789012', 'pubsub.googleapis.com'],
+ * 'azp': '123456789012.apps.googleusercontent.com',
+ * 'email': 'jsmith@example.com',
+ * 'iat': 1353601026,
+ * 'exp': 1353604926}
+ * SAML assertions are similarly specified, but with an identity provider
+ * dependent structure.
+ *
+ * Generated from protobuf field .google.protobuf.Struct claims = 4;
+ */
+ protected $claims = null;
+ /**
+ * A list of access level resource names that allow resources to be
+ * accessed by authenticated requester. It is part of Secure GCP processing
+ * for the incoming request. An access level string has the format:
+ * "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}"
+ * Example:
+ * "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"
+ *
+ * Generated from protobuf field repeated string access_levels = 5;
+ */
+ private $access_levels;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $principal
+ * The authenticated principal. Reflects the issuer (`iss`) and subject
+ * (`sub`) claims within a JWT. The issuer and subject should be `/`
+ * delimited, with `/` percent-encoded within the subject fragment. For
+ * Google accounts, the principal format is:
+ * "https://accounts.google.com/{id}"
+ * @type array|\Google\Protobuf\Internal\RepeatedField $audiences
+ * The intended audience(s) for this authentication information. Reflects
+ * the audience (`aud`) claim within a JWT. The audience
+ * value(s) depends on the `issuer`, but typically include one or more of
+ * the following pieces of information:
+ * * The services intended to receive the credential. For example,
+ * ["https://pubsub.googleapis.com/", "https://storage.googleapis.com/"].
+ * * A set of service-based scopes. For example,
+ * ["https://www.googleapis.com/auth/cloud-platform"].
+ * * The client id of an app, such as the Firebase project id for JWTs
+ * from Firebase Auth.
+ * Consult the documentation for the credential issuer to determine the
+ * information provided.
+ * @type string $presenter
+ * The authorized presenter of the credential. Reflects the optional
+ * Authorized Presenter (`azp`) claim within a JWT or the
+ * OAuth client id. For example, a Google Cloud Platform client id looks
+ * as follows: "123456789012.apps.googleusercontent.com".
+ * @type \Google\Protobuf\Struct $claims
+ * Structured claims presented with the credential. JWTs include
+ * `{key: value}` pairs for standard and private claims. The following
+ * is a subset of the standard required and optional claims that would
+ * typically be presented for a Google-based JWT:
+ * {'iss': 'accounts.google.com',
+ * 'sub': '113289723416554971153',
+ * 'aud': ['123456789012', 'pubsub.googleapis.com'],
+ * 'azp': '123456789012.apps.googleusercontent.com',
+ * 'email': 'jsmith@example.com',
+ * 'iat': 1353601026,
+ * 'exp': 1353604926}
+ * SAML assertions are similarly specified, but with an identity provider
+ * dependent structure.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $access_levels
+ * A list of access level resource names that allow resources to be
+ * accessed by authenticated requester. It is part of Secure GCP processing
+ * for the incoming request. An access level string has the format:
+ * "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}"
+ * Example:
+ * "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\Context\AttributeContext::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The authenticated principal. Reflects the issuer (`iss`) and subject
+ * (`sub`) claims within a JWT. The issuer and subject should be `/`
+ * delimited, with `/` percent-encoded within the subject fragment. For
+ * Google accounts, the principal format is:
+ * "https://accounts.google.com/{id}"
+ *
+ * Generated from protobuf field string principal = 1;
+ * @return string
+ */
+ public function getPrincipal()
+ {
+ return $this->principal;
+ }
+
+ /**
+ * The authenticated principal. Reflects the issuer (`iss`) and subject
+ * (`sub`) claims within a JWT. The issuer and subject should be `/`
+ * delimited, with `/` percent-encoded within the subject fragment. For
+ * Google accounts, the principal format is:
+ * "https://accounts.google.com/{id}"
+ *
+ * Generated from protobuf field string principal = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setPrincipal($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->principal = $var;
+
+ return $this;
+ }
+
+ /**
+ * The intended audience(s) for this authentication information. Reflects
+ * the audience (`aud`) claim within a JWT. The audience
+ * value(s) depends on the `issuer`, but typically include one or more of
+ * the following pieces of information:
+ * * The services intended to receive the credential. For example,
+ * ["https://pubsub.googleapis.com/", "https://storage.googleapis.com/"].
+ * * A set of service-based scopes. For example,
+ * ["https://www.googleapis.com/auth/cloud-platform"].
+ * * The client id of an app, such as the Firebase project id for JWTs
+ * from Firebase Auth.
+ * Consult the documentation for the credential issuer to determine the
+ * information provided.
+ *
+ * Generated from protobuf field repeated string audiences = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAudiences()
+ {
+ return $this->audiences;
+ }
+
+ /**
+ * The intended audience(s) for this authentication information. Reflects
+ * the audience (`aud`) claim within a JWT. The audience
+ * value(s) depends on the `issuer`, but typically include one or more of
+ * the following pieces of information:
+ * * The services intended to receive the credential. For example,
+ * ["https://pubsub.googleapis.com/", "https://storage.googleapis.com/"].
+ * * A set of service-based scopes. For example,
+ * ["https://www.googleapis.com/auth/cloud-platform"].
+ * * The client id of an app, such as the Firebase project id for JWTs
+ * from Firebase Auth.
+ * Consult the documentation for the credential issuer to determine the
+ * information provided.
+ *
+ * Generated from protobuf field repeated string audiences = 2;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAudiences($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->audiences = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The authorized presenter of the credential. Reflects the optional
+ * Authorized Presenter (`azp`) claim within a JWT or the
+ * OAuth client id. For example, a Google Cloud Platform client id looks
+ * as follows: "123456789012.apps.googleusercontent.com".
+ *
+ * Generated from protobuf field string presenter = 3;
+ * @return string
+ */
+ public function getPresenter()
+ {
+ return $this->presenter;
+ }
+
+ /**
+ * The authorized presenter of the credential. Reflects the optional
+ * Authorized Presenter (`azp`) claim within a JWT or the
+ * OAuth client id. For example, a Google Cloud Platform client id looks
+ * as follows: "123456789012.apps.googleusercontent.com".
+ *
+ * Generated from protobuf field string presenter = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setPresenter($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->presenter = $var;
+
+ return $this;
+ }
+
+ /**
+ * Structured claims presented with the credential. JWTs include
+ * `{key: value}` pairs for standard and private claims. The following
+ * is a subset of the standard required and optional claims that would
+ * typically be presented for a Google-based JWT:
+ * {'iss': 'accounts.google.com',
+ * 'sub': '113289723416554971153',
+ * 'aud': ['123456789012', 'pubsub.googleapis.com'],
+ * 'azp': '123456789012.apps.googleusercontent.com',
+ * 'email': 'jsmith@example.com',
+ * 'iat': 1353601026,
+ * 'exp': 1353604926}
+ * SAML assertions are similarly specified, but with an identity provider
+ * dependent structure.
+ *
+ * Generated from protobuf field .google.protobuf.Struct claims = 4;
+ * @return \Google\Protobuf\Struct|null
+ */
+ public function getClaims()
+ {
+ return $this->claims;
+ }
+
+ public function hasClaims()
+ {
+ return isset($this->claims);
+ }
+
+ public function clearClaims()
+ {
+ unset($this->claims);
+ }
+
+ /**
+ * Structured claims presented with the credential. JWTs include
+ * `{key: value}` pairs for standard and private claims. The following
+ * is a subset of the standard required and optional claims that would
+ * typically be presented for a Google-based JWT:
+ * {'iss': 'accounts.google.com',
+ * 'sub': '113289723416554971153',
+ * 'aud': ['123456789012', 'pubsub.googleapis.com'],
+ * 'azp': '123456789012.apps.googleusercontent.com',
+ * 'email': 'jsmith@example.com',
+ * 'iat': 1353601026,
+ * 'exp': 1353604926}
+ * SAML assertions are similarly specified, but with an identity provider
+ * dependent structure.
+ *
+ * Generated from protobuf field .google.protobuf.Struct claims = 4;
+ * @param \Google\Protobuf\Struct $var
+ * @return $this
+ */
+ public function setClaims($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
+ $this->claims = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of access level resource names that allow resources to be
+ * accessed by authenticated requester. It is part of Secure GCP processing
+ * for the incoming request. An access level string has the format:
+ * "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}"
+ * Example:
+ * "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"
+ *
+ * Generated from protobuf field repeated string access_levels = 5;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAccessLevels()
+ {
+ return $this->access_levels;
+ }
+
+ /**
+ * A list of access level resource names that allow resources to be
+ * accessed by authenticated requester. It is part of Secure GCP processing
+ * for the incoming request. An access level string has the format:
+ * "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}"
+ * Example:
+ * "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"
+ *
+ * Generated from protobuf field repeated string access_levels = 5;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAccessLevels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->access_levels = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Peer.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Peer.php
new file mode 100644
index 0000000..9d3e1b6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Peer.php
@@ -0,0 +1,223 @@
+google.rpc.context.AttributeContext.Peer
+ */
+class Peer extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The IP address of the peer.
+ *
+ * Generated from protobuf field string ip = 1;
+ */
+ protected $ip = '';
+ /**
+ * The network port of the peer.
+ *
+ * Generated from protobuf field int64 port = 2;
+ */
+ protected $port = 0;
+ /**
+ * The labels associated with the peer.
+ *
+ * Generated from protobuf field map labels = 6;
+ */
+ private $labels;
+ /**
+ * The identity of this peer. Similar to `Request.auth.principal`, but
+ * relative to the peer instead of the request. For example, the
+ * identity associated with a load balancer that forwarded the request.
+ *
+ * Generated from protobuf field string principal = 7;
+ */
+ protected $principal = '';
+ /**
+ * The CLDR country/region code associated with the above IP address.
+ * If the IP address is private, the `region_code` should reflect the
+ * physical location where this peer is running.
+ *
+ * Generated from protobuf field string region_code = 8;
+ */
+ protected $region_code = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $ip
+ * The IP address of the peer.
+ * @type int|string $port
+ * The network port of the peer.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * The labels associated with the peer.
+ * @type string $principal
+ * The identity of this peer. Similar to `Request.auth.principal`, but
+ * relative to the peer instead of the request. For example, the
+ * identity associated with a load balancer that forwarded the request.
+ * @type string $region_code
+ * The CLDR country/region code associated with the above IP address.
+ * If the IP address is private, the `region_code` should reflect the
+ * physical location where this peer is running.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\Context\AttributeContext::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The IP address of the peer.
+ *
+ * Generated from protobuf field string ip = 1;
+ * @return string
+ */
+ public function getIp()
+ {
+ return $this->ip;
+ }
+
+ /**
+ * The IP address of the peer.
+ *
+ * Generated from protobuf field string ip = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setIp($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->ip = $var;
+
+ return $this;
+ }
+
+ /**
+ * The network port of the peer.
+ *
+ * Generated from protobuf field int64 port = 2;
+ * @return int|string
+ */
+ public function getPort()
+ {
+ return $this->port;
+ }
+
+ /**
+ * The network port of the peer.
+ *
+ * Generated from protobuf field int64 port = 2;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setPort($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->port = $var;
+
+ return $this;
+ }
+
+ /**
+ * The labels associated with the peer.
+ *
+ * Generated from protobuf field map labels = 6;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * The labels associated with the peer.
+ *
+ * Generated from protobuf field map labels = 6;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The identity of this peer. Similar to `Request.auth.principal`, but
+ * relative to the peer instead of the request. For example, the
+ * identity associated with a load balancer that forwarded the request.
+ *
+ * Generated from protobuf field string principal = 7;
+ * @return string
+ */
+ public function getPrincipal()
+ {
+ return $this->principal;
+ }
+
+ /**
+ * The identity of this peer. Similar to `Request.auth.principal`, but
+ * relative to the peer instead of the request. For example, the
+ * identity associated with a load balancer that forwarded the request.
+ *
+ * Generated from protobuf field string principal = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setPrincipal($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->principal = $var;
+
+ return $this;
+ }
+
+ /**
+ * The CLDR country/region code associated with the above IP address.
+ * If the IP address is private, the `region_code` should reflect the
+ * physical location where this peer is running.
+ *
+ * Generated from protobuf field string region_code = 8;
+ * @return string
+ */
+ public function getRegionCode()
+ {
+ return $this->region_code;
+ }
+
+ /**
+ * The CLDR country/region code associated with the above IP address.
+ * If the IP address is private, the `region_code` should reflect the
+ * physical location where this peer is running.
+ *
+ * Generated from protobuf field string region_code = 8;
+ * @param string $var
+ * @return $this
+ */
+ public function setRegionCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->region_code = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Request.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Request.php
new file mode 100644
index 0000000..928794a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Request.php
@@ -0,0 +1,508 @@
+google.rpc.context.AttributeContext.Request
+ */
+class Request extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The unique ID for a request, which can be propagated to downstream
+ * systems. The ID should have low probability of collision
+ * within a single day for a specific service.
+ *
+ * Generated from protobuf field string id = 1;
+ */
+ protected $id = '';
+ /**
+ * The HTTP request method, such as `GET`, `POST`.
+ *
+ * Generated from protobuf field string method = 2;
+ */
+ protected $method = '';
+ /**
+ * The HTTP request headers. If multiple headers share the same key, they
+ * must be merged according to the HTTP spec. All header keys must be
+ * lowercased, because HTTP header keys are case-insensitive.
+ *
+ * Generated from protobuf field map headers = 3;
+ */
+ private $headers;
+ /**
+ * The HTTP URL path, excluding the query parameters.
+ *
+ * Generated from protobuf field string path = 4;
+ */
+ protected $path = '';
+ /**
+ * The HTTP request `Host` header value.
+ *
+ * Generated from protobuf field string host = 5;
+ */
+ protected $host = '';
+ /**
+ * The HTTP URL scheme, such as `http` and `https`.
+ *
+ * Generated from protobuf field string scheme = 6;
+ */
+ protected $scheme = '';
+ /**
+ * The HTTP URL query in the format of `name1=value1&name2=value2`, as it
+ * appears in the first line of the HTTP request. No decoding is performed.
+ *
+ * Generated from protobuf field string query = 7;
+ */
+ protected $query = '';
+ /**
+ * The timestamp when the `destination` service receives the last byte of
+ * the request.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp time = 9;
+ */
+ protected $time = null;
+ /**
+ * The HTTP request size in bytes. If unknown, it must be -1.
+ *
+ * Generated from protobuf field int64 size = 10;
+ */
+ protected $size = 0;
+ /**
+ * The network protocol used with the request, such as "http/1.1",
+ * "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
+ * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+ * for details.
+ *
+ * Generated from protobuf field string protocol = 11;
+ */
+ protected $protocol = '';
+ /**
+ * A special parameter for request reason. It is used by security systems
+ * to associate auditing information with a request.
+ *
+ * Generated from protobuf field string reason = 12;
+ */
+ protected $reason = '';
+ /**
+ * The request authentication. May be absent for unauthenticated requests.
+ * Derived from the HTTP request `Authorization` header or equivalent.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Auth auth = 13;
+ */
+ protected $auth = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $id
+ * The unique ID for a request, which can be propagated to downstream
+ * systems. The ID should have low probability of collision
+ * within a single day for a specific service.
+ * @type string $method
+ * The HTTP request method, such as `GET`, `POST`.
+ * @type array|\Google\Protobuf\Internal\MapField $headers
+ * The HTTP request headers. If multiple headers share the same key, they
+ * must be merged according to the HTTP spec. All header keys must be
+ * lowercased, because HTTP header keys are case-insensitive.
+ * @type string $path
+ * The HTTP URL path, excluding the query parameters.
+ * @type string $host
+ * The HTTP request `Host` header value.
+ * @type string $scheme
+ * The HTTP URL scheme, such as `http` and `https`.
+ * @type string $query
+ * The HTTP URL query in the format of `name1=value1&name2=value2`, as it
+ * appears in the first line of the HTTP request. No decoding is performed.
+ * @type \Google\Protobuf\Timestamp $time
+ * The timestamp when the `destination` service receives the last byte of
+ * the request.
+ * @type int|string $size
+ * The HTTP request size in bytes. If unknown, it must be -1.
+ * @type string $protocol
+ * The network protocol used with the request, such as "http/1.1",
+ * "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
+ * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+ * for details.
+ * @type string $reason
+ * A special parameter for request reason. It is used by security systems
+ * to associate auditing information with a request.
+ * @type \Google\Rpc\Context\AttributeContext\Auth $auth
+ * The request authentication. May be absent for unauthenticated requests.
+ * Derived from the HTTP request `Authorization` header or equivalent.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\Context\AttributeContext::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The unique ID for a request, which can be propagated to downstream
+ * systems. The ID should have low probability of collision
+ * within a single day for a specific service.
+ *
+ * Generated from protobuf field string id = 1;
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * The unique ID for a request, which can be propagated to downstream
+ * systems. The ID should have low probability of collision
+ * within a single day for a specific service.
+ *
+ * Generated from protobuf field string id = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The HTTP request method, such as `GET`, `POST`.
+ *
+ * Generated from protobuf field string method = 2;
+ * @return string
+ */
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+ /**
+ * The HTTP request method, such as `GET`, `POST`.
+ *
+ * Generated from protobuf field string method = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setMethod($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->method = $var;
+
+ return $this;
+ }
+
+ /**
+ * The HTTP request headers. If multiple headers share the same key, they
+ * must be merged according to the HTTP spec. All header keys must be
+ * lowercased, because HTTP header keys are case-insensitive.
+ *
+ * Generated from protobuf field map headers = 3;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getHeaders()
+ {
+ return $this->headers;
+ }
+
+ /**
+ * The HTTP request headers. If multiple headers share the same key, they
+ * must be merged according to the HTTP spec. All header keys must be
+ * lowercased, because HTTP header keys are case-insensitive.
+ *
+ * Generated from protobuf field map headers = 3;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setHeaders($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->headers = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The HTTP URL path, excluding the query parameters.
+ *
+ * Generated from protobuf field string path = 4;
+ * @return string
+ */
+ public function getPath()
+ {
+ return $this->path;
+ }
+
+ /**
+ * The HTTP URL path, excluding the query parameters.
+ *
+ * Generated from protobuf field string path = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setPath($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->path = $var;
+
+ return $this;
+ }
+
+ /**
+ * The HTTP request `Host` header value.
+ *
+ * Generated from protobuf field string host = 5;
+ * @return string
+ */
+ public function getHost()
+ {
+ return $this->host;
+ }
+
+ /**
+ * The HTTP request `Host` header value.
+ *
+ * Generated from protobuf field string host = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setHost($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->host = $var;
+
+ return $this;
+ }
+
+ /**
+ * The HTTP URL scheme, such as `http` and `https`.
+ *
+ * Generated from protobuf field string scheme = 6;
+ * @return string
+ */
+ public function getScheme()
+ {
+ return $this->scheme;
+ }
+
+ /**
+ * The HTTP URL scheme, such as `http` and `https`.
+ *
+ * Generated from protobuf field string scheme = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setScheme($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->scheme = $var;
+
+ return $this;
+ }
+
+ /**
+ * The HTTP URL query in the format of `name1=value1&name2=value2`, as it
+ * appears in the first line of the HTTP request. No decoding is performed.
+ *
+ * Generated from protobuf field string query = 7;
+ * @return string
+ */
+ public function getQuery()
+ {
+ return $this->query;
+ }
+
+ /**
+ * The HTTP URL query in the format of `name1=value1&name2=value2`, as it
+ * appears in the first line of the HTTP request. No decoding is performed.
+ *
+ * Generated from protobuf field string query = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setQuery($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->query = $var;
+
+ return $this;
+ }
+
+ /**
+ * The timestamp when the `destination` service receives the last byte of
+ * the request.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp time = 9;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getTime()
+ {
+ return $this->time;
+ }
+
+ public function hasTime()
+ {
+ return isset($this->time);
+ }
+
+ public function clearTime()
+ {
+ unset($this->time);
+ }
+
+ /**
+ * The timestamp when the `destination` service receives the last byte of
+ * the request.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp time = 9;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->time = $var;
+
+ return $this;
+ }
+
+ /**
+ * The HTTP request size in bytes. If unknown, it must be -1.
+ *
+ * Generated from protobuf field int64 size = 10;
+ * @return int|string
+ */
+ public function getSize()
+ {
+ return $this->size;
+ }
+
+ /**
+ * The HTTP request size in bytes. If unknown, it must be -1.
+ *
+ * Generated from protobuf field int64 size = 10;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setSize($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->size = $var;
+
+ return $this;
+ }
+
+ /**
+ * The network protocol used with the request, such as "http/1.1",
+ * "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
+ * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+ * for details.
+ *
+ * Generated from protobuf field string protocol = 11;
+ * @return string
+ */
+ public function getProtocol()
+ {
+ return $this->protocol;
+ }
+
+ /**
+ * The network protocol used with the request, such as "http/1.1",
+ * "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
+ * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+ * for details.
+ *
+ * Generated from protobuf field string protocol = 11;
+ * @param string $var
+ * @return $this
+ */
+ public function setProtocol($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->protocol = $var;
+
+ return $this;
+ }
+
+ /**
+ * A special parameter for request reason. It is used by security systems
+ * to associate auditing information with a request.
+ *
+ * Generated from protobuf field string reason = 12;
+ * @return string
+ */
+ public function getReason()
+ {
+ return $this->reason;
+ }
+
+ /**
+ * A special parameter for request reason. It is used by security systems
+ * to associate auditing information with a request.
+ *
+ * Generated from protobuf field string reason = 12;
+ * @param string $var
+ * @return $this
+ */
+ public function setReason($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->reason = $var;
+
+ return $this;
+ }
+
+ /**
+ * The request authentication. May be absent for unauthenticated requests.
+ * Derived from the HTTP request `Authorization` header or equivalent.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Auth auth = 13;
+ * @return \Google\Rpc\Context\AttributeContext\Auth|null
+ */
+ public function getAuth()
+ {
+ return $this->auth;
+ }
+
+ public function hasAuth()
+ {
+ return isset($this->auth);
+ }
+
+ public function clearAuth()
+ {
+ unset($this->auth);
+ }
+
+ /**
+ * The request authentication. May be absent for unauthenticated requests.
+ * Derived from the HTTP request `Authorization` header or equivalent.
+ *
+ * Generated from protobuf field .google.rpc.context.AttributeContext.Auth auth = 13;
+ * @param \Google\Rpc\Context\AttributeContext\Auth $var
+ * @return $this
+ */
+ public function setAuth($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Rpc\Context\AttributeContext\Auth::class);
+ $this->auth = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Resource.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Resource.php
new file mode 100644
index 0000000..6cf4b69
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Resource.php
@@ -0,0 +1,610 @@
+google.rpc.context.AttributeContext.Resource
+ */
+class Resource extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The name of the service that this resource belongs to, such as
+ * `pubsub.googleapis.com`. The service may be different from the DNS
+ * hostname that actually serves the request.
+ *
+ * Generated from protobuf field string service = 1;
+ */
+ protected $service = '';
+ /**
+ * The stable identifier (name) of a resource on the `service`. A resource
+ * can be logically identified as "//{resource.service}/{resource.name}".
+ * The differences between a resource name and a URI are:
+ * * Resource name is a logical identifier, independent of network
+ * protocol and API version. For example,
+ * `//pubsub.googleapis.com/projects/123/topics/news-feed`.
+ * * URI often includes protocol and version information, so it can
+ * be used directly by applications. For example,
+ * `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`.
+ * See https://cloud.google.com/apis/design/resource_names for details.
+ *
+ * Generated from protobuf field string name = 2;
+ */
+ protected $name = '';
+ /**
+ * The type of the resource. The syntax is platform-specific because
+ * different platforms define their resources differently.
+ * For Google APIs, the type format must be "{service}/{kind}", such as
+ * "pubsub.googleapis.com/Topic".
+ *
+ * Generated from protobuf field string type = 3;
+ */
+ protected $type = '';
+ /**
+ * The labels or tags on the resource, such as AWS resource tags and
+ * Kubernetes resource labels.
+ *
+ * Generated from protobuf field map labels = 4;
+ */
+ private $labels;
+ /**
+ * The unique identifier of the resource. UID is unique in the time
+ * and space for this resource within the scope of the service. It is
+ * typically generated by the server on successful creation of a resource
+ * and must not be changed. UID is used to uniquely identify resources
+ * with resource name reuses. This should be a UUID4.
+ *
+ * Generated from protobuf field string uid = 5;
+ */
+ protected $uid = '';
+ /**
+ * Annotations is an unstructured key-value map stored with a resource that
+ * may be set by external tools to store and retrieve arbitrary metadata.
+ * They are not queryable and should be preserved when modifying objects.
+ * More info: https://kubernetes.io/docs/user-guide/annotations
+ *
+ * Generated from protobuf field map annotations = 6;
+ */
+ private $annotations;
+ /**
+ * Mutable. The display name set by clients. Must be <= 63 characters.
+ *
+ * Generated from protobuf field string display_name = 7;
+ */
+ protected $display_name = '';
+ /**
+ * Output only. The timestamp when the resource was created. This may
+ * be either the time creation was initiated or when it was completed.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 8;
+ */
+ protected $create_time = null;
+ /**
+ * Output only. The timestamp when the resource was last updated. Any
+ * change to the resource made by users must refresh this value.
+ * Changes to a resource made by the service should refresh this value.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 9;
+ */
+ protected $update_time = null;
+ /**
+ * Output only. The timestamp when the resource was deleted.
+ * If the resource is not deleted, this must be empty.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10;
+ */
+ protected $delete_time = null;
+ /**
+ * Output only. An opaque value that uniquely identifies a version or
+ * generation of a resource. It can be used to confirm that the client
+ * and server agree on the ordering of a resource being written.
+ *
+ * Generated from protobuf field string etag = 11;
+ */
+ protected $etag = '';
+ /**
+ * Immutable. The location of the resource. The location encoding is
+ * specific to the service provider, and new encoding may be introduced
+ * as the service evolves.
+ * For Google Cloud products, the encoding is what is used by Google Cloud
+ * APIs, such as `us-east1`, `aws-us-east-1`, and `azure-eastus2`. The
+ * semantics of `location` is identical to the
+ * `cloud.googleapis.com/location` label used by some Google Cloud APIs.
+ *
+ * Generated from protobuf field string location = 12;
+ */
+ protected $location = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $service
+ * The name of the service that this resource belongs to, such as
+ * `pubsub.googleapis.com`. The service may be different from the DNS
+ * hostname that actually serves the request.
+ * @type string $name
+ * The stable identifier (name) of a resource on the `service`. A resource
+ * can be logically identified as "//{resource.service}/{resource.name}".
+ * The differences between a resource name and a URI are:
+ * * Resource name is a logical identifier, independent of network
+ * protocol and API version. For example,
+ * `//pubsub.googleapis.com/projects/123/topics/news-feed`.
+ * * URI often includes protocol and version information, so it can
+ * be used directly by applications. For example,
+ * `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`.
+ * See https://cloud.google.com/apis/design/resource_names for details.
+ * @type string $type
+ * The type of the resource. The syntax is platform-specific because
+ * different platforms define their resources differently.
+ * For Google APIs, the type format must be "{service}/{kind}", such as
+ * "pubsub.googleapis.com/Topic".
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * The labels or tags on the resource, such as AWS resource tags and
+ * Kubernetes resource labels.
+ * @type string $uid
+ * The unique identifier of the resource. UID is unique in the time
+ * and space for this resource within the scope of the service. It is
+ * typically generated by the server on successful creation of a resource
+ * and must not be changed. UID is used to uniquely identify resources
+ * with resource name reuses. This should be a UUID4.
+ * @type array|\Google\Protobuf\Internal\MapField $annotations
+ * Annotations is an unstructured key-value map stored with a resource that
+ * may be set by external tools to store and retrieve arbitrary metadata.
+ * They are not queryable and should be preserved when modifying objects.
+ * More info: https://kubernetes.io/docs/user-guide/annotations
+ * @type string $display_name
+ * Mutable. The display name set by clients. Must be <= 63 characters.
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. The timestamp when the resource was created. This may
+ * be either the time creation was initiated or when it was completed.
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. The timestamp when the resource was last updated. Any
+ * change to the resource made by users must refresh this value.
+ * Changes to a resource made by the service should refresh this value.
+ * @type \Google\Protobuf\Timestamp $delete_time
+ * Output only. The timestamp when the resource was deleted.
+ * If the resource is not deleted, this must be empty.
+ * @type string $etag
+ * Output only. An opaque value that uniquely identifies a version or
+ * generation of a resource. It can be used to confirm that the client
+ * and server agree on the ordering of a resource being written.
+ * @type string $location
+ * Immutable. The location of the resource. The location encoding is
+ * specific to the service provider, and new encoding may be introduced
+ * as the service evolves.
+ * For Google Cloud products, the encoding is what is used by Google Cloud
+ * APIs, such as `us-east1`, `aws-us-east-1`, and `azure-eastus2`. The
+ * semantics of `location` is identical to the
+ * `cloud.googleapis.com/location` label used by some Google Cloud APIs.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\Context\AttributeContext::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The name of the service that this resource belongs to, such as
+ * `pubsub.googleapis.com`. The service may be different from the DNS
+ * hostname that actually serves the request.
+ *
+ * Generated from protobuf field string service = 1;
+ * @return string
+ */
+ public function getService()
+ {
+ return $this->service;
+ }
+
+ /**
+ * The name of the service that this resource belongs to, such as
+ * `pubsub.googleapis.com`. The service may be different from the DNS
+ * hostname that actually serves the request.
+ *
+ * Generated from protobuf field string service = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setService($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service = $var;
+
+ return $this;
+ }
+
+ /**
+ * The stable identifier (name) of a resource on the `service`. A resource
+ * can be logically identified as "//{resource.service}/{resource.name}".
+ * The differences between a resource name and a URI are:
+ * * Resource name is a logical identifier, independent of network
+ * protocol and API version. For example,
+ * `//pubsub.googleapis.com/projects/123/topics/news-feed`.
+ * * URI often includes protocol and version information, so it can
+ * be used directly by applications. For example,
+ * `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`.
+ * See https://cloud.google.com/apis/design/resource_names for details.
+ *
+ * Generated from protobuf field string name = 2;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The stable identifier (name) of a resource on the `service`. A resource
+ * can be logically identified as "//{resource.service}/{resource.name}".
+ * The differences between a resource name and a URI are:
+ * * Resource name is a logical identifier, independent of network
+ * protocol and API version. For example,
+ * `//pubsub.googleapis.com/projects/123/topics/news-feed`.
+ * * URI often includes protocol and version information, so it can
+ * be used directly by applications. For example,
+ * `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`.
+ * See https://cloud.google.com/apis/design/resource_names for details.
+ *
+ * Generated from protobuf field string name = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The type of the resource. The syntax is platform-specific because
+ * different platforms define their resources differently.
+ * For Google APIs, the type format must be "{service}/{kind}", such as
+ * "pubsub.googleapis.com/Topic".
+ *
+ * Generated from protobuf field string type = 3;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * The type of the resource. The syntax is platform-specific because
+ * different platforms define their resources differently.
+ * For Google APIs, the type format must be "{service}/{kind}", such as
+ * "pubsub.googleapis.com/Topic".
+ *
+ * Generated from protobuf field string type = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The labels or tags on the resource, such as AWS resource tags and
+ * Kubernetes resource labels.
+ *
+ * Generated from protobuf field map labels = 4;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * The labels or tags on the resource, such as AWS resource tags and
+ * Kubernetes resource labels.
+ *
+ * Generated from protobuf field map labels = 4;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The unique identifier of the resource. UID is unique in the time
+ * and space for this resource within the scope of the service. It is
+ * typically generated by the server on successful creation of a resource
+ * and must not be changed. UID is used to uniquely identify resources
+ * with resource name reuses. This should be a UUID4.
+ *
+ * Generated from protobuf field string uid = 5;
+ * @return string
+ */
+ public function getUid()
+ {
+ return $this->uid;
+ }
+
+ /**
+ * The unique identifier of the resource. UID is unique in the time
+ * and space for this resource within the scope of the service. It is
+ * typically generated by the server on successful creation of a resource
+ * and must not be changed. UID is used to uniquely identify resources
+ * with resource name reuses. This should be a UUID4.
+ *
+ * Generated from protobuf field string uid = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setUid($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->uid = $var;
+
+ return $this;
+ }
+
+ /**
+ * Annotations is an unstructured key-value map stored with a resource that
+ * may be set by external tools to store and retrieve arbitrary metadata.
+ * They are not queryable and should be preserved when modifying objects.
+ * More info: https://kubernetes.io/docs/user-guide/annotations
+ *
+ * Generated from protobuf field map annotations = 6;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getAnnotations()
+ {
+ return $this->annotations;
+ }
+
+ /**
+ * Annotations is an unstructured key-value map stored with a resource that
+ * may be set by external tools to store and retrieve arbitrary metadata.
+ * They are not queryable and should be preserved when modifying objects.
+ * More info: https://kubernetes.io/docs/user-guide/annotations
+ *
+ * Generated from protobuf field map annotations = 6;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setAnnotations($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->annotations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Mutable. The display name set by clients. Must be <= 63 characters.
+ *
+ * Generated from protobuf field string display_name = 7;
+ * @return string
+ */
+ public function getDisplayName()
+ {
+ return $this->display_name;
+ }
+
+ /**
+ * Mutable. The display name set by clients. Must be <= 63 characters.
+ *
+ * Generated from protobuf field string display_name = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The timestamp when the resource was created. This may
+ * be either the time creation was initiated or when it was completed.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 8;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. The timestamp when the resource was created. This may
+ * be either the time creation was initiated or when it was completed.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 8;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The timestamp when the resource was last updated. Any
+ * change to the resource made by users must refresh this value.
+ * Changes to a resource made by the service should refresh this value.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 9;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getUpdateTime()
+ {
+ return $this->update_time;
+ }
+
+ public function hasUpdateTime()
+ {
+ return isset($this->update_time);
+ }
+
+ public function clearUpdateTime()
+ {
+ unset($this->update_time);
+ }
+
+ /**
+ * Output only. The timestamp when the resource was last updated. Any
+ * change to the resource made by users must refresh this value.
+ * Changes to a resource made by the service should refresh this value.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 9;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setUpdateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->update_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The timestamp when the resource was deleted.
+ * If the resource is not deleted, this must be empty.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getDeleteTime()
+ {
+ return $this->delete_time;
+ }
+
+ public function hasDeleteTime()
+ {
+ return isset($this->delete_time);
+ }
+
+ public function clearDeleteTime()
+ {
+ unset($this->delete_time);
+ }
+
+ /**
+ * Output only. The timestamp when the resource was deleted.
+ * If the resource is not deleted, this must be empty.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setDeleteTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->delete_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. An opaque value that uniquely identifies a version or
+ * generation of a resource. It can be used to confirm that the client
+ * and server agree on the ordering of a resource being written.
+ *
+ * Generated from protobuf field string etag = 11;
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * Output only. An opaque value that uniquely identifies a version or
+ * generation of a resource. It can be used to confirm that the client
+ * and server agree on the ordering of a resource being written.
+ *
+ * Generated from protobuf field string etag = 11;
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Immutable. The location of the resource. The location encoding is
+ * specific to the service provider, and new encoding may be introduced
+ * as the service evolves.
+ * For Google Cloud products, the encoding is what is used by Google Cloud
+ * APIs, such as `us-east1`, `aws-us-east-1`, and `azure-eastus2`. The
+ * semantics of `location` is identical to the
+ * `cloud.googleapis.com/location` label used by some Google Cloud APIs.
+ *
+ * Generated from protobuf field string location = 12;
+ * @return string
+ */
+ public function getLocation()
+ {
+ return $this->location;
+ }
+
+ /**
+ * Immutable. The location of the resource. The location encoding is
+ * specific to the service provider, and new encoding may be introduced
+ * as the service evolves.
+ * For Google Cloud products, the encoding is what is used by Google Cloud
+ * APIs, such as `us-east1`, `aws-us-east-1`, and `azure-eastus2`. The
+ * semantics of `location` is identical to the
+ * `cloud.googleapis.com/location` label used by some Google Cloud APIs.
+ *
+ * Generated from protobuf field string location = 12;
+ * @param string $var
+ * @return $this
+ */
+ public function setLocation($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->location = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Response.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Response.php
new file mode 100644
index 0000000..c632cf4
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AttributeContext/Response.php
@@ -0,0 +1,249 @@
+google.rpc.context.AttributeContext.Response
+ */
+class Response extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The HTTP response status code, such as `200` and `404`.
+ *
+ * Generated from protobuf field int64 code = 1;
+ */
+ protected $code = 0;
+ /**
+ * The HTTP response size in bytes. If unknown, it must be -1.
+ *
+ * Generated from protobuf field int64 size = 2;
+ */
+ protected $size = 0;
+ /**
+ * The HTTP response headers. If multiple headers share the same key, they
+ * must be merged according to HTTP spec. All header keys must be
+ * lowercased, because HTTP header keys are case-insensitive.
+ *
+ * Generated from protobuf field map headers = 3;
+ */
+ private $headers;
+ /**
+ * The timestamp when the `destination` service sends the last byte of
+ * the response.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp time = 4;
+ */
+ protected $time = null;
+ /**
+ * The amount of time it takes the backend service to fully respond to a
+ * request. Measured from when the destination service starts to send the
+ * request to the backend until when the destination service receives the
+ * complete response from the backend.
+ *
+ * Generated from protobuf field .google.protobuf.Duration backend_latency = 5;
+ */
+ protected $backend_latency = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $code
+ * The HTTP response status code, such as `200` and `404`.
+ * @type int|string $size
+ * The HTTP response size in bytes. If unknown, it must be -1.
+ * @type array|\Google\Protobuf\Internal\MapField $headers
+ * The HTTP response headers. If multiple headers share the same key, they
+ * must be merged according to HTTP spec. All header keys must be
+ * lowercased, because HTTP header keys are case-insensitive.
+ * @type \Google\Protobuf\Timestamp $time
+ * The timestamp when the `destination` service sends the last byte of
+ * the response.
+ * @type \Google\Protobuf\Duration $backend_latency
+ * The amount of time it takes the backend service to fully respond to a
+ * request. Measured from when the destination service starts to send the
+ * request to the backend until when the destination service receives the
+ * complete response from the backend.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\Context\AttributeContext::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The HTTP response status code, such as `200` and `404`.
+ *
+ * Generated from protobuf field int64 code = 1;
+ * @return int|string
+ */
+ public function getCode()
+ {
+ return $this->code;
+ }
+
+ /**
+ * The HTTP response status code, such as `200` and `404`.
+ *
+ * Generated from protobuf field int64 code = 1;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCode($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->code = $var;
+
+ return $this;
+ }
+
+ /**
+ * The HTTP response size in bytes. If unknown, it must be -1.
+ *
+ * Generated from protobuf field int64 size = 2;
+ * @return int|string
+ */
+ public function getSize()
+ {
+ return $this->size;
+ }
+
+ /**
+ * The HTTP response size in bytes. If unknown, it must be -1.
+ *
+ * Generated from protobuf field int64 size = 2;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setSize($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->size = $var;
+
+ return $this;
+ }
+
+ /**
+ * The HTTP response headers. If multiple headers share the same key, they
+ * must be merged according to HTTP spec. All header keys must be
+ * lowercased, because HTTP header keys are case-insensitive.
+ *
+ * Generated from protobuf field map headers = 3;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getHeaders()
+ {
+ return $this->headers;
+ }
+
+ /**
+ * The HTTP response headers. If multiple headers share the same key, they
+ * must be merged according to HTTP spec. All header keys must be
+ * lowercased, because HTTP header keys are case-insensitive.
+ *
+ * Generated from protobuf field map headers = 3;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setHeaders($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->headers = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The timestamp when the `destination` service sends the last byte of
+ * the response.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp time = 4;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getTime()
+ {
+ return $this->time;
+ }
+
+ public function hasTime()
+ {
+ return isset($this->time);
+ }
+
+ public function clearTime()
+ {
+ unset($this->time);
+ }
+
+ /**
+ * The timestamp when the `destination` service sends the last byte of
+ * the response.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp time = 4;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->time = $var;
+
+ return $this;
+ }
+
+ /**
+ * The amount of time it takes the backend service to fully respond to a
+ * request. Measured from when the destination service starts to send the
+ * request to the backend until when the destination service receives the
+ * complete response from the backend.
+ *
+ * Generated from protobuf field .google.protobuf.Duration backend_latency = 5;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getBackendLatency()
+ {
+ return $this->backend_latency;
+ }
+
+ public function hasBackendLatency()
+ {
+ return isset($this->backend_latency);
+ }
+
+ public function clearBackendLatency()
+ {
+ unset($this->backend_latency);
+ }
+
+ /**
+ * The amount of time it takes the backend service to fully respond to a
+ * request. Measured from when the destination service starts to send the
+ * request to the backend until when the destination service receives the
+ * complete response from the backend.
+ *
+ * Generated from protobuf field .google.protobuf.Duration backend_latency = 5;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setBackendLatency($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->backend_latency = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AuditContext.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AuditContext.php
new file mode 100644
index 0000000..3e9588a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Context/AuditContext.php
@@ -0,0 +1,247 @@
+google.rpc.context.AuditContext
+ */
+class AuditContext extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Serialized audit log.
+ *
+ * Generated from protobuf field bytes audit_log = 1;
+ */
+ protected $audit_log = '';
+ /**
+ * An API request message that is scrubbed based on the method annotation.
+ * This field should only be filled if audit_log field is present.
+ * Service Control will use this to assemble a complete log for Cloud Audit
+ * Logs and Google internal audit logs.
+ *
+ * Generated from protobuf field .google.protobuf.Struct scrubbed_request = 2;
+ */
+ protected $scrubbed_request = null;
+ /**
+ * An API response message that is scrubbed based on the method annotation.
+ * This field should only be filled if audit_log field is present.
+ * Service Control will use this to assemble a complete log for Cloud Audit
+ * Logs and Google internal audit logs.
+ *
+ * Generated from protobuf field .google.protobuf.Struct scrubbed_response = 3;
+ */
+ protected $scrubbed_response = null;
+ /**
+ * Number of scrubbed response items.
+ *
+ * Generated from protobuf field int32 scrubbed_response_item_count = 4;
+ */
+ protected $scrubbed_response_item_count = 0;
+ /**
+ * Audit resource name which is scrubbed.
+ *
+ * Generated from protobuf field string target_resource = 5;
+ */
+ protected $target_resource = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $audit_log
+ * Serialized audit log.
+ * @type \Google\Protobuf\Struct $scrubbed_request
+ * An API request message that is scrubbed based on the method annotation.
+ * This field should only be filled if audit_log field is present.
+ * Service Control will use this to assemble a complete log for Cloud Audit
+ * Logs and Google internal audit logs.
+ * @type \Google\Protobuf\Struct $scrubbed_response
+ * An API response message that is scrubbed based on the method annotation.
+ * This field should only be filled if audit_log field is present.
+ * Service Control will use this to assemble a complete log for Cloud Audit
+ * Logs and Google internal audit logs.
+ * @type int $scrubbed_response_item_count
+ * Number of scrubbed response items.
+ * @type string $target_resource
+ * Audit resource name which is scrubbed.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\Context\AuditContext::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Serialized audit log.
+ *
+ * Generated from protobuf field bytes audit_log = 1;
+ * @return string
+ */
+ public function getAuditLog()
+ {
+ return $this->audit_log;
+ }
+
+ /**
+ * Serialized audit log.
+ *
+ * Generated from protobuf field bytes audit_log = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setAuditLog($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->audit_log = $var;
+
+ return $this;
+ }
+
+ /**
+ * An API request message that is scrubbed based on the method annotation.
+ * This field should only be filled if audit_log field is present.
+ * Service Control will use this to assemble a complete log for Cloud Audit
+ * Logs and Google internal audit logs.
+ *
+ * Generated from protobuf field .google.protobuf.Struct scrubbed_request = 2;
+ * @return \Google\Protobuf\Struct|null
+ */
+ public function getScrubbedRequest()
+ {
+ return $this->scrubbed_request;
+ }
+
+ public function hasScrubbedRequest()
+ {
+ return isset($this->scrubbed_request);
+ }
+
+ public function clearScrubbedRequest()
+ {
+ unset($this->scrubbed_request);
+ }
+
+ /**
+ * An API request message that is scrubbed based on the method annotation.
+ * This field should only be filled if audit_log field is present.
+ * Service Control will use this to assemble a complete log for Cloud Audit
+ * Logs and Google internal audit logs.
+ *
+ * Generated from protobuf field .google.protobuf.Struct scrubbed_request = 2;
+ * @param \Google\Protobuf\Struct $var
+ * @return $this
+ */
+ public function setScrubbedRequest($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
+ $this->scrubbed_request = $var;
+
+ return $this;
+ }
+
+ /**
+ * An API response message that is scrubbed based on the method annotation.
+ * This field should only be filled if audit_log field is present.
+ * Service Control will use this to assemble a complete log for Cloud Audit
+ * Logs and Google internal audit logs.
+ *
+ * Generated from protobuf field .google.protobuf.Struct scrubbed_response = 3;
+ * @return \Google\Protobuf\Struct|null
+ */
+ public function getScrubbedResponse()
+ {
+ return $this->scrubbed_response;
+ }
+
+ public function hasScrubbedResponse()
+ {
+ return isset($this->scrubbed_response);
+ }
+
+ public function clearScrubbedResponse()
+ {
+ unset($this->scrubbed_response);
+ }
+
+ /**
+ * An API response message that is scrubbed based on the method annotation.
+ * This field should only be filled if audit_log field is present.
+ * Service Control will use this to assemble a complete log for Cloud Audit
+ * Logs and Google internal audit logs.
+ *
+ * Generated from protobuf field .google.protobuf.Struct scrubbed_response = 3;
+ * @param \Google\Protobuf\Struct $var
+ * @return $this
+ */
+ public function setScrubbedResponse($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
+ $this->scrubbed_response = $var;
+
+ return $this;
+ }
+
+ /**
+ * Number of scrubbed response items.
+ *
+ * Generated from protobuf field int32 scrubbed_response_item_count = 4;
+ * @return int
+ */
+ public function getScrubbedResponseItemCount()
+ {
+ return $this->scrubbed_response_item_count;
+ }
+
+ /**
+ * Number of scrubbed response items.
+ *
+ * Generated from protobuf field int32 scrubbed_response_item_count = 4;
+ * @param int $var
+ * @return $this
+ */
+ public function setScrubbedResponseItemCount($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->scrubbed_response_item_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * Audit resource name which is scrubbed.
+ *
+ * Generated from protobuf field string target_resource = 5;
+ * @return string
+ */
+ public function getTargetResource()
+ {
+ return $this->target_resource;
+ }
+
+ /**
+ * Audit resource name which is scrubbed.
+ *
+ * Generated from protobuf field string target_resource = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setTargetResource($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->target_resource = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/DebugInfo.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/DebugInfo.php
new file mode 100644
index 0000000..6489673
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/DebugInfo.php
@@ -0,0 +1,101 @@
+google.rpc.DebugInfo
+ */
+class DebugInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The stack trace entries indicating where the error occurred.
+ *
+ * Generated from protobuf field repeated string stack_entries = 1;
+ */
+ private $stack_entries;
+ /**
+ * Additional debugging information provided by the server.
+ *
+ * Generated from protobuf field string detail = 2;
+ */
+ protected $detail = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\RepeatedField $stack_entries
+ * The stack trace entries indicating where the error occurred.
+ * @type string $detail
+ * Additional debugging information provided by the server.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The stack trace entries indicating where the error occurred.
+ *
+ * Generated from protobuf field repeated string stack_entries = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getStackEntries()
+ {
+ return $this->stack_entries;
+ }
+
+ /**
+ * The stack trace entries indicating where the error occurred.
+ *
+ * Generated from protobuf field repeated string stack_entries = 1;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setStackEntries($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->stack_entries = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Additional debugging information provided by the server.
+ *
+ * Generated from protobuf field string detail = 2;
+ * @return string
+ */
+ public function getDetail()
+ {
+ return $this->detail;
+ }
+
+ /**
+ * Additional debugging information provided by the server.
+ *
+ * Generated from protobuf field string detail = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setDetail($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->detail = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/ErrorInfo.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/ErrorInfo.php
new file mode 100644
index 0000000..8c2e0ec
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/ErrorInfo.php
@@ -0,0 +1,213 @@
+google.rpc.ErrorInfo
+ */
+class ErrorInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The reason of the error. This is a constant value that identifies the
+ * proximate cause of the error. Error reasons are unique within a particular
+ * domain of errors. This should be at most 63 characters and match a
+ * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents
+ * UPPER_SNAKE_CASE.
+ *
+ * Generated from protobuf field string reason = 1;
+ */
+ protected $reason = '';
+ /**
+ * The logical grouping to which the "reason" belongs. The error domain
+ * is typically the registered service name of the tool or product that
+ * generates the error. Example: "pubsub.googleapis.com". If the error is
+ * generated by some common infrastructure, the error domain must be a
+ * globally unique value that identifies the infrastructure. For Google API
+ * infrastructure, the error domain is "googleapis.com".
+ *
+ * Generated from protobuf field string domain = 2;
+ */
+ protected $domain = '';
+ /**
+ * Additional structured details about this error.
+ * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in
+ * length. When identifying the current value of an exceeded limit, the units
+ * should be contained in the key, not the value. For example, rather than
+ * {"instanceLimit": "100/request"}, should be returned as,
+ * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of
+ * instances that can be created in a single (batch) request.
+ *
+ * Generated from protobuf field map metadata = 3;
+ */
+ private $metadata;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $reason
+ * The reason of the error. This is a constant value that identifies the
+ * proximate cause of the error. Error reasons are unique within a particular
+ * domain of errors. This should be at most 63 characters and match a
+ * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents
+ * UPPER_SNAKE_CASE.
+ * @type string $domain
+ * The logical grouping to which the "reason" belongs. The error domain
+ * is typically the registered service name of the tool or product that
+ * generates the error. Example: "pubsub.googleapis.com". If the error is
+ * generated by some common infrastructure, the error domain must be a
+ * globally unique value that identifies the infrastructure. For Google API
+ * infrastructure, the error domain is "googleapis.com".
+ * @type array|\Google\Protobuf\Internal\MapField $metadata
+ * Additional structured details about this error.
+ * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in
+ * length. When identifying the current value of an exceeded limit, the units
+ * should be contained in the key, not the value. For example, rather than
+ * {"instanceLimit": "100/request"}, should be returned as,
+ * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of
+ * instances that can be created in a single (batch) request.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The reason of the error. This is a constant value that identifies the
+ * proximate cause of the error. Error reasons are unique within a particular
+ * domain of errors. This should be at most 63 characters and match a
+ * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents
+ * UPPER_SNAKE_CASE.
+ *
+ * Generated from protobuf field string reason = 1;
+ * @return string
+ */
+ public function getReason()
+ {
+ return $this->reason;
+ }
+
+ /**
+ * The reason of the error. This is a constant value that identifies the
+ * proximate cause of the error. Error reasons are unique within a particular
+ * domain of errors. This should be at most 63 characters and match a
+ * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents
+ * UPPER_SNAKE_CASE.
+ *
+ * Generated from protobuf field string reason = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setReason($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->reason = $var;
+
+ return $this;
+ }
+
+ /**
+ * The logical grouping to which the "reason" belongs. The error domain
+ * is typically the registered service name of the tool or product that
+ * generates the error. Example: "pubsub.googleapis.com". If the error is
+ * generated by some common infrastructure, the error domain must be a
+ * globally unique value that identifies the infrastructure. For Google API
+ * infrastructure, the error domain is "googleapis.com".
+ *
+ * Generated from protobuf field string domain = 2;
+ * @return string
+ */
+ public function getDomain()
+ {
+ return $this->domain;
+ }
+
+ /**
+ * The logical grouping to which the "reason" belongs. The error domain
+ * is typically the registered service name of the tool or product that
+ * generates the error. Example: "pubsub.googleapis.com". If the error is
+ * generated by some common infrastructure, the error domain must be a
+ * globally unique value that identifies the infrastructure. For Google API
+ * infrastructure, the error domain is "googleapis.com".
+ *
+ * Generated from protobuf field string domain = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setDomain($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->domain = $var;
+
+ return $this;
+ }
+
+ /**
+ * Additional structured details about this error.
+ * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in
+ * length. When identifying the current value of an exceeded limit, the units
+ * should be contained in the key, not the value. For example, rather than
+ * {"instanceLimit": "100/request"}, should be returned as,
+ * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of
+ * instances that can be created in a single (batch) request.
+ *
+ * Generated from protobuf field map metadata = 3;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getMetadata()
+ {
+ return $this->metadata;
+ }
+
+ /**
+ * Additional structured details about this error.
+ * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in
+ * length. When identifying the current value of an exceeded limit, the units
+ * should be contained in the key, not the value. For example, rather than
+ * {"instanceLimit": "100/request"}, should be returned as,
+ * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of
+ * instances that can be created in a single (batch) request.
+ *
+ * Generated from protobuf field map metadata = 3;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setMetadata($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->metadata = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Help.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Help.php
new file mode 100644
index 0000000..e01c5b2
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Help.php
@@ -0,0 +1,70 @@
+google.rpc.Help
+ */
+class Help extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * URL(s) pointing to additional information on handling the current error.
+ *
+ * Generated from protobuf field repeated .google.rpc.Help.Link links = 1;
+ */
+ private $links;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $links
+ * URL(s) pointing to additional information on handling the current error.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * URL(s) pointing to additional information on handling the current error.
+ *
+ * Generated from protobuf field repeated .google.rpc.Help.Link links = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLinks()
+ {
+ return $this->links;
+ }
+
+ /**
+ * URL(s) pointing to additional information on handling the current error.
+ *
+ * Generated from protobuf field repeated .google.rpc.Help.Link links = 1;
+ * @param array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLinks($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Help\Link::class);
+ $this->links = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Help/Link.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Help/Link.php
new file mode 100644
index 0000000..1786b3f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Help/Link.php
@@ -0,0 +1,102 @@
+google.rpc.Help.Link
+ */
+class Link extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Describes what the link offers.
+ *
+ * Generated from protobuf field string description = 1;
+ */
+ protected $description = '';
+ /**
+ * The URL of the link.
+ *
+ * Generated from protobuf field string url = 2;
+ */
+ protected $url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $description
+ * Describes what the link offers.
+ * @type string $url
+ * The URL of the link.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Describes what the link offers.
+ *
+ * Generated from protobuf field string description = 1;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * Describes what the link offers.
+ *
+ * Generated from protobuf field string description = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * The URL of the link.
+ *
+ * Generated from protobuf field string url = 2;
+ * @return string
+ */
+ public function getUrl()
+ {
+ return $this->url;
+ }
+
+ /**
+ * The URL of the link.
+ *
+ * Generated from protobuf field string url = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->url = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/LocalizedMessage.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/LocalizedMessage.php
new file mode 100644
index 0000000..e4fa20a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/LocalizedMessage.php
@@ -0,0 +1,110 @@
+google.rpc.LocalizedMessage
+ */
+class LocalizedMessage extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The locale used following the specification defined at
+ * https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
+ * Examples are: "en-US", "fr-CH", "es-MX"
+ *
+ * Generated from protobuf field string locale = 1;
+ */
+ protected $locale = '';
+ /**
+ * The localized error message in the above locale.
+ *
+ * Generated from protobuf field string message = 2;
+ */
+ protected $message = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $locale
+ * The locale used following the specification defined at
+ * https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
+ * Examples are: "en-US", "fr-CH", "es-MX"
+ * @type string $message
+ * The localized error message in the above locale.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The locale used following the specification defined at
+ * https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
+ * Examples are: "en-US", "fr-CH", "es-MX"
+ *
+ * Generated from protobuf field string locale = 1;
+ * @return string
+ */
+ public function getLocale()
+ {
+ return $this->locale;
+ }
+
+ /**
+ * The locale used following the specification defined at
+ * https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
+ * Examples are: "en-US", "fr-CH", "es-MX"
+ *
+ * Generated from protobuf field string locale = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setLocale($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->locale = $var;
+
+ return $this;
+ }
+
+ /**
+ * The localized error message in the above locale.
+ *
+ * Generated from protobuf field string message = 2;
+ * @return string
+ */
+ public function getMessage()
+ {
+ return $this->message;
+ }
+
+ /**
+ * The localized error message in the above locale.
+ *
+ * Generated from protobuf field string message = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setMessage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->message = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/PreconditionFailure.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/PreconditionFailure.php
new file mode 100644
index 0000000..cc82e73
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/PreconditionFailure.php
@@ -0,0 +1,70 @@
+google.rpc.PreconditionFailure
+ */
+class PreconditionFailure extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Describes all precondition violations.
+ *
+ * Generated from protobuf field repeated .google.rpc.PreconditionFailure.Violation violations = 1;
+ */
+ private $violations;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Rpc\PreconditionFailure\Violation>|\Google\Protobuf\Internal\RepeatedField $violations
+ * Describes all precondition violations.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Describes all precondition violations.
+ *
+ * Generated from protobuf field repeated .google.rpc.PreconditionFailure.Violation violations = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getViolations()
+ {
+ return $this->violations;
+ }
+
+ /**
+ * Describes all precondition violations.
+ *
+ * Generated from protobuf field repeated .google.rpc.PreconditionFailure.Violation violations = 1;
+ * @param array<\Google\Rpc\PreconditionFailure\Violation>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setViolations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\PreconditionFailure\Violation::class);
+ $this->violations = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/PreconditionFailure/Violation.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/PreconditionFailure/Violation.php
new file mode 100644
index 0000000..df35be2
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/PreconditionFailure/Violation.php
@@ -0,0 +1,160 @@
+google.rpc.PreconditionFailure.Violation
+ */
+class Violation extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The type of PreconditionFailure. We recommend using a service-specific
+ * enum type to define the supported precondition violation subjects. For
+ * example, "TOS" for "Terms of Service violation".
+ *
+ * Generated from protobuf field string type = 1;
+ */
+ protected $type = '';
+ /**
+ * The subject, relative to the type, that failed.
+ * For example, "google.com/cloud" relative to the "TOS" type would indicate
+ * which terms of service is being referenced.
+ *
+ * Generated from protobuf field string subject = 2;
+ */
+ protected $subject = '';
+ /**
+ * A description of how the precondition failed. Developers can use this
+ * description to understand how to fix the failure.
+ * For example: "Terms of service not accepted".
+ *
+ * Generated from protobuf field string description = 3;
+ */
+ protected $description = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $type
+ * The type of PreconditionFailure. We recommend using a service-specific
+ * enum type to define the supported precondition violation subjects. For
+ * example, "TOS" for "Terms of Service violation".
+ * @type string $subject
+ * The subject, relative to the type, that failed.
+ * For example, "google.com/cloud" relative to the "TOS" type would indicate
+ * which terms of service is being referenced.
+ * @type string $description
+ * A description of how the precondition failed. Developers can use this
+ * description to understand how to fix the failure.
+ * For example: "Terms of service not accepted".
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The type of PreconditionFailure. We recommend using a service-specific
+ * enum type to define the supported precondition violation subjects. For
+ * example, "TOS" for "Terms of Service violation".
+ *
+ * Generated from protobuf field string type = 1;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * The type of PreconditionFailure. We recommend using a service-specific
+ * enum type to define the supported precondition violation subjects. For
+ * example, "TOS" for "Terms of Service violation".
+ *
+ * Generated from protobuf field string type = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The subject, relative to the type, that failed.
+ * For example, "google.com/cloud" relative to the "TOS" type would indicate
+ * which terms of service is being referenced.
+ *
+ * Generated from protobuf field string subject = 2;
+ * @return string
+ */
+ public function getSubject()
+ {
+ return $this->subject;
+ }
+
+ /**
+ * The subject, relative to the type, that failed.
+ * For example, "google.com/cloud" relative to the "TOS" type would indicate
+ * which terms of service is being referenced.
+ *
+ * Generated from protobuf field string subject = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setSubject($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->subject = $var;
+
+ return $this;
+ }
+
+ /**
+ * A description of how the precondition failed. Developers can use this
+ * description to understand how to fix the failure.
+ * For example: "Terms of service not accepted".
+ *
+ * Generated from protobuf field string description = 3;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * A description of how the precondition failed. Developers can use this
+ * description to understand how to fix the failure.
+ * For example: "Terms of service not accepted".
+ *
+ * Generated from protobuf field string description = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/QuotaFailure.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/QuotaFailure.php
new file mode 100644
index 0000000..7bb6561
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/QuotaFailure.php
@@ -0,0 +1,75 @@
+google.rpc.QuotaFailure
+ */
+class QuotaFailure extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Describes all quota violations.
+ *
+ * Generated from protobuf field repeated .google.rpc.QuotaFailure.Violation violations = 1;
+ */
+ private $violations;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Rpc\QuotaFailure\Violation>|\Google\Protobuf\Internal\RepeatedField $violations
+ * Describes all quota violations.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Describes all quota violations.
+ *
+ * Generated from protobuf field repeated .google.rpc.QuotaFailure.Violation violations = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getViolations()
+ {
+ return $this->violations;
+ }
+
+ /**
+ * Describes all quota violations.
+ *
+ * Generated from protobuf field repeated .google.rpc.QuotaFailure.Violation violations = 1;
+ * @param array<\Google\Rpc\QuotaFailure\Violation>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setViolations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\QuotaFailure\Violation::class);
+ $this->violations = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/QuotaFailure/Violation.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/QuotaFailure/Violation.php
new file mode 100644
index 0000000..3a7cc9f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/QuotaFailure/Violation.php
@@ -0,0 +1,131 @@
+google.rpc.QuotaFailure.Violation
+ */
+class Violation extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The subject on which the quota check failed.
+ * For example, "clientip:" or "project:".
+ *
+ * Generated from protobuf field string subject = 1;
+ */
+ protected $subject = '';
+ /**
+ * A description of how the quota check failed. Clients can use this
+ * description to find more about the quota configuration in the service's
+ * public documentation, or find the relevant quota limit to adjust through
+ * developer console.
+ * For example: "Service disabled" or "Daily Limit for read operations
+ * exceeded".
+ *
+ * Generated from protobuf field string description = 2;
+ */
+ protected $description = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $subject
+ * The subject on which the quota check failed.
+ * For example, "clientip:" or "project:".
+ * @type string $description
+ * A description of how the quota check failed. Clients can use this
+ * description to find more about the quota configuration in the service's
+ * public documentation, or find the relevant quota limit to adjust through
+ * developer console.
+ * For example: "Service disabled" or "Daily Limit for read operations
+ * exceeded".
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The subject on which the quota check failed.
+ * For example, "clientip:" or "project:".
+ *
+ * Generated from protobuf field string subject = 1;
+ * @return string
+ */
+ public function getSubject()
+ {
+ return $this->subject;
+ }
+
+ /**
+ * The subject on which the quota check failed.
+ * For example, "clientip:" or "project:".
+ *
+ * Generated from protobuf field string subject = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSubject($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->subject = $var;
+
+ return $this;
+ }
+
+ /**
+ * A description of how the quota check failed. Clients can use this
+ * description to find more about the quota configuration in the service's
+ * public documentation, or find the relevant quota limit to adjust through
+ * developer console.
+ * For example: "Service disabled" or "Daily Limit for read operations
+ * exceeded".
+ *
+ * Generated from protobuf field string description = 2;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * A description of how the quota check failed. Clients can use this
+ * description to find more about the quota configuration in the service's
+ * public documentation, or find the relevant quota limit to adjust through
+ * developer console.
+ * For example: "Service disabled" or "Daily Limit for read operations
+ * exceeded".
+ *
+ * Generated from protobuf field string description = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/RequestInfo.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/RequestInfo.php
new file mode 100644
index 0000000..effe01d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/RequestInfo.php
@@ -0,0 +1,110 @@
+google.rpc.RequestInfo
+ */
+class RequestInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An opaque string that should only be interpreted by the service generating
+ * it. For example, it can be used to identify requests in the service's logs.
+ *
+ * Generated from protobuf field string request_id = 1;
+ */
+ protected $request_id = '';
+ /**
+ * Any data that was used to serve this request. For example, an encrypted
+ * stack trace that can be sent back to the service provider for debugging.
+ *
+ * Generated from protobuf field string serving_data = 2;
+ */
+ protected $serving_data = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $request_id
+ * An opaque string that should only be interpreted by the service generating
+ * it. For example, it can be used to identify requests in the service's logs.
+ * @type string $serving_data
+ * Any data that was used to serve this request. For example, an encrypted
+ * stack trace that can be sent back to the service provider for debugging.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An opaque string that should only be interpreted by the service generating
+ * it. For example, it can be used to identify requests in the service's logs.
+ *
+ * Generated from protobuf field string request_id = 1;
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * An opaque string that should only be interpreted by the service generating
+ * it. For example, it can be used to identify requests in the service's logs.
+ *
+ * Generated from protobuf field string request_id = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Any data that was used to serve this request. For example, an encrypted
+ * stack trace that can be sent back to the service provider for debugging.
+ *
+ * Generated from protobuf field string serving_data = 2;
+ * @return string
+ */
+ public function getServingData()
+ {
+ return $this->serving_data;
+ }
+
+ /**
+ * Any data that was used to serve this request. For example, an encrypted
+ * stack trace that can be sent back to the service provider for debugging.
+ *
+ * Generated from protobuf field string serving_data = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setServingData($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->serving_data = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/ResourceInfo.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/ResourceInfo.php
new file mode 100644
index 0000000..3a7859c
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/ResourceInfo.php
@@ -0,0 +1,205 @@
+google.rpc.ResourceInfo
+ */
+class ResourceInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A name for the type of resource being accessed, e.g. "sql table",
+ * "cloud storage bucket", "file", "Google calendar"; or the type URL
+ * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+ *
+ * Generated from protobuf field string resource_type = 1;
+ */
+ protected $resource_type = '';
+ /**
+ * The name of the resource being accessed. For example, a shared calendar
+ * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+ * error is
+ * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+ *
+ * Generated from protobuf field string resource_name = 2;
+ */
+ protected $resource_name = '';
+ /**
+ * The owner of the resource (optional).
+ * For example, "user:" or "project:".
+ *
+ * Generated from protobuf field string owner = 3;
+ */
+ protected $owner = '';
+ /**
+ * Describes what error is encountered when accessing this resource.
+ * For example, updating a cloud project may require the `writer` permission
+ * on the developer console project.
+ *
+ * Generated from protobuf field string description = 4;
+ */
+ protected $description = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $resource_type
+ * A name for the type of resource being accessed, e.g. "sql table",
+ * "cloud storage bucket", "file", "Google calendar"; or the type URL
+ * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+ * @type string $resource_name
+ * The name of the resource being accessed. For example, a shared calendar
+ * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+ * error is
+ * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+ * @type string $owner
+ * The owner of the resource (optional).
+ * For example, "user:" or "project:".
+ * @type string $description
+ * Describes what error is encountered when accessing this resource.
+ * For example, updating a cloud project may require the `writer` permission
+ * on the developer console project.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A name for the type of resource being accessed, e.g. "sql table",
+ * "cloud storage bucket", "file", "Google calendar"; or the type URL
+ * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+ *
+ * Generated from protobuf field string resource_type = 1;
+ * @return string
+ */
+ public function getResourceType()
+ {
+ return $this->resource_type;
+ }
+
+ /**
+ * A name for the type of resource being accessed, e.g. "sql table",
+ * "cloud storage bucket", "file", "Google calendar"; or the type URL
+ * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+ *
+ * Generated from protobuf field string resource_type = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setResourceType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->resource_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The name of the resource being accessed. For example, a shared calendar
+ * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+ * error is
+ * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+ *
+ * Generated from protobuf field string resource_name = 2;
+ * @return string
+ */
+ public function getResourceName()
+ {
+ return $this->resource_name;
+ }
+
+ /**
+ * The name of the resource being accessed. For example, a shared calendar
+ * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+ * error is
+ * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+ *
+ * Generated from protobuf field string resource_name = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setResourceName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->resource_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The owner of the resource (optional).
+ * For example, "user:" or "project:".
+ *
+ * Generated from protobuf field string owner = 3;
+ * @return string
+ */
+ public function getOwner()
+ {
+ return $this->owner;
+ }
+
+ /**
+ * The owner of the resource (optional).
+ * For example, "user:" or "project:".
+ *
+ * Generated from protobuf field string owner = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setOwner($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->owner = $var;
+
+ return $this;
+ }
+
+ /**
+ * Describes what error is encountered when accessing this resource.
+ * For example, updating a cloud project may require the `writer` permission
+ * on the developer console project.
+ *
+ * Generated from protobuf field string description = 4;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * Describes what error is encountered when accessing this resource.
+ * For example, updating a cloud project may require the `writer` permission
+ * on the developer console project.
+ *
+ * Generated from protobuf field string description = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/RetryInfo.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/RetryInfo.php
new file mode 100644
index 0000000..3d391ba
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/RetryInfo.php
@@ -0,0 +1,87 @@
+google.rpc.RetryInfo
+ */
+class RetryInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Clients should wait at least this long between retrying the same request.
+ *
+ * Generated from protobuf field .google.protobuf.Duration retry_delay = 1;
+ */
+ protected $retry_delay = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Duration $retry_delay
+ * Clients should wait at least this long between retrying the same request.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\ErrorDetails::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Clients should wait at least this long between retrying the same request.
+ *
+ * Generated from protobuf field .google.protobuf.Duration retry_delay = 1;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getRetryDelay()
+ {
+ return $this->retry_delay;
+ }
+
+ public function hasRetryDelay()
+ {
+ return isset($this->retry_delay);
+ }
+
+ public function clearRetryDelay()
+ {
+ unset($this->retry_delay);
+ }
+
+ /**
+ * Clients should wait at least this long between retrying the same request.
+ *
+ * Generated from protobuf field .google.protobuf.Duration retry_delay = 1;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setRetryDelay($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->retry_delay = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Rpc/Status.php b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Status.php
new file mode 100644
index 0000000..55b3038
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Rpc/Status.php
@@ -0,0 +1,160 @@
+google.rpc.Status
+ */
+class Status extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The status code, which should be an enum value of
+ * [google.rpc.Code][google.rpc.Code].
+ *
+ * Generated from protobuf field int32 code = 1;
+ */
+ protected $code = 0;
+ /**
+ * A developer-facing error message, which should be in English. Any
+ * user-facing error message should be localized and sent in the
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized
+ * by the client.
+ *
+ * Generated from protobuf field string message = 2;
+ */
+ protected $message = '';
+ /**
+ * A list of messages that carry the error details. There is a common set of
+ * message types for APIs to use.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any details = 3;
+ */
+ private $details;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $code
+ * The status code, which should be an enum value of
+ * [google.rpc.Code][google.rpc.Code].
+ * @type string $message
+ * A developer-facing error message, which should be in English. Any
+ * user-facing error message should be localized and sent in the
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized
+ * by the client.
+ * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $details
+ * A list of messages that carry the error details. There is a common set of
+ * message types for APIs to use.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Rpc\Status::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The status code, which should be an enum value of
+ * [google.rpc.Code][google.rpc.Code].
+ *
+ * Generated from protobuf field int32 code = 1;
+ * @return int
+ */
+ public function getCode()
+ {
+ return $this->code;
+ }
+
+ /**
+ * The status code, which should be an enum value of
+ * [google.rpc.Code][google.rpc.Code].
+ *
+ * Generated from protobuf field int32 code = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setCode($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->code = $var;
+
+ return $this;
+ }
+
+ /**
+ * A developer-facing error message, which should be in English. Any
+ * user-facing error message should be localized and sent in the
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized
+ * by the client.
+ *
+ * Generated from protobuf field string message = 2;
+ * @return string
+ */
+ public function getMessage()
+ {
+ return $this->message;
+ }
+
+ /**
+ * A developer-facing error message, which should be in English. Any
+ * user-facing error message should be localized and sent in the
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized
+ * by the client.
+ *
+ * Generated from protobuf field string message = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setMessage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->message = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of messages that carry the error details. There is a common set of
+ * message types for APIs to use.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any details = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDetails()
+ {
+ return $this->details;
+ }
+
+ /**
+ * A list of messages that carry the error details. There is a common set of
+ * message types for APIs to use.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Any details = 3;
+ * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDetails($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class);
+ $this->details = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/CalendarPeriod.php b/tests/php_test_files/vendor/google/common-protos/src/Type/CalendarPeriod.php
new file mode 100644
index 0000000..e4807c0
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/CalendarPeriod.php
@@ -0,0 +1,102 @@
+google.type.CalendarPeriod
+ */
+class CalendarPeriod
+{
+ /**
+ * Undefined period, raises an error.
+ *
+ * Generated from protobuf enum CALENDAR_PERIOD_UNSPECIFIED = 0;
+ */
+ const CALENDAR_PERIOD_UNSPECIFIED = 0;
+ /**
+ * A day.
+ *
+ * Generated from protobuf enum DAY = 1;
+ */
+ const DAY = 1;
+ /**
+ * A week. Weeks begin on Monday, following
+ * [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
+ *
+ * Generated from protobuf enum WEEK = 2;
+ */
+ const WEEK = 2;
+ /**
+ * A fortnight. The first calendar fortnight of the year begins at the start
+ * of week 1 according to
+ * [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
+ *
+ * Generated from protobuf enum FORTNIGHT = 3;
+ */
+ const FORTNIGHT = 3;
+ /**
+ * A month.
+ *
+ * Generated from protobuf enum MONTH = 4;
+ */
+ const MONTH = 4;
+ /**
+ * A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each
+ * year.
+ *
+ * Generated from protobuf enum QUARTER = 5;
+ */
+ const QUARTER = 5;
+ /**
+ * A half-year. Half-years start on dates 1-Jan and 1-Jul.
+ *
+ * Generated from protobuf enum HALF = 6;
+ */
+ const HALF = 6;
+ /**
+ * A year.
+ *
+ * Generated from protobuf enum YEAR = 7;
+ */
+ const YEAR = 7;
+
+ private static $valueToName = [
+ self::CALENDAR_PERIOD_UNSPECIFIED => 'CALENDAR_PERIOD_UNSPECIFIED',
+ self::DAY => 'DAY',
+ self::WEEK => 'WEEK',
+ self::FORTNIGHT => 'FORTNIGHT',
+ self::MONTH => 'MONTH',
+ self::QUARTER => 'QUARTER',
+ self::HALF => 'HALF',
+ self::YEAR => 'YEAR',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/Color.php b/tests/php_test_files/vendor/google/common-protos/src/Type/Color.php
new file mode 100644
index 0000000..31c1a6e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/Color.php
@@ -0,0 +1,360 @@
+google.type.Color
+ */
+class Color extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The amount of red in the color as a value in the interval [0, 1].
+ *
+ * Generated from protobuf field float red = 1;
+ */
+ protected $red = 0.0;
+ /**
+ * The amount of green in the color as a value in the interval [0, 1].
+ *
+ * Generated from protobuf field float green = 2;
+ */
+ protected $green = 0.0;
+ /**
+ * The amount of blue in the color as a value in the interval [0, 1].
+ *
+ * Generated from protobuf field float blue = 3;
+ */
+ protected $blue = 0.0;
+ /**
+ * The fraction of this color that should be applied to the pixel. That is,
+ * the final pixel color is defined by the equation:
+ * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)`
+ * This means that a value of 1.0 corresponds to a solid color, whereas
+ * a value of 0.0 corresponds to a completely transparent color. This
+ * uses a wrapper message rather than a simple float scalar so that it is
+ * possible to distinguish between a default value and the value being unset.
+ * If omitted, this color object is rendered as a solid color
+ * (as if the alpha value had been explicitly given a value of 1.0).
+ *
+ * Generated from protobuf field .google.protobuf.FloatValue alpha = 4;
+ */
+ protected $alpha = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $red
+ * The amount of red in the color as a value in the interval [0, 1].
+ * @type float $green
+ * The amount of green in the color as a value in the interval [0, 1].
+ * @type float $blue
+ * The amount of blue in the color as a value in the interval [0, 1].
+ * @type \Google\Protobuf\FloatValue $alpha
+ * The fraction of this color that should be applied to the pixel. That is,
+ * the final pixel color is defined by the equation:
+ * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)`
+ * This means that a value of 1.0 corresponds to a solid color, whereas
+ * a value of 0.0 corresponds to a completely transparent color. This
+ * uses a wrapper message rather than a simple float scalar so that it is
+ * possible to distinguish between a default value and the value being unset.
+ * If omitted, this color object is rendered as a solid color
+ * (as if the alpha value had been explicitly given a value of 1.0).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Color::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The amount of red in the color as a value in the interval [0, 1].
+ *
+ * Generated from protobuf field float red = 1;
+ * @return float
+ */
+ public function getRed()
+ {
+ return $this->red;
+ }
+
+ /**
+ * The amount of red in the color as a value in the interval [0, 1].
+ *
+ * Generated from protobuf field float red = 1;
+ * @param float $var
+ * @return $this
+ */
+ public function setRed($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->red = $var;
+
+ return $this;
+ }
+
+ /**
+ * The amount of green in the color as a value in the interval [0, 1].
+ *
+ * Generated from protobuf field float green = 2;
+ * @return float
+ */
+ public function getGreen()
+ {
+ return $this->green;
+ }
+
+ /**
+ * The amount of green in the color as a value in the interval [0, 1].
+ *
+ * Generated from protobuf field float green = 2;
+ * @param float $var
+ * @return $this
+ */
+ public function setGreen($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->green = $var;
+
+ return $this;
+ }
+
+ /**
+ * The amount of blue in the color as a value in the interval [0, 1].
+ *
+ * Generated from protobuf field float blue = 3;
+ * @return float
+ */
+ public function getBlue()
+ {
+ return $this->blue;
+ }
+
+ /**
+ * The amount of blue in the color as a value in the interval [0, 1].
+ *
+ * Generated from protobuf field float blue = 3;
+ * @param float $var
+ * @return $this
+ */
+ public function setBlue($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->blue = $var;
+
+ return $this;
+ }
+
+ /**
+ * The fraction of this color that should be applied to the pixel. That is,
+ * the final pixel color is defined by the equation:
+ * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)`
+ * This means that a value of 1.0 corresponds to a solid color, whereas
+ * a value of 0.0 corresponds to a completely transparent color. This
+ * uses a wrapper message rather than a simple float scalar so that it is
+ * possible to distinguish between a default value and the value being unset.
+ * If omitted, this color object is rendered as a solid color
+ * (as if the alpha value had been explicitly given a value of 1.0).
+ *
+ * Generated from protobuf field .google.protobuf.FloatValue alpha = 4;
+ * @return \Google\Protobuf\FloatValue|null
+ */
+ public function getAlpha()
+ {
+ return $this->alpha;
+ }
+
+ public function hasAlpha()
+ {
+ return isset($this->alpha);
+ }
+
+ public function clearAlpha()
+ {
+ unset($this->alpha);
+ }
+
+ /**
+ * Returns the unboxed value from getAlpha()
+
+ * The fraction of this color that should be applied to the pixel. That is,
+ * the final pixel color is defined by the equation:
+ * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)`
+ * This means that a value of 1.0 corresponds to a solid color, whereas
+ * a value of 0.0 corresponds to a completely transparent color. This
+ * uses a wrapper message rather than a simple float scalar so that it is
+ * possible to distinguish between a default value and the value being unset.
+ * If omitted, this color object is rendered as a solid color
+ * (as if the alpha value had been explicitly given a value of 1.0).
+ *
+ * Generated from protobuf field .google.protobuf.FloatValue alpha = 4;
+ * @return float|null
+ */
+ public function getAlphaUnwrapped()
+ {
+ return $this->readWrapperValue("alpha");
+ }
+
+ /**
+ * The fraction of this color that should be applied to the pixel. That is,
+ * the final pixel color is defined by the equation:
+ * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)`
+ * This means that a value of 1.0 corresponds to a solid color, whereas
+ * a value of 0.0 corresponds to a completely transparent color. This
+ * uses a wrapper message rather than a simple float scalar so that it is
+ * possible to distinguish between a default value and the value being unset.
+ * If omitted, this color object is rendered as a solid color
+ * (as if the alpha value had been explicitly given a value of 1.0).
+ *
+ * Generated from protobuf field .google.protobuf.FloatValue alpha = 4;
+ * @param \Google\Protobuf\FloatValue $var
+ * @return $this
+ */
+ public function setAlpha($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FloatValue::class);
+ $this->alpha = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the field by wrapping a primitive type in a Google\Protobuf\FloatValue object.
+
+ * The fraction of this color that should be applied to the pixel. That is,
+ * the final pixel color is defined by the equation:
+ * `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)`
+ * This means that a value of 1.0 corresponds to a solid color, whereas
+ * a value of 0.0 corresponds to a completely transparent color. This
+ * uses a wrapper message rather than a simple float scalar so that it is
+ * possible to distinguish between a default value and the value being unset.
+ * If omitted, this color object is rendered as a solid color
+ * (as if the alpha value had been explicitly given a value of 1.0).
+ *
+ * Generated from protobuf field .google.protobuf.FloatValue alpha = 4;
+ * @param float|null $var
+ * @return $this
+ */
+ public function setAlphaUnwrapped($var)
+ {
+ $this->writeWrapperValue("alpha", $var);
+ return $this;}
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/Date.php b/tests/php_test_files/vendor/google/common-protos/src/Type/Date.php
new file mode 100644
index 0000000..ba03e77
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/Date.php
@@ -0,0 +1,161 @@
+google.type.Date
+ */
+class Date extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Year of the date. Must be from 1 to 9999, or 0 to specify a date without
+ * a year.
+ *
+ * Generated from protobuf field int32 year = 1;
+ */
+ protected $year = 0;
+ /**
+ * Month of a year. Must be from 1 to 12, or 0 to specify a year without a
+ * month and day.
+ *
+ * Generated from protobuf field int32 month = 2;
+ */
+ protected $month = 0;
+ /**
+ * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
+ * to specify a year by itself or a year and month where the day isn't
+ * significant.
+ *
+ * Generated from protobuf field int32 day = 3;
+ */
+ protected $day = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $year
+ * Year of the date. Must be from 1 to 9999, or 0 to specify a date without
+ * a year.
+ * @type int $month
+ * Month of a year. Must be from 1 to 12, or 0 to specify a year without a
+ * month and day.
+ * @type int $day
+ * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
+ * to specify a year by itself or a year and month where the day isn't
+ * significant.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Date::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Year of the date. Must be from 1 to 9999, or 0 to specify a date without
+ * a year.
+ *
+ * Generated from protobuf field int32 year = 1;
+ * @return int
+ */
+ public function getYear()
+ {
+ return $this->year;
+ }
+
+ /**
+ * Year of the date. Must be from 1 to 9999, or 0 to specify a date without
+ * a year.
+ *
+ * Generated from protobuf field int32 year = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setYear($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->year = $var;
+
+ return $this;
+ }
+
+ /**
+ * Month of a year. Must be from 1 to 12, or 0 to specify a year without a
+ * month and day.
+ *
+ * Generated from protobuf field int32 month = 2;
+ * @return int
+ */
+ public function getMonth()
+ {
+ return $this->month;
+ }
+
+ /**
+ * Month of a year. Must be from 1 to 12, or 0 to specify a year without a
+ * month and day.
+ *
+ * Generated from protobuf field int32 month = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setMonth($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->month = $var;
+
+ return $this;
+ }
+
+ /**
+ * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
+ * to specify a year by itself or a year and month where the day isn't
+ * significant.
+ *
+ * Generated from protobuf field int32 day = 3;
+ * @return int
+ */
+ public function getDay()
+ {
+ return $this->day;
+ }
+
+ /**
+ * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
+ * to specify a year by itself or a year and month where the day isn't
+ * significant.
+ *
+ * Generated from protobuf field int32 day = 3;
+ * @param int $var
+ * @return $this
+ */
+ public function setDay($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->day = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/DateTime.php b/tests/php_test_files/vendor/google/common-protos/src/Type/DateTime.php
new file mode 100644
index 0000000..ed211b6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/DateTime.php
@@ -0,0 +1,393 @@
+google.type.DateTime
+ */
+class DateTime extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
+ * datetime without a year.
+ *
+ * Generated from protobuf field int32 year = 1;
+ */
+ protected $year = 0;
+ /**
+ * Required. Month of year. Must be from 1 to 12.
+ *
+ * Generated from protobuf field int32 month = 2;
+ */
+ protected $month = 0;
+ /**
+ * Required. Day of month. Must be from 1 to 31 and valid for the year and
+ * month.
+ *
+ * Generated from protobuf field int32 day = 3;
+ */
+ protected $day = 0;
+ /**
+ * Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
+ * may choose to allow the value "24:00:00" for scenarios like business
+ * closing time.
+ *
+ * Generated from protobuf field int32 hours = 4;
+ */
+ protected $hours = 0;
+ /**
+ * Required. Minutes of hour of day. Must be from 0 to 59.
+ *
+ * Generated from protobuf field int32 minutes = 5;
+ */
+ protected $minutes = 0;
+ /**
+ * Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
+ * API may allow the value 60 if it allows leap-seconds.
+ *
+ * Generated from protobuf field int32 seconds = 6;
+ */
+ protected $seconds = 0;
+ /**
+ * Required. Fractions of seconds in nanoseconds. Must be from 0 to
+ * 999,999,999.
+ *
+ * Generated from protobuf field int32 nanos = 7;
+ */
+ protected $nanos = 0;
+ protected $time_offset;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $year
+ * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
+ * datetime without a year.
+ * @type int $month
+ * Required. Month of year. Must be from 1 to 12.
+ * @type int $day
+ * Required. Day of month. Must be from 1 to 31 and valid for the year and
+ * month.
+ * @type int $hours
+ * Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
+ * may choose to allow the value "24:00:00" for scenarios like business
+ * closing time.
+ * @type int $minutes
+ * Required. Minutes of hour of day. Must be from 0 to 59.
+ * @type int $seconds
+ * Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
+ * API may allow the value 60 if it allows leap-seconds.
+ * @type int $nanos
+ * Required. Fractions of seconds in nanoseconds. Must be from 0 to
+ * 999,999,999.
+ * @type \Google\Protobuf\Duration $utc_offset
+ * UTC offset. Must be whole seconds, between -18 hours and +18 hours.
+ * For example, a UTC offset of -4:00 would be represented as
+ * { seconds: -14400 }.
+ * @type \Google\Type\TimeZone $time_zone
+ * Time zone.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Datetime::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
+ * datetime without a year.
+ *
+ * Generated from protobuf field int32 year = 1;
+ * @return int
+ */
+ public function getYear()
+ {
+ return $this->year;
+ }
+
+ /**
+ * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
+ * datetime without a year.
+ *
+ * Generated from protobuf field int32 year = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setYear($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->year = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Month of year. Must be from 1 to 12.
+ *
+ * Generated from protobuf field int32 month = 2;
+ * @return int
+ */
+ public function getMonth()
+ {
+ return $this->month;
+ }
+
+ /**
+ * Required. Month of year. Must be from 1 to 12.
+ *
+ * Generated from protobuf field int32 month = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setMonth($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->month = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Day of month. Must be from 1 to 31 and valid for the year and
+ * month.
+ *
+ * Generated from protobuf field int32 day = 3;
+ * @return int
+ */
+ public function getDay()
+ {
+ return $this->day;
+ }
+
+ /**
+ * Required. Day of month. Must be from 1 to 31 and valid for the year and
+ * month.
+ *
+ * Generated from protobuf field int32 day = 3;
+ * @param int $var
+ * @return $this
+ */
+ public function setDay($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->day = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
+ * may choose to allow the value "24:00:00" for scenarios like business
+ * closing time.
+ *
+ * Generated from protobuf field int32 hours = 4;
+ * @return int
+ */
+ public function getHours()
+ {
+ return $this->hours;
+ }
+
+ /**
+ * Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
+ * may choose to allow the value "24:00:00" for scenarios like business
+ * closing time.
+ *
+ * Generated from protobuf field int32 hours = 4;
+ * @param int $var
+ * @return $this
+ */
+ public function setHours($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->hours = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Minutes of hour of day. Must be from 0 to 59.
+ *
+ * Generated from protobuf field int32 minutes = 5;
+ * @return int
+ */
+ public function getMinutes()
+ {
+ return $this->minutes;
+ }
+
+ /**
+ * Required. Minutes of hour of day. Must be from 0 to 59.
+ *
+ * Generated from protobuf field int32 minutes = 5;
+ * @param int $var
+ * @return $this
+ */
+ public function setMinutes($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->minutes = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
+ * API may allow the value 60 if it allows leap-seconds.
+ *
+ * Generated from protobuf field int32 seconds = 6;
+ * @return int
+ */
+ public function getSeconds()
+ {
+ return $this->seconds;
+ }
+
+ /**
+ * Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
+ * API may allow the value 60 if it allows leap-seconds.
+ *
+ * Generated from protobuf field int32 seconds = 6;
+ * @param int $var
+ * @return $this
+ */
+ public function setSeconds($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->seconds = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Fractions of seconds in nanoseconds. Must be from 0 to
+ * 999,999,999.
+ *
+ * Generated from protobuf field int32 nanos = 7;
+ * @return int
+ */
+ public function getNanos()
+ {
+ return $this->nanos;
+ }
+
+ /**
+ * Required. Fractions of seconds in nanoseconds. Must be from 0 to
+ * 999,999,999.
+ *
+ * Generated from protobuf field int32 nanos = 7;
+ * @param int $var
+ * @return $this
+ */
+ public function setNanos($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->nanos = $var;
+
+ return $this;
+ }
+
+ /**
+ * UTC offset. Must be whole seconds, between -18 hours and +18 hours.
+ * For example, a UTC offset of -4:00 would be represented as
+ * { seconds: -14400 }.
+ *
+ * Generated from protobuf field .google.protobuf.Duration utc_offset = 8;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getUtcOffset()
+ {
+ return $this->readOneof(8);
+ }
+
+ public function hasUtcOffset()
+ {
+ return $this->hasOneof(8);
+ }
+
+ /**
+ * UTC offset. Must be whole seconds, between -18 hours and +18 hours.
+ * For example, a UTC offset of -4:00 would be represented as
+ * { seconds: -14400 }.
+ *
+ * Generated from protobuf field .google.protobuf.Duration utc_offset = 8;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setUtcOffset($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->writeOneof(8, $var);
+
+ return $this;
+ }
+
+ /**
+ * Time zone.
+ *
+ * Generated from protobuf field .google.type.TimeZone time_zone = 9;
+ * @return \Google\Type\TimeZone|null
+ */
+ public function getTimeZone()
+ {
+ return $this->readOneof(9);
+ }
+
+ public function hasTimeZone()
+ {
+ return $this->hasOneof(9);
+ }
+
+ /**
+ * Time zone.
+ *
+ * Generated from protobuf field .google.type.TimeZone time_zone = 9;
+ * @param \Google\Type\TimeZone $var
+ * @return $this
+ */
+ public function setTimeZone($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Type\TimeZone::class);
+ $this->writeOneof(9, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTimeOffset()
+ {
+ return $this->whichOneof("time_offset");
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/DayOfWeek.php b/tests/php_test_files/vendor/google/common-protos/src/Type/DayOfWeek.php
new file mode 100644
index 0000000..56219ff
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/DayOfWeek.php
@@ -0,0 +1,96 @@
+google.type.DayOfWeek
+ */
+class DayOfWeek
+{
+ /**
+ * The day of the week is unspecified.
+ *
+ * Generated from protobuf enum DAY_OF_WEEK_UNSPECIFIED = 0;
+ */
+ const DAY_OF_WEEK_UNSPECIFIED = 0;
+ /**
+ * Monday
+ *
+ * Generated from protobuf enum MONDAY = 1;
+ */
+ const MONDAY = 1;
+ /**
+ * Tuesday
+ *
+ * Generated from protobuf enum TUESDAY = 2;
+ */
+ const TUESDAY = 2;
+ /**
+ * Wednesday
+ *
+ * Generated from protobuf enum WEDNESDAY = 3;
+ */
+ const WEDNESDAY = 3;
+ /**
+ * Thursday
+ *
+ * Generated from protobuf enum THURSDAY = 4;
+ */
+ const THURSDAY = 4;
+ /**
+ * Friday
+ *
+ * Generated from protobuf enum FRIDAY = 5;
+ */
+ const FRIDAY = 5;
+ /**
+ * Saturday
+ *
+ * Generated from protobuf enum SATURDAY = 6;
+ */
+ const SATURDAY = 6;
+ /**
+ * Sunday
+ *
+ * Generated from protobuf enum SUNDAY = 7;
+ */
+ const SUNDAY = 7;
+
+ private static $valueToName = [
+ self::DAY_OF_WEEK_UNSPECIFIED => 'DAY_OF_WEEK_UNSPECIFIED',
+ self::MONDAY => 'MONDAY',
+ self::TUESDAY => 'TUESDAY',
+ self::WEDNESDAY => 'WEDNESDAY',
+ self::THURSDAY => 'THURSDAY',
+ self::FRIDAY => 'FRIDAY',
+ self::SATURDAY => 'SATURDAY',
+ self::SUNDAY => 'SUNDAY',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/Decimal.php b/tests/php_test_files/vendor/google/common-protos/src/Type/Decimal.php
new file mode 100644
index 0000000..84e0fec
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/Decimal.php
@@ -0,0 +1,244 @@
+google.type.Decimal
+ */
+class Decimal extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The decimal value, as a string.
+ * The string representation consists of an optional sign, `+` (`U+002B`)
+ * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits
+ * ("the integer"), optionally followed by a fraction, optionally followed
+ * by an exponent.
+ * The fraction consists of a decimal point followed by zero or more decimal
+ * digits. The string must contain at least one digit in either the integer
+ * or the fraction. The number formed by the sign, the integer and the
+ * fraction is referred to as the significand.
+ * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`)
+ * followed by one or more decimal digits.
+ * Services **should** normalize decimal values before storing them by:
+ * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`).
+ * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`).
+ * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`).
+ * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`).
+ * Services **may** perform additional normalization based on its own needs
+ * and the internal decimal implementation selected, such as shifting the
+ * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`).
+ * Additionally, services **may** preserve trailing zeroes in the fraction
+ * to indicate increased precision, but are not required to do so.
+ * Note that only the `.` character is supported to divide the integer
+ * and the fraction; `,` **should not** be supported regardless of locale.
+ * Additionally, thousand separators **should not** be supported. If a
+ * service does support them, values **must** be normalized.
+ * The ENBF grammar is:
+ * DecimalString =
+ * [Sign] Significand [Exponent];
+ * Sign = '+' | '-';
+ * Significand =
+ * Digits ['.'] [Digits] | [Digits] '.' Digits;
+ * Exponent = ('e' | 'E') [Sign] Digits;
+ * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' };
+ * Services **should** clearly document the range of supported values, the
+ * maximum supported precision (total number of digits), and, if applicable,
+ * the scale (number of digits after the decimal point), as well as how it
+ * behaves when receiving out-of-bounds values.
+ * Services **may** choose to accept values passed as input even when the
+ * value has a higher precision or scale than the service supports, and
+ * **should** round the value to fit the supported scale. Alternatively, the
+ * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC)
+ * if precision would be lost.
+ * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in
+ * gRPC) if the service receives a value outside of the supported range.
+ *
+ * Generated from protobuf field string value = 1;
+ */
+ protected $value = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $value
+ * The decimal value, as a string.
+ * The string representation consists of an optional sign, `+` (`U+002B`)
+ * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits
+ * ("the integer"), optionally followed by a fraction, optionally followed
+ * by an exponent.
+ * The fraction consists of a decimal point followed by zero or more decimal
+ * digits. The string must contain at least one digit in either the integer
+ * or the fraction. The number formed by the sign, the integer and the
+ * fraction is referred to as the significand.
+ * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`)
+ * followed by one or more decimal digits.
+ * Services **should** normalize decimal values before storing them by:
+ * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`).
+ * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`).
+ * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`).
+ * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`).
+ * Services **may** perform additional normalization based on its own needs
+ * and the internal decimal implementation selected, such as shifting the
+ * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`).
+ * Additionally, services **may** preserve trailing zeroes in the fraction
+ * to indicate increased precision, but are not required to do so.
+ * Note that only the `.` character is supported to divide the integer
+ * and the fraction; `,` **should not** be supported regardless of locale.
+ * Additionally, thousand separators **should not** be supported. If a
+ * service does support them, values **must** be normalized.
+ * The ENBF grammar is:
+ * DecimalString =
+ * [Sign] Significand [Exponent];
+ * Sign = '+' | '-';
+ * Significand =
+ * Digits ['.'] [Digits] | [Digits] '.' Digits;
+ * Exponent = ('e' | 'E') [Sign] Digits;
+ * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' };
+ * Services **should** clearly document the range of supported values, the
+ * maximum supported precision (total number of digits), and, if applicable,
+ * the scale (number of digits after the decimal point), as well as how it
+ * behaves when receiving out-of-bounds values.
+ * Services **may** choose to accept values passed as input even when the
+ * value has a higher precision or scale than the service supports, and
+ * **should** round the value to fit the supported scale. Alternatively, the
+ * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC)
+ * if precision would be lost.
+ * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in
+ * gRPC) if the service receives a value outside of the supported range.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Decimal::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The decimal value, as a string.
+ * The string representation consists of an optional sign, `+` (`U+002B`)
+ * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits
+ * ("the integer"), optionally followed by a fraction, optionally followed
+ * by an exponent.
+ * The fraction consists of a decimal point followed by zero or more decimal
+ * digits. The string must contain at least one digit in either the integer
+ * or the fraction. The number formed by the sign, the integer and the
+ * fraction is referred to as the significand.
+ * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`)
+ * followed by one or more decimal digits.
+ * Services **should** normalize decimal values before storing them by:
+ * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`).
+ * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`).
+ * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`).
+ * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`).
+ * Services **may** perform additional normalization based on its own needs
+ * and the internal decimal implementation selected, such as shifting the
+ * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`).
+ * Additionally, services **may** preserve trailing zeroes in the fraction
+ * to indicate increased precision, but are not required to do so.
+ * Note that only the `.` character is supported to divide the integer
+ * and the fraction; `,` **should not** be supported regardless of locale.
+ * Additionally, thousand separators **should not** be supported. If a
+ * service does support them, values **must** be normalized.
+ * The ENBF grammar is:
+ * DecimalString =
+ * [Sign] Significand [Exponent];
+ * Sign = '+' | '-';
+ * Significand =
+ * Digits ['.'] [Digits] | [Digits] '.' Digits;
+ * Exponent = ('e' | 'E') [Sign] Digits;
+ * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' };
+ * Services **should** clearly document the range of supported values, the
+ * maximum supported precision (total number of digits), and, if applicable,
+ * the scale (number of digits after the decimal point), as well as how it
+ * behaves when receiving out-of-bounds values.
+ * Services **may** choose to accept values passed as input even when the
+ * value has a higher precision or scale than the service supports, and
+ * **should** round the value to fit the supported scale. Alternatively, the
+ * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC)
+ * if precision would be lost.
+ * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in
+ * gRPC) if the service receives a value outside of the supported range.
+ *
+ * Generated from protobuf field string value = 1;
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The decimal value, as a string.
+ * The string representation consists of an optional sign, `+` (`U+002B`)
+ * or `-` (`U+002D`), followed by a sequence of zero or more decimal digits
+ * ("the integer"), optionally followed by a fraction, optionally followed
+ * by an exponent.
+ * The fraction consists of a decimal point followed by zero or more decimal
+ * digits. The string must contain at least one digit in either the integer
+ * or the fraction. The number formed by the sign, the integer and the
+ * fraction is referred to as the significand.
+ * The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`)
+ * followed by one or more decimal digits.
+ * Services **should** normalize decimal values before storing them by:
+ * - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`).
+ * - Replacing a zero-length integer value with `0` (`.5` -> `0.5`).
+ * - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`).
+ * - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`).
+ * Services **may** perform additional normalization based on its own needs
+ * and the internal decimal implementation selected, such as shifting the
+ * decimal point and exponent value together (example: `2.5e-1` <-> `0.25`).
+ * Additionally, services **may** preserve trailing zeroes in the fraction
+ * to indicate increased precision, but are not required to do so.
+ * Note that only the `.` character is supported to divide the integer
+ * and the fraction; `,` **should not** be supported regardless of locale.
+ * Additionally, thousand separators **should not** be supported. If a
+ * service does support them, values **must** be normalized.
+ * The ENBF grammar is:
+ * DecimalString =
+ * [Sign] Significand [Exponent];
+ * Sign = '+' | '-';
+ * Significand =
+ * Digits ['.'] [Digits] | [Digits] '.' Digits;
+ * Exponent = ('e' | 'E') [Sign] Digits;
+ * Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' };
+ * Services **should** clearly document the range of supported values, the
+ * maximum supported precision (total number of digits), and, if applicable,
+ * the scale (number of digits after the decimal point), as well as how it
+ * behaves when receiving out-of-bounds values.
+ * Services **may** choose to accept values passed as input even when the
+ * value has a higher precision or scale than the service supports, and
+ * **should** round the value to fit the supported scale. Alternatively, the
+ * service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC)
+ * if precision would be lost.
+ * Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in
+ * gRPC) if the service receives a value outside of the supported range.
+ *
+ * Generated from protobuf field string value = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/Expr.php b/tests/php_test_files/vendor/google/common-protos/src/Type/Expr.php
new file mode 100644
index 0000000..e47299b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/Expr.php
@@ -0,0 +1,210 @@
+google.type.Expr
+ */
+class Expr extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Textual representation of an expression in Common Expression Language
+ * syntax.
+ *
+ * Generated from protobuf field string expression = 1;
+ */
+ protected $expression = '';
+ /**
+ * Optional. Title for the expression, i.e. a short string describing
+ * its purpose. This can be used e.g. in UIs which allow to enter the
+ * expression.
+ *
+ * Generated from protobuf field string title = 2;
+ */
+ protected $title = '';
+ /**
+ * Optional. Description of the expression. This is a longer text which
+ * describes the expression, e.g. when hovered over it in a UI.
+ *
+ * Generated from protobuf field string description = 3;
+ */
+ protected $description = '';
+ /**
+ * Optional. String indicating the location of the expression for error
+ * reporting, e.g. a file name and a position in the file.
+ *
+ * Generated from protobuf field string location = 4;
+ */
+ protected $location = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $expression
+ * Textual representation of an expression in Common Expression Language
+ * syntax.
+ * @type string $title
+ * Optional. Title for the expression, i.e. a short string describing
+ * its purpose. This can be used e.g. in UIs which allow to enter the
+ * expression.
+ * @type string $description
+ * Optional. Description of the expression. This is a longer text which
+ * describes the expression, e.g. when hovered over it in a UI.
+ * @type string $location
+ * Optional. String indicating the location of the expression for error
+ * reporting, e.g. a file name and a position in the file.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Expr::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Textual representation of an expression in Common Expression Language
+ * syntax.
+ *
+ * Generated from protobuf field string expression = 1;
+ * @return string
+ */
+ public function getExpression()
+ {
+ return $this->expression;
+ }
+
+ /**
+ * Textual representation of an expression in Common Expression Language
+ * syntax.
+ *
+ * Generated from protobuf field string expression = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setExpression($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->expression = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Title for the expression, i.e. a short string describing
+ * its purpose. This can be used e.g. in UIs which allow to enter the
+ * expression.
+ *
+ * Generated from protobuf field string title = 2;
+ * @return string
+ */
+ public function getTitle()
+ {
+ return $this->title;
+ }
+
+ /**
+ * Optional. Title for the expression, i.e. a short string describing
+ * its purpose. This can be used e.g. in UIs which allow to enter the
+ * expression.
+ *
+ * Generated from protobuf field string title = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setTitle($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->title = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Description of the expression. This is a longer text which
+ * describes the expression, e.g. when hovered over it in a UI.
+ *
+ * Generated from protobuf field string description = 3;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * Optional. Description of the expression. This is a longer text which
+ * describes the expression, e.g. when hovered over it in a UI.
+ *
+ * Generated from protobuf field string description = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. String indicating the location of the expression for error
+ * reporting, e.g. a file name and a position in the file.
+ *
+ * Generated from protobuf field string location = 4;
+ * @return string
+ */
+ public function getLocation()
+ {
+ return $this->location;
+ }
+
+ /**
+ * Optional. String indicating the location of the expression for error
+ * reporting, e.g. a file name and a position in the file.
+ *
+ * Generated from protobuf field string location = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setLocation($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->location = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/Fraction.php b/tests/php_test_files/vendor/google/common-protos/src/Type/Fraction.php
new file mode 100644
index 0000000..f7aae21
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/Fraction.php
@@ -0,0 +1,105 @@
+google.type.Fraction
+ */
+class Fraction extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The numerator in the fraction, e.g. 2 in 2/3.
+ *
+ * Generated from protobuf field int64 numerator = 1;
+ */
+ protected $numerator = 0;
+ /**
+ * The value by which the numerator is divided, e.g. 3 in 2/3. Must be
+ * positive.
+ *
+ * Generated from protobuf field int64 denominator = 2;
+ */
+ protected $denominator = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $numerator
+ * The numerator in the fraction, e.g. 2 in 2/3.
+ * @type int|string $denominator
+ * The value by which the numerator is divided, e.g. 3 in 2/3. Must be
+ * positive.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Fraction::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The numerator in the fraction, e.g. 2 in 2/3.
+ *
+ * Generated from protobuf field int64 numerator = 1;
+ * @return int|string
+ */
+ public function getNumerator()
+ {
+ return $this->numerator;
+ }
+
+ /**
+ * The numerator in the fraction, e.g. 2 in 2/3.
+ *
+ * Generated from protobuf field int64 numerator = 1;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setNumerator($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->numerator = $var;
+
+ return $this;
+ }
+
+ /**
+ * The value by which the numerator is divided, e.g. 3 in 2/3. Must be
+ * positive.
+ *
+ * Generated from protobuf field int64 denominator = 2;
+ * @return int|string
+ */
+ public function getDenominator()
+ {
+ return $this->denominator;
+ }
+
+ /**
+ * The value by which the numerator is divided, e.g. 3 in 2/3. Must be
+ * positive.
+ *
+ * Generated from protobuf field int64 denominator = 2;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setDenominator($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->denominator = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/Interval.php b/tests/php_test_files/vendor/google/common-protos/src/Type/Interval.php
new file mode 100644
index 0000000..89fb028
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/Interval.php
@@ -0,0 +1,141 @@
+google.type.Interval
+ */
+class Interval extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Inclusive start of the interval.
+ * If specified, a Timestamp matching this interval will have to be the same
+ * or after the start.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp start_time = 1;
+ */
+ protected $start_time = null;
+ /**
+ * Optional. Exclusive end of the interval.
+ * If specified, a Timestamp matching this interval will have to be before the
+ * end.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
+ */
+ protected $end_time = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Timestamp $start_time
+ * Optional. Inclusive start of the interval.
+ * If specified, a Timestamp matching this interval will have to be the same
+ * or after the start.
+ * @type \Google\Protobuf\Timestamp $end_time
+ * Optional. Exclusive end of the interval.
+ * If specified, a Timestamp matching this interval will have to be before the
+ * end.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Interval::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Inclusive start of the interval.
+ * If specified, a Timestamp matching this interval will have to be the same
+ * or after the start.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp start_time = 1;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getStartTime()
+ {
+ return $this->start_time;
+ }
+
+ public function hasStartTime()
+ {
+ return isset($this->start_time);
+ }
+
+ public function clearStartTime()
+ {
+ unset($this->start_time);
+ }
+
+ /**
+ * Optional. Inclusive start of the interval.
+ * If specified, a Timestamp matching this interval will have to be the same
+ * or after the start.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp start_time = 1;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setStartTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->start_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Exclusive end of the interval.
+ * If specified, a Timestamp matching this interval will have to be before the
+ * end.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getEndTime()
+ {
+ return $this->end_time;
+ }
+
+ public function hasEndTime()
+ {
+ return isset($this->end_time);
+ }
+
+ public function clearEndTime()
+ {
+ unset($this->end_time);
+ }
+
+ /**
+ * Optional. Exclusive end of the interval.
+ * If specified, a Timestamp matching this interval will have to be before the
+ * end.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp end_time = 2;
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setEndTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->end_time = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/LatLng.php b/tests/php_test_files/vendor/google/common-protos/src/Type/LatLng.php
new file mode 100644
index 0000000..3725faf
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/LatLng.php
@@ -0,0 +1,105 @@
+WGS84
+ * standard. Values must be within normalized ranges.
+ *
+ * Generated from protobuf message google.type.LatLng
+ */
+class LatLng extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The latitude in degrees. It must be in the range [-90.0, +90.0].
+ *
+ * Generated from protobuf field double latitude = 1;
+ */
+ protected $latitude = 0.0;
+ /**
+ * The longitude in degrees. It must be in the range [-180.0, +180.0].
+ *
+ * Generated from protobuf field double longitude = 2;
+ */
+ protected $longitude = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $latitude
+ * The latitude in degrees. It must be in the range [-90.0, +90.0].
+ * @type float $longitude
+ * The longitude in degrees. It must be in the range [-180.0, +180.0].
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Latlng::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The latitude in degrees. It must be in the range [-90.0, +90.0].
+ *
+ * Generated from protobuf field double latitude = 1;
+ * @return float
+ */
+ public function getLatitude()
+ {
+ return $this->latitude;
+ }
+
+ /**
+ * The latitude in degrees. It must be in the range [-90.0, +90.0].
+ *
+ * Generated from protobuf field double latitude = 1;
+ * @param float $var
+ * @return $this
+ */
+ public function setLatitude($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->latitude = $var;
+
+ return $this;
+ }
+
+ /**
+ * The longitude in degrees. It must be in the range [-180.0, +180.0].
+ *
+ * Generated from protobuf field double longitude = 2;
+ * @return float
+ */
+ public function getLongitude()
+ {
+ return $this->longitude;
+ }
+
+ /**
+ * The longitude in degrees. It must be in the range [-180.0, +180.0].
+ *
+ * Generated from protobuf field double longitude = 2;
+ * @param float $var
+ * @return $this
+ */
+ public function setLongitude($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->longitude = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/LocalizedText.php b/tests/php_test_files/vendor/google/common-protos/src/Type/LocalizedText.php
new file mode 100644
index 0000000..00545c6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/LocalizedText.php
@@ -0,0 +1,109 @@
+google.type.LocalizedText
+ */
+class LocalizedText extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Localized string in the language corresponding to `language_code' below.
+ *
+ * Generated from protobuf field string text = 1;
+ */
+ protected $text = '';
+ /**
+ * The text's BCP-47 language code, such as "en-US" or "sr-Latn".
+ * For more information, see
+ * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ *
+ * Generated from protobuf field string language_code = 2;
+ */
+ protected $language_code = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $text
+ * Localized string in the language corresponding to `language_code' below.
+ * @type string $language_code
+ * The text's BCP-47 language code, such as "en-US" or "sr-Latn".
+ * For more information, see
+ * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\LocalizedText::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Localized string in the language corresponding to `language_code' below.
+ *
+ * Generated from protobuf field string text = 1;
+ * @return string
+ */
+ public function getText()
+ {
+ return $this->text;
+ }
+
+ /**
+ * Localized string in the language corresponding to `language_code' below.
+ *
+ * Generated from protobuf field string text = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setText($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->text = $var;
+
+ return $this;
+ }
+
+ /**
+ * The text's BCP-47 language code, such as "en-US" or "sr-Latn".
+ * For more information, see
+ * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ *
+ * Generated from protobuf field string language_code = 2;
+ * @return string
+ */
+ public function getLanguageCode()
+ {
+ return $this->language_code;
+ }
+
+ /**
+ * The text's BCP-47 language code, such as "en-US" or "sr-Latn".
+ * For more information, see
+ * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ *
+ * Generated from protobuf field string language_code = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setLanguageCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->language_code = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/Money.php b/tests/php_test_files/vendor/google/common-protos/src/Type/Money.php
new file mode 100644
index 0000000..826c954
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/Money.php
@@ -0,0 +1,159 @@
+google.type.Money
+ */
+class Money extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The three-letter currency code defined in ISO 4217.
+ *
+ * Generated from protobuf field string currency_code = 1;
+ */
+ protected $currency_code = '';
+ /**
+ * The whole units of the amount.
+ * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ *
+ * Generated from protobuf field int64 units = 2;
+ */
+ protected $units = 0;
+ /**
+ * Number of nano (10^-9) units of the amount.
+ * The value must be between -999,999,999 and +999,999,999 inclusive.
+ * If `units` is positive, `nanos` must be positive or zero.
+ * If `units` is zero, `nanos` can be positive, zero, or negative.
+ * If `units` is negative, `nanos` must be negative or zero.
+ * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ *
+ * Generated from protobuf field int32 nanos = 3;
+ */
+ protected $nanos = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $currency_code
+ * The three-letter currency code defined in ISO 4217.
+ * @type int|string $units
+ * The whole units of the amount.
+ * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ * @type int $nanos
+ * Number of nano (10^-9) units of the amount.
+ * The value must be between -999,999,999 and +999,999,999 inclusive.
+ * If `units` is positive, `nanos` must be positive or zero.
+ * If `units` is zero, `nanos` can be positive, zero, or negative.
+ * If `units` is negative, `nanos` must be negative or zero.
+ * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Money::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The three-letter currency code defined in ISO 4217.
+ *
+ * Generated from protobuf field string currency_code = 1;
+ * @return string
+ */
+ public function getCurrencyCode()
+ {
+ return $this->currency_code;
+ }
+
+ /**
+ * The three-letter currency code defined in ISO 4217.
+ *
+ * Generated from protobuf field string currency_code = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setCurrencyCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->currency_code = $var;
+
+ return $this;
+ }
+
+ /**
+ * The whole units of the amount.
+ * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ *
+ * Generated from protobuf field int64 units = 2;
+ * @return int|string
+ */
+ public function getUnits()
+ {
+ return $this->units;
+ }
+
+ /**
+ * The whole units of the amount.
+ * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ *
+ * Generated from protobuf field int64 units = 2;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setUnits($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->units = $var;
+
+ return $this;
+ }
+
+ /**
+ * Number of nano (10^-9) units of the amount.
+ * The value must be between -999,999,999 and +999,999,999 inclusive.
+ * If `units` is positive, `nanos` must be positive or zero.
+ * If `units` is zero, `nanos` can be positive, zero, or negative.
+ * If `units` is negative, `nanos` must be negative or zero.
+ * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ *
+ * Generated from protobuf field int32 nanos = 3;
+ * @return int
+ */
+ public function getNanos()
+ {
+ return $this->nanos;
+ }
+
+ /**
+ * Number of nano (10^-9) units of the amount.
+ * The value must be between -999,999,999 and +999,999,999 inclusive.
+ * If `units` is positive, `nanos` must be positive or zero.
+ * If `units` is zero, `nanos` can be positive, zero, or negative.
+ * If `units` is negative, `nanos` must be negative or zero.
+ * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ *
+ * Generated from protobuf field int32 nanos = 3;
+ * @param int $var
+ * @return $this
+ */
+ public function setNanos($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->nanos = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/Month.php b/tests/php_test_files/vendor/google/common-protos/src/Type/Month.php
new file mode 100644
index 0000000..473d62e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/Month.php
@@ -0,0 +1,131 @@
+google.type.Month
+ */
+class Month
+{
+ /**
+ * The unspecified month.
+ *
+ * Generated from protobuf enum MONTH_UNSPECIFIED = 0;
+ */
+ const MONTH_UNSPECIFIED = 0;
+ /**
+ * The month of January.
+ *
+ * Generated from protobuf enum JANUARY = 1;
+ */
+ const JANUARY = 1;
+ /**
+ * The month of February.
+ *
+ * Generated from protobuf enum FEBRUARY = 2;
+ */
+ const FEBRUARY = 2;
+ /**
+ * The month of March.
+ *
+ * Generated from protobuf enum MARCH = 3;
+ */
+ const MARCH = 3;
+ /**
+ * The month of April.
+ *
+ * Generated from protobuf enum APRIL = 4;
+ */
+ const APRIL = 4;
+ /**
+ * The month of May.
+ *
+ * Generated from protobuf enum MAY = 5;
+ */
+ const MAY = 5;
+ /**
+ * The month of June.
+ *
+ * Generated from protobuf enum JUNE = 6;
+ */
+ const JUNE = 6;
+ /**
+ * The month of July.
+ *
+ * Generated from protobuf enum JULY = 7;
+ */
+ const JULY = 7;
+ /**
+ * The month of August.
+ *
+ * Generated from protobuf enum AUGUST = 8;
+ */
+ const AUGUST = 8;
+ /**
+ * The month of September.
+ *
+ * Generated from protobuf enum SEPTEMBER = 9;
+ */
+ const SEPTEMBER = 9;
+ /**
+ * The month of October.
+ *
+ * Generated from protobuf enum OCTOBER = 10;
+ */
+ const OCTOBER = 10;
+ /**
+ * The month of November.
+ *
+ * Generated from protobuf enum NOVEMBER = 11;
+ */
+ const NOVEMBER = 11;
+ /**
+ * The month of December.
+ *
+ * Generated from protobuf enum DECEMBER = 12;
+ */
+ const DECEMBER = 12;
+
+ private static $valueToName = [
+ self::MONTH_UNSPECIFIED => 'MONTH_UNSPECIFIED',
+ self::JANUARY => 'JANUARY',
+ self::FEBRUARY => 'FEBRUARY',
+ self::MARCH => 'MARCH',
+ self::APRIL => 'APRIL',
+ self::MAY => 'MAY',
+ self::JUNE => 'JUNE',
+ self::JULY => 'JULY',
+ self::AUGUST => 'AUGUST',
+ self::SEPTEMBER => 'SEPTEMBER',
+ self::OCTOBER => 'OCTOBER',
+ self::NOVEMBER => 'NOVEMBER',
+ self::DECEMBER => 'DECEMBER',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/PhoneNumber.php b/tests/php_test_files/vendor/google/common-protos/src/Type/PhoneNumber.php
new file mode 100644
index 0000000..8f4289d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/PhoneNumber.php
@@ -0,0 +1,230 @@
+google.type.PhoneNumber
+ */
+class PhoneNumber extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The phone number's extension. The extension is not standardized in ITU
+ * recommendations, except for being defined as a series of numbers with a
+ * maximum length of 40 digits. Other than digits, some other dialing
+ * characters such as ',' (indicating a wait) or '#' may be stored here.
+ * Note that no regions currently use extensions with short codes, so this
+ * field is normally only set in conjunction with an E.164 number. It is held
+ * separately from the E.164 number to allow for short code extensions in the
+ * future.
+ *
+ * Generated from protobuf field string extension = 3;
+ */
+ protected $extension = '';
+ protected $kind;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $e164_number
+ * The phone number, represented as a leading plus sign ('+'), followed by a
+ * phone number that uses a relaxed ITU E.164 format consisting of the
+ * country calling code (1 to 3 digits) and the subscriber number, with no
+ * additional spaces or formatting, e.g.:
+ * - correct: "+15552220123"
+ * - incorrect: "+1 (555) 222-01234 x123".
+ * The ITU E.164 format limits the latter to 12 digits, but in practice not
+ * all countries respect that, so we relax that restriction here.
+ * National-only numbers are not allowed.
+ * References:
+ * - https://www.itu.int/rec/T-REC-E.164-201011-I
+ * - https://en.wikipedia.org/wiki/E.164.
+ * - https://en.wikipedia.org/wiki/List_of_country_calling_codes
+ * @type \Google\Type\PhoneNumber\ShortCode $short_code
+ * A short code.
+ * Reference(s):
+ * - https://en.wikipedia.org/wiki/Short_code
+ * @type string $extension
+ * The phone number's extension. The extension is not standardized in ITU
+ * recommendations, except for being defined as a series of numbers with a
+ * maximum length of 40 digits. Other than digits, some other dialing
+ * characters such as ',' (indicating a wait) or '#' may be stored here.
+ * Note that no regions currently use extensions with short codes, so this
+ * field is normally only set in conjunction with an E.164 number. It is held
+ * separately from the E.164 number to allow for short code extensions in the
+ * future.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\PhoneNumber::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The phone number, represented as a leading plus sign ('+'), followed by a
+ * phone number that uses a relaxed ITU E.164 format consisting of the
+ * country calling code (1 to 3 digits) and the subscriber number, with no
+ * additional spaces or formatting, e.g.:
+ * - correct: "+15552220123"
+ * - incorrect: "+1 (555) 222-01234 x123".
+ * The ITU E.164 format limits the latter to 12 digits, but in practice not
+ * all countries respect that, so we relax that restriction here.
+ * National-only numbers are not allowed.
+ * References:
+ * - https://www.itu.int/rec/T-REC-E.164-201011-I
+ * - https://en.wikipedia.org/wiki/E.164.
+ * - https://en.wikipedia.org/wiki/List_of_country_calling_codes
+ *
+ * Generated from protobuf field string e164_number = 1;
+ * @return string
+ */
+ public function getE164Number()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasE164Number()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * The phone number, represented as a leading plus sign ('+'), followed by a
+ * phone number that uses a relaxed ITU E.164 format consisting of the
+ * country calling code (1 to 3 digits) and the subscriber number, with no
+ * additional spaces or formatting, e.g.:
+ * - correct: "+15552220123"
+ * - incorrect: "+1 (555) 222-01234 x123".
+ * The ITU E.164 format limits the latter to 12 digits, but in practice not
+ * all countries respect that, so we relax that restriction here.
+ * National-only numbers are not allowed.
+ * References:
+ * - https://www.itu.int/rec/T-REC-E.164-201011-I
+ * - https://en.wikipedia.org/wiki/E.164.
+ * - https://en.wikipedia.org/wiki/List_of_country_calling_codes
+ *
+ * Generated from protobuf field string e164_number = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setE164Number($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * A short code.
+ * Reference(s):
+ * - https://en.wikipedia.org/wiki/Short_code
+ *
+ * Generated from protobuf field .google.type.PhoneNumber.ShortCode short_code = 2;
+ * @return \Google\Type\PhoneNumber\ShortCode|null
+ */
+ public function getShortCode()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasShortCode()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * A short code.
+ * Reference(s):
+ * - https://en.wikipedia.org/wiki/Short_code
+ *
+ * Generated from protobuf field .google.type.PhoneNumber.ShortCode short_code = 2;
+ * @param \Google\Type\PhoneNumber\ShortCode $var
+ * @return $this
+ */
+ public function setShortCode($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Type\PhoneNumber\ShortCode::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * The phone number's extension. The extension is not standardized in ITU
+ * recommendations, except for being defined as a series of numbers with a
+ * maximum length of 40 digits. Other than digits, some other dialing
+ * characters such as ',' (indicating a wait) or '#' may be stored here.
+ * Note that no regions currently use extensions with short codes, so this
+ * field is normally only set in conjunction with an E.164 number. It is held
+ * separately from the E.164 number to allow for short code extensions in the
+ * future.
+ *
+ * Generated from protobuf field string extension = 3;
+ * @return string
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * The phone number's extension. The extension is not standardized in ITU
+ * recommendations, except for being defined as a series of numbers with a
+ * maximum length of 40 digits. Other than digits, some other dialing
+ * characters such as ',' (indicating a wait) or '#' may be stored here.
+ * Note that no regions currently use extensions with short codes, so this
+ * field is normally only set in conjunction with an E.164 number. It is held
+ * separately from the E.164 number to allow for short code extensions in the
+ * future.
+ *
+ * Generated from protobuf field string extension = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->extension = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getKind()
+ {
+ return $this->whichOneof("kind");
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/PhoneNumber/ShortCode.php b/tests/php_test_files/vendor/google/common-protos/src/Type/PhoneNumber/ShortCode.php
new file mode 100644
index 0000000..1ac9de2
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/PhoneNumber/ShortCode.php
@@ -0,0 +1,125 @@
+google.type.PhoneNumber.ShortCode
+ */
+class ShortCode extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The BCP-47 region code of the location where calls to this
+ * short code can be made, such as "US" and "BB".
+ * Reference(s):
+ * - http://www.unicode.org/reports/tr35/#unicode_region_subtag
+ *
+ * Generated from protobuf field string region_code = 1;
+ */
+ protected $region_code = '';
+ /**
+ * Required. The short code digits, without a leading plus ('+') or country
+ * calling code, e.g. "611".
+ *
+ * Generated from protobuf field string number = 2;
+ */
+ protected $number = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $region_code
+ * Required. The BCP-47 region code of the location where calls to this
+ * short code can be made, such as "US" and "BB".
+ * Reference(s):
+ * - http://www.unicode.org/reports/tr35/#unicode_region_subtag
+ * @type string $number
+ * Required. The short code digits, without a leading plus ('+') or country
+ * calling code, e.g. "611".
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\PhoneNumber::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The BCP-47 region code of the location where calls to this
+ * short code can be made, such as "US" and "BB".
+ * Reference(s):
+ * - http://www.unicode.org/reports/tr35/#unicode_region_subtag
+ *
+ * Generated from protobuf field string region_code = 1;
+ * @return string
+ */
+ public function getRegionCode()
+ {
+ return $this->region_code;
+ }
+
+ /**
+ * Required. The BCP-47 region code of the location where calls to this
+ * short code can be made, such as "US" and "BB".
+ * Reference(s):
+ * - http://www.unicode.org/reports/tr35/#unicode_region_subtag
+ *
+ * Generated from protobuf field string region_code = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setRegionCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->region_code = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The short code digits, without a leading plus ('+') or country
+ * calling code, e.g. "611".
+ *
+ * Generated from protobuf field string number = 2;
+ * @return string
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * Required. The short code digits, without a leading plus ('+') or country
+ * calling code, e.g. "611".
+ *
+ * Generated from protobuf field string number = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->number = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/PostalAddress.php b/tests/php_test_files/vendor/google/common-protos/src/Type/PostalAddress.php
new file mode 100644
index 0000000..1fdaf26
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/PostalAddress.php
@@ -0,0 +1,628 @@
+google.type.PostalAddress
+ */
+class PostalAddress extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The schema revision of the `PostalAddress`. This must be set to 0, which is
+ * the latest revision.
+ * All new revisions **must** be backward compatible with old revisions.
+ *
+ * Generated from protobuf field int32 revision = 1;
+ */
+ protected $revision = 0;
+ /**
+ * Required. CLDR region code of the country/region of the address. This
+ * is never inferred and it is up to the user to ensure the value is
+ * correct. See http://cldr.unicode.org/ and
+ * http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+ * for details. Example: "CH" for Switzerland.
+ *
+ * Generated from protobuf field string region_code = 2;
+ */
+ protected $region_code = '';
+ /**
+ * Optional. BCP-47 language code of the contents of this address (if
+ * known). This is often the UI language of the input form or is expected
+ * to match one of the languages used in the address' country/region, or their
+ * transliterated equivalents.
+ * This can affect formatting in certain countries, but is not critical
+ * to the correctness of the data and will never affect any validation or
+ * other non-formatting related operations.
+ * If this value is not known, it should be omitted (rather than specifying a
+ * possibly incorrect default).
+ * Examples: "zh-Hant", "ja", "ja-Latn", "en".
+ *
+ * Generated from protobuf field string language_code = 3;
+ */
+ protected $language_code = '';
+ /**
+ * Optional. Postal code of the address. Not all countries use or require
+ * postal codes to be present, but where they are used, they may trigger
+ * additional validation with other parts of the address (e.g. state/zip
+ * validation in the U.S.A.).
+ *
+ * Generated from protobuf field string postal_code = 4;
+ */
+ protected $postal_code = '';
+ /**
+ * Optional. Additional, country-specific, sorting code. This is not used
+ * in most regions. Where it is used, the value is either a string like
+ * "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
+ * alone, representing the "sector code" (Jamaica), "delivery area indicator"
+ * (Malawi) or "post office indicator" (e.g. Cรดte d'Ivoire).
+ *
+ * Generated from protobuf field string sorting_code = 5;
+ */
+ protected $sorting_code = '';
+ /**
+ * Optional. Highest administrative subdivision which is used for postal
+ * addresses of a country or region.
+ * For example, this can be a state, a province, an oblast, or a prefecture.
+ * Specifically, for Spain this is the province and not the autonomous
+ * community (e.g. "Barcelona" and not "Catalonia").
+ * Many countries don't use an administrative area in postal addresses. E.g.
+ * in Switzerland this should be left unpopulated.
+ *
+ * Generated from protobuf field string administrative_area = 6;
+ */
+ protected $administrative_area = '';
+ /**
+ * Optional. Generally refers to the city/town portion of the address.
+ * Examples: US city, IT comune, UK post town.
+ * In regions of the world where localities are not well defined or do not fit
+ * into this structure well, leave locality empty and use address_lines.
+ *
+ * Generated from protobuf field string locality = 7;
+ */
+ protected $locality = '';
+ /**
+ * Optional. Sublocality of the address.
+ * For example, this can be neighborhoods, boroughs, districts.
+ *
+ * Generated from protobuf field string sublocality = 8;
+ */
+ protected $sublocality = '';
+ /**
+ * Unstructured address lines describing the lower levels of an address.
+ * Because values in address_lines do not have type information and may
+ * sometimes contain multiple values in a single field (e.g.
+ * "Austin, TX"), it is important that the line order is clear. The order of
+ * address lines should be "envelope order" for the country/region of the
+ * address. In places where this can vary (e.g. Japan), address_language is
+ * used to make it explicit (e.g. "ja" for large-to-small ordering and
+ * "ja-Latn" or "en" for small-to-large). This way, the most specific line of
+ * an address can be selected based on the language.
+ * The minimum permitted structural representation of an address consists
+ * of a region_code with all remaining information placed in the
+ * address_lines. It would be possible to format such an address very
+ * approximately without geocoding, but no semantic reasoning could be
+ * made about any of the address components until it was at least
+ * partially resolved.
+ * Creating an address only containing a region_code and address_lines, and
+ * then geocoding is the recommended way to handle completely unstructured
+ * addresses (as opposed to guessing which parts of the address should be
+ * localities or administrative areas).
+ *
+ * Generated from protobuf field repeated string address_lines = 9;
+ */
+ private $address_lines;
+ /**
+ * Optional. The recipient at the address.
+ * This field may, under certain circumstances, contain multiline information.
+ * For example, it might contain "care of" information.
+ *
+ * Generated from protobuf field repeated string recipients = 10;
+ */
+ private $recipients;
+ /**
+ * Optional. The name of the organization at the address.
+ *
+ * Generated from protobuf field string organization = 11;
+ */
+ protected $organization = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $revision
+ * The schema revision of the `PostalAddress`. This must be set to 0, which is
+ * the latest revision.
+ * All new revisions **must** be backward compatible with old revisions.
+ * @type string $region_code
+ * Required. CLDR region code of the country/region of the address. This
+ * is never inferred and it is up to the user to ensure the value is
+ * correct. See http://cldr.unicode.org/ and
+ * http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+ * for details. Example: "CH" for Switzerland.
+ * @type string $language_code
+ * Optional. BCP-47 language code of the contents of this address (if
+ * known). This is often the UI language of the input form or is expected
+ * to match one of the languages used in the address' country/region, or their
+ * transliterated equivalents.
+ * This can affect formatting in certain countries, but is not critical
+ * to the correctness of the data and will never affect any validation or
+ * other non-formatting related operations.
+ * If this value is not known, it should be omitted (rather than specifying a
+ * possibly incorrect default).
+ * Examples: "zh-Hant", "ja", "ja-Latn", "en".
+ * @type string $postal_code
+ * Optional. Postal code of the address. Not all countries use or require
+ * postal codes to be present, but where they are used, they may trigger
+ * additional validation with other parts of the address (e.g. state/zip
+ * validation in the U.S.A.).
+ * @type string $sorting_code
+ * Optional. Additional, country-specific, sorting code. This is not used
+ * in most regions. Where it is used, the value is either a string like
+ * "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
+ * alone, representing the "sector code" (Jamaica), "delivery area indicator"
+ * (Malawi) or "post office indicator" (e.g. Cรดte d'Ivoire).
+ * @type string $administrative_area
+ * Optional. Highest administrative subdivision which is used for postal
+ * addresses of a country or region.
+ * For example, this can be a state, a province, an oblast, or a prefecture.
+ * Specifically, for Spain this is the province and not the autonomous
+ * community (e.g. "Barcelona" and not "Catalonia").
+ * Many countries don't use an administrative area in postal addresses. E.g.
+ * in Switzerland this should be left unpopulated.
+ * @type string $locality
+ * Optional. Generally refers to the city/town portion of the address.
+ * Examples: US city, IT comune, UK post town.
+ * In regions of the world where localities are not well defined or do not fit
+ * into this structure well, leave locality empty and use address_lines.
+ * @type string $sublocality
+ * Optional. Sublocality of the address.
+ * For example, this can be neighborhoods, boroughs, districts.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $address_lines
+ * Unstructured address lines describing the lower levels of an address.
+ * Because values in address_lines do not have type information and may
+ * sometimes contain multiple values in a single field (e.g.
+ * "Austin, TX"), it is important that the line order is clear. The order of
+ * address lines should be "envelope order" for the country/region of the
+ * address. In places where this can vary (e.g. Japan), address_language is
+ * used to make it explicit (e.g. "ja" for large-to-small ordering and
+ * "ja-Latn" or "en" for small-to-large). This way, the most specific line of
+ * an address can be selected based on the language.
+ * The minimum permitted structural representation of an address consists
+ * of a region_code with all remaining information placed in the
+ * address_lines. It would be possible to format such an address very
+ * approximately without geocoding, but no semantic reasoning could be
+ * made about any of the address components until it was at least
+ * partially resolved.
+ * Creating an address only containing a region_code and address_lines, and
+ * then geocoding is the recommended way to handle completely unstructured
+ * addresses (as opposed to guessing which parts of the address should be
+ * localities or administrative areas).
+ * @type array|\Google\Protobuf\Internal\RepeatedField $recipients
+ * Optional. The recipient at the address.
+ * This field may, under certain circumstances, contain multiline information.
+ * For example, it might contain "care of" information.
+ * @type string $organization
+ * Optional. The name of the organization at the address.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\PostalAddress::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The schema revision of the `PostalAddress`. This must be set to 0, which is
+ * the latest revision.
+ * All new revisions **must** be backward compatible with old revisions.
+ *
+ * Generated from protobuf field int32 revision = 1;
+ * @return int
+ */
+ public function getRevision()
+ {
+ return $this->revision;
+ }
+
+ /**
+ * The schema revision of the `PostalAddress`. This must be set to 0, which is
+ * the latest revision.
+ * All new revisions **must** be backward compatible with old revisions.
+ *
+ * Generated from protobuf field int32 revision = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setRevision($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->revision = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. CLDR region code of the country/region of the address. This
+ * is never inferred and it is up to the user to ensure the value is
+ * correct. See http://cldr.unicode.org/ and
+ * http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+ * for details. Example: "CH" for Switzerland.
+ *
+ * Generated from protobuf field string region_code = 2;
+ * @return string
+ */
+ public function getRegionCode()
+ {
+ return $this->region_code;
+ }
+
+ /**
+ * Required. CLDR region code of the country/region of the address. This
+ * is never inferred and it is up to the user to ensure the value is
+ * correct. See http://cldr.unicode.org/ and
+ * http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+ * for details. Example: "CH" for Switzerland.
+ *
+ * Generated from protobuf field string region_code = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setRegionCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->region_code = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. BCP-47 language code of the contents of this address (if
+ * known). This is often the UI language of the input form or is expected
+ * to match one of the languages used in the address' country/region, or their
+ * transliterated equivalents.
+ * This can affect formatting in certain countries, but is not critical
+ * to the correctness of the data and will never affect any validation or
+ * other non-formatting related operations.
+ * If this value is not known, it should be omitted (rather than specifying a
+ * possibly incorrect default).
+ * Examples: "zh-Hant", "ja", "ja-Latn", "en".
+ *
+ * Generated from protobuf field string language_code = 3;
+ * @return string
+ */
+ public function getLanguageCode()
+ {
+ return $this->language_code;
+ }
+
+ /**
+ * Optional. BCP-47 language code of the contents of this address (if
+ * known). This is often the UI language of the input form or is expected
+ * to match one of the languages used in the address' country/region, or their
+ * transliterated equivalents.
+ * This can affect formatting in certain countries, but is not critical
+ * to the correctness of the data and will never affect any validation or
+ * other non-formatting related operations.
+ * If this value is not known, it should be omitted (rather than specifying a
+ * possibly incorrect default).
+ * Examples: "zh-Hant", "ja", "ja-Latn", "en".
+ *
+ * Generated from protobuf field string language_code = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setLanguageCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->language_code = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Postal code of the address. Not all countries use or require
+ * postal codes to be present, but where they are used, they may trigger
+ * additional validation with other parts of the address (e.g. state/zip
+ * validation in the U.S.A.).
+ *
+ * Generated from protobuf field string postal_code = 4;
+ * @return string
+ */
+ public function getPostalCode()
+ {
+ return $this->postal_code;
+ }
+
+ /**
+ * Optional. Postal code of the address. Not all countries use or require
+ * postal codes to be present, but where they are used, they may trigger
+ * additional validation with other parts of the address (e.g. state/zip
+ * validation in the U.S.A.).
+ *
+ * Generated from protobuf field string postal_code = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setPostalCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->postal_code = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Additional, country-specific, sorting code. This is not used
+ * in most regions. Where it is used, the value is either a string like
+ * "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
+ * alone, representing the "sector code" (Jamaica), "delivery area indicator"
+ * (Malawi) or "post office indicator" (e.g. Cรดte d'Ivoire).
+ *
+ * Generated from protobuf field string sorting_code = 5;
+ * @return string
+ */
+ public function getSortingCode()
+ {
+ return $this->sorting_code;
+ }
+
+ /**
+ * Optional. Additional, country-specific, sorting code. This is not used
+ * in most regions. Where it is used, the value is either a string like
+ * "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
+ * alone, representing the "sector code" (Jamaica), "delivery area indicator"
+ * (Malawi) or "post office indicator" (e.g. Cรดte d'Ivoire).
+ *
+ * Generated from protobuf field string sorting_code = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setSortingCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->sorting_code = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Highest administrative subdivision which is used for postal
+ * addresses of a country or region.
+ * For example, this can be a state, a province, an oblast, or a prefecture.
+ * Specifically, for Spain this is the province and not the autonomous
+ * community (e.g. "Barcelona" and not "Catalonia").
+ * Many countries don't use an administrative area in postal addresses. E.g.
+ * in Switzerland this should be left unpopulated.
+ *
+ * Generated from protobuf field string administrative_area = 6;
+ * @return string
+ */
+ public function getAdministrativeArea()
+ {
+ return $this->administrative_area;
+ }
+
+ /**
+ * Optional. Highest administrative subdivision which is used for postal
+ * addresses of a country or region.
+ * For example, this can be a state, a province, an oblast, or a prefecture.
+ * Specifically, for Spain this is the province and not the autonomous
+ * community (e.g. "Barcelona" and not "Catalonia").
+ * Many countries don't use an administrative area in postal addresses. E.g.
+ * in Switzerland this should be left unpopulated.
+ *
+ * Generated from protobuf field string administrative_area = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setAdministrativeArea($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->administrative_area = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Generally refers to the city/town portion of the address.
+ * Examples: US city, IT comune, UK post town.
+ * In regions of the world where localities are not well defined or do not fit
+ * into this structure well, leave locality empty and use address_lines.
+ *
+ * Generated from protobuf field string locality = 7;
+ * @return string
+ */
+ public function getLocality()
+ {
+ return $this->locality;
+ }
+
+ /**
+ * Optional. Generally refers to the city/town portion of the address.
+ * Examples: US city, IT comune, UK post town.
+ * In regions of the world where localities are not well defined or do not fit
+ * into this structure well, leave locality empty and use address_lines.
+ *
+ * Generated from protobuf field string locality = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setLocality($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->locality = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Sublocality of the address.
+ * For example, this can be neighborhoods, boroughs, districts.
+ *
+ * Generated from protobuf field string sublocality = 8;
+ * @return string
+ */
+ public function getSublocality()
+ {
+ return $this->sublocality;
+ }
+
+ /**
+ * Optional. Sublocality of the address.
+ * For example, this can be neighborhoods, boroughs, districts.
+ *
+ * Generated from protobuf field string sublocality = 8;
+ * @param string $var
+ * @return $this
+ */
+ public function setSublocality($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->sublocality = $var;
+
+ return $this;
+ }
+
+ /**
+ * Unstructured address lines describing the lower levels of an address.
+ * Because values in address_lines do not have type information and may
+ * sometimes contain multiple values in a single field (e.g.
+ * "Austin, TX"), it is important that the line order is clear. The order of
+ * address lines should be "envelope order" for the country/region of the
+ * address. In places where this can vary (e.g. Japan), address_language is
+ * used to make it explicit (e.g. "ja" for large-to-small ordering and
+ * "ja-Latn" or "en" for small-to-large). This way, the most specific line of
+ * an address can be selected based on the language.
+ * The minimum permitted structural representation of an address consists
+ * of a region_code with all remaining information placed in the
+ * address_lines. It would be possible to format such an address very
+ * approximately without geocoding, but no semantic reasoning could be
+ * made about any of the address components until it was at least
+ * partially resolved.
+ * Creating an address only containing a region_code and address_lines, and
+ * then geocoding is the recommended way to handle completely unstructured
+ * addresses (as opposed to guessing which parts of the address should be
+ * localities or administrative areas).
+ *
+ * Generated from protobuf field repeated string address_lines = 9;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAddressLines()
+ {
+ return $this->address_lines;
+ }
+
+ /**
+ * Unstructured address lines describing the lower levels of an address.
+ * Because values in address_lines do not have type information and may
+ * sometimes contain multiple values in a single field (e.g.
+ * "Austin, TX"), it is important that the line order is clear. The order of
+ * address lines should be "envelope order" for the country/region of the
+ * address. In places where this can vary (e.g. Japan), address_language is
+ * used to make it explicit (e.g. "ja" for large-to-small ordering and
+ * "ja-Latn" or "en" for small-to-large). This way, the most specific line of
+ * an address can be selected based on the language.
+ * The minimum permitted structural representation of an address consists
+ * of a region_code with all remaining information placed in the
+ * address_lines. It would be possible to format such an address very
+ * approximately without geocoding, but no semantic reasoning could be
+ * made about any of the address components until it was at least
+ * partially resolved.
+ * Creating an address only containing a region_code and address_lines, and
+ * then geocoding is the recommended way to handle completely unstructured
+ * addresses (as opposed to guessing which parts of the address should be
+ * localities or administrative areas).
+ *
+ * Generated from protobuf field repeated string address_lines = 9;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAddressLines($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->address_lines = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The recipient at the address.
+ * This field may, under certain circumstances, contain multiline information.
+ * For example, it might contain "care of" information.
+ *
+ * Generated from protobuf field repeated string recipients = 10;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRecipients()
+ {
+ return $this->recipients;
+ }
+
+ /**
+ * Optional. The recipient at the address.
+ * This field may, under certain circumstances, contain multiline information.
+ * For example, it might contain "care of" information.
+ *
+ * Generated from protobuf field repeated string recipients = 10;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRecipients($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->recipients = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The name of the organization at the address.
+ *
+ * Generated from protobuf field string organization = 11;
+ * @return string
+ */
+ public function getOrganization()
+ {
+ return $this->organization;
+ }
+
+ /**
+ * Optional. The name of the organization at the address.
+ *
+ * Generated from protobuf field string organization = 11;
+ * @param string $var
+ * @return $this
+ */
+ public function setOrganization($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->organization = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/Quaternion.php b/tests/php_test_files/vendor/google/common-protos/src/Type/Quaternion.php
new file mode 100644
index 0000000..f3c316d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/Quaternion.php
@@ -0,0 +1,211 @@
+google.type.Quaternion
+ */
+class Quaternion extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The x component.
+ *
+ * Generated from protobuf field double x = 1;
+ */
+ protected $x = 0.0;
+ /**
+ * The y component.
+ *
+ * Generated from protobuf field double y = 2;
+ */
+ protected $y = 0.0;
+ /**
+ * The z component.
+ *
+ * Generated from protobuf field double z = 3;
+ */
+ protected $z = 0.0;
+ /**
+ * The scalar component.
+ *
+ * Generated from protobuf field double w = 4;
+ */
+ protected $w = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $x
+ * The x component.
+ * @type float $y
+ * The y component.
+ * @type float $z
+ * The z component.
+ * @type float $w
+ * The scalar component.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Quaternion::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The x component.
+ *
+ * Generated from protobuf field double x = 1;
+ * @return float
+ */
+ public function getX()
+ {
+ return $this->x;
+ }
+
+ /**
+ * The x component.
+ *
+ * Generated from protobuf field double x = 1;
+ * @param float $var
+ * @return $this
+ */
+ public function setX($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->x = $var;
+
+ return $this;
+ }
+
+ /**
+ * The y component.
+ *
+ * Generated from protobuf field double y = 2;
+ * @return float
+ */
+ public function getY()
+ {
+ return $this->y;
+ }
+
+ /**
+ * The y component.
+ *
+ * Generated from protobuf field double y = 2;
+ * @param float $var
+ * @return $this
+ */
+ public function setY($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->y = $var;
+
+ return $this;
+ }
+
+ /**
+ * The z component.
+ *
+ * Generated from protobuf field double z = 3;
+ * @return float
+ */
+ public function getZ()
+ {
+ return $this->z;
+ }
+
+ /**
+ * The z component.
+ *
+ * Generated from protobuf field double z = 3;
+ * @param float $var
+ * @return $this
+ */
+ public function setZ($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->z = $var;
+
+ return $this;
+ }
+
+ /**
+ * The scalar component.
+ *
+ * Generated from protobuf field double w = 4;
+ * @return float
+ */
+ public function getW()
+ {
+ return $this->w;
+ }
+
+ /**
+ * The scalar component.
+ *
+ * Generated from protobuf field double w = 4;
+ * @param float $var
+ * @return $this
+ */
+ public function setW($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->w = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/TimeOfDay.php b/tests/php_test_files/vendor/google/common-protos/src/Type/TimeOfDay.php
new file mode 100644
index 0000000..4ab91e0
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/TimeOfDay.php
@@ -0,0 +1,180 @@
+google.type.TimeOfDay
+ */
+class TimeOfDay extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
+ * to allow the value "24:00:00" for scenarios like business closing time.
+ *
+ * Generated from protobuf field int32 hours = 1;
+ */
+ protected $hours = 0;
+ /**
+ * Minutes of hour of day. Must be from 0 to 59.
+ *
+ * Generated from protobuf field int32 minutes = 2;
+ */
+ protected $minutes = 0;
+ /**
+ * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
+ * allow the value 60 if it allows leap-seconds.
+ *
+ * Generated from protobuf field int32 seconds = 3;
+ */
+ protected $seconds = 0;
+ /**
+ * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
+ *
+ * Generated from protobuf field int32 nanos = 4;
+ */
+ protected $nanos = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $hours
+ * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
+ * to allow the value "24:00:00" for scenarios like business closing time.
+ * @type int $minutes
+ * Minutes of hour of day. Must be from 0 to 59.
+ * @type int $seconds
+ * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
+ * allow the value 60 if it allows leap-seconds.
+ * @type int $nanos
+ * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Timeofday::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
+ * to allow the value "24:00:00" for scenarios like business closing time.
+ *
+ * Generated from protobuf field int32 hours = 1;
+ * @return int
+ */
+ public function getHours()
+ {
+ return $this->hours;
+ }
+
+ /**
+ * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
+ * to allow the value "24:00:00" for scenarios like business closing time.
+ *
+ * Generated from protobuf field int32 hours = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setHours($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->hours = $var;
+
+ return $this;
+ }
+
+ /**
+ * Minutes of hour of day. Must be from 0 to 59.
+ *
+ * Generated from protobuf field int32 minutes = 2;
+ * @return int
+ */
+ public function getMinutes()
+ {
+ return $this->minutes;
+ }
+
+ /**
+ * Minutes of hour of day. Must be from 0 to 59.
+ *
+ * Generated from protobuf field int32 minutes = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setMinutes($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->minutes = $var;
+
+ return $this;
+ }
+
+ /**
+ * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
+ * allow the value 60 if it allows leap-seconds.
+ *
+ * Generated from protobuf field int32 seconds = 3;
+ * @return int
+ */
+ public function getSeconds()
+ {
+ return $this->seconds;
+ }
+
+ /**
+ * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
+ * allow the value 60 if it allows leap-seconds.
+ *
+ * Generated from protobuf field int32 seconds = 3;
+ * @param int $var
+ * @return $this
+ */
+ public function setSeconds($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->seconds = $var;
+
+ return $this;
+ }
+
+ /**
+ * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
+ *
+ * Generated from protobuf field int32 nanos = 4;
+ * @return int
+ */
+ public function getNanos()
+ {
+ return $this->nanos;
+ }
+
+ /**
+ * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
+ *
+ * Generated from protobuf field int32 nanos = 4;
+ * @param int $var
+ * @return $this
+ */
+ public function setNanos($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->nanos = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/common-protos/src/Type/TimeZone.php b/tests/php_test_files/vendor/google/common-protos/src/Type/TimeZone.php
new file mode 100644
index 0000000..064bc32
--- /dev/null
+++ b/tests/php_test_files/vendor/google/common-protos/src/Type/TimeZone.php
@@ -0,0 +1,102 @@
+google.type.TimeZone
+ */
+class TimeZone extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * IANA Time Zone Database time zone, e.g. "America/New_York".
+ *
+ * Generated from protobuf field string id = 1;
+ */
+ protected $id = '';
+ /**
+ * Optional. IANA Time Zone Database version number, e.g. "2019a".
+ *
+ * Generated from protobuf field string version = 2;
+ */
+ protected $version = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $id
+ * IANA Time Zone Database time zone, e.g. "America/New_York".
+ * @type string $version
+ * Optional. IANA Time Zone Database version number, e.g. "2019a".
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Type\Datetime::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * IANA Time Zone Database time zone, e.g. "America/New_York".
+ *
+ * Generated from protobuf field string id = 1;
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * IANA Time Zone Database time zone, e.g. "America/New_York".
+ *
+ * Generated from protobuf field string id = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. IANA Time Zone Database version number, e.g. "2019a".
+ *
+ * Generated from protobuf field string version = 2;
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * Optional. IANA Time Zone Database version number, e.g. "2019a".
+ *
+ * Generated from protobuf field string version = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->version = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/LICENSE b/tests/php_test_files/vendor/google/protobuf/LICENSE
new file mode 100644
index 0000000..ba32af4
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2019, Protocol Buffers
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/tests/php_test_files/vendor/google/protobuf/README.md b/tests/php_test_files/vendor/google/protobuf/README.md
new file mode 100644
index 0000000..3663050
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/README.md
@@ -0,0 +1,2 @@
+# protobuf-php
+This repository contains only PHP files to support Composer installation. This repository is a mirror of [protobuf](https://github.com/protocolbuffers/protobuf). Any support requests, bug reports, or development contributions should be directed to that project. To install protobuf for PHP, please see https://github.com/protocolbuffers/protobuf/tree/master/php
diff --git a/tests/php_test_files/vendor/google/protobuf/composer.json b/tests/php_test_files/vendor/google/protobuf/composer.json
new file mode 100644
index 0000000..70af0a0
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/composer.json
@@ -0,0 +1,23 @@
+{
+ "name": "google/protobuf",
+ "type": "library",
+ "description": "proto library for PHP",
+ "keywords": ["proto"],
+ "homepage": "https://developers.google.com/protocol-buffers/",
+ "license": "BSD-3-Clause",
+ "require": {
+ "php": ">=7.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=5.0.0"
+ },
+ "suggest": {
+ "ext-bcmath": "Need to support JSON deserialization"
+ },
+ "autoload": {
+ "psr-4": {
+ "Google\\Protobuf\\": "src/Google/Protobuf",
+ "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php
new file mode 100644
index 0000000..fbce4bf
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php
@@ -0,0 +1,30 @@
+internalAddGeneratedFile(
+ '
+ิ
+google/protobuf/any.protogoogle.protobuf"&
+Any
+type_url (
+value (Bv
+com.google.protobufBAnyProtoPZ,google.golang.org/protobuf/types/known/anypbขGPBชGoogle.Protobuf.WellKnownTypesbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
new file mode 100644
index 0000000..75e0ec6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
@@ -0,0 +1,48 @@
+internalAddGeneratedFile(
+ '
+ษ
+google/protobuf/api.protogoogle.protobufgoogle/protobuf/type.proto"
+Api
+name ( (
+methods (2.google.protobuf.Method(
+options (2.google.protobuf.Option
+version ( 6
+source_context (2.google.protobuf.SourceContext&
+mixins (2.google.protobuf.Mixin\'
+syntax (2.google.protobuf.Syntax"ี
+Method
+name (
+request_type_url (
+request_streaming (
+response_type_url (
+response_streaming ((
+options (2.google.protobuf.Option\'
+syntax (2.google.protobuf.Syntax"#
+Mixin
+name (
+root ( Bv
+com.google.protobufBApiProtoPZ,google.golang.org/protobuf/types/known/apipbขGPBชGoogle.Protobuf.WellKnownTypesbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php
new file mode 100644
index 0000000..5d8023e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php
@@ -0,0 +1,30 @@
+internalAddGeneratedFile(
+ '
+๋
+google/protobuf/duration.protogoogle.protobuf"*
+Duration
+seconds (
+nanos (B
+com.google.protobufB
DurationProtoPZ1google.golang.org/protobuf/types/known/durationpb๘ขGPBชGoogle.Protobuf.WellKnownTypesbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php
new file mode 100644
index 0000000..f31bcc0
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php
@@ -0,0 +1,29 @@
+internalAddGeneratedFile(
+ '
+฿
+ google/protobuf/field_mask.protogoogle.protobuf"
+ FieldMask
+paths ( B
+com.google.protobufBFieldMaskProtoPZ2google.golang.org/protobuf/types/known/fieldmaskpb๘ขGPBชGoogle.Protobuf.WellKnownTypesbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php
new file mode 100644
index 0000000..5e42536
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php
@@ -0,0 +1,29 @@
+internalAddGeneratedFile(
+ '
+พ
+google/protobuf/empty.protogoogle.protobuf"
+EmptyB}
+com.google.protobufB
+EmptyProtoPZ.google.golang.org/protobuf/types/known/emptypb๘ขGPBชGoogle.Protobuf.WellKnownTypesbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
new file mode 100644
index 0000000..4247c09
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
@@ -0,0 +1,282 @@
+addMessage('google.protobuf.internal.FileDescriptorSet', \Google\Protobuf\Internal\FileDescriptorSet::class)
+ ->repeated('file', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.FileDescriptorProto')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FileDescriptorProto', \Google\Protobuf\Internal\FileDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('package', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->repeated('dependency', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->repeated('public_dependency', \Google\Protobuf\Internal\GPBType::INT32, 10)
+ ->repeated('weak_dependency', \Google\Protobuf\Internal\GPBType::INT32, 11)
+ ->repeated('message_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.DescriptorProto')
+ ->repeated('enum_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 5, 'google.protobuf.internal.EnumDescriptorProto')
+ ->repeated('service', \Google\Protobuf\Internal\GPBType::MESSAGE, 6, 'google.protobuf.internal.ServiceDescriptorProto')
+ ->repeated('extension', \Google\Protobuf\Internal\GPBType::MESSAGE, 7, 'google.protobuf.internal.FieldDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.FileOptions')
+ ->optional('source_code_info', \Google\Protobuf\Internal\GPBType::MESSAGE, 9, 'google.protobuf.internal.SourceCodeInfo')
+ ->optional('syntax', \Google\Protobuf\Internal\GPBType::STRING, 12)
+ ->optional('edition', \Google\Protobuf\Internal\GPBType::STRING, 13)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.DescriptorProto', \Google\Protobuf\Internal\DescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->repeated('field', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.FieldDescriptorProto')
+ ->repeated('extension', \Google\Protobuf\Internal\GPBType::MESSAGE, 6, 'google.protobuf.internal.FieldDescriptorProto')
+ ->repeated('nested_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.DescriptorProto')
+ ->repeated('enum_type', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.EnumDescriptorProto')
+ ->repeated('extension_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 5, 'google.protobuf.internal.DescriptorProto.ExtensionRange')
+ ->repeated('oneof_decl', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.OneofDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 7, 'google.protobuf.internal.MessageOptions')
+ ->repeated('reserved_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 9, 'google.protobuf.internal.DescriptorProto.ReservedRange')
+ ->repeated('reserved_name', \Google\Protobuf\Internal\GPBType::STRING, 10)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.DescriptorProto.ExtensionRange', \Google\Protobuf\Internal\DescriptorProto\ExtensionRange::class)
+ ->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.ExtensionRangeOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.DescriptorProto.ReservedRange', \Google\Protobuf\Internal\DescriptorProto\ReservedRange::class)
+ ->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.ExtensionRangeOptions', \Google\Protobuf\Internal\ExtensionRangeOptions::class)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FieldDescriptorProto', \Google\Protobuf\Internal\FieldDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 3)
+ ->optional('label', \Google\Protobuf\Internal\GPBType::ENUM, 4, 'google.protobuf.internal.FieldDescriptorProto.Label')
+ ->optional('type', \Google\Protobuf\Internal\GPBType::ENUM, 5, 'google.protobuf.internal.FieldDescriptorProto.Type')
+ ->optional('type_name', \Google\Protobuf\Internal\GPBType::STRING, 6)
+ ->optional('extendee', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->optional('default_value', \Google\Protobuf\Internal\GPBType::STRING, 7)
+ ->optional('oneof_index', \Google\Protobuf\Internal\GPBType::INT32, 9)
+ ->optional('json_name', \Google\Protobuf\Internal\GPBType::STRING, 10)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.FieldOptions')
+ ->optional('proto3_optional', \Google\Protobuf\Internal\GPBType::BOOL, 17)
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Type', \Google\Protobuf\Internal\Type::class)
+ ->value("TYPE_DOUBLE", 1)
+ ->value("TYPE_FLOAT", 2)
+ ->value("TYPE_INT64", 3)
+ ->value("TYPE_UINT64", 4)
+ ->value("TYPE_INT32", 5)
+ ->value("TYPE_FIXED64", 6)
+ ->value("TYPE_FIXED32", 7)
+ ->value("TYPE_BOOL", 8)
+ ->value("TYPE_STRING", 9)
+ ->value("TYPE_GROUP", 10)
+ ->value("TYPE_MESSAGE", 11)
+ ->value("TYPE_BYTES", 12)
+ ->value("TYPE_UINT32", 13)
+ ->value("TYPE_ENUM", 14)
+ ->value("TYPE_SFIXED32", 15)
+ ->value("TYPE_SFIXED64", 16)
+ ->value("TYPE_SINT32", 17)
+ ->value("TYPE_SINT64", 18)
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Label', \Google\Protobuf\Internal\Label::class)
+ ->value("LABEL_OPTIONAL", 1)
+ ->value("LABEL_REQUIRED", 2)
+ ->value("LABEL_REPEATED", 3)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.OneofDescriptorProto', \Google\Protobuf\Internal\OneofDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.OneofOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumDescriptorProto', \Google\Protobuf\Internal\EnumDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->repeated('value', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.EnumValueDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumOptions')
+ ->repeated('reserved_range', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.EnumDescriptorProto.EnumReservedRange')
+ ->repeated('reserved_name', \Google\Protobuf\Internal\GPBType::STRING, 5)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumDescriptorProto.EnumReservedRange', \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange::class)
+ ->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumValueDescriptorProto', \Google\Protobuf\Internal\EnumValueDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.EnumValueOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.ServiceDescriptorProto', \Google\Protobuf\Internal\ServiceDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->repeated('method', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.MethodDescriptorProto')
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.ServiceOptions')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.MethodDescriptorProto', \Google\Protobuf\Internal\MethodDescriptorProto::class)
+ ->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('input_type', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->optional('output_type', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.MethodOptions')
+ ->optional('client_streaming', \Google\Protobuf\Internal\GPBType::BOOL, 5)
+ ->optional('server_streaming', \Google\Protobuf\Internal\GPBType::BOOL, 6)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FileOptions', \Google\Protobuf\Internal\FileOptions::class)
+ ->optional('java_package', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->optional('java_outer_classname', \Google\Protobuf\Internal\GPBType::STRING, 8)
+ ->optional('java_multiple_files', \Google\Protobuf\Internal\GPBType::BOOL, 10)
+ ->optional('java_generate_equals_and_hash', \Google\Protobuf\Internal\GPBType::BOOL, 20)
+ ->optional('java_string_check_utf8', \Google\Protobuf\Internal\GPBType::BOOL, 27)
+ ->optional('optimize_for', \Google\Protobuf\Internal\GPBType::ENUM, 9, 'google.protobuf.internal.FileOptions.OptimizeMode')
+ ->optional('go_package', \Google\Protobuf\Internal\GPBType::STRING, 11)
+ ->optional('cc_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 16)
+ ->optional('java_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 17)
+ ->optional('py_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 18)
+ ->optional('php_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 42)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 23)
+ ->optional('cc_enable_arenas', \Google\Protobuf\Internal\GPBType::BOOL, 31)
+ ->optional('objc_class_prefix', \Google\Protobuf\Internal\GPBType::STRING, 36)
+ ->optional('csharp_namespace', \Google\Protobuf\Internal\GPBType::STRING, 37)
+ ->optional('swift_prefix', \Google\Protobuf\Internal\GPBType::STRING, 39)
+ ->optional('php_class_prefix', \Google\Protobuf\Internal\GPBType::STRING, 40)
+ ->optional('php_namespace', \Google\Protobuf\Internal\GPBType::STRING, 41)
+ ->optional('php_metadata_namespace', \Google\Protobuf\Internal\GPBType::STRING, 44)
+ ->optional('ruby_package', \Google\Protobuf\Internal\GPBType::STRING, 45)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FileOptions.OptimizeMode', \Google\Protobuf\Internal\OptimizeMode::class)
+ ->value("SPEED", 1)
+ ->value("CODE_SIZE", 2)
+ ->value("LITE_RUNTIME", 3)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.MessageOptions', \Google\Protobuf\Internal\MessageOptions::class)
+ ->optional('message_set_wire_format', \Google\Protobuf\Internal\GPBType::BOOL, 1)
+ ->optional('no_standard_descriptor_accessor', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
+ ->optional('map_entry', \Google\Protobuf\Internal\GPBType::BOOL, 7)
+ ->optional('deprecated_legacy_json_field_conflicts', \Google\Protobuf\Internal\GPBType::BOOL, 11)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.FieldOptions', \Google\Protobuf\Internal\FieldOptions::class)
+ ->optional('ctype', \Google\Protobuf\Internal\GPBType::ENUM, 1, 'google.protobuf.internal.FieldOptions.CType')
+ ->optional('packed', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->optional('jstype', \Google\Protobuf\Internal\GPBType::ENUM, 6, 'google.protobuf.internal.FieldOptions.JSType')
+ ->optional('lazy', \Google\Protobuf\Internal\GPBType::BOOL, 5)
+ ->optional('unverified_lazy', \Google\Protobuf\Internal\GPBType::BOOL, 15)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
+ ->optional('weak', \Google\Protobuf\Internal\GPBType::BOOL, 10)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldOptions.CType', \Google\Protobuf\Internal\CType::class)
+ ->value("STRING", 0)
+ ->value("CORD", 1)
+ ->value("STRING_PIECE", 2)
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.FieldOptions.JSType', \Google\Protobuf\Internal\JSType::class)
+ ->value("JS_NORMAL", 0)
+ ->value("JS_STRING", 1)
+ ->value("JS_NUMBER", 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.OneofOptions', \Google\Protobuf\Internal\OneofOptions::class)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumOptions', \Google\Protobuf\Internal\EnumOptions::class)
+ ->optional('allow_alias', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3)
+ ->optional('deprecated_legacy_json_field_conflicts', \Google\Protobuf\Internal\GPBType::BOOL, 6)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.EnumValueOptions', \Google\Protobuf\Internal\EnumValueOptions::class)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 1)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.ServiceOptions', \Google\Protobuf\Internal\ServiceOptions::class)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 33)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.MethodOptions', \Google\Protobuf\Internal\MethodOptions::class)
+ ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 33)
+ ->optional('idempotency_level', \Google\Protobuf\Internal\GPBType::ENUM, 34, 'google.protobuf.internal.MethodOptions.IdempotencyLevel')
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
+ $pool->addEnum('google.protobuf.internal.MethodOptions.IdempotencyLevel', \Google\Protobuf\Internal\IdempotencyLevel::class)
+ ->value("IDEMPOTENCY_UNKNOWN", 0)
+ ->value("NO_SIDE_EFFECTS", 1)
+ ->value("IDEMPOTENT", 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.UninterpretedOption', \Google\Protobuf\Internal\UninterpretedOption::class)
+ ->repeated('name', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.UninterpretedOption.NamePart')
+ ->optional('identifier_value', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->optional('positive_int_value', \Google\Protobuf\Internal\GPBType::UINT64, 4)
+ ->optional('negative_int_value', \Google\Protobuf\Internal\GPBType::INT64, 5)
+ ->optional('double_value', \Google\Protobuf\Internal\GPBType::DOUBLE, 6)
+ ->optional('string_value', \Google\Protobuf\Internal\GPBType::BYTES, 7)
+ ->optional('aggregate_value', \Google\Protobuf\Internal\GPBType::STRING, 8)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.UninterpretedOption.NamePart', \Google\Protobuf\Internal\UninterpretedOption\NamePart::class)
+ ->required('name_part', \Google\Protobuf\Internal\GPBType::STRING, 1)
+ ->required('is_extension', \Google\Protobuf\Internal\GPBType::BOOL, 2)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.SourceCodeInfo', \Google\Protobuf\Internal\SourceCodeInfo::class)
+ ->repeated('location', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.SourceCodeInfo.Location')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.SourceCodeInfo.Location', \Google\Protobuf\Internal\SourceCodeInfo\Location::class)
+ ->repeated('path', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->repeated('span', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->optional('leading_comments', \Google\Protobuf\Internal\GPBType::STRING, 3)
+ ->optional('trailing_comments', \Google\Protobuf\Internal\GPBType::STRING, 4)
+ ->repeated('leading_detached_comments', \Google\Protobuf\Internal\GPBType::STRING, 6)
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.GeneratedCodeInfo', \Google\Protobuf\Internal\GeneratedCodeInfo::class)
+ ->repeated('annotation', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.GeneratedCodeInfo.Annotation')
+ ->finalizeToPool();
+
+ $pool->addMessage('google.protobuf.internal.GeneratedCodeInfo.Annotation', \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation::class)
+ ->repeated('path', \Google\Protobuf\Internal\GPBType::INT32, 1)
+ ->optional('source_file', \Google\Protobuf\Internal\GPBType::STRING, 2)
+ ->optional('begin', \Google\Protobuf\Internal\GPBType::INT32, 3)
+ ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 4)
+ ->finalizeToPool();
+
+ $pool->finish();
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php
new file mode 100644
index 0000000..797732d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php
@@ -0,0 +1,29 @@
+internalAddGeneratedFile(
+ '
+๐
+$google/protobuf/source_context.protogoogle.protobuf""
+
SourceContext
+ file_name ( B
+com.google.protobufBSourceContextProtoPZ6google.golang.org/protobuf/types/known/sourcecontextpbขGPBชGoogle.Protobuf.WellKnownTypesbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php
new file mode 100644
index 0000000..888a81a
Binary files /dev/null and b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php differ
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php
new file mode 100644
index 0000000..0943727
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php
@@ -0,0 +1,30 @@
+internalAddGeneratedFile(
+ '
+๏
+google/protobuf/timestamp.protogoogle.protobuf"+
+ Timestamp
+seconds (
+nanos (B
+com.google.protobufBTimestampProtoPZ2google.golang.org/protobuf/types/known/timestamppb๘ขGPBชGoogle.Protobuf.WellKnownTypesbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php
new file mode 100644
index 0000000..7d0bfbb
Binary files /dev/null and b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php differ
diff --git a/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php
new file mode 100644
index 0000000..e7ea1a3
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php
@@ -0,0 +1,49 @@
+internalAddGeneratedFile(
+ '
+ว
+google/protobuf/wrappers.protogoogle.protobuf"
+DoubleValue
+value ("
+
+FloatValue
+value ("
+
+Int64Value
+value ("
+UInt64Value
+value ("
+
+Int32Value
+value ("
+UInt32Value
+value (
"
+ BoolValue
+value ("
+StringValue
+value ( "
+
+BytesValue
+value (B
+com.google.protobufB
WrappersProtoPZ1google.golang.org/protobuf/types/known/wrapperspb๘ขGPBชGoogle.Protobuf.WellKnownTypesbproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Any.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Any.php
new file mode 100644
index 0000000..feea41a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Any.php
@@ -0,0 +1,257 @@
+,
+ * "lastName":
+ * }
+ * If the embedded message type is well-known and has a custom JSON
+ * representation, that representation will be embedded adding a field
+ * `value` which holds the custom JSON in addition to the `@type`
+ * field. Example (for message [google.protobuf.Duration][]):
+ * {
+ * "@type": "type.googleapis.com/google.protobuf.Duration",
+ * "value": "1.212s"
+ * }
+ *
+ * Generated from protobuf message google.protobuf.Any
+ */
+class Any extends \Google\Protobuf\Internal\AnyBase
+{
+ /**
+ * A URL/resource name that uniquely identifies the type of the serialized
+ * protocol buffer message. This string must contain at least
+ * one "/" character. The last segment of the URL's path must represent
+ * the fully qualified name of the type (as in
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
+ * (e.g., leading "." is not accepted).
+ * In practice, teams usually precompile into the binary all types that they
+ * expect it to use in the context of Any. However, for URLs which use the
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
+ * server that maps type URLs to message definitions as follows:
+ * * If no scheme is provided, `https` is assumed.
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ * value in binary format, or produce an error.
+ * * Applications are allowed to cache lookup results based on the
+ * URL, or have them precompiled into a binary to avoid any
+ * lookup. Therefore, binary compatibility needs to be preserved
+ * on changes to types. (Use versioned type names to manage
+ * breaking changes.)
+ * Note: this functionality is not currently available in the official
+ * protobuf release, and it is not used for type URLs beginning with
+ * type.googleapis.com.
+ * Schemes other than `http`, `https` (or the empty scheme) might be
+ * used with implementation specific semantics.
+ *
+ * Generated from protobuf field string type_url = 1;
+ */
+ protected $type_url = '';
+ /**
+ * Must be a valid serialized protocol buffer of the above specified type.
+ *
+ * Generated from protobuf field bytes value = 2;
+ */
+ protected $value = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $type_url
+ * A URL/resource name that uniquely identifies the type of the serialized
+ * protocol buffer message. This string must contain at least
+ * one "/" character. The last segment of the URL's path must represent
+ * the fully qualified name of the type (as in
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
+ * (e.g., leading "." is not accepted).
+ * In practice, teams usually precompile into the binary all types that they
+ * expect it to use in the context of Any. However, for URLs which use the
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
+ * server that maps type URLs to message definitions as follows:
+ * * If no scheme is provided, `https` is assumed.
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ * value in binary format, or produce an error.
+ * * Applications are allowed to cache lookup results based on the
+ * URL, or have them precompiled into a binary to avoid any
+ * lookup. Therefore, binary compatibility needs to be preserved
+ * on changes to types. (Use versioned type names to manage
+ * breaking changes.)
+ * Note: this functionality is not currently available in the official
+ * protobuf release, and it is not used for type URLs beginning with
+ * type.googleapis.com.
+ * Schemes other than `http`, `https` (or the empty scheme) might be
+ * used with implementation specific semantics.
+ * @type string $value
+ * Must be a valid serialized protocol buffer of the above specified type.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Any::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A URL/resource name that uniquely identifies the type of the serialized
+ * protocol buffer message. This string must contain at least
+ * one "/" character. The last segment of the URL's path must represent
+ * the fully qualified name of the type (as in
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
+ * (e.g., leading "." is not accepted).
+ * In practice, teams usually precompile into the binary all types that they
+ * expect it to use in the context of Any. However, for URLs which use the
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
+ * server that maps type URLs to message definitions as follows:
+ * * If no scheme is provided, `https` is assumed.
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ * value in binary format, or produce an error.
+ * * Applications are allowed to cache lookup results based on the
+ * URL, or have them precompiled into a binary to avoid any
+ * lookup. Therefore, binary compatibility needs to be preserved
+ * on changes to types. (Use versioned type names to manage
+ * breaking changes.)
+ * Note: this functionality is not currently available in the official
+ * protobuf release, and it is not used for type URLs beginning with
+ * type.googleapis.com.
+ * Schemes other than `http`, `https` (or the empty scheme) might be
+ * used with implementation specific semantics.
+ *
+ * Generated from protobuf field string type_url = 1;
+ * @return string
+ */
+ public function getTypeUrl()
+ {
+ return $this->type_url;
+ }
+
+ /**
+ * A URL/resource name that uniquely identifies the type of the serialized
+ * protocol buffer message. This string must contain at least
+ * one "/" character. The last segment of the URL's path must represent
+ * the fully qualified name of the type (as in
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
+ * (e.g., leading "." is not accepted).
+ * In practice, teams usually precompile into the binary all types that they
+ * expect it to use in the context of Any. However, for URLs which use the
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
+ * server that maps type URLs to message definitions as follows:
+ * * If no scheme is provided, `https` is assumed.
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ * value in binary format, or produce an error.
+ * * Applications are allowed to cache lookup results based on the
+ * URL, or have them precompiled into a binary to avoid any
+ * lookup. Therefore, binary compatibility needs to be preserved
+ * on changes to types. (Use versioned type names to manage
+ * breaking changes.)
+ * Note: this functionality is not currently available in the official
+ * protobuf release, and it is not used for type URLs beginning with
+ * type.googleapis.com.
+ * Schemes other than `http`, `https` (or the empty scheme) might be
+ * used with implementation specific semantics.
+ *
+ * Generated from protobuf field string type_url = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setTypeUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * Must be a valid serialized protocol buffer of the above specified type.
+ *
+ * Generated from protobuf field bytes value = 2;
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Must be a valid serialized protocol buffer of the above specified type.
+ *
+ * Generated from protobuf field bytes value = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Api.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Api.php
new file mode 100644
index 0000000..3784263
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Api.php
@@ -0,0 +1,360 @@
+google.protobuf.Api
+ */
+class Api extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The fully qualified name of this interface, including package name
+ * followed by the interface's simple name.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The methods of this interface, in unspecified order.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Method methods = 2;
+ */
+ private $methods;
+ /**
+ * Any metadata attached to the interface.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 3;
+ */
+ private $options;
+ /**
+ * A version string for this interface. If specified, must have the form
+ * `major-version.minor-version`, as in `1.10`. If the minor version is
+ * omitted, it defaults to zero. If the entire version field is empty, the
+ * major version is derived from the package name, as outlined below. If the
+ * field is not empty, the version in the package name will be verified to be
+ * consistent with what is provided here.
+ * The versioning schema uses [semantic
+ * versioning](http://semver.org) where the major version number
+ * indicates a breaking change and the minor version an additive,
+ * non-breaking change. Both version numbers are signals to users
+ * what to expect from different versions, and should be carefully
+ * chosen based on the product plan.
+ * The major version is also reflected in the package name of the
+ * interface, which must end in `v`, as in
+ * `google.feature.v1`. For major versions 0 and 1, the suffix can
+ * be omitted. Zero major versions must only be used for
+ * experimental, non-GA interfaces.
+ *
+ * Generated from protobuf field string version = 4;
+ */
+ protected $version = '';
+ /**
+ * Source context for the protocol buffer service represented by this
+ * message.
+ *
+ * Generated from protobuf field .google.protobuf.SourceContext source_context = 5;
+ */
+ protected $source_context = null;
+ /**
+ * Included interfaces. See [Mixin][].
+ *
+ * Generated from protobuf field repeated .google.protobuf.Mixin mixins = 6;
+ */
+ private $mixins;
+ /**
+ * The source syntax of the service.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 7;
+ */
+ protected $syntax = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The fully qualified name of this interface, including package name
+ * followed by the interface's simple name.
+ * @type array<\Google\Protobuf\Method>|\Google\Protobuf\Internal\RepeatedField $methods
+ * The methods of this interface, in unspecified order.
+ * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
+ * Any metadata attached to the interface.
+ * @type string $version
+ * A version string for this interface. If specified, must have the form
+ * `major-version.minor-version`, as in `1.10`. If the minor version is
+ * omitted, it defaults to zero. If the entire version field is empty, the
+ * major version is derived from the package name, as outlined below. If the
+ * field is not empty, the version in the package name will be verified to be
+ * consistent with what is provided here.
+ * The versioning schema uses [semantic
+ * versioning](http://semver.org) where the major version number
+ * indicates a breaking change and the minor version an additive,
+ * non-breaking change. Both version numbers are signals to users
+ * what to expect from different versions, and should be carefully
+ * chosen based on the product plan.
+ * The major version is also reflected in the package name of the
+ * interface, which must end in `v`, as in
+ * `google.feature.v1`. For major versions 0 and 1, the suffix can
+ * be omitted. Zero major versions must only be used for
+ * experimental, non-GA interfaces.
+ * @type \Google\Protobuf\SourceContext $source_context
+ * Source context for the protocol buffer service represented by this
+ * message.
+ * @type array<\Google\Protobuf\Mixin>|\Google\Protobuf\Internal\RepeatedField $mixins
+ * Included interfaces. See [Mixin][].
+ * @type int $syntax
+ * The source syntax of the service.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Api::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The fully qualified name of this interface, including package name
+ * followed by the interface's simple name.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The fully qualified name of this interface, including package name
+ * followed by the interface's simple name.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The methods of this interface, in unspecified order.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Method methods = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMethods()
+ {
+ return $this->methods;
+ }
+
+ /**
+ * The methods of this interface, in unspecified order.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Method methods = 2;
+ * @param array<\Google\Protobuf\Method>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMethods($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Method::class);
+ $this->methods = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Any metadata attached to the interface.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Any metadata attached to the interface.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 3;
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
+ $this->options = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A version string for this interface. If specified, must have the form
+ * `major-version.minor-version`, as in `1.10`. If the minor version is
+ * omitted, it defaults to zero. If the entire version field is empty, the
+ * major version is derived from the package name, as outlined below. If the
+ * field is not empty, the version in the package name will be verified to be
+ * consistent with what is provided here.
+ * The versioning schema uses [semantic
+ * versioning](http://semver.org) where the major version number
+ * indicates a breaking change and the minor version an additive,
+ * non-breaking change. Both version numbers are signals to users
+ * what to expect from different versions, and should be carefully
+ * chosen based on the product plan.
+ * The major version is also reflected in the package name of the
+ * interface, which must end in `v`, as in
+ * `google.feature.v1`. For major versions 0 and 1, the suffix can
+ * be omitted. Zero major versions must only be used for
+ * experimental, non-GA interfaces.
+ *
+ * Generated from protobuf field string version = 4;
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * A version string for this interface. If specified, must have the form
+ * `major-version.minor-version`, as in `1.10`. If the minor version is
+ * omitted, it defaults to zero. If the entire version field is empty, the
+ * major version is derived from the package name, as outlined below. If the
+ * field is not empty, the version in the package name will be verified to be
+ * consistent with what is provided here.
+ * The versioning schema uses [semantic
+ * versioning](http://semver.org) where the major version number
+ * indicates a breaking change and the minor version an additive,
+ * non-breaking change. Both version numbers are signals to users
+ * what to expect from different versions, and should be carefully
+ * chosen based on the product plan.
+ * The major version is also reflected in the package name of the
+ * interface, which must end in `v`, as in
+ * `google.feature.v1`. For major versions 0 and 1, the suffix can
+ * be omitted. Zero major versions must only be used for
+ * experimental, non-GA interfaces.
+ *
+ * Generated from protobuf field string version = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->version = $var;
+
+ return $this;
+ }
+
+ /**
+ * Source context for the protocol buffer service represented by this
+ * message.
+ *
+ * Generated from protobuf field .google.protobuf.SourceContext source_context = 5;
+ * @return \Google\Protobuf\SourceContext|null
+ */
+ public function getSourceContext()
+ {
+ return $this->source_context;
+ }
+
+ public function hasSourceContext()
+ {
+ return isset($this->source_context);
+ }
+
+ public function clearSourceContext()
+ {
+ unset($this->source_context);
+ }
+
+ /**
+ * Source context for the protocol buffer service represented by this
+ * message.
+ *
+ * Generated from protobuf field .google.protobuf.SourceContext source_context = 5;
+ * @param \Google\Protobuf\SourceContext $var
+ * @return $this
+ */
+ public function setSourceContext($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
+ $this->source_context = $var;
+
+ return $this;
+ }
+
+ /**
+ * Included interfaces. See [Mixin][].
+ *
+ * Generated from protobuf field repeated .google.protobuf.Mixin mixins = 6;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMixins()
+ {
+ return $this->mixins;
+ }
+
+ /**
+ * Included interfaces. See [Mixin][].
+ *
+ * Generated from protobuf field repeated .google.protobuf.Mixin mixins = 6;
+ * @param array<\Google\Protobuf\Mixin>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMixins($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Mixin::class);
+ $this->mixins = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The source syntax of the service.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 7;
+ * @return int
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * The source syntax of the service.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 7;
+ * @param int $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/BoolValue.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/BoolValue.php
new file mode 100644
index 0000000..ecdbf4d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/BoolValue.php
@@ -0,0 +1,68 @@
+google.protobuf.BoolValue
+ */
+class BoolValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The bool value.
+ *
+ * Generated from protobuf field bool value = 1;
+ */
+ protected $value = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $value
+ * The bool value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The bool value.
+ *
+ * Generated from protobuf field bool value = 1;
+ * @return bool
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The bool value.
+ *
+ * Generated from protobuf field bool value = 1;
+ * @param bool $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/BytesValue.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/BytesValue.php
new file mode 100644
index 0000000..1582e14
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/BytesValue.php
@@ -0,0 +1,68 @@
+google.protobuf.BytesValue
+ */
+class BytesValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The bytes value.
+ *
+ * Generated from protobuf field bytes value = 1;
+ */
+ protected $value = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $value
+ * The bytes value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The bytes value.
+ *
+ * Generated from protobuf field bytes value = 1;
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The bytes value.
+ *
+ * Generated from protobuf field bytes value = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Descriptor.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Descriptor.php
new file mode 100644
index 0000000..760d917
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Descriptor.php
@@ -0,0 +1,85 @@
+internal_desc = $internal_desc;
+ }
+
+ /**
+ * @return string Full protobuf message name
+ */
+ public function getFullName()
+ {
+ return trim($this->internal_desc->getFullName(), ".");
+ }
+
+ /**
+ * @return string PHP class name
+ */
+ public function getClass()
+ {
+ return $this->internal_desc->getClass();
+ }
+
+ /**
+ * @param int $index Must be >= 0 and < getFieldCount()
+ * @return FieldDescriptor
+ */
+ public function getField($index)
+ {
+ return $this->getPublicDescriptor($this->internal_desc->getFieldByIndex($index));
+ }
+
+ /**
+ * @return int Number of fields in message
+ */
+ public function getFieldCount()
+ {
+ return count($this->internal_desc->getField());
+ }
+
+ /**
+ * @param int $index Must be >= 0 and < getOneofDeclCount()
+ * @return OneofDescriptor
+ */
+ public function getOneofDecl($index)
+ {
+ return $this->getPublicDescriptor($this->internal_desc->getOneofDecl()[$index]);
+ }
+
+ /**
+ * @return int Number of oneofs in message
+ */
+ public function getOneofDeclCount()
+ {
+ return count($this->internal_desc->getOneofDecl());
+ }
+
+ /**
+ * @return int Number of real oneofs in message
+ */
+ public function getRealOneofDeclCount()
+ {
+ return $this->internal_desc->getRealOneofDeclCount();
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php
new file mode 100644
index 0000000..6fa447b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php
@@ -0,0 +1,53 @@
+internal_pool = $internal_pool;
+ }
+
+ /**
+ * @param string $className A fully qualified protobuf class name
+ * @return Descriptor
+ */
+ public function getDescriptorByClassName($className)
+ {
+ $desc = $this->internal_pool->getDescriptorByClassName($className);
+ return is_null($desc) ? null : $desc->getPublicDescriptor();
+ }
+
+ /**
+ * @param string $className A fully qualified protobuf class name
+ * @return EnumDescriptor
+ */
+ public function getEnumDescriptorByClassName($className)
+ {
+ $desc = $this->internal_pool->getEnumDescriptorByClassName($className);
+ return is_null($desc) ? null : $desc->getPublicDescriptor();
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php
new file mode 100644
index 0000000..b72399f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php
@@ -0,0 +1,68 @@
+google.protobuf.DoubleValue
+ */
+class DoubleValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The double value.
+ *
+ * Generated from protobuf field double value = 1;
+ */
+ protected $value = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $value
+ * The double value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The double value.
+ *
+ * Generated from protobuf field double value = 1;
+ * @return float
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The double value.
+ *
+ * Generated from protobuf field double value = 1;
+ * @param float $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Duration.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Duration.php
new file mode 100644
index 0000000..531cd50
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Duration.php
@@ -0,0 +1,173 @@
+ 0) {
+ * duration.seconds += 1;
+ * duration.nanos -= 1000000000;
+ * } else if (duration.seconds > 0 && duration.nanos < 0) {
+ * duration.seconds -= 1;
+ * duration.nanos += 1000000000;
+ * }
+ * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+ * Timestamp start = ...;
+ * Duration duration = ...;
+ * Timestamp end = ...;
+ * end.seconds = start.seconds + duration.seconds;
+ * end.nanos = start.nanos + duration.nanos;
+ * if (end.nanos < 0) {
+ * end.seconds -= 1;
+ * end.nanos += 1000000000;
+ * } else if (end.nanos >= 1000000000) {
+ * end.seconds += 1;
+ * end.nanos -= 1000000000;
+ * }
+ * Example 3: Compute Duration from datetime.timedelta in Python.
+ * td = datetime.timedelta(days=3, minutes=10)
+ * duration = Duration()
+ * duration.FromTimedelta(td)
+ * # JSON Mapping
+ * In JSON format, the Duration type is encoded as a string rather than an
+ * object, where the string ends in the suffix "s" (indicating seconds) and
+ * is preceded by the number of seconds, with nanoseconds expressed as
+ * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
+ * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
+ * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
+ * microsecond should be expressed in JSON format as "3.000001s".
+ *
+ * Generated from protobuf message google.protobuf.Duration
+ */
+class Duration extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Signed seconds of the span of time. Must be from -315,576,000,000
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+ *
+ * Generated from protobuf field int64 seconds = 1;
+ */
+ protected $seconds = 0;
+ /**
+ * Signed fractions of a second at nanosecond resolution of the span
+ * of time. Durations less than one second are represented with a 0
+ * `seconds` field and a positive or negative `nanos` field. For durations
+ * of one second or more, a non-zero value for the `nanos` field must be
+ * of the same sign as the `seconds` field. Must be from -999,999,999
+ * to +999,999,999 inclusive.
+ *
+ * Generated from protobuf field int32 nanos = 2;
+ */
+ protected $nanos = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $seconds
+ * Signed seconds of the span of time. Must be from -315,576,000,000
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+ * @type int $nanos
+ * Signed fractions of a second at nanosecond resolution of the span
+ * of time. Durations less than one second are represented with a 0
+ * `seconds` field and a positive or negative `nanos` field. For durations
+ * of one second or more, a non-zero value for the `nanos` field must be
+ * of the same sign as the `seconds` field. Must be from -999,999,999
+ * to +999,999,999 inclusive.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Duration::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Signed seconds of the span of time. Must be from -315,576,000,000
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+ *
+ * Generated from protobuf field int64 seconds = 1;
+ * @return int|string
+ */
+ public function getSeconds()
+ {
+ return $this->seconds;
+ }
+
+ /**
+ * Signed seconds of the span of time. Must be from -315,576,000,000
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+ *
+ * Generated from protobuf field int64 seconds = 1;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setSeconds($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->seconds = $var;
+
+ return $this;
+ }
+
+ /**
+ * Signed fractions of a second at nanosecond resolution of the span
+ * of time. Durations less than one second are represented with a 0
+ * `seconds` field and a positive or negative `nanos` field. For durations
+ * of one second or more, a non-zero value for the `nanos` field must be
+ * of the same sign as the `seconds` field. Must be from -999,999,999
+ * to +999,999,999 inclusive.
+ *
+ * Generated from protobuf field int32 nanos = 2;
+ * @return int
+ */
+ public function getNanos()
+ {
+ return $this->nanos;
+ }
+
+ /**
+ * Signed fractions of a second at nanosecond resolution of the span
+ * of time. Durations less than one second are represented with a 0
+ * `seconds` field and a positive or negative `nanos` field. For durations
+ * of one second or more, a non-zero value for the `nanos` field must be
+ * of the same sign as the `seconds` field. Must be from -999,999,999
+ * to +999,999,999 inclusive.
+ *
+ * Generated from protobuf field int32 nanos = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setNanos($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->nanos = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Enum.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Enum.php
new file mode 100644
index 0000000..185e54e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Enum.php
@@ -0,0 +1,213 @@
+google.protobuf.Enum
+ */
+class Enum extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Enum type name.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * Enum value definitions.
+ *
+ * Generated from protobuf field repeated .google.protobuf.EnumValue enumvalue = 2;
+ */
+ private $enumvalue;
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 3;
+ */
+ private $options;
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field .google.protobuf.SourceContext source_context = 4;
+ */
+ protected $source_context = null;
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 5;
+ */
+ protected $syntax = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Enum type name.
+ * @type array<\Google\Protobuf\EnumValue>|\Google\Protobuf\Internal\RepeatedField $enumvalue
+ * Enum value definitions.
+ * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
+ * Protocol buffer options.
+ * @type \Google\Protobuf\SourceContext $source_context
+ * The source context.
+ * @type int $syntax
+ * The source syntax.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Type::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Enum type name.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Enum type name.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Enum value definitions.
+ *
+ * Generated from protobuf field repeated .google.protobuf.EnumValue enumvalue = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnumvalue()
+ {
+ return $this->enumvalue;
+ }
+
+ /**
+ * Enum value definitions.
+ *
+ * Generated from protobuf field repeated .google.protobuf.EnumValue enumvalue = 2;
+ * @param array<\Google\Protobuf\EnumValue>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEnumvalue($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\EnumValue::class);
+ $this->enumvalue = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 3;
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
+ $this->options = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field .google.protobuf.SourceContext source_context = 4;
+ * @return \Google\Protobuf\SourceContext|null
+ */
+ public function getSourceContext()
+ {
+ return $this->source_context;
+ }
+
+ public function hasSourceContext()
+ {
+ return isset($this->source_context);
+ }
+
+ public function clearSourceContext()
+ {
+ unset($this->source_context);
+ }
+
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field .google.protobuf.SourceContext source_context = 4;
+ * @param \Google\Protobuf\SourceContext $var
+ * @return $this
+ */
+ public function setSourceContext($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
+ $this->source_context = $var;
+
+ return $this;
+ }
+
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 5;
+ * @return int
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 5;
+ * @param int $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php
new file mode 100644
index 0000000..39c145d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php
@@ -0,0 +1,56 @@
+internal_desc = $internal_desc;
+ }
+
+ /**
+ * @return string Full protobuf message name
+ */
+ public function getFullName()
+ {
+ return $this->internal_desc->getFullName();
+ }
+
+ /**
+ * @return string PHP class name
+ */
+ public function getClass()
+ {
+ return $this->internal_desc->getClass();
+ }
+
+ /**
+ * @param int $index Must be >= 0 and < getValueCount()
+ * @return EnumValueDescriptor
+ */
+ public function getValue($index)
+ {
+ return $this->internal_desc->getValueDescriptorByIndex($index);
+ }
+
+ /**
+ * @return int Number of values in enum
+ */
+ public function getValueCount()
+ {
+ return $this->internal_desc->getValueCount();
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
new file mode 100644
index 0000000..93c20f9
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
@@ -0,0 +1,135 @@
+google.protobuf.EnumValue
+ */
+class EnumValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Enum value name.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * Enum value number.
+ *
+ * Generated from protobuf field int32 number = 2;
+ */
+ protected $number = 0;
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 3;
+ */
+ private $options;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Enum value name.
+ * @type int $number
+ * Enum value number.
+ * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
+ * Protocol buffer options.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Type::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Enum value name.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Enum value name.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Enum value number.
+ *
+ * Generated from protobuf field int32 number = 2;
+ * @return int
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * Enum value number.
+ *
+ * Generated from protobuf field int32 number = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+
+ return $this;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 3;
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
+ $this->options = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php
new file mode 100644
index 0000000..a1ee10a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php
@@ -0,0 +1,41 @@
+name = $name;
+ $this->number = $number;
+ }
+
+ /**
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * @return int
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field.php
new file mode 100644
index 0000000..ddae570
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field.php
@@ -0,0 +1,381 @@
+google.protobuf.Field
+ */
+class Field extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The field type.
+ *
+ * Generated from protobuf field .google.protobuf.Field.Kind kind = 1;
+ */
+ protected $kind = 0;
+ /**
+ * The field cardinality.
+ *
+ * Generated from protobuf field .google.protobuf.Field.Cardinality cardinality = 2;
+ */
+ protected $cardinality = 0;
+ /**
+ * The field number.
+ *
+ * Generated from protobuf field int32 number = 3;
+ */
+ protected $number = 0;
+ /**
+ * The field name.
+ *
+ * Generated from protobuf field string name = 4;
+ */
+ protected $name = '';
+ /**
+ * The field type URL, without the scheme, for message or enumeration
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ *
+ * Generated from protobuf field string type_url = 6;
+ */
+ protected $type_url = '';
+ /**
+ * The index of the field type in `Type.oneofs`, for message or enumeration
+ * types. The first type has index 1; zero means the type is not in the list.
+ *
+ * Generated from protobuf field int32 oneof_index = 7;
+ */
+ protected $oneof_index = 0;
+ /**
+ * Whether to use alternative packed wire representation.
+ *
+ * Generated from protobuf field bool packed = 8;
+ */
+ protected $packed = false;
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 9;
+ */
+ private $options;
+ /**
+ * The field JSON name.
+ *
+ * Generated from protobuf field string json_name = 10;
+ */
+ protected $json_name = '';
+ /**
+ * The string value of the default value of this field. Proto2 syntax only.
+ *
+ * Generated from protobuf field string default_value = 11;
+ */
+ protected $default_value = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $kind
+ * The field type.
+ * @type int $cardinality
+ * The field cardinality.
+ * @type int $number
+ * The field number.
+ * @type string $name
+ * The field name.
+ * @type string $type_url
+ * The field type URL, without the scheme, for message or enumeration
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ * @type int $oneof_index
+ * The index of the field type in `Type.oneofs`, for message or enumeration
+ * types. The first type has index 1; zero means the type is not in the list.
+ * @type bool $packed
+ * Whether to use alternative packed wire representation.
+ * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
+ * The protocol buffer options.
+ * @type string $json_name
+ * The field JSON name.
+ * @type string $default_value
+ * The string value of the default value of this field. Proto2 syntax only.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Type::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The field type.
+ *
+ * Generated from protobuf field .google.protobuf.Field.Kind kind = 1;
+ * @return int
+ */
+ public function getKind()
+ {
+ return $this->kind;
+ }
+
+ /**
+ * The field type.
+ *
+ * Generated from protobuf field .google.protobuf.Field.Kind kind = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setKind($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Field\Kind::class);
+ $this->kind = $var;
+
+ return $this;
+ }
+
+ /**
+ * The field cardinality.
+ *
+ * Generated from protobuf field .google.protobuf.Field.Cardinality cardinality = 2;
+ * @return int
+ */
+ public function getCardinality()
+ {
+ return $this->cardinality;
+ }
+
+ /**
+ * The field cardinality.
+ *
+ * Generated from protobuf field .google.protobuf.Field.Cardinality cardinality = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setCardinality($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Field\Cardinality::class);
+ $this->cardinality = $var;
+
+ return $this;
+ }
+
+ /**
+ * The field number.
+ *
+ * Generated from protobuf field int32 number = 3;
+ * @return int
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * The field number.
+ *
+ * Generated from protobuf field int32 number = 3;
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+
+ return $this;
+ }
+
+ /**
+ * The field name.
+ *
+ * Generated from protobuf field string name = 4;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The field name.
+ *
+ * Generated from protobuf field string name = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The field type URL, without the scheme, for message or enumeration
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ *
+ * Generated from protobuf field string type_url = 6;
+ * @return string
+ */
+ public function getTypeUrl()
+ {
+ return $this->type_url;
+ }
+
+ /**
+ * The field type URL, without the scheme, for message or enumeration
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ *
+ * Generated from protobuf field string type_url = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setTypeUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * The index of the field type in `Type.oneofs`, for message or enumeration
+ * types. The first type has index 1; zero means the type is not in the list.
+ *
+ * Generated from protobuf field int32 oneof_index = 7;
+ * @return int
+ */
+ public function getOneofIndex()
+ {
+ return $this->oneof_index;
+ }
+
+ /**
+ * The index of the field type in `Type.oneofs`, for message or enumeration
+ * types. The first type has index 1; zero means the type is not in the list.
+ *
+ * Generated from protobuf field int32 oneof_index = 7;
+ * @param int $var
+ * @return $this
+ */
+ public function setOneofIndex($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->oneof_index = $var;
+
+ return $this;
+ }
+
+ /**
+ * Whether to use alternative packed wire representation.
+ *
+ * Generated from protobuf field bool packed = 8;
+ * @return bool
+ */
+ public function getPacked()
+ {
+ return $this->packed;
+ }
+
+ /**
+ * Whether to use alternative packed wire representation.
+ *
+ * Generated from protobuf field bool packed = 8;
+ * @param bool $var
+ * @return $this
+ */
+ public function setPacked($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->packed = $var;
+
+ return $this;
+ }
+
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 9;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 9;
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
+ $this->options = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The field JSON name.
+ *
+ * Generated from protobuf field string json_name = 10;
+ * @return string
+ */
+ public function getJsonName()
+ {
+ return $this->json_name;
+ }
+
+ /**
+ * The field JSON name.
+ *
+ * Generated from protobuf field string json_name = 10;
+ * @param string $var
+ * @return $this
+ */
+ public function setJsonName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->json_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The string value of the default value of this field. Proto2 syntax only.
+ *
+ * Generated from protobuf field string default_value = 11;
+ * @return string
+ */
+ public function getDefaultValue()
+ {
+ return $this->default_value;
+ }
+
+ /**
+ * The string value of the default value of this field. Proto2 syntax only.
+ *
+ * Generated from protobuf field string default_value = 11;
+ * @param string $var
+ * @return $this
+ */
+ public function setDefaultValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->default_value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php
new file mode 100644
index 0000000..a422199
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php
@@ -0,0 +1,71 @@
+google.protobuf.Field.Cardinality
+ */
+class Cardinality
+{
+ /**
+ * For fields with unknown cardinality.
+ *
+ * Generated from protobuf enum CARDINALITY_UNKNOWN = 0;
+ */
+ const CARDINALITY_UNKNOWN = 0;
+ /**
+ * For optional fields.
+ *
+ * Generated from protobuf enum CARDINALITY_OPTIONAL = 1;
+ */
+ const CARDINALITY_OPTIONAL = 1;
+ /**
+ * For required fields. Proto2 syntax only.
+ *
+ * Generated from protobuf enum CARDINALITY_REQUIRED = 2;
+ */
+ const CARDINALITY_REQUIRED = 2;
+ /**
+ * For repeated fields.
+ *
+ * Generated from protobuf enum CARDINALITY_REPEATED = 3;
+ */
+ const CARDINALITY_REPEATED = 3;
+
+ private static $valueToName = [
+ self::CARDINALITY_UNKNOWN => 'CARDINALITY_UNKNOWN',
+ self::CARDINALITY_OPTIONAL => 'CARDINALITY_OPTIONAL',
+ self::CARDINALITY_REQUIRED => 'CARDINALITY_REQUIRED',
+ self::CARDINALITY_REPEATED => 'CARDINALITY_REPEATED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Cardinality::class, \Google\Protobuf\Field_Cardinality::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php
new file mode 100644
index 0000000..2d8dd77
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php
@@ -0,0 +1,176 @@
+google.protobuf.Field.Kind
+ */
+class Kind
+{
+ /**
+ * Field type unknown.
+ *
+ * Generated from protobuf enum TYPE_UNKNOWN = 0;
+ */
+ const TYPE_UNKNOWN = 0;
+ /**
+ * Field type double.
+ *
+ * Generated from protobuf enum TYPE_DOUBLE = 1;
+ */
+ const TYPE_DOUBLE = 1;
+ /**
+ * Field type float.
+ *
+ * Generated from protobuf enum TYPE_FLOAT = 2;
+ */
+ const TYPE_FLOAT = 2;
+ /**
+ * Field type int64.
+ *
+ * Generated from protobuf enum TYPE_INT64 = 3;
+ */
+ const TYPE_INT64 = 3;
+ /**
+ * Field type uint64.
+ *
+ * Generated from protobuf enum TYPE_UINT64 = 4;
+ */
+ const TYPE_UINT64 = 4;
+ /**
+ * Field type int32.
+ *
+ * Generated from protobuf enum TYPE_INT32 = 5;
+ */
+ const TYPE_INT32 = 5;
+ /**
+ * Field type fixed64.
+ *
+ * Generated from protobuf enum TYPE_FIXED64 = 6;
+ */
+ const TYPE_FIXED64 = 6;
+ /**
+ * Field type fixed32.
+ *
+ * Generated from protobuf enum TYPE_FIXED32 = 7;
+ */
+ const TYPE_FIXED32 = 7;
+ /**
+ * Field type bool.
+ *
+ * Generated from protobuf enum TYPE_BOOL = 8;
+ */
+ const TYPE_BOOL = 8;
+ /**
+ * Field type string.
+ *
+ * Generated from protobuf enum TYPE_STRING = 9;
+ */
+ const TYPE_STRING = 9;
+ /**
+ * Field type group. Proto2 syntax only, and deprecated.
+ *
+ * Generated from protobuf enum TYPE_GROUP = 10;
+ */
+ const TYPE_GROUP = 10;
+ /**
+ * Field type message.
+ *
+ * Generated from protobuf enum TYPE_MESSAGE = 11;
+ */
+ const TYPE_MESSAGE = 11;
+ /**
+ * Field type bytes.
+ *
+ * Generated from protobuf enum TYPE_BYTES = 12;
+ */
+ const TYPE_BYTES = 12;
+ /**
+ * Field type uint32.
+ *
+ * Generated from protobuf enum TYPE_UINT32 = 13;
+ */
+ const TYPE_UINT32 = 13;
+ /**
+ * Field type enum.
+ *
+ * Generated from protobuf enum TYPE_ENUM = 14;
+ */
+ const TYPE_ENUM = 14;
+ /**
+ * Field type sfixed32.
+ *
+ * Generated from protobuf enum TYPE_SFIXED32 = 15;
+ */
+ const TYPE_SFIXED32 = 15;
+ /**
+ * Field type sfixed64.
+ *
+ * Generated from protobuf enum TYPE_SFIXED64 = 16;
+ */
+ const TYPE_SFIXED64 = 16;
+ /**
+ * Field type sint32.
+ *
+ * Generated from protobuf enum TYPE_SINT32 = 17;
+ */
+ const TYPE_SINT32 = 17;
+ /**
+ * Field type sint64.
+ *
+ * Generated from protobuf enum TYPE_SINT64 = 18;
+ */
+ const TYPE_SINT64 = 18;
+
+ private static $valueToName = [
+ self::TYPE_UNKNOWN => 'TYPE_UNKNOWN',
+ self::TYPE_DOUBLE => 'TYPE_DOUBLE',
+ self::TYPE_FLOAT => 'TYPE_FLOAT',
+ self::TYPE_INT64 => 'TYPE_INT64',
+ self::TYPE_UINT64 => 'TYPE_UINT64',
+ self::TYPE_INT32 => 'TYPE_INT32',
+ self::TYPE_FIXED64 => 'TYPE_FIXED64',
+ self::TYPE_FIXED32 => 'TYPE_FIXED32',
+ self::TYPE_BOOL => 'TYPE_BOOL',
+ self::TYPE_STRING => 'TYPE_STRING',
+ self::TYPE_GROUP => 'TYPE_GROUP',
+ self::TYPE_MESSAGE => 'TYPE_MESSAGE',
+ self::TYPE_BYTES => 'TYPE_BYTES',
+ self::TYPE_UINT32 => 'TYPE_UINT32',
+ self::TYPE_ENUM => 'TYPE_ENUM',
+ self::TYPE_SFIXED32 => 'TYPE_SFIXED32',
+ self::TYPE_SFIXED64 => 'TYPE_SFIXED64',
+ self::TYPE_SINT32 => 'TYPE_SINT32',
+ self::TYPE_SINT64 => 'TYPE_SINT64',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Kind::class, \Google\Protobuf\Field_Kind::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php
new file mode 100644
index 0000000..04bef89
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php
@@ -0,0 +1,121 @@
+internal_desc = $internal_desc;
+ }
+
+ /**
+ * @return string Field name
+ */
+ public function getName()
+ {
+ return $this->internal_desc->getName();
+ }
+
+ /**
+ * @return int Protobuf field number
+ */
+ public function getNumber()
+ {
+ return $this->internal_desc->getNumber();
+ }
+
+ /**
+ * @return int
+ */
+ public function getLabel()
+ {
+ return $this->internal_desc->getLabel();
+ }
+
+ /**
+ * @return int
+ */
+ public function getType()
+ {
+ return $this->internal_desc->getType();
+ }
+
+ /**
+ * @return OneofDescriptor
+ */
+ public function getContainingOneof()
+ {
+ return $this->getPublicDescriptor($this->internal_desc->getContainingOneof());
+ }
+
+ /**
+ * Gets the field's containing oneof, only if non-synthetic.
+ *
+ * @return null|OneofDescriptor
+ */
+ public function getRealContainingOneof()
+ {
+ return $this->getPublicDescriptor($this->internal_desc->getRealContainingOneof());
+ }
+
+ /**
+ * @return boolean
+ */
+ public function hasOptionalKeyword()
+ {
+ return $this->internal_desc->hasOptionalKeyword();
+ }
+
+ /**
+ * @return Descriptor Returns a descriptor for the field type if the field type is a message, otherwise throws \Exception
+ * @throws \Exception
+ */
+ public function getMessageType()
+ {
+ if ($this->getType() == GPBType::MESSAGE) {
+ return $this->getPublicDescriptor($this->internal_desc->getMessageType());
+ } else {
+ throw new \Exception("Cannot get message type for non-message field '" . $this->getName() . "'");
+ }
+ }
+
+ /**
+ * @return EnumDescriptor Returns an enum descriptor if the field type is an enum, otherwise throws \Exception
+ * @throws \Exception
+ */
+ public function getEnumType()
+ {
+ if ($this->getType() == GPBType::ENUM) {
+ return $this->getPublicDescriptor($this->internal_desc->getEnumType());
+ } else {
+ throw new \Exception("Cannot get enum type for non-enum field '" . $this->getName() . "'");
+ }
+ }
+
+ /**
+ * @return boolean
+ */
+ public function isMap()
+ {
+ return $this->internal_desc->isMap();
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/FieldMask.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/FieldMask.php
new file mode 100644
index 0000000..a8e5243
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/FieldMask.php
@@ -0,0 +1,217 @@
+google.protobuf.FieldMask
+ */
+class FieldMask extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of field mask paths.
+ *
+ * Generated from protobuf field repeated string paths = 1;
+ */
+ private $paths;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\RepeatedField $paths
+ * The set of field mask paths.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\FieldMask::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of field mask paths.
+ *
+ * Generated from protobuf field repeated string paths = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPaths()
+ {
+ return $this->paths;
+ }
+
+ /**
+ * The set of field mask paths.
+ *
+ * Generated from protobuf field repeated string paths = 1;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPaths($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->paths = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php
new file mode 100644
index 0000000..dff8f89
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php
@@ -0,0 +1,16 @@
+google.protobuf.FloatValue
+ */
+class FloatValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The float value.
+ *
+ * Generated from protobuf field float value = 1;
+ */
+ protected $value = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $value
+ * The float value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The float value.
+ *
+ * Generated from protobuf field float value = 1;
+ * @return float
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The float value.
+ *
+ * Generated from protobuf field float value = 1;
+ * @param float $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php
new file mode 100644
index 0000000..4db6923
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php
@@ -0,0 +1,38 @@
+google.protobuf.Empty
+ */
+class GPBEmpty extends \Google\Protobuf\Internal\Message
+{
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce();
+ parent::__construct($data);
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Int32Value.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Int32Value.php
new file mode 100644
index 0000000..cfd73cd
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Int32Value.php
@@ -0,0 +1,68 @@
+google.protobuf.Int32Value
+ */
+class Int32Value extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The int32 value.
+ *
+ * Generated from protobuf field int32 value = 1;
+ */
+ protected $value = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $value
+ * The int32 value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The int32 value.
+ *
+ * Generated from protobuf field int32 value = 1;
+ * @return int
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The int32 value.
+ *
+ * Generated from protobuf field int32 value = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Int64Value.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Int64Value.php
new file mode 100644
index 0000000..143474f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Int64Value.php
@@ -0,0 +1,68 @@
+google.protobuf.Int64Value
+ */
+class Int64Value extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The int64 value.
+ *
+ * Generated from protobuf field int64 value = 1;
+ */
+ protected $value = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $value
+ * The int64 value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The int64 value.
+ *
+ * Generated from protobuf field int64 value = 1;
+ * @return int|string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The int64 value.
+ *
+ * Generated from protobuf field int64 value = 1;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/AnyBase.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/AnyBase.php
new file mode 100644
index 0000000..5e9ab57
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/AnyBase.php
@@ -0,0 +1,86 @@
+type_url, 0, $url_prifix_len) !=
+ GPBUtil::TYPE_URL_PREFIX) {
+ throw new \Exception(
+ "Type url needs to be type.googleapis.com/fully-qulified");
+ }
+ $fully_qualifed_name =
+ substr($this->type_url, $url_prifix_len);
+
+ // Create message according to fully qualified name.
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+ $desc = $pool->getDescriptorByProtoName($fully_qualifed_name);
+ if (is_null($desc)) {
+ throw new \Exception("Class ".$fully_qualifed_name
+ ." hasn't been added to descriptor pool");
+ }
+ $klass = $desc->getClass();
+ $msg = new $klass();
+
+ // Merge data into message.
+ $msg->mergeFromString($this->value);
+ return $msg;
+ }
+
+ /**
+ * The type_url will be created according to the given messageโs type and
+ * the value is encoded data from the given message..
+ * @param Message $msg A proto message.
+ */
+ public function pack($msg)
+ {
+ if (!$msg instanceof Message) {
+ trigger_error("Given parameter is not a message instance.",
+ E_USER_ERROR);
+ return;
+ }
+
+ // Set value using serialized message.
+ $this->value = $msg->serializeToString();
+
+ // Set type url.
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+ $desc = $pool->getDescriptorByClassName(get_class($msg));
+ $fully_qualifed_name = $desc->getFullName();
+ $this->type_url = GPBUtil::TYPE_URL_PREFIX . $fully_qualifed_name;
+ }
+
+ /**
+ * This method returns whether the type_url in any_message is corresponded
+ * to the given class.
+ * @param string $klass The fully qualified PHP class name of a proto message type.
+ */
+ public function is($klass)
+ {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+ $desc = $pool->getDescriptorByClassName($klass);
+ $fully_qualifed_name = $desc->getFullName();
+ $type_url = GPBUtil::TYPE_URL_PREFIX . $fully_qualifed_name;
+ return $this->type_url === $type_url;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php
new file mode 100644
index 0000000..cfb3c4d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php
@@ -0,0 +1,358 @@
+buffer = $buffer;
+ $this->buffer_size_after_limit = 0;
+ $this->buffer_end = $end;
+ $this->current = $start;
+ $this->current_limit = $end;
+ $this->legitimate_message_end = false;
+ $this->recursion_budget = self::DEFAULT_RECURSION_LIMIT;
+ $this->recursion_limit = self::DEFAULT_RECURSION_LIMIT;
+ $this->total_bytes_limit = self::DEFAULT_TOTAL_BYTES_LIMIT;
+ $this->total_bytes_read = $end - $start;
+ }
+
+ private function advance($amount)
+ {
+ $this->current += $amount;
+ }
+
+ public function bufferSize()
+ {
+ return $this->buffer_end - $this->current;
+ }
+
+ public function current()
+ {
+ return $this->total_bytes_read -
+ ($this->buffer_end - $this->current +
+ $this->buffer_size_after_limit);
+ }
+
+ public function substr($start, $end)
+ {
+ return substr($this->buffer, $start, $end - $start);
+ }
+
+ private function recomputeBufferLimits()
+ {
+ $this->buffer_end += $this->buffer_size_after_limit;
+ $closest_limit = min($this->current_limit, $this->total_bytes_limit);
+ if ($closest_limit < $this->total_bytes_read) {
+ // The limit position is in the current buffer. We must adjust the
+ // buffer size accordingly.
+ $this->buffer_size_after_limit = $this->total_bytes_read -
+ $closest_limit;
+ $this->buffer_end -= $this->buffer_size_after_limit;
+ } else {
+ $this->buffer_size_after_limit = 0;
+ }
+ }
+
+ private function consumedEntireMessage()
+ {
+ return $this->legitimate_message_end;
+ }
+
+ /**
+ * Read uint32 into $var. Advance buffer with consumed bytes. If the
+ * contained varint is larger than 32 bits, discard the high order bits.
+ * @param $var
+ */
+ public function readVarint32(&$var)
+ {
+ if (!$this->readVarint64($var)) {
+ return false;
+ }
+
+ if (PHP_INT_SIZE == 4) {
+ $var = bcmod($var, 4294967296);
+ } else {
+ $var &= 0xFFFFFFFF;
+ }
+
+ // Convert large uint32 to int32.
+ if ($var > 0x7FFFFFFF) {
+ if (PHP_INT_SIZE === 8) {
+ $var = $var | (0xFFFFFFFF << 32);
+ } else {
+ $var = bcsub($var, 4294967296);
+ }
+ }
+
+ $var = intval($var);
+ return true;
+ }
+
+ /**
+ * Read Uint64 into $var. Advance buffer with consumed bytes.
+ * @param $var
+ */
+ public function readVarint64(&$var)
+ {
+ $count = 0;
+
+ if (PHP_INT_SIZE == 4) {
+ $high = 0;
+ $low = 0;
+ $b = 0;
+
+ do {
+ if ($this->current === $this->buffer_end) {
+ return false;
+ }
+ if ($count === self::MAX_VARINT_BYTES) {
+ return false;
+ }
+ $b = ord($this->buffer[$this->current]);
+ $bits = 7 * $count;
+ if ($bits >= 32) {
+ $high |= (($b & 0x7F) << ($bits - 32));
+ } else if ($bits > 25){
+ // $bits is 28 in this case.
+ $low |= (($b & 0x7F) << 28);
+ $high = ($b & 0x7F) >> 4;
+ } else {
+ $low |= (($b & 0x7F) << $bits);
+ }
+
+ $this->advance(1);
+ $count += 1;
+ } while ($b & 0x80);
+
+ $var = GPBUtil::combineInt32ToInt64($high, $low);
+ if (bccomp($var, 0) < 0) {
+ $var = bcadd($var, "18446744073709551616");
+ }
+ } else {
+ $result = 0;
+ $shift = 0;
+
+ do {
+ if ($this->current === $this->buffer_end) {
+ return false;
+ }
+ if ($count === self::MAX_VARINT_BYTES) {
+ return false;
+ }
+
+ $byte = ord($this->buffer[$this->current]);
+ $result |= ($byte & 0x7f) << $shift;
+ $shift += 7;
+ $this->advance(1);
+ $count += 1;
+ } while ($byte > 0x7f);
+
+ $var = $result;
+ }
+
+ return true;
+ }
+
+ /**
+ * Read int into $var. If the result is larger than the largest integer, $var
+ * will be -1. Advance buffer with consumed bytes.
+ * @param $var
+ */
+ public function readVarintSizeAsInt(&$var)
+ {
+ if (!$this->readVarint64($var)) {
+ return false;
+ }
+ $var = (int)$var;
+ return true;
+ }
+
+ /**
+ * Read 32-bit unsigned integer to $var. If the buffer has less than 4 bytes,
+ * return false. Advance buffer with consumed bytes.
+ * @param $var
+ */
+ public function readLittleEndian32(&$var)
+ {
+ $data = null;
+ if (!$this->readRaw(4, $data)) {
+ return false;
+ }
+ $var = unpack('V', $data);
+ $var = $var[1];
+ return true;
+ }
+
+ /**
+ * Read 64-bit unsigned integer to $var. If the buffer has less than 8 bytes,
+ * return false. Advance buffer with consumed bytes.
+ * @param $var
+ */
+ public function readLittleEndian64(&$var)
+ {
+ $data = null;
+ if (!$this->readRaw(4, $data)) {
+ return false;
+ }
+ $low = unpack('V', $data)[1];
+ if (!$this->readRaw(4, $data)) {
+ return false;
+ }
+ $high = unpack('V', $data)[1];
+ if (PHP_INT_SIZE == 4) {
+ $var = GPBUtil::combineInt32ToInt64($high, $low);
+ } else {
+ $var = ($high << 32) | $low;
+ }
+ return true;
+ }
+
+ /**
+ * Read tag into $var. Advance buffer with consumed bytes.
+ */
+ public function readTag()
+ {
+ if ($this->current === $this->buffer_end) {
+ // Make sure that it failed due to EOF, not because we hit
+ // total_bytes_limit, which, unlike normal limits, is not a valid
+ // place to end a message.
+ $current_position = $this->total_bytes_read -
+ $this->buffer_size_after_limit;
+ if ($current_position >= $this->total_bytes_limit) {
+ // Hit total_bytes_limit_. But if we also hit the normal limit,
+ // we're still OK.
+ $this->legitimate_message_end =
+ ($this->current_limit === $this->total_bytes_limit);
+ } else {
+ $this->legitimate_message_end = true;
+ }
+ return 0;
+ }
+
+ $result = 0;
+ // The largest tag is 2^29 - 1, which can be represented by int32.
+ $success = $this->readVarint32($result);
+ if ($success) {
+ return $result;
+ } else {
+ return 0;
+ }
+ }
+
+ public function readRaw($size, &$buffer)
+ {
+ $current_buffer_size = 0;
+ if ($this->bufferSize() < $size) {
+ return false;
+ }
+
+ if ($size === 0) {
+ $buffer = "";
+ } else {
+ $buffer = substr($this->buffer, $this->current, $size);
+ $this->advance($size);
+ }
+
+ return true;
+ }
+
+ /* Places a limit on the number of bytes that the stream may read, starting
+ * from the current position. Once the stream hits this limit, it will act
+ * like the end of the input has been reached until popLimit() is called.
+ *
+ * As the names imply, the stream conceptually has a stack of limits. The
+ * shortest limit on the stack is always enforced, even if it is not the top
+ * limit.
+ *
+ * The value returned by pushLimit() is opaque to the caller, and must be
+ * passed unchanged to the corresponding call to popLimit().
+ *
+ * @param integer $byte_limit
+ * @throws \Exception Fail to push limit.
+ */
+ public function pushLimit($byte_limit)
+ {
+ // Current position relative to the beginning of the stream.
+ $current_position = $this->current();
+ $old_limit = $this->current_limit;
+
+ // security: byte_limit is possibly evil, so check for negative values
+ // and overflow.
+ if ($byte_limit >= 0 &&
+ $byte_limit <= PHP_INT_MAX - $current_position &&
+ $byte_limit <= $this->current_limit - $current_position) {
+ $this->current_limit = $current_position + $byte_limit;
+ $this->recomputeBufferLimits();
+ } else {
+ throw new GPBDecodeException("Fail to push limit.");
+ }
+
+ return $old_limit;
+ }
+
+ /* The limit passed in is actually the *old* limit, which we returned from
+ * PushLimit().
+ *
+ * @param integer $byte_limit
+ */
+ public function popLimit($byte_limit)
+ {
+ $this->current_limit = $byte_limit;
+ $this->recomputeBufferLimits();
+ // We may no longer be at a legitimate message end. ReadTag() needs to
+ // be called again to find out.
+ $this->legitimate_message_end = false;
+ }
+
+ public function incrementRecursionDepthAndPushLimit(
+ $byte_limit, &$old_limit, &$recursion_budget)
+ {
+ $old_limit = $this->pushLimit($byte_limit);
+ $recursion_limit = --$this->recursion_limit;
+ }
+
+ public function decrementRecursionDepthAndPopLimit($byte_limit)
+ {
+ $result = $this->consumedEntireMessage();
+ $this->popLimit($byte_limit);
+ ++$this->recursion_budget;
+ return $result;
+ }
+
+ public function bytesUntilLimit()
+ {
+ if ($this->current_limit === PHP_INT_MAX) {
+ return -1;
+ }
+ return $this->current_limit - $this->current;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php
new file mode 100644
index 0000000..6bdb6d9
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php
@@ -0,0 +1,136 @@
+current = 0;
+ $this->buffer_size = $size;
+ $this->buffer = str_repeat(chr(0), $this->buffer_size);
+ }
+
+ public function getData()
+ {
+ return $this->buffer;
+ }
+
+ public function writeVarint32($value, $trim)
+ {
+ $bytes = str_repeat(chr(0), self::MAX_VARINT64_BYTES);
+ $size = self::writeVarintToArray($value, $bytes, $trim);
+ return $this->writeRaw($bytes, $size);
+ }
+
+ public function writeVarint64($value)
+ {
+ $bytes = str_repeat(chr(0), self::MAX_VARINT64_BYTES);
+ $size = self::writeVarintToArray($value, $bytes);
+ return $this->writeRaw($bytes, $size);
+ }
+
+ public function writeLittleEndian32($value)
+ {
+ $bytes = str_repeat(chr(0), 4);
+ $size = self::writeLittleEndian32ToArray($value, $bytes);
+ return $this->writeRaw($bytes, $size);
+ }
+
+ public function writeLittleEndian64($value)
+ {
+ $bytes = str_repeat(chr(0), 8);
+ $size = self::writeLittleEndian64ToArray($value, $bytes);
+ return $this->writeRaw($bytes, $size);
+ }
+
+ public function writeTag($tag)
+ {
+ return $this->writeVarint32($tag, true);
+ }
+
+ public function writeRaw($data, $size)
+ {
+ if ($this->buffer_size < $size) {
+ trigger_error("Output stream doesn't have enough buffer.");
+ return false;
+ }
+
+ for ($i = 0; $i < $size; $i++) {
+ $this->buffer[$this->current] = $data[$i];
+ $this->current++;
+ $this->buffer_size--;
+ }
+ return true;
+ }
+
+ public static function writeVarintToArray($value, &$buffer, $trim = false)
+ {
+ $current = 0;
+
+ $high = 0;
+ $low = 0;
+ if (PHP_INT_SIZE == 4) {
+ GPBUtil::divideInt64ToInt32($value, $high, $low, $trim);
+ } else {
+ $low = $value;
+ }
+
+ while (($low >= 0x80 || $low < 0) || $high != 0) {
+ $buffer[$current] = chr($low | 0x80);
+ $value = ($value >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7));
+ $carry = ($high & 0x7F) << ((PHP_INT_SIZE << 3) - 7);
+ $high = ($high >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7));
+ $low = (($low >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7)) | $carry);
+ $current++;
+ }
+ $buffer[$current] = chr($low);
+ return $current + 1;
+ }
+
+ private static function writeLittleEndian32ToArray($value, &$buffer)
+ {
+ $buffer[0] = chr($value & 0x000000FF);
+ $buffer[1] = chr(($value >> 8) & 0x000000FF);
+ $buffer[2] = chr(($value >> 16) & 0x000000FF);
+ $buffer[3] = chr(($value >> 24) & 0x000000FF);
+ return 4;
+ }
+
+ private static function writeLittleEndian64ToArray($value, &$buffer)
+ {
+ $high = 0;
+ $low = 0;
+ if (PHP_INT_SIZE == 4) {
+ GPBUtil::divideInt64ToInt32($value, $high, $low);
+ } else {
+ $low = $value & 0xFFFFFFFF;
+ $high = ($value >> 32) & 0xFFFFFFFF;
+ }
+
+ $buffer[0] = chr($low & 0x000000FF);
+ $buffer[1] = chr(($low >> 8) & 0x000000FF);
+ $buffer[2] = chr(($low >> 16) & 0x000000FF);
+ $buffer[3] = chr(($low >> 24) & 0x000000FF);
+ $buffer[4] = chr($high & 0x000000FF);
+ $buffer[5] = chr(($high >> 8) & 0x000000FF);
+ $buffer[6] = chr(($high >> 16) & 0x000000FF);
+ $buffer[7] = chr(($high >> 24) & 0x000000FF);
+ return 8;
+ }
+
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php
new file mode 100644
index 0000000..7eef196
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php
@@ -0,0 +1,213 @@
+public_desc = new \Google\Protobuf\Descriptor($this);
+ }
+
+ public function addOneofDecl($oneof)
+ {
+ $this->oneof_decl[] = $oneof;
+ }
+
+ public function getOneofDecl()
+ {
+ return $this->oneof_decl;
+ }
+
+ public function setFullName($full_name)
+ {
+ $this->full_name = $full_name;
+ }
+
+ public function getFullName()
+ {
+ return $this->full_name;
+ }
+
+ public function addField($field)
+ {
+ $this->field[$field->getNumber()] = $field;
+ $this->json_to_field[$field->getJsonName()] = $field;
+ $this->name_to_field[$field->getName()] = $field;
+ $this->index_to_field[] = $field;
+ }
+
+ public function getField()
+ {
+ return $this->field;
+ }
+
+ public function addNestedType($desc)
+ {
+ $this->nested_type[] = $desc;
+ }
+
+ public function getNestedType()
+ {
+ return $this->nested_type;
+ }
+
+ public function addEnumType($desc)
+ {
+ $this->enum_type[] = $desc;
+ }
+
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ public function getFieldByNumber($number)
+ {
+ if (!isset($this->field[$number])) {
+ return NULL;
+ } else {
+ return $this->field[$number];
+ }
+ }
+
+ public function getFieldByJsonName($json_name)
+ {
+ if (!isset($this->json_to_field[$json_name])) {
+ return NULL;
+ } else {
+ return $this->json_to_field[$json_name];
+ }
+ }
+
+ public function getFieldByName($name)
+ {
+ if (!isset($this->name_to_field[$name])) {
+ return NULL;
+ } else {
+ return $this->name_to_field[$name];
+ }
+ }
+
+ public function getFieldByIndex($index)
+ {
+ if (count($this->index_to_field) <= $index) {
+ return NULL;
+ } else {
+ return $this->index_to_field[$index];
+ }
+ }
+
+ public function setClass($klass)
+ {
+ $this->klass = $klass;
+ }
+
+ public function getClass()
+ {
+ return $this->klass;
+ }
+
+ public function setLegacyClass($klass)
+ {
+ $this->legacy_klass = $klass;
+ }
+
+ public function getLegacyClass()
+ {
+ return $this->legacy_klass;
+ }
+
+ public function setPreviouslyUnreservedClass($klass)
+ {
+ $this->previous_klass = $klass;
+ }
+
+ public function getPreviouslyUnreservedClass()
+ {
+ return $this->previous_klass;
+ }
+
+ public function setOptions($options)
+ {
+ $this->options = $options;
+ }
+
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public static function buildFromProto($proto, $file_proto, $containing)
+ {
+ $desc = new Descriptor();
+
+ $message_name_without_package = "";
+ $classname = "";
+ $legacy_classname = "";
+ $previous_classname = "";
+ $fullname = "";
+ GPBUtil::getFullClassName(
+ $proto,
+ $containing,
+ $file_proto,
+ $message_name_without_package,
+ $classname,
+ $legacy_classname,
+ $fullname,
+ $previous_classname);
+ $desc->setFullName($fullname);
+ $desc->setClass($classname);
+ $desc->setLegacyClass($legacy_classname);
+ $desc->setPreviouslyUnreservedClass($previous_classname);
+ $desc->setOptions($proto->getOptions());
+
+ foreach ($proto->getField() as $field_proto) {
+ $desc->addField(FieldDescriptor::buildFromProto($field_proto));
+ }
+
+ // Handle nested types.
+ foreach ($proto->getNestedType() as $nested_proto) {
+ $desc->addNestedType(Descriptor::buildFromProto(
+ $nested_proto, $file_proto, $message_name_without_package));
+ }
+
+ // Handle nested enum.
+ foreach ($proto->getEnumType() as $enum_proto) {
+ $desc->addEnumType(EnumDescriptor::buildFromProto(
+ $enum_proto, $file_proto, $message_name_without_package));
+ }
+
+ // Handle oneof fields.
+ $index = 0;
+ foreach ($proto->getOneofDecl() as $oneof_proto) {
+ $desc->addOneofDecl(
+ OneofDescriptor::buildFromProto($oneof_proto, $desc, $index));
+ $index++;
+ }
+
+ return $desc;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php
new file mode 100644
index 0000000..621e2e6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php
@@ -0,0 +1,171 @@
+mergeFromString($data);
+
+ foreach($files->getFile() as $file_proto) {
+ $file = FileDescriptor::buildFromProto($file_proto);
+
+ foreach ($file->getMessageType() as $desc) {
+ $this->addDescriptor($desc);
+ }
+ unset($desc);
+
+ foreach ($file->getEnumType() as $desc) {
+ $this->addEnumDescriptor($desc);
+ }
+ unset($desc);
+
+ foreach ($file->getMessageType() as $desc) {
+ $this->crossLink($desc);
+ }
+ unset($desc);
+ }
+ }
+
+ public function addMessage($name, $klass)
+ {
+ return new MessageBuilderContext($name, $klass, $this);
+ }
+
+ public function addEnum($name, $klass)
+ {
+ return new EnumBuilderContext($name, $klass, $this);
+ }
+
+ public function addDescriptor($descriptor)
+ {
+ $this->proto_to_class[$descriptor->getFullName()] =
+ $descriptor->getClass();
+ $this->class_to_desc[$descriptor->getClass()] = $descriptor;
+ $this->class_to_desc[$descriptor->getLegacyClass()] = $descriptor;
+ $this->class_to_desc[$descriptor->getPreviouslyUnreservedClass()] = $descriptor;
+ foreach ($descriptor->getNestedType() as $nested_type) {
+ $this->addDescriptor($nested_type);
+ }
+ foreach ($descriptor->getEnumType() as $enum_type) {
+ $this->addEnumDescriptor($enum_type);
+ }
+ }
+
+ public function addEnumDescriptor($descriptor)
+ {
+ $this->proto_to_class[$descriptor->getFullName()] =
+ $descriptor->getClass();
+ $this->class_to_enum_desc[$descriptor->getClass()] = $descriptor;
+ $this->class_to_enum_desc[$descriptor->getLegacyClass()] = $descriptor;
+ }
+
+ public function getDescriptorByClassName($klass)
+ {
+ if (isset($this->class_to_desc[$klass])) {
+ return $this->class_to_desc[$klass];
+ } else {
+ return null;
+ }
+ }
+
+ public function getEnumDescriptorByClassName($klass)
+ {
+ if (isset($this->class_to_enum_desc[$klass])) {
+ return $this->class_to_enum_desc[$klass];
+ } else {
+ return null;
+ }
+ }
+
+ public function getDescriptorByProtoName($proto)
+ {
+ if (isset($this->proto_to_class[$proto])) {
+ $klass = $this->proto_to_class[$proto];
+ return $this->class_to_desc[$klass];
+ } else {
+ return null;
+ }
+ }
+
+ public function getEnumDescriptorByProtoName($proto)
+ {
+ $klass = $this->proto_to_class[$proto];
+ return $this->class_to_enum_desc[$klass];
+ }
+
+ private function crossLink(Descriptor $desc)
+ {
+ foreach ($desc->getField() as $field) {
+ switch ($field->getType()) {
+ case GPBType::MESSAGE:
+ $proto = $field->getMessageType();
+ if ($proto[0] == '.') {
+ $proto = substr($proto, 1);
+ }
+ $subdesc = $this->getDescriptorByProtoName($proto);
+ if (is_null($subdesc)) {
+ trigger_error(
+ 'proto not added: ' . $proto
+ . " for " . $desc->getFullName(), E_USER_ERROR);
+ }
+ $field->setMessageType($subdesc);
+ break;
+ case GPBType::ENUM:
+ $proto = $field->getEnumType();
+ if ($proto[0] == '.') {
+ $proto = substr($proto, 1);
+ }
+ $field->setEnumType(
+ $this->getEnumDescriptorByProtoName($proto));
+ break;
+ default:
+ break;
+ }
+ }
+ unset($field);
+
+ foreach ($desc->getNestedType() as $nested_type) {
+ $this->crossLink($nested_type);
+ }
+ unset($nested_type);
+ }
+
+ public function finish()
+ {
+ foreach ($this->class_to_desc as $klass => $desc) {
+ $this->crossLink($desc);
+ }
+ unset($desc);
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php
new file mode 100644
index 0000000..2937c5a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php
@@ -0,0 +1,336 @@
+google.protobuf.DescriptorProto
+ */
+class DescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field optional string name = 1;
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto field = 2;
+ */
+ private $field;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 6;
+ */
+ private $extension;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto nested_type = 3;
+ */
+ private $nested_type;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
+ */
+ private $enum_type;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
+ */
+ private $extension_range;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
+ */
+ private $oneof_decl;
+ /**
+ * Generated from protobuf field optional .google.protobuf.MessageOptions options = 7;
+ */
+ protected $options = null;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
+ */
+ private $reserved_range;
+ /**
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ *
+ * Generated from protobuf field repeated string reserved_name = 10;
+ */
+ private $reserved_name;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $field
+ * @type array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $extension
+ * @type array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $nested_type
+ * @type array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $enum_type
+ * @type array<\Google\Protobuf\Internal\DescriptorProto\ExtensionRange>|\Google\Protobuf\Internal\RepeatedField $extension_range
+ * @type array<\Google\Protobuf\Internal\OneofDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $oneof_decl
+ * @type \Google\Protobuf\Internal\MessageOptions $options
+ * @type array<\Google\Protobuf\Internal\DescriptorProto\ReservedRange>|\Google\Protobuf\Internal\RepeatedField $reserved_range
+ * @type array|\Google\Protobuf\Internal\RepeatedField $reserved_name
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto field = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getField()
+ {
+ return $this->field;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto field = 2;
+ * @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setField($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->field = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 6;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 6;
+ * @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->extension = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto nested_type = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getNestedType()
+ {
+ return $this->nested_type;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto nested_type = 3;
+ * @param array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setNestedType($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
+ $this->nested_type = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
+ * @param array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEnumType($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
+ $this->enum_type = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExtensionRange()
+ {
+ return $this->extension_range;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
+ * @param array<\Google\Protobuf\Internal\DescriptorProto\ExtensionRange>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExtensionRange($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ExtensionRange::class);
+ $this->extension_range = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOneofDecl()
+ {
+ return $this->oneof_decl;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
+ * @param array<\Google\Protobuf\Internal\OneofDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOneofDecl($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\OneofDescriptorProto::class);
+ $this->oneof_decl = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.MessageOptions options = 7;
+ * @return \Google\Protobuf\Internal\MessageOptions|null
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public function hasOptions()
+ {
+ return isset($this->options);
+ }
+
+ public function clearOptions()
+ {
+ unset($this->options);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.MessageOptions options = 7;
+ * @param \Google\Protobuf\Internal\MessageOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MessageOptions::class);
+ $this->options = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReservedRange()
+ {
+ return $this->reserved_range;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
+ * @param array<\Google\Protobuf\Internal\DescriptorProto\ReservedRange>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setReservedRange($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ReservedRange::class);
+ $this->reserved_range = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ *
+ * Generated from protobuf field repeated string reserved_name = 10;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReservedName()
+ {
+ return $this->reserved_name;
+ }
+
+ /**
+ * Reserved field names, which may not be used by fields in the same message.
+ * A given name may only be reserved once.
+ *
+ * Generated from protobuf field repeated string reserved_name = 10;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setReservedName($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->reserved_name = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
new file mode 100644
index 0000000..43c33c4
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
@@ -0,0 +1,161 @@
+google.protobuf.DescriptorProto.ExtensionRange
+ */
+class ExtensionRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 start = 1;
+ */
+ protected $start = null;
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field optional int32 end = 2;
+ */
+ protected $end = null;
+ /**
+ * Generated from protobuf field optional .google.protobuf.ExtensionRangeOptions options = 3;
+ */
+ protected $options = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $start
+ * Inclusive.
+ * @type int $end
+ * Exclusive.
+ * @type \Google\Protobuf\Internal\ExtensionRangeOptions $options
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 start = 1;
+ * @return int
+ */
+ public function getStart()
+ {
+ return isset($this->start) ? $this->start : 0;
+ }
+
+ public function hasStart()
+ {
+ return isset($this->start);
+ }
+
+ public function clearStart()
+ {
+ unset($this->start);
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 start = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+
+ return $this;
+ }
+
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field optional int32 end = 2;
+ * @return int
+ */
+ public function getEnd()
+ {
+ return isset($this->end) ? $this->end : 0;
+ }
+
+ public function hasEnd()
+ {
+ return isset($this->end);
+ }
+
+ public function clearEnd()
+ {
+ unset($this->end);
+ }
+
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field optional int32 end = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.ExtensionRangeOptions options = 3;
+ * @return \Google\Protobuf\Internal\ExtensionRangeOptions|null
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public function hasOptions()
+ {
+ return isset($this->options);
+ }
+
+ public function clearOptions()
+ {
+ unset($this->options);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.ExtensionRangeOptions options = 3;
+ * @param \Google\Protobuf\Internal\ExtensionRangeOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ExtensionRangeOptions::class);
+ $this->options = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ExtensionRange::class, \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
new file mode 100644
index 0000000..f099cc3
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
@@ -0,0 +1,128 @@
+google.protobuf.DescriptorProto.ReservedRange
+ */
+class ReservedRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 start = 1;
+ */
+ protected $start = null;
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field optional int32 end = 2;
+ */
+ protected $end = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $start
+ * Inclusive.
+ * @type int $end
+ * Exclusive.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 start = 1;
+ * @return int
+ */
+ public function getStart()
+ {
+ return isset($this->start) ? $this->start : 0;
+ }
+
+ public function hasStart()
+ {
+ return isset($this->start);
+ }
+
+ public function clearStart()
+ {
+ unset($this->start);
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 start = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+
+ return $this;
+ }
+
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field optional int32 end = 2;
+ * @return int
+ */
+ public function getEnd()
+ {
+ return isset($this->end) ? $this->end : 0;
+ }
+
+ public function hasEnd()
+ {
+ return isset($this->end);
+ }
+
+ public function clearEnd()
+ {
+ unset($this->end);
+ }
+
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field optional int32 end = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ReservedRange::class, \Google\Protobuf\Internal\DescriptorProto_ReservedRange::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
new file mode 100644
index 0000000..c928fbe
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
@@ -0,0 +1,16 @@
+descriptor = new EnumDescriptor();
+ $this->descriptor->setFullName($full_name);
+ $this->descriptor->setClass($klass);
+ $this->pool = $pool;
+ }
+
+ public function value($name, $number)
+ {
+ $value = new EnumValueDescriptor($name, $number);
+ $this->descriptor->addValue($number, $value);
+ return $this;
+ }
+
+ public function finalizeToPool()
+ {
+ $this->pool->addEnumDescriptor($this->descriptor);
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php
new file mode 100644
index 0000000..383f53b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php
@@ -0,0 +1,116 @@
+public_desc = new \Google\Protobuf\EnumDescriptor($this);
+ }
+
+ public function setFullName($full_name)
+ {
+ $this->full_name = $full_name;
+ }
+
+ public function getFullName()
+ {
+ return $this->full_name;
+ }
+
+ public function addValue($number, $value)
+ {
+ $this->value[$number] = $value;
+ $this->name_to_value[$value->getName()] = $value;
+ $this->value_descriptor[] = new EnumValueDescriptor($value->getName(), $number);
+ }
+
+ public function getValueByNumber($number)
+ {
+ if (isset($this->value[$number])) {
+ return $this->value[$number];
+ }
+ return null;
+ }
+
+ public function getValueByName($name)
+ {
+ if (isset($this->name_to_value[$name])) {
+ return $this->name_to_value[$name];
+ }
+ return null;
+ }
+
+ public function getValueDescriptorByIndex($index)
+ {
+ if (isset($this->value_descriptor[$index])) {
+ return $this->value_descriptor[$index];
+ }
+ return null;
+ }
+
+ public function getValueCount()
+ {
+ return count($this->value);
+ }
+
+ public function setClass($klass)
+ {
+ $this->klass = $klass;
+ }
+
+ public function getClass()
+ {
+ return $this->klass;
+ }
+
+ public function setLegacyClass($klass)
+ {
+ $this->legacy_klass = $klass;
+ }
+
+ public function getLegacyClass()
+ {
+ return $this->legacy_klass;
+ }
+
+ public static function buildFromProto($proto, $file_proto, $containing)
+ {
+ $desc = new EnumDescriptor();
+
+ $enum_name_without_package = "";
+ $classname = "";
+ $legacy_classname = "";
+ $fullname = "";
+ GPBUtil::getFullClassName(
+ $proto,
+ $containing,
+ $file_proto,
+ $enum_name_without_package,
+ $classname,
+ $legacy_classname,
+ $fullname,
+ $unused_previous_classname);
+ $desc->setFullName($fullname);
+ $desc->setClass($classname);
+ $desc->setLegacyClass($legacy_classname);
+ $values = $proto->getValue();
+ foreach ($values as $value) {
+ $desc->addValue($value->getNumber(), $value);
+ }
+
+ return $desc;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php
new file mode 100644
index 0000000..cb2a42a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php
@@ -0,0 +1,216 @@
+google.protobuf.EnumDescriptorProto
+ */
+class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field optional string name = 1;
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.EnumValueDescriptorProto value = 2;
+ */
+ private $value;
+ /**
+ * Generated from protobuf field optional .google.protobuf.EnumOptions options = 3;
+ */
+ protected $options = null;
+ /**
+ * Range of reserved numeric values. Reserved numeric values may not be used
+ * by enum values in the same enum declaration. Reserved ranges may not
+ * overlap.
+ *
+ * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
+ */
+ private $reserved_range;
+ /**
+ * Reserved enum value names, which may not be reused. A given name may only
+ * be reserved once.
+ *
+ * Generated from protobuf field repeated string reserved_name = 5;
+ */
+ private $reserved_name;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type array<\Google\Protobuf\Internal\EnumValueDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $value
+ * @type \Google\Protobuf\Internal\EnumOptions $options
+ * @type array<\Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange>|\Google\Protobuf\Internal\RepeatedField $reserved_range
+ * Range of reserved numeric values. Reserved numeric values may not be used
+ * by enum values in the same enum declaration. Reserved ranges may not
+ * overlap.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $reserved_name
+ * Reserved enum value names, which may not be reused. A given name may only
+ * be reserved once.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.EnumValueDescriptorProto value = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.EnumValueDescriptorProto value = 2;
+ * @param array<\Google\Protobuf\Internal\EnumValueDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumValueDescriptorProto::class);
+ $this->value = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.EnumOptions options = 3;
+ * @return \Google\Protobuf\Internal\EnumOptions|null
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public function hasOptions()
+ {
+ return isset($this->options);
+ }
+
+ public function clearOptions()
+ {
+ unset($this->options);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.EnumOptions options = 3;
+ * @param \Google\Protobuf\Internal\EnumOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumOptions::class);
+ $this->options = $var;
+
+ return $this;
+ }
+
+ /**
+ * Range of reserved numeric values. Reserved numeric values may not be used
+ * by enum values in the same enum declaration. Reserved ranges may not
+ * overlap.
+ *
+ * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReservedRange()
+ {
+ return $this->reserved_range;
+ }
+
+ /**
+ * Range of reserved numeric values. Reserved numeric values may not be used
+ * by enum values in the same enum declaration. Reserved ranges may not
+ * overlap.
+ *
+ * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
+ * @param array<\Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setReservedRange($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange::class);
+ $this->reserved_range = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Reserved enum value names, which may not be reused. A given name may only
+ * be reserved once.
+ *
+ * Generated from protobuf field repeated string reserved_name = 5;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReservedName()
+ {
+ return $this->reserved_name;
+ }
+
+ /**
+ * Reserved enum value names, which may not be reused. A given name may only
+ * be reserved once.
+ *
+ * Generated from protobuf field repeated string reserved_name = 5;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setReservedName($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->reserved_name = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
new file mode 100644
index 0000000..7282fcc
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
@@ -0,0 +1,130 @@
+google.protobuf.EnumDescriptorProto.EnumReservedRange
+ */
+class EnumReservedRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 start = 1;
+ */
+ protected $start = null;
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 end = 2;
+ */
+ protected $end = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $start
+ * Inclusive.
+ * @type int $end
+ * Inclusive.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 start = 1;
+ * @return int
+ */
+ public function getStart()
+ {
+ return isset($this->start) ? $this->start : 0;
+ }
+
+ public function hasStart()
+ {
+ return isset($this->start);
+ }
+
+ public function clearStart()
+ {
+ unset($this->start);
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 start = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+
+ return $this;
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 end = 2;
+ * @return int
+ */
+ public function getEnd()
+ {
+ return isset($this->end) ? $this->end : 0;
+ }
+
+ public function hasEnd()
+ {
+ return isset($this->end);
+ }
+
+ public function clearEnd()
+ {
+ unset($this->end);
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field optional int32 end = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(EnumReservedRange::class, \Google\Protobuf\Internal\EnumDescriptorProto_EnumReservedRange::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto_EnumReservedRange.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto_EnumReservedRange.php
new file mode 100644
index 0000000..b1b59ed
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto_EnumReservedRange.php
@@ -0,0 +1,16 @@
+google.protobuf.EnumOptions
+ */
+class EnumOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ *
+ * Generated from protobuf field optional bool allow_alias = 2;
+ */
+ protected $allow_alias = null;
+ /**
+ * Is this enum deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating enums.
+ *
+ * Generated from protobuf field optional bool deprecated = 3 [default = false];
+ */
+ protected $deprecated = null;
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * TODO Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
+ * @deprecated
+ */
+ protected $deprecated_legacy_json_field_conflicts = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ */
+ private $uninterpreted_option;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $allow_alias
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ * @type bool $deprecated
+ * Is this enum deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating enums.
+ * @type bool $deprecated_legacy_json_field_conflicts
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * TODO Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ *
+ * Generated from protobuf field optional bool allow_alias = 2;
+ * @return bool
+ */
+ public function getAllowAlias()
+ {
+ return isset($this->allow_alias) ? $this->allow_alias : false;
+ }
+
+ public function hasAllowAlias()
+ {
+ return isset($this->allow_alias);
+ }
+
+ public function clearAllowAlias()
+ {
+ unset($this->allow_alias);
+ }
+
+ /**
+ * Set this option to true to allow mapping different tag names to the same
+ * value.
+ *
+ * Generated from protobuf field optional bool allow_alias = 2;
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowAlias($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_alias = $var;
+
+ return $this;
+ }
+
+ /**
+ * Is this enum deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating enums.
+ *
+ * Generated from protobuf field optional bool deprecated = 3 [default = false];
+ * @return bool
+ */
+ public function getDeprecated()
+ {
+ return isset($this->deprecated) ? $this->deprecated : false;
+ }
+
+ public function hasDeprecated()
+ {
+ return isset($this->deprecated);
+ }
+
+ public function clearDeprecated()
+ {
+ unset($this->deprecated);
+ }
+
+ /**
+ * Is this enum deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating enums.
+ *
+ * Generated from protobuf field optional bool deprecated = 3 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+
+ return $this;
+ }
+
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * TODO Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
+ * @return bool
+ * @deprecated
+ */
+ public function getDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ return isset($this->deprecated_legacy_json_field_conflicts) ? $this->deprecated_legacy_json_field_conflicts : false;
+ }
+
+ public function hasDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ return isset($this->deprecated_legacy_json_field_conflicts);
+ }
+
+ public function clearDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ unset($this->deprecated_legacy_json_field_conflicts);
+ }
+
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * TODO Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
+ * @param bool $var
+ * @return $this
+ * @deprecated
+ */
+ public function setDeprecatedLegacyJsonFieldConflicts($var)
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ GPBUtil::checkBool($var);
+ $this->deprecated_legacy_json_field_conflicts = $var;
+
+ return $this;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
new file mode 100644
index 0000000..0feaea6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
@@ -0,0 +1,146 @@
+google.protobuf.EnumValueDescriptorProto
+ */
+class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field optional string name = 1;
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field optional int32 number = 2;
+ */
+ protected $number = null;
+ /**
+ * Generated from protobuf field optional .google.protobuf.EnumValueOptions options = 3;
+ */
+ protected $options = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type int $number
+ * @type \Google\Protobuf\Internal\EnumValueOptions $options
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional int32 number = 2;
+ * @return int
+ */
+ public function getNumber()
+ {
+ return isset($this->number) ? $this->number : 0;
+ }
+
+ public function hasNumber()
+ {
+ return isset($this->number);
+ }
+
+ public function clearNumber()
+ {
+ unset($this->number);
+ }
+
+ /**
+ * Generated from protobuf field optional int32 number = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.EnumValueOptions options = 3;
+ * @return \Google\Protobuf\Internal\EnumValueOptions|null
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public function hasOptions()
+ {
+ return isset($this->options);
+ }
+
+ public function clearOptions()
+ {
+ unset($this->options);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.EnumValueOptions options = 3;
+ * @param \Google\Protobuf\Internal\EnumValueOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumValueOptions::class);
+ $this->options = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php
new file mode 100644
index 0000000..2db7fce
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php
@@ -0,0 +1,123 @@
+google.protobuf.EnumValueOptions
+ */
+class EnumValueOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Is this enum value deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum value, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating enum values.
+ *
+ * Generated from protobuf field optional bool deprecated = 1 [default = false];
+ */
+ protected $deprecated = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ */
+ private $uninterpreted_option;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $deprecated
+ * Is this enum value deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum value, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating enum values.
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Is this enum value deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum value, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating enum values.
+ *
+ * Generated from protobuf field optional bool deprecated = 1 [default = false];
+ * @return bool
+ */
+ public function getDeprecated()
+ {
+ return isset($this->deprecated) ? $this->deprecated : false;
+ }
+
+ public function hasDeprecated()
+ {
+ return isset($this->deprecated);
+ }
+
+ public function clearDeprecated()
+ {
+ unset($this->deprecated);
+ }
+
+ /**
+ * Is this enum value deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the enum value, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating enum values.
+ *
+ * Generated from protobuf field optional bool deprecated = 1 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+
+ return $this;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
new file mode 100644
index 0000000..245173c
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
@@ -0,0 +1,67 @@
+google.protobuf.ExtensionRangeOptions
+ */
+class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ */
+ private $uninterpreted_option;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php
new file mode 100644
index 0000000..63cd22d
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php
@@ -0,0 +1,303 @@
+public_desc = new \Google\Protobuf\FieldDescriptor($this);
+ }
+
+ public function setOneofIndex($index)
+ {
+ $this->oneof_index = $index;
+ }
+
+ public function getOneofIndex()
+ {
+ return $this->oneof_index;
+ }
+
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ public function setJsonName($json_name)
+ {
+ $this->json_name = $json_name;
+ }
+
+ public function getJsonName()
+ {
+ return $this->json_name;
+ }
+
+ public function setSetter($setter)
+ {
+ $this->setter = $setter;
+ }
+
+ public function getSetter()
+ {
+ return $this->setter;
+ }
+
+ public function setGetter($getter)
+ {
+ $this->getter = $getter;
+ }
+
+ public function getGetter()
+ {
+ return $this->getter;
+ }
+
+ public function setNumber($number)
+ {
+ $this->number = $number;
+ }
+
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ public function setLabel($label)
+ {
+ $this->label = $label;
+ }
+
+ public function getLabel()
+ {
+ return $this->label;
+ }
+
+ public function isRepeated()
+ {
+ return $this->label === GPBLabel::REPEATED;
+ }
+
+ public function setType($type)
+ {
+ $this->type = $type;
+ }
+
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ public function setMessageType($message_type)
+ {
+ $this->message_type = $message_type;
+ }
+
+ public function getMessageType()
+ {
+ return $this->message_type;
+ }
+
+ public function setEnumType($enum_type)
+ {
+ $this->enum_type = $enum_type;
+ }
+
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ public function setPacked($packed)
+ {
+ $this->packed = $packed;
+ }
+
+ public function getPacked()
+ {
+ return $this->packed;
+ }
+
+ public function getProto3Optional()
+ {
+ return $this->proto3_optional;
+ }
+
+ public function setProto3Optional($proto3_optional)
+ {
+ $this->proto3_optional = $proto3_optional;
+ }
+
+ public function getContainingOneof()
+ {
+ return $this->containing_oneof;
+ }
+
+ public function setContainingOneof($containing_oneof)
+ {
+ $this->containing_oneof = $containing_oneof;
+ }
+
+ public function getRealContainingOneof()
+ {
+ return !is_null($this->containing_oneof) && !$this->containing_oneof->isSynthetic()
+ ? $this->containing_oneof : null;
+ }
+
+ public function isPackable()
+ {
+ return $this->isRepeated() && self::isTypePackable($this->type);
+ }
+
+ public function isMap()
+ {
+ return $this->getType() == GPBType::MESSAGE &&
+ !is_null($this->getMessageType()->getOptions()) &&
+ $this->getMessageType()->getOptions()->getMapEntry();
+ }
+
+ public function isTimestamp()
+ {
+ return $this->getType() == GPBType::MESSAGE &&
+ $this->getMessageType()->getClass() === "Google\Protobuf\Timestamp";
+ }
+
+ public function isWrapperType()
+ {
+ if ($this->getType() == GPBType::MESSAGE) {
+ $class = $this->getMessageType()->getClass();
+ return in_array($class, [
+ "Google\Protobuf\DoubleValue",
+ "Google\Protobuf\FloatValue",
+ "Google\Protobuf\Int64Value",
+ "Google\Protobuf\UInt64Value",
+ "Google\Protobuf\Int32Value",
+ "Google\Protobuf\UInt32Value",
+ "Google\Protobuf\BoolValue",
+ "Google\Protobuf\StringValue",
+ "Google\Protobuf\BytesValue",
+ ]);
+ }
+ return false;
+ }
+
+ private static function isTypePackable($field_type)
+ {
+ return ($field_type !== GPBType::STRING &&
+ $field_type !== GPBType::GROUP &&
+ $field_type !== GPBType::MESSAGE &&
+ $field_type !== GPBType::BYTES);
+ }
+
+ /**
+ * @param FieldDescriptorProto $proto
+ * @return FieldDescriptor
+ */
+ public static function getFieldDescriptor($proto)
+ {
+ $type_name = null;
+ $type = $proto->getType();
+ switch ($type) {
+ case GPBType::MESSAGE:
+ case GPBType::GROUP:
+ case GPBType::ENUM:
+ $type_name = $proto->getTypeName();
+ break;
+ default:
+ break;
+ }
+
+ $oneof_index = $proto->hasOneofIndex() ? $proto->getOneofIndex() : -1;
+ // TODO: once proto2 is supported, this default should be false
+ // for proto2.
+ if ($proto->getLabel() === GPBLabel::REPEATED &&
+ $proto->getType() !== GPBType::MESSAGE &&
+ $proto->getType() !== GPBType::GROUP &&
+ $proto->getType() !== GPBType::STRING &&
+ $proto->getType() !== GPBType::BYTES) {
+ $packed = true;
+ } else {
+ $packed = false;
+ }
+ $options = $proto->getOptions();
+ if ($options !== null) {
+ $packed = $options->getPacked();
+ }
+
+ $field = new FieldDescriptor();
+ $field->setName($proto->getName());
+
+ if ($proto->hasJsonName()) {
+ $json_name = $proto->getJsonName();
+ } else {
+ $proto_name = $proto->getName();
+ $json_name = implode('', array_map('ucwords', explode('_', $proto_name)));
+ if ($proto_name[0] !== "_" && !ctype_upper($proto_name[0])) {
+ $json_name = lcfirst($json_name);
+ }
+ }
+ $field->setJsonName($json_name);
+
+ $camel_name = implode('', array_map('ucwords', explode('_', $proto->getName())));
+ $field->setGetter('get' . $camel_name);
+ $field->setSetter('set' . $camel_name);
+ $field->setType($proto->getType());
+ $field->setNumber($proto->getNumber());
+ $field->setLabel($proto->getLabel());
+ $field->setPacked($packed);
+ $field->setOneofIndex($oneof_index);
+ $field->setProto3Optional($proto->getProto3Optional());
+
+ // At this time, the message/enum type may have not been added to pool.
+ // So we use the type name as place holder and will replace it with the
+ // actual descriptor in cross building.
+ switch ($type) {
+ case GPBType::MESSAGE:
+ $field->setMessageType($type_name);
+ break;
+ case GPBType::ENUM:
+ $field->setEnumType($type_name);
+ break;
+ default:
+ break;
+ }
+
+ return $field;
+ }
+
+ public static function buildFromProto($proto)
+ {
+ return FieldDescriptor::getFieldDescriptor($proto);
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php
new file mode 100644
index 0000000..5e99bff
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php
@@ -0,0 +1,611 @@
+google.protobuf.FieldDescriptorProto
+ */
+class FieldDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field optional string name = 1;
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field optional int32 number = 3;
+ */
+ protected $number = null;
+ /**
+ * Generated from protobuf field optional .google.protobuf.FieldDescriptorProto.Label label = 4;
+ */
+ protected $label = null;
+ /**
+ * If type_name is set, this need not be set. If both this and type_name
+ * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+ *
+ * Generated from protobuf field optional .google.protobuf.FieldDescriptorProto.Type type = 5;
+ */
+ protected $type = null;
+ /**
+ * For message and enum types, this is the name of the type. If the name
+ * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
+ * rules are used to find the type (i.e. first the nested types within this
+ * message are searched, then within the parent, on up to the root
+ * namespace).
+ *
+ * Generated from protobuf field optional string type_name = 6;
+ */
+ protected $type_name = null;
+ /**
+ * For extensions, this is the name of the type being extended. It is
+ * resolved in the same manner as type_name.
+ *
+ * Generated from protobuf field optional string extendee = 2;
+ */
+ protected $extendee = null;
+ /**
+ * For numeric types, contains the original text representation of the value.
+ * For booleans, "true" or "false".
+ * For strings, contains the default text contents (not escaped in any way).
+ * For bytes, contains the C escaped value. All bytes >= 128 are escaped.
+ *
+ * Generated from protobuf field optional string default_value = 7;
+ */
+ protected $default_value = null;
+ /**
+ * If set, gives the index of a oneof in the containing type's oneof_decl
+ * list. This field is a member of that oneof.
+ *
+ * Generated from protobuf field optional int32 oneof_index = 9;
+ */
+ protected $oneof_index = null;
+ /**
+ * JSON name of this field. The value is set by protocol compiler. If the
+ * user has set a "json_name" option on this field, that option's value
+ * will be used. Otherwise, it's deduced from the field's name by converting
+ * it to camelCase.
+ *
+ * Generated from protobuf field optional string json_name = 10;
+ */
+ protected $json_name = null;
+ /**
+ * Generated from protobuf field optional .google.protobuf.FieldOptions options = 8;
+ */
+ protected $options = null;
+ /**
+ * If true, this is a proto3 "optional". When a proto3 field is optional, it
+ * tracks presence regardless of field type.
+ * When proto3_optional is true, this field must be belong to a oneof to
+ * signal to old proto3 clients that presence is tracked for this field. This
+ * oneof is known as a "synthetic" oneof, and this field must be its sole
+ * member (each proto3 optional field gets its own synthetic oneof). Synthetic
+ * oneofs exist in the descriptor only, and do not generate any API. Synthetic
+ * oneofs must be ordered after all "real" oneofs.
+ * For message fields, proto3_optional doesn't create any semantic change,
+ * since non-repeated message fields always track presence. However it still
+ * indicates the semantic detail of whether the user wrote "optional" or not.
+ * This can be useful for round-tripping the .proto file. For consistency we
+ * give message fields a synthetic oneof also, even though it is not required
+ * to track presence. This is especially important because the parser can't
+ * tell if a field is a message or an enum, so it must always create a
+ * synthetic oneof.
+ * Proto2 optional fields do not set this flag, because they already indicate
+ * optional with `LABEL_OPTIONAL`.
+ *
+ * Generated from protobuf field optional bool proto3_optional = 17;
+ */
+ protected $proto3_optional = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type int $number
+ * @type int $label
+ * @type int $type
+ * If type_name is set, this need not be set. If both this and type_name
+ * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+ * @type string $type_name
+ * For message and enum types, this is the name of the type. If the name
+ * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
+ * rules are used to find the type (i.e. first the nested types within this
+ * message are searched, then within the parent, on up to the root
+ * namespace).
+ * @type string $extendee
+ * For extensions, this is the name of the type being extended. It is
+ * resolved in the same manner as type_name.
+ * @type string $default_value
+ * For numeric types, contains the original text representation of the value.
+ * For booleans, "true" or "false".
+ * For strings, contains the default text contents (not escaped in any way).
+ * For bytes, contains the C escaped value. All bytes >= 128 are escaped.
+ * @type int $oneof_index
+ * If set, gives the index of a oneof in the containing type's oneof_decl
+ * list. This field is a member of that oneof.
+ * @type string $json_name
+ * JSON name of this field. The value is set by protocol compiler. If the
+ * user has set a "json_name" option on this field, that option's value
+ * will be used. Otherwise, it's deduced from the field's name by converting
+ * it to camelCase.
+ * @type \Google\Protobuf\Internal\FieldOptions $options
+ * @type bool $proto3_optional
+ * If true, this is a proto3 "optional". When a proto3 field is optional, it
+ * tracks presence regardless of field type.
+ * When proto3_optional is true, this field must be belong to a oneof to
+ * signal to old proto3 clients that presence is tracked for this field. This
+ * oneof is known as a "synthetic" oneof, and this field must be its sole
+ * member (each proto3 optional field gets its own synthetic oneof). Synthetic
+ * oneofs exist in the descriptor only, and do not generate any API. Synthetic
+ * oneofs must be ordered after all "real" oneofs.
+ * For message fields, proto3_optional doesn't create any semantic change,
+ * since non-repeated message fields always track presence. However it still
+ * indicates the semantic detail of whether the user wrote "optional" or not.
+ * This can be useful for round-tripping the .proto file. For consistency we
+ * give message fields a synthetic oneof also, even though it is not required
+ * to track presence. This is especially important because the parser can't
+ * tell if a field is a message or an enum, so it must always create a
+ * synthetic oneof.
+ * Proto2 optional fields do not set this flag, because they already indicate
+ * optional with `LABEL_OPTIONAL`.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional int32 number = 3;
+ * @return int
+ */
+ public function getNumber()
+ {
+ return isset($this->number) ? $this->number : 0;
+ }
+
+ public function hasNumber()
+ {
+ return isset($this->number);
+ }
+
+ public function clearNumber()
+ {
+ unset($this->number);
+ }
+
+ /**
+ * Generated from protobuf field optional int32 number = 3;
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.FieldDescriptorProto.Label label = 4;
+ * @return int
+ */
+ public function getLabel()
+ {
+ return isset($this->label) ? $this->label : 0;
+ }
+
+ public function hasLabel()
+ {
+ return isset($this->label);
+ }
+
+ public function clearLabel()
+ {
+ unset($this->label);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.FieldDescriptorProto.Label label = 4;
+ * @param int $var
+ * @return $this
+ */
+ public function setLabel($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto\Label::class);
+ $this->label = $var;
+
+ return $this;
+ }
+
+ /**
+ * If type_name is set, this need not be set. If both this and type_name
+ * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+ *
+ * Generated from protobuf field optional .google.protobuf.FieldDescriptorProto.Type type = 5;
+ * @return int
+ */
+ public function getType()
+ {
+ return isset($this->type) ? $this->type : 0;
+ }
+
+ public function hasType()
+ {
+ return isset($this->type);
+ }
+
+ public function clearType()
+ {
+ unset($this->type);
+ }
+
+ /**
+ * If type_name is set, this need not be set. If both this and type_name
+ * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+ *
+ * Generated from protobuf field optional .google.protobuf.FieldDescriptorProto.Type type = 5;
+ * @param int $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto\Type::class);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * For message and enum types, this is the name of the type. If the name
+ * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
+ * rules are used to find the type (i.e. first the nested types within this
+ * message are searched, then within the parent, on up to the root
+ * namespace).
+ *
+ * Generated from protobuf field optional string type_name = 6;
+ * @return string
+ */
+ public function getTypeName()
+ {
+ return isset($this->type_name) ? $this->type_name : '';
+ }
+
+ public function hasTypeName()
+ {
+ return isset($this->type_name);
+ }
+
+ public function clearTypeName()
+ {
+ unset($this->type_name);
+ }
+
+ /**
+ * For message and enum types, this is the name of the type. If the name
+ * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
+ * rules are used to find the type (i.e. first the nested types within this
+ * message are searched, then within the parent, on up to the root
+ * namespace).
+ *
+ * Generated from protobuf field optional string type_name = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setTypeName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * For extensions, this is the name of the type being extended. It is
+ * resolved in the same manner as type_name.
+ *
+ * Generated from protobuf field optional string extendee = 2;
+ * @return string
+ */
+ public function getExtendee()
+ {
+ return isset($this->extendee) ? $this->extendee : '';
+ }
+
+ public function hasExtendee()
+ {
+ return isset($this->extendee);
+ }
+
+ public function clearExtendee()
+ {
+ unset($this->extendee);
+ }
+
+ /**
+ * For extensions, this is the name of the type being extended. It is
+ * resolved in the same manner as type_name.
+ *
+ * Generated from protobuf field optional string extendee = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setExtendee($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->extendee = $var;
+
+ return $this;
+ }
+
+ /**
+ * For numeric types, contains the original text representation of the value.
+ * For booleans, "true" or "false".
+ * For strings, contains the default text contents (not escaped in any way).
+ * For bytes, contains the C escaped value. All bytes >= 128 are escaped.
+ *
+ * Generated from protobuf field optional string default_value = 7;
+ * @return string
+ */
+ public function getDefaultValue()
+ {
+ return isset($this->default_value) ? $this->default_value : '';
+ }
+
+ public function hasDefaultValue()
+ {
+ return isset($this->default_value);
+ }
+
+ public function clearDefaultValue()
+ {
+ unset($this->default_value);
+ }
+
+ /**
+ * For numeric types, contains the original text representation of the value.
+ * For booleans, "true" or "false".
+ * For strings, contains the default text contents (not escaped in any way).
+ * For bytes, contains the C escaped value. All bytes >= 128 are escaped.
+ *
+ * Generated from protobuf field optional string default_value = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setDefaultValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->default_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * If set, gives the index of a oneof in the containing type's oneof_decl
+ * list. This field is a member of that oneof.
+ *
+ * Generated from protobuf field optional int32 oneof_index = 9;
+ * @return int
+ */
+ public function getOneofIndex()
+ {
+ return isset($this->oneof_index) ? $this->oneof_index : 0;
+ }
+
+ public function hasOneofIndex()
+ {
+ return isset($this->oneof_index);
+ }
+
+ public function clearOneofIndex()
+ {
+ unset($this->oneof_index);
+ }
+
+ /**
+ * If set, gives the index of a oneof in the containing type's oneof_decl
+ * list. This field is a member of that oneof.
+ *
+ * Generated from protobuf field optional int32 oneof_index = 9;
+ * @param int $var
+ * @return $this
+ */
+ public function setOneofIndex($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->oneof_index = $var;
+
+ return $this;
+ }
+
+ /**
+ * JSON name of this field. The value is set by protocol compiler. If the
+ * user has set a "json_name" option on this field, that option's value
+ * will be used. Otherwise, it's deduced from the field's name by converting
+ * it to camelCase.
+ *
+ * Generated from protobuf field optional string json_name = 10;
+ * @return string
+ */
+ public function getJsonName()
+ {
+ return isset($this->json_name) ? $this->json_name : '';
+ }
+
+ public function hasJsonName()
+ {
+ return isset($this->json_name);
+ }
+
+ public function clearJsonName()
+ {
+ unset($this->json_name);
+ }
+
+ /**
+ * JSON name of this field. The value is set by protocol compiler. If the
+ * user has set a "json_name" option on this field, that option's value
+ * will be used. Otherwise, it's deduced from the field's name by converting
+ * it to camelCase.
+ *
+ * Generated from protobuf field optional string json_name = 10;
+ * @param string $var
+ * @return $this
+ */
+ public function setJsonName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->json_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.FieldOptions options = 8;
+ * @return \Google\Protobuf\Internal\FieldOptions|null
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public function hasOptions()
+ {
+ return isset($this->options);
+ }
+
+ public function clearOptions()
+ {
+ unset($this->options);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.FieldOptions options = 8;
+ * @param \Google\Protobuf\Internal\FieldOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FieldOptions::class);
+ $this->options = $var;
+
+ return $this;
+ }
+
+ /**
+ * If true, this is a proto3 "optional". When a proto3 field is optional, it
+ * tracks presence regardless of field type.
+ * When proto3_optional is true, this field must be belong to a oneof to
+ * signal to old proto3 clients that presence is tracked for this field. This
+ * oneof is known as a "synthetic" oneof, and this field must be its sole
+ * member (each proto3 optional field gets its own synthetic oneof). Synthetic
+ * oneofs exist in the descriptor only, and do not generate any API. Synthetic
+ * oneofs must be ordered after all "real" oneofs.
+ * For message fields, proto3_optional doesn't create any semantic change,
+ * since non-repeated message fields always track presence. However it still
+ * indicates the semantic detail of whether the user wrote "optional" or not.
+ * This can be useful for round-tripping the .proto file. For consistency we
+ * give message fields a synthetic oneof also, even though it is not required
+ * to track presence. This is especially important because the parser can't
+ * tell if a field is a message or an enum, so it must always create a
+ * synthetic oneof.
+ * Proto2 optional fields do not set this flag, because they already indicate
+ * optional with `LABEL_OPTIONAL`.
+ *
+ * Generated from protobuf field optional bool proto3_optional = 17;
+ * @return bool
+ */
+ public function getProto3Optional()
+ {
+ return isset($this->proto3_optional) ? $this->proto3_optional : false;
+ }
+
+ public function hasProto3Optional()
+ {
+ return isset($this->proto3_optional);
+ }
+
+ public function clearProto3Optional()
+ {
+ unset($this->proto3_optional);
+ }
+
+ /**
+ * If true, this is a proto3 "optional". When a proto3 field is optional, it
+ * tracks presence regardless of field type.
+ * When proto3_optional is true, this field must be belong to a oneof to
+ * signal to old proto3 clients that presence is tracked for this field. This
+ * oneof is known as a "synthetic" oneof, and this field must be its sole
+ * member (each proto3 optional field gets its own synthetic oneof). Synthetic
+ * oneofs exist in the descriptor only, and do not generate any API. Synthetic
+ * oneofs must be ordered after all "real" oneofs.
+ * For message fields, proto3_optional doesn't create any semantic change,
+ * since non-repeated message fields always track presence. However it still
+ * indicates the semantic detail of whether the user wrote "optional" or not.
+ * This can be useful for round-tripping the .proto file. For consistency we
+ * give message fields a synthetic oneof also, even though it is not required
+ * to track presence. This is especially important because the parser can't
+ * tell if a field is a message or an enum, so it must always create a
+ * synthetic oneof.
+ * Proto2 optional fields do not set this flag, because they already indicate
+ * optional with `LABEL_OPTIONAL`.
+ *
+ * Generated from protobuf field optional bool proto3_optional = 17;
+ * @param bool $var
+ * @return $this
+ */
+ public function setProto3Optional($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->proto3_optional = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php
new file mode 100644
index 0000000..a54b228
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php
@@ -0,0 +1,58 @@
+google.protobuf.FieldDescriptorProto.Label
+ */
+class Label
+{
+ /**
+ * 0 is reserved for errors
+ *
+ * Generated from protobuf enum LABEL_OPTIONAL = 1;
+ */
+ const LABEL_OPTIONAL = 1;
+ /**
+ * Generated from protobuf enum LABEL_REQUIRED = 2;
+ */
+ const LABEL_REQUIRED = 2;
+ /**
+ * Generated from protobuf enum LABEL_REPEATED = 3;
+ */
+ const LABEL_REPEATED = 3;
+
+ private static $valueToName = [
+ self::LABEL_OPTIONAL => 'LABEL_OPTIONAL',
+ self::LABEL_REQUIRED => 'LABEL_REQUIRED',
+ self::LABEL_REPEATED => 'LABEL_REPEATED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Label::class, \Google\Protobuf\Internal\FieldDescriptorProto_Label::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php
new file mode 100644
index 0000000..6072e99
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php
@@ -0,0 +1,153 @@
+google.protobuf.FieldDescriptorProto.Type
+ */
+class Type
+{
+ /**
+ * 0 is reserved for errors.
+ * Order is weird for historical reasons.
+ *
+ * Generated from protobuf enum TYPE_DOUBLE = 1;
+ */
+ const TYPE_DOUBLE = 1;
+ /**
+ * Generated from protobuf enum TYPE_FLOAT = 2;
+ */
+ const TYPE_FLOAT = 2;
+ /**
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
+ * negative values are likely.
+ *
+ * Generated from protobuf enum TYPE_INT64 = 3;
+ */
+ const TYPE_INT64 = 3;
+ /**
+ * Generated from protobuf enum TYPE_UINT64 = 4;
+ */
+ const TYPE_UINT64 = 4;
+ /**
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
+ * negative values are likely.
+ *
+ * Generated from protobuf enum TYPE_INT32 = 5;
+ */
+ const TYPE_INT32 = 5;
+ /**
+ * Generated from protobuf enum TYPE_FIXED64 = 6;
+ */
+ const TYPE_FIXED64 = 6;
+ /**
+ * Generated from protobuf enum TYPE_FIXED32 = 7;
+ */
+ const TYPE_FIXED32 = 7;
+ /**
+ * Generated from protobuf enum TYPE_BOOL = 8;
+ */
+ const TYPE_BOOL = 8;
+ /**
+ * Generated from protobuf enum TYPE_STRING = 9;
+ */
+ const TYPE_STRING = 9;
+ /**
+ * Tag-delimited aggregate.
+ * Group type is deprecated and not supported in proto3. However, Proto3
+ * implementations should still be able to parse the group wire format and
+ * treat group fields as unknown fields.
+ *
+ * Generated from protobuf enum TYPE_GROUP = 10;
+ */
+ const TYPE_GROUP = 10;
+ /**
+ * Length-delimited aggregate.
+ *
+ * Generated from protobuf enum TYPE_MESSAGE = 11;
+ */
+ const TYPE_MESSAGE = 11;
+ /**
+ * New in version 2.
+ *
+ * Generated from protobuf enum TYPE_BYTES = 12;
+ */
+ const TYPE_BYTES = 12;
+ /**
+ * Generated from protobuf enum TYPE_UINT32 = 13;
+ */
+ const TYPE_UINT32 = 13;
+ /**
+ * Generated from protobuf enum TYPE_ENUM = 14;
+ */
+ const TYPE_ENUM = 14;
+ /**
+ * Generated from protobuf enum TYPE_SFIXED32 = 15;
+ */
+ const TYPE_SFIXED32 = 15;
+ /**
+ * Generated from protobuf enum TYPE_SFIXED64 = 16;
+ */
+ const TYPE_SFIXED64 = 16;
+ /**
+ * Uses ZigZag encoding.
+ *
+ * Generated from protobuf enum TYPE_SINT32 = 17;
+ */
+ const TYPE_SINT32 = 17;
+ /**
+ * Uses ZigZag encoding.
+ *
+ * Generated from protobuf enum TYPE_SINT64 = 18;
+ */
+ const TYPE_SINT64 = 18;
+
+ private static $valueToName = [
+ self::TYPE_DOUBLE => 'TYPE_DOUBLE',
+ self::TYPE_FLOAT => 'TYPE_FLOAT',
+ self::TYPE_INT64 => 'TYPE_INT64',
+ self::TYPE_UINT64 => 'TYPE_UINT64',
+ self::TYPE_INT32 => 'TYPE_INT32',
+ self::TYPE_FIXED64 => 'TYPE_FIXED64',
+ self::TYPE_FIXED32 => 'TYPE_FIXED32',
+ self::TYPE_BOOL => 'TYPE_BOOL',
+ self::TYPE_STRING => 'TYPE_STRING',
+ self::TYPE_GROUP => 'TYPE_GROUP',
+ self::TYPE_MESSAGE => 'TYPE_MESSAGE',
+ self::TYPE_BYTES => 'TYPE_BYTES',
+ self::TYPE_UINT32 => 'TYPE_UINT32',
+ self::TYPE_ENUM => 'TYPE_ENUM',
+ self::TYPE_SFIXED32 => 'TYPE_SFIXED32',
+ self::TYPE_SFIXED64 => 'TYPE_SFIXED64',
+ self::TYPE_SINT32 => 'TYPE_SINT32',
+ self::TYPE_SINT64 => 'TYPE_SINT64',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Type::class, \Google\Protobuf\Internal\FieldDescriptorProto_Type::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php
new file mode 100644
index 0000000..218a846
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php
@@ -0,0 +1,16 @@
+google.protobuf.FieldOptions
+ */
+class FieldOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The ctype option instructs the C++ code generator to use a different
+ * representation of the field than it normally would. See the specific
+ * options below. This option is not yet implemented in the open source
+ * release -- sorry, we'll try to include it in a future version!
+ *
+ * Generated from protobuf field optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
+ */
+ protected $ctype = null;
+ /**
+ * The packed option can be enabled for repeated primitive fields to enable
+ * a more efficient representation on the wire. Rather than repeatedly
+ * writing the tag and type for each element, the entire array is encoded as
+ * a single length-delimited blob. In proto3, only explicit setting it to
+ * false will avoid using packed encoding.
+ *
+ * Generated from protobuf field optional bool packed = 2;
+ */
+ protected $packed = null;
+ /**
+ * The jstype option determines the JavaScript type used for values of the
+ * field. The option is permitted only for 64 bit integral and fixed types
+ * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
+ * is represented as JavaScript string, which avoids loss of precision that
+ * can happen when a large value is converted to a floating point JavaScript.
+ * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
+ * use the JavaScript "number" type. The behavior of the default option
+ * JS_NORMAL is implementation dependent.
+ * This option is an enum to permit additional types to be added, e.g.
+ * goog.math.Integer.
+ *
+ * Generated from protobuf field optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
+ */
+ protected $jstype = null;
+ /**
+ * Should this field be parsed lazily? Lazy applies only to message-type
+ * fields. It means that when the outer message is initially parsed, the
+ * inner message's contents will not be parsed but instead stored in encoded
+ * form. The inner message will actually be parsed when it is first accessed.
+ * This is only a hint. Implementations are free to choose whether to use
+ * eager or lazy parsing regardless of the value of this option. However,
+ * setting this option true suggests that the protocol author believes that
+ * using lazy parsing on this field is worth the additional bookkeeping
+ * overhead typically needed to implement it.
+ * This option does not affect the public interface of any generated code;
+ * all method signatures remain the same. Furthermore, thread-safety of the
+ * interface is not affected by this option; const methods remain safe to
+ * call from multiple threads concurrently, while non-const methods continue
+ * to require exclusive access.
+ * Note that implementations may choose not to check required fields within
+ * a lazy sub-message. That is, calling IsInitialized() on the outer message
+ * may return true even if the inner message has missing required fields.
+ * This is necessary because otherwise the inner message would have to be
+ * parsed in order to perform the check, defeating the purpose of lazy
+ * parsing. An implementation which chooses not to check required fields
+ * must be consistent about it. That is, for any particular sub-message, the
+ * implementation must either *always* check its required fields, or *never*
+ * check its required fields, regardless of whether or not the message has
+ * been parsed.
+ * As of May 2022, lazy verifies the contents of the byte stream during
+ * parsing. An invalid byte stream will cause the overall parsing to fail.
+ *
+ * Generated from protobuf field optional bool lazy = 5 [default = false];
+ */
+ protected $lazy = null;
+ /**
+ * unverified_lazy does no correctness checks on the byte stream. This should
+ * only be used where lazy with verification is prohibitive for performance
+ * reasons.
+ *
+ * Generated from protobuf field optional bool unverified_lazy = 15 [default = false];
+ */
+ protected $unverified_lazy = null;
+ /**
+ * Is this field deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for accessors, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating fields.
+ *
+ * Generated from protobuf field optional bool deprecated = 3 [default = false];
+ */
+ protected $deprecated = null;
+ /**
+ * For Google-internal migration only. Do not use.
+ *
+ * Generated from protobuf field optional bool weak = 10 [default = false];
+ */
+ protected $weak = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ */
+ private $uninterpreted_option;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $ctype
+ * The ctype option instructs the C++ code generator to use a different
+ * representation of the field than it normally would. See the specific
+ * options below. This option is not yet implemented in the open source
+ * release -- sorry, we'll try to include it in a future version!
+ * @type bool $packed
+ * The packed option can be enabled for repeated primitive fields to enable
+ * a more efficient representation on the wire. Rather than repeatedly
+ * writing the tag and type for each element, the entire array is encoded as
+ * a single length-delimited blob. In proto3, only explicit setting it to
+ * false will avoid using packed encoding.
+ * @type int $jstype
+ * The jstype option determines the JavaScript type used for values of the
+ * field. The option is permitted only for 64 bit integral and fixed types
+ * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
+ * is represented as JavaScript string, which avoids loss of precision that
+ * can happen when a large value is converted to a floating point JavaScript.
+ * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
+ * use the JavaScript "number" type. The behavior of the default option
+ * JS_NORMAL is implementation dependent.
+ * This option is an enum to permit additional types to be added, e.g.
+ * goog.math.Integer.
+ * @type bool $lazy
+ * Should this field be parsed lazily? Lazy applies only to message-type
+ * fields. It means that when the outer message is initially parsed, the
+ * inner message's contents will not be parsed but instead stored in encoded
+ * form. The inner message will actually be parsed when it is first accessed.
+ * This is only a hint. Implementations are free to choose whether to use
+ * eager or lazy parsing regardless of the value of this option. However,
+ * setting this option true suggests that the protocol author believes that
+ * using lazy parsing on this field is worth the additional bookkeeping
+ * overhead typically needed to implement it.
+ * This option does not affect the public interface of any generated code;
+ * all method signatures remain the same. Furthermore, thread-safety of the
+ * interface is not affected by this option; const methods remain safe to
+ * call from multiple threads concurrently, while non-const methods continue
+ * to require exclusive access.
+ * Note that implementations may choose not to check required fields within
+ * a lazy sub-message. That is, calling IsInitialized() on the outer message
+ * may return true even if the inner message has missing required fields.
+ * This is necessary because otherwise the inner message would have to be
+ * parsed in order to perform the check, defeating the purpose of lazy
+ * parsing. An implementation which chooses not to check required fields
+ * must be consistent about it. That is, for any particular sub-message, the
+ * implementation must either *always* check its required fields, or *never*
+ * check its required fields, regardless of whether or not the message has
+ * been parsed.
+ * As of May 2022, lazy verifies the contents of the byte stream during
+ * parsing. An invalid byte stream will cause the overall parsing to fail.
+ * @type bool $unverified_lazy
+ * unverified_lazy does no correctness checks on the byte stream. This should
+ * only be used where lazy with verification is prohibitive for performance
+ * reasons.
+ * @type bool $deprecated
+ * Is this field deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for accessors, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating fields.
+ * @type bool $weak
+ * For Google-internal migration only. Do not use.
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The ctype option instructs the C++ code generator to use a different
+ * representation of the field than it normally would. See the specific
+ * options below. This option is not yet implemented in the open source
+ * release -- sorry, we'll try to include it in a future version!
+ *
+ * Generated from protobuf field optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
+ * @return int
+ */
+ public function getCtype()
+ {
+ return isset($this->ctype) ? $this->ctype : 0;
+ }
+
+ public function hasCtype()
+ {
+ return isset($this->ctype);
+ }
+
+ public function clearCtype()
+ {
+ unset($this->ctype);
+ }
+
+ /**
+ * The ctype option instructs the C++ code generator to use a different
+ * representation of the field than it normally would. See the specific
+ * options below. This option is not yet implemented in the open source
+ * release -- sorry, we'll try to include it in a future version!
+ *
+ * Generated from protobuf field optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
+ * @param int $var
+ * @return $this
+ */
+ public function setCtype($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions\CType::class);
+ $this->ctype = $var;
+
+ return $this;
+ }
+
+ /**
+ * The packed option can be enabled for repeated primitive fields to enable
+ * a more efficient representation on the wire. Rather than repeatedly
+ * writing the tag and type for each element, the entire array is encoded as
+ * a single length-delimited blob. In proto3, only explicit setting it to
+ * false will avoid using packed encoding.
+ *
+ * Generated from protobuf field optional bool packed = 2;
+ * @return bool
+ */
+ public function getPacked()
+ {
+ return isset($this->packed) ? $this->packed : false;
+ }
+
+ public function hasPacked()
+ {
+ return isset($this->packed);
+ }
+
+ public function clearPacked()
+ {
+ unset($this->packed);
+ }
+
+ /**
+ * The packed option can be enabled for repeated primitive fields to enable
+ * a more efficient representation on the wire. Rather than repeatedly
+ * writing the tag and type for each element, the entire array is encoded as
+ * a single length-delimited blob. In proto3, only explicit setting it to
+ * false will avoid using packed encoding.
+ *
+ * Generated from protobuf field optional bool packed = 2;
+ * @param bool $var
+ * @return $this
+ */
+ public function setPacked($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->packed = $var;
+
+ return $this;
+ }
+
+ /**
+ * The jstype option determines the JavaScript type used for values of the
+ * field. The option is permitted only for 64 bit integral and fixed types
+ * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
+ * is represented as JavaScript string, which avoids loss of precision that
+ * can happen when a large value is converted to a floating point JavaScript.
+ * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
+ * use the JavaScript "number" type. The behavior of the default option
+ * JS_NORMAL is implementation dependent.
+ * This option is an enum to permit additional types to be added, e.g.
+ * goog.math.Integer.
+ *
+ * Generated from protobuf field optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
+ * @return int
+ */
+ public function getJstype()
+ {
+ return isset($this->jstype) ? $this->jstype : 0;
+ }
+
+ public function hasJstype()
+ {
+ return isset($this->jstype);
+ }
+
+ public function clearJstype()
+ {
+ unset($this->jstype);
+ }
+
+ /**
+ * The jstype option determines the JavaScript type used for values of the
+ * field. The option is permitted only for 64 bit integral and fixed types
+ * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
+ * is represented as JavaScript string, which avoids loss of precision that
+ * can happen when a large value is converted to a floating point JavaScript.
+ * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
+ * use the JavaScript "number" type. The behavior of the default option
+ * JS_NORMAL is implementation dependent.
+ * This option is an enum to permit additional types to be added, e.g.
+ * goog.math.Integer.
+ *
+ * Generated from protobuf field optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setJstype($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions\JSType::class);
+ $this->jstype = $var;
+
+ return $this;
+ }
+
+ /**
+ * Should this field be parsed lazily? Lazy applies only to message-type
+ * fields. It means that when the outer message is initially parsed, the
+ * inner message's contents will not be parsed but instead stored in encoded
+ * form. The inner message will actually be parsed when it is first accessed.
+ * This is only a hint. Implementations are free to choose whether to use
+ * eager or lazy parsing regardless of the value of this option. However,
+ * setting this option true suggests that the protocol author believes that
+ * using lazy parsing on this field is worth the additional bookkeeping
+ * overhead typically needed to implement it.
+ * This option does not affect the public interface of any generated code;
+ * all method signatures remain the same. Furthermore, thread-safety of the
+ * interface is not affected by this option; const methods remain safe to
+ * call from multiple threads concurrently, while non-const methods continue
+ * to require exclusive access.
+ * Note that implementations may choose not to check required fields within
+ * a lazy sub-message. That is, calling IsInitialized() on the outer message
+ * may return true even if the inner message has missing required fields.
+ * This is necessary because otherwise the inner message would have to be
+ * parsed in order to perform the check, defeating the purpose of lazy
+ * parsing. An implementation which chooses not to check required fields
+ * must be consistent about it. That is, for any particular sub-message, the
+ * implementation must either *always* check its required fields, or *never*
+ * check its required fields, regardless of whether or not the message has
+ * been parsed.
+ * As of May 2022, lazy verifies the contents of the byte stream during
+ * parsing. An invalid byte stream will cause the overall parsing to fail.
+ *
+ * Generated from protobuf field optional bool lazy = 5 [default = false];
+ * @return bool
+ */
+ public function getLazy()
+ {
+ return isset($this->lazy) ? $this->lazy : false;
+ }
+
+ public function hasLazy()
+ {
+ return isset($this->lazy);
+ }
+
+ public function clearLazy()
+ {
+ unset($this->lazy);
+ }
+
+ /**
+ * Should this field be parsed lazily? Lazy applies only to message-type
+ * fields. It means that when the outer message is initially parsed, the
+ * inner message's contents will not be parsed but instead stored in encoded
+ * form. The inner message will actually be parsed when it is first accessed.
+ * This is only a hint. Implementations are free to choose whether to use
+ * eager or lazy parsing regardless of the value of this option. However,
+ * setting this option true suggests that the protocol author believes that
+ * using lazy parsing on this field is worth the additional bookkeeping
+ * overhead typically needed to implement it.
+ * This option does not affect the public interface of any generated code;
+ * all method signatures remain the same. Furthermore, thread-safety of the
+ * interface is not affected by this option; const methods remain safe to
+ * call from multiple threads concurrently, while non-const methods continue
+ * to require exclusive access.
+ * Note that implementations may choose not to check required fields within
+ * a lazy sub-message. That is, calling IsInitialized() on the outer message
+ * may return true even if the inner message has missing required fields.
+ * This is necessary because otherwise the inner message would have to be
+ * parsed in order to perform the check, defeating the purpose of lazy
+ * parsing. An implementation which chooses not to check required fields
+ * must be consistent about it. That is, for any particular sub-message, the
+ * implementation must either *always* check its required fields, or *never*
+ * check its required fields, regardless of whether or not the message has
+ * been parsed.
+ * As of May 2022, lazy verifies the contents of the byte stream during
+ * parsing. An invalid byte stream will cause the overall parsing to fail.
+ *
+ * Generated from protobuf field optional bool lazy = 5 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setLazy($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->lazy = $var;
+
+ return $this;
+ }
+
+ /**
+ * unverified_lazy does no correctness checks on the byte stream. This should
+ * only be used where lazy with verification is prohibitive for performance
+ * reasons.
+ *
+ * Generated from protobuf field optional bool unverified_lazy = 15 [default = false];
+ * @return bool
+ */
+ public function getUnverifiedLazy()
+ {
+ return isset($this->unverified_lazy) ? $this->unverified_lazy : false;
+ }
+
+ public function hasUnverifiedLazy()
+ {
+ return isset($this->unverified_lazy);
+ }
+
+ public function clearUnverifiedLazy()
+ {
+ unset($this->unverified_lazy);
+ }
+
+ /**
+ * unverified_lazy does no correctness checks on the byte stream. This should
+ * only be used where lazy with verification is prohibitive for performance
+ * reasons.
+ *
+ * Generated from protobuf field optional bool unverified_lazy = 15 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setUnverifiedLazy($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->unverified_lazy = $var;
+
+ return $this;
+ }
+
+ /**
+ * Is this field deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for accessors, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating fields.
+ *
+ * Generated from protobuf field optional bool deprecated = 3 [default = false];
+ * @return bool
+ */
+ public function getDeprecated()
+ {
+ return isset($this->deprecated) ? $this->deprecated : false;
+ }
+
+ public function hasDeprecated()
+ {
+ return isset($this->deprecated);
+ }
+
+ public function clearDeprecated()
+ {
+ unset($this->deprecated);
+ }
+
+ /**
+ * Is this field deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for accessors, or it will be completely ignored; in the very least, this
+ * is a formalization for deprecating fields.
+ *
+ * Generated from protobuf field optional bool deprecated = 3 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+
+ return $this;
+ }
+
+ /**
+ * For Google-internal migration only. Do not use.
+ *
+ * Generated from protobuf field optional bool weak = 10 [default = false];
+ * @return bool
+ */
+ public function getWeak()
+ {
+ return isset($this->weak) ? $this->weak : false;
+ }
+
+ public function hasWeak()
+ {
+ return isset($this->weak);
+ }
+
+ public function clearWeak()
+ {
+ unset($this->weak);
+ }
+
+ /**
+ * For Google-internal migration only. Do not use.
+ *
+ * Generated from protobuf field optional bool weak = 10 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setWeak($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->weak = $var;
+
+ return $this;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/CType.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/CType.php
new file mode 100644
index 0000000..ba9eb4a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/CType.php
@@ -0,0 +1,58 @@
+google.protobuf.FieldOptions.CType
+ */
+class CType
+{
+ /**
+ * Default mode.
+ *
+ * Generated from protobuf enum STRING = 0;
+ */
+ const STRING = 0;
+ /**
+ * Generated from protobuf enum CORD = 1;
+ */
+ const CORD = 1;
+ /**
+ * Generated from protobuf enum STRING_PIECE = 2;
+ */
+ const STRING_PIECE = 2;
+
+ private static $valueToName = [
+ self::STRING => 'STRING',
+ self::CORD => 'CORD',
+ self::STRING_PIECE => 'STRING_PIECE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(CType::class, \Google\Protobuf\Internal\FieldOptions_CType::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/JSType.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/JSType.php
new file mode 100644
index 0000000..175a433
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/JSType.php
@@ -0,0 +1,62 @@
+google.protobuf.FieldOptions.JSType
+ */
+class JSType
+{
+ /**
+ * Use the default type.
+ *
+ * Generated from protobuf enum JS_NORMAL = 0;
+ */
+ const JS_NORMAL = 0;
+ /**
+ * Use JavaScript strings.
+ *
+ * Generated from protobuf enum JS_STRING = 1;
+ */
+ const JS_STRING = 1;
+ /**
+ * Use JavaScript numbers.
+ *
+ * Generated from protobuf enum JS_NUMBER = 2;
+ */
+ const JS_NUMBER = 2;
+
+ private static $valueToName = [
+ self::JS_NORMAL => 'JS_NORMAL',
+ self::JS_STRING => 'JS_STRING',
+ self::JS_NUMBER => 'JS_NUMBER',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(JSType::class, \Google\Protobuf\Internal\FieldOptions_JSType::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_CType.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_CType.php
new file mode 100644
index 0000000..4d18783
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_CType.php
@@ -0,0 +1,16 @@
+package = $package;
+ }
+
+ public function getPackage()
+ {
+ return $this->package;
+ }
+
+ public function getMessageType()
+ {
+ return $this->message_type;
+ }
+
+ public function addMessageType($desc)
+ {
+ $this->message_type[] = $desc;
+ }
+
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ public function addEnumType($desc)
+ {
+ $this->enum_type[]= $desc;
+ }
+
+ public static function buildFromProto($proto)
+ {
+ $file = new FileDescriptor();
+ $file->setPackage($proto->getPackage());
+ foreach ($proto->getMessageType() as $message_proto) {
+ $file->addMessageType(Descriptor::buildFromProto(
+ $message_proto, $proto, ""));
+ }
+ foreach ($proto->getEnumType() as $enum_proto) {
+ $file->addEnumType(
+ EnumDescriptor::buildFromProto(
+ $enum_proto,
+ $proto,
+ ""));
+ }
+ return $file;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorProto.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorProto.php
new file mode 100644
index 0000000..d4c7f6b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorProto.php
@@ -0,0 +1,533 @@
+google.protobuf.FileDescriptorProto
+ */
+class FileDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * file name, relative to root of source tree
+ *
+ * Generated from protobuf field optional string name = 1;
+ */
+ protected $name = null;
+ /**
+ * e.g. "foo", "foo.bar", etc.
+ *
+ * Generated from protobuf field optional string package = 2;
+ */
+ protected $package = null;
+ /**
+ * Names of files imported by this file.
+ *
+ * Generated from protobuf field repeated string dependency = 3;
+ */
+ private $dependency;
+ /**
+ * Indexes of the public imported files in the dependency list above.
+ *
+ * Generated from protobuf field repeated int32 public_dependency = 10;
+ */
+ private $public_dependency;
+ /**
+ * Indexes of the weak imported files in the dependency list.
+ * For Google-internal migration only. Do not use.
+ *
+ * Generated from protobuf field repeated int32 weak_dependency = 11;
+ */
+ private $weak_dependency;
+ /**
+ * All top-level definitions in this file.
+ *
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto message_type = 4;
+ */
+ private $message_type;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
+ */
+ private $enum_type;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.ServiceDescriptorProto service = 6;
+ */
+ private $service;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 7;
+ */
+ private $extension;
+ /**
+ * Generated from protobuf field optional .google.protobuf.FileOptions options = 8;
+ */
+ protected $options = null;
+ /**
+ * This field contains optional information about the original source code.
+ * You may safely remove this entire field without harming runtime
+ * functionality of the descriptors -- the information is needed only by
+ * development tools.
+ *
+ * Generated from protobuf field optional .google.protobuf.SourceCodeInfo source_code_info = 9;
+ */
+ protected $source_code_info = null;
+ /**
+ * The syntax of the proto file.
+ * The supported values are "proto2", "proto3", and "editions".
+ * If `edition` is present, this value must be "editions".
+ *
+ * Generated from protobuf field optional string syntax = 12;
+ */
+ protected $syntax = null;
+ /**
+ * The edition of the proto file, which is an opaque string.
+ *
+ * Generated from protobuf field optional string edition = 13;
+ */
+ protected $edition = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * file name, relative to root of source tree
+ * @type string $package
+ * e.g. "foo", "foo.bar", etc.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $dependency
+ * Names of files imported by this file.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $public_dependency
+ * Indexes of the public imported files in the dependency list above.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $weak_dependency
+ * Indexes of the weak imported files in the dependency list.
+ * For Google-internal migration only. Do not use.
+ * @type array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $message_type
+ * All top-level definitions in this file.
+ * @type array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $enum_type
+ * @type array<\Google\Protobuf\Internal\ServiceDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $service
+ * @type array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $extension
+ * @type \Google\Protobuf\Internal\FileOptions $options
+ * @type \Google\Protobuf\Internal\SourceCodeInfo $source_code_info
+ * This field contains optional information about the original source code.
+ * You may safely remove this entire field without harming runtime
+ * functionality of the descriptors -- the information is needed only by
+ * development tools.
+ * @type string $syntax
+ * The syntax of the proto file.
+ * The supported values are "proto2", "proto3", and "editions".
+ * If `edition` is present, this value must be "editions".
+ * @type string $edition
+ * The edition of the proto file, which is an opaque string.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * file name, relative to root of source tree
+ *
+ * Generated from protobuf field optional string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * file name, relative to root of source tree
+ *
+ * Generated from protobuf field optional string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * e.g. "foo", "foo.bar", etc.
+ *
+ * Generated from protobuf field optional string package = 2;
+ * @return string
+ */
+ public function getPackage()
+ {
+ return isset($this->package) ? $this->package : '';
+ }
+
+ public function hasPackage()
+ {
+ return isset($this->package);
+ }
+
+ public function clearPackage()
+ {
+ unset($this->package);
+ }
+
+ /**
+ * e.g. "foo", "foo.bar", etc.
+ *
+ * Generated from protobuf field optional string package = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setPackage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->package = $var;
+
+ return $this;
+ }
+
+ /**
+ * Names of files imported by this file.
+ *
+ * Generated from protobuf field repeated string dependency = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDependency()
+ {
+ return $this->dependency;
+ }
+
+ /**
+ * Names of files imported by this file.
+ *
+ * Generated from protobuf field repeated string dependency = 3;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDependency($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->dependency = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Indexes of the public imported files in the dependency list above.
+ *
+ * Generated from protobuf field repeated int32 public_dependency = 10;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPublicDependency()
+ {
+ return $this->public_dependency;
+ }
+
+ /**
+ * Indexes of the public imported files in the dependency list above.
+ *
+ * Generated from protobuf field repeated int32 public_dependency = 10;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPublicDependency($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->public_dependency = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Indexes of the weak imported files in the dependency list.
+ * For Google-internal migration only. Do not use.
+ *
+ * Generated from protobuf field repeated int32 weak_dependency = 11;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getWeakDependency()
+ {
+ return $this->weak_dependency;
+ }
+
+ /**
+ * Indexes of the weak imported files in the dependency list.
+ * For Google-internal migration only. Do not use.
+ *
+ * Generated from protobuf field repeated int32 weak_dependency = 11;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setWeakDependency($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->weak_dependency = $arr;
+
+ return $this;
+ }
+
+ /**
+ * All top-level definitions in this file.
+ *
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto message_type = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMessageType()
+ {
+ return $this->message_type;
+ }
+
+ /**
+ * All top-level definitions in this file.
+ *
+ * Generated from protobuf field repeated .google.protobuf.DescriptorProto message_type = 4;
+ * @param array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMessageType($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
+ $this->message_type = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
+ * @param array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEnumType($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
+ $this->enum_type = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.ServiceDescriptorProto service = 6;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getService()
+ {
+ return $this->service;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.ServiceDescriptorProto service = 6;
+ * @param array<\Google\Protobuf\Internal\ServiceDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setService($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\ServiceDescriptorProto::class);
+ $this->service = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 7;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 7;
+ * @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExtension($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->extension = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.FileOptions options = 8;
+ * @return \Google\Protobuf\Internal\FileOptions|null
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public function hasOptions()
+ {
+ return isset($this->options);
+ }
+
+ public function clearOptions()
+ {
+ unset($this->options);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.FileOptions options = 8;
+ * @param \Google\Protobuf\Internal\FileOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FileOptions::class);
+ $this->options = $var;
+
+ return $this;
+ }
+
+ /**
+ * This field contains optional information about the original source code.
+ * You may safely remove this entire field without harming runtime
+ * functionality of the descriptors -- the information is needed only by
+ * development tools.
+ *
+ * Generated from protobuf field optional .google.protobuf.SourceCodeInfo source_code_info = 9;
+ * @return \Google\Protobuf\Internal\SourceCodeInfo|null
+ */
+ public function getSourceCodeInfo()
+ {
+ return $this->source_code_info;
+ }
+
+ public function hasSourceCodeInfo()
+ {
+ return isset($this->source_code_info);
+ }
+
+ public function clearSourceCodeInfo()
+ {
+ unset($this->source_code_info);
+ }
+
+ /**
+ * This field contains optional information about the original source code.
+ * You may safely remove this entire field without harming runtime
+ * functionality of the descriptors -- the information is needed only by
+ * development tools.
+ *
+ * Generated from protobuf field optional .google.protobuf.SourceCodeInfo source_code_info = 9;
+ * @param \Google\Protobuf\Internal\SourceCodeInfo $var
+ * @return $this
+ */
+ public function setSourceCodeInfo($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\SourceCodeInfo::class);
+ $this->source_code_info = $var;
+
+ return $this;
+ }
+
+ /**
+ * The syntax of the proto file.
+ * The supported values are "proto2", "proto3", and "editions".
+ * If `edition` is present, this value must be "editions".
+ *
+ * Generated from protobuf field optional string syntax = 12;
+ * @return string
+ */
+ public function getSyntax()
+ {
+ return isset($this->syntax) ? $this->syntax : '';
+ }
+
+ public function hasSyntax()
+ {
+ return isset($this->syntax);
+ }
+
+ public function clearSyntax()
+ {
+ unset($this->syntax);
+ }
+
+ /**
+ * The syntax of the proto file.
+ * The supported values are "proto2", "proto3", and "editions".
+ * If `edition` is present, this value must be "editions".
+ *
+ * Generated from protobuf field optional string syntax = 12;
+ * @param string $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+ /**
+ * The edition of the proto file, which is an opaque string.
+ *
+ * Generated from protobuf field optional string edition = 13;
+ * @return string
+ */
+ public function getEdition()
+ {
+ return isset($this->edition) ? $this->edition : '';
+ }
+
+ public function hasEdition()
+ {
+ return isset($this->edition);
+ }
+
+ public function clearEdition()
+ {
+ unset($this->edition);
+ }
+
+ /**
+ * The edition of the proto file, which is an opaque string.
+ *
+ * Generated from protobuf field optional string edition = 13;
+ * @param string $var
+ * @return $this
+ */
+ public function setEdition($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->edition = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorSet.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorSet.php
new file mode 100644
index 0000000..1dae6fb
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorSet.php
@@ -0,0 +1,63 @@
+google.protobuf.FileDescriptorSet
+ */
+class FileDescriptorSet extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FileDescriptorProto file = 1;
+ */
+ private $file;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Protobuf\Internal\FileDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $file
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FileDescriptorProto file = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getFile()
+ {
+ return $this->file;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.FileDescriptorProto file = 1;
+ * @param array<\Google\Protobuf\Internal\FileDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setFile($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FileDescriptorProto::class);
+ $this->file = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions.php
new file mode 100644
index 0000000..43931be
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions.php
@@ -0,0 +1,1106 @@
+google.protobuf.FileOptions
+ */
+class FileOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Sets the Java package where classes generated from this .proto will be
+ * placed. By default, the proto package is used, but this is often
+ * inappropriate because proto packages do not normally start with backwards
+ * domain names.
+ *
+ * Generated from protobuf field optional string java_package = 1;
+ */
+ protected $java_package = null;
+ /**
+ * Controls the name of the wrapper Java class generated for the .proto file.
+ * That class will always contain the .proto file's getDescriptor() method as
+ * well as any top-level extensions defined in the .proto file.
+ * If java_multiple_files is disabled, then all the other classes from the
+ * .proto file will be nested inside the single wrapper outer class.
+ *
+ * Generated from protobuf field optional string java_outer_classname = 8;
+ */
+ protected $java_outer_classname = null;
+ /**
+ * If enabled, then the Java code generator will generate a separate .java
+ * file for each top-level message, enum, and service defined in the .proto
+ * file. Thus, these types will *not* be nested inside the wrapper class
+ * named by java_outer_classname. However, the wrapper class will still be
+ * generated to contain the file's getDescriptor() method as well as any
+ * top-level extensions defined in the file.
+ *
+ * Generated from protobuf field optional bool java_multiple_files = 10 [default = false];
+ */
+ protected $java_multiple_files = null;
+ /**
+ * This option does nothing.
+ *
+ * Generated from protobuf field optional bool java_generate_equals_and_hash = 20 [deprecated = true];
+ * @deprecated
+ */
+ protected $java_generate_equals_and_hash = null;
+ /**
+ * If set true, then the Java2 code generator will generate code that
+ * throws an exception whenever an attempt is made to assign a non-UTF-8
+ * byte sequence to a string field.
+ * Message reflection will do the same.
+ * However, an extension field still accepts non-UTF-8 byte sequences.
+ * This option has no effect on when used with the lite runtime.
+ *
+ * Generated from protobuf field optional bool java_string_check_utf8 = 27 [default = false];
+ */
+ protected $java_string_check_utf8 = null;
+ /**
+ * Generated from protobuf field optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
+ */
+ protected $optimize_for = null;
+ /**
+ * Sets the Go package where structs generated from this .proto will be
+ * placed. If omitted, the Go package will be derived from the following:
+ * - The basename of the package import path, if provided.
+ * - Otherwise, the package statement in the .proto file, if present.
+ * - Otherwise, the basename of the .proto file, without extension.
+ *
+ * Generated from protobuf field optional string go_package = 11;
+ */
+ protected $go_package = null;
+ /**
+ * Should generic services be generated in each language? "Generic" services
+ * are not specific to any particular RPC system. They are generated by the
+ * main code generators in each language (without additional plugins).
+ * Generic services were the only kind of service generation supported by
+ * early versions of google.protobuf.
+ * Generic services are now considered deprecated in favor of using plugins
+ * that generate code specific to your particular RPC system. Therefore,
+ * these default to false. Old code which depends on generic services should
+ * explicitly set them to true.
+ *
+ * Generated from protobuf field optional bool cc_generic_services = 16 [default = false];
+ */
+ protected $cc_generic_services = null;
+ /**
+ * Generated from protobuf field optional bool java_generic_services = 17 [default = false];
+ */
+ protected $java_generic_services = null;
+ /**
+ * Generated from protobuf field optional bool py_generic_services = 18 [default = false];
+ */
+ protected $py_generic_services = null;
+ /**
+ * Generated from protobuf field optional bool php_generic_services = 42 [default = false];
+ */
+ protected $php_generic_services = null;
+ /**
+ * Is this file deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for everything in the file, or it will be completely ignored; in the very
+ * least, this is a formalization for deprecating files.
+ *
+ * Generated from protobuf field optional bool deprecated = 23 [default = false];
+ */
+ protected $deprecated = null;
+ /**
+ * Enables the use of arenas for the proto messages in this file. This applies
+ * only to generated classes for C++.
+ *
+ * Generated from protobuf field optional bool cc_enable_arenas = 31 [default = true];
+ */
+ protected $cc_enable_arenas = null;
+ /**
+ * Sets the objective c class prefix which is prepended to all objective c
+ * generated classes from this .proto. There is no default.
+ *
+ * Generated from protobuf field optional string objc_class_prefix = 36;
+ */
+ protected $objc_class_prefix = null;
+ /**
+ * Namespace for generated classes; defaults to the package.
+ *
+ * Generated from protobuf field optional string csharp_namespace = 37;
+ */
+ protected $csharp_namespace = null;
+ /**
+ * By default Swift generators will take the proto package and CamelCase it
+ * replacing '.' with underscore and use that to prefix the types/symbols
+ * defined. When this options is provided, they will use this value instead
+ * to prefix the types/symbols defined.
+ *
+ * Generated from protobuf field optional string swift_prefix = 39;
+ */
+ protected $swift_prefix = null;
+ /**
+ * Sets the php class prefix which is prepended to all php generated classes
+ * from this .proto. Default is empty.
+ *
+ * Generated from protobuf field optional string php_class_prefix = 40;
+ */
+ protected $php_class_prefix = null;
+ /**
+ * Use this option to change the namespace of php generated classes. Default
+ * is empty. When this option is empty, the package name will be used for
+ * determining the namespace.
+ *
+ * Generated from protobuf field optional string php_namespace = 41;
+ */
+ protected $php_namespace = null;
+ /**
+ * Use this option to change the namespace of php generated metadata classes.
+ * Default is empty. When this option is empty, the proto file name will be
+ * used for determining the namespace.
+ *
+ * Generated from protobuf field optional string php_metadata_namespace = 44;
+ */
+ protected $php_metadata_namespace = null;
+ /**
+ * Use this option to change the package of ruby generated classes. Default
+ * is empty. When this option is not set, the package name will be used for
+ * determining the ruby package.
+ *
+ * Generated from protobuf field optional string ruby_package = 45;
+ */
+ protected $ruby_package = null;
+ /**
+ * The parser stores options it doesn't recognize here.
+ * See the documentation for the "Options" section above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ */
+ private $uninterpreted_option;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $java_package
+ * Sets the Java package where classes generated from this .proto will be
+ * placed. By default, the proto package is used, but this is often
+ * inappropriate because proto packages do not normally start with backwards
+ * domain names.
+ * @type string $java_outer_classname
+ * Controls the name of the wrapper Java class generated for the .proto file.
+ * That class will always contain the .proto file's getDescriptor() method as
+ * well as any top-level extensions defined in the .proto file.
+ * If java_multiple_files is disabled, then all the other classes from the
+ * .proto file will be nested inside the single wrapper outer class.
+ * @type bool $java_multiple_files
+ * If enabled, then the Java code generator will generate a separate .java
+ * file for each top-level message, enum, and service defined in the .proto
+ * file. Thus, these types will *not* be nested inside the wrapper class
+ * named by java_outer_classname. However, the wrapper class will still be
+ * generated to contain the file's getDescriptor() method as well as any
+ * top-level extensions defined in the file.
+ * @type bool $java_generate_equals_and_hash
+ * This option does nothing.
+ * @type bool $java_string_check_utf8
+ * If set true, then the Java2 code generator will generate code that
+ * throws an exception whenever an attempt is made to assign a non-UTF-8
+ * byte sequence to a string field.
+ * Message reflection will do the same.
+ * However, an extension field still accepts non-UTF-8 byte sequences.
+ * This option has no effect on when used with the lite runtime.
+ * @type int $optimize_for
+ * @type string $go_package
+ * Sets the Go package where structs generated from this .proto will be
+ * placed. If omitted, the Go package will be derived from the following:
+ * - The basename of the package import path, if provided.
+ * - Otherwise, the package statement in the .proto file, if present.
+ * - Otherwise, the basename of the .proto file, without extension.
+ * @type bool $cc_generic_services
+ * Should generic services be generated in each language? "Generic" services
+ * are not specific to any particular RPC system. They are generated by the
+ * main code generators in each language (without additional plugins).
+ * Generic services were the only kind of service generation supported by
+ * early versions of google.protobuf.
+ * Generic services are now considered deprecated in favor of using plugins
+ * that generate code specific to your particular RPC system. Therefore,
+ * these default to false. Old code which depends on generic services should
+ * explicitly set them to true.
+ * @type bool $java_generic_services
+ * @type bool $py_generic_services
+ * @type bool $php_generic_services
+ * @type bool $deprecated
+ * Is this file deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for everything in the file, or it will be completely ignored; in the very
+ * least, this is a formalization for deprecating files.
+ * @type bool $cc_enable_arenas
+ * Enables the use of arenas for the proto messages in this file. This applies
+ * only to generated classes for C++.
+ * @type string $objc_class_prefix
+ * Sets the objective c class prefix which is prepended to all objective c
+ * generated classes from this .proto. There is no default.
+ * @type string $csharp_namespace
+ * Namespace for generated classes; defaults to the package.
+ * @type string $swift_prefix
+ * By default Swift generators will take the proto package and CamelCase it
+ * replacing '.' with underscore and use that to prefix the types/symbols
+ * defined. When this options is provided, they will use this value instead
+ * to prefix the types/symbols defined.
+ * @type string $php_class_prefix
+ * Sets the php class prefix which is prepended to all php generated classes
+ * from this .proto. Default is empty.
+ * @type string $php_namespace
+ * Use this option to change the namespace of php generated classes. Default
+ * is empty. When this option is empty, the package name will be used for
+ * determining the namespace.
+ * @type string $php_metadata_namespace
+ * Use this option to change the namespace of php generated metadata classes.
+ * Default is empty. When this option is empty, the proto file name will be
+ * used for determining the namespace.
+ * @type string $ruby_package
+ * Use this option to change the package of ruby generated classes. Default
+ * is empty. When this option is not set, the package name will be used for
+ * determining the ruby package.
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here.
+ * See the documentation for the "Options" section above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Sets the Java package where classes generated from this .proto will be
+ * placed. By default, the proto package is used, but this is often
+ * inappropriate because proto packages do not normally start with backwards
+ * domain names.
+ *
+ * Generated from protobuf field optional string java_package = 1;
+ * @return string
+ */
+ public function getJavaPackage()
+ {
+ return isset($this->java_package) ? $this->java_package : '';
+ }
+
+ public function hasJavaPackage()
+ {
+ return isset($this->java_package);
+ }
+
+ public function clearJavaPackage()
+ {
+ unset($this->java_package);
+ }
+
+ /**
+ * Sets the Java package where classes generated from this .proto will be
+ * placed. By default, the proto package is used, but this is often
+ * inappropriate because proto packages do not normally start with backwards
+ * domain names.
+ *
+ * Generated from protobuf field optional string java_package = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setJavaPackage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->java_package = $var;
+
+ return $this;
+ }
+
+ /**
+ * Controls the name of the wrapper Java class generated for the .proto file.
+ * That class will always contain the .proto file's getDescriptor() method as
+ * well as any top-level extensions defined in the .proto file.
+ * If java_multiple_files is disabled, then all the other classes from the
+ * .proto file will be nested inside the single wrapper outer class.
+ *
+ * Generated from protobuf field optional string java_outer_classname = 8;
+ * @return string
+ */
+ public function getJavaOuterClassname()
+ {
+ return isset($this->java_outer_classname) ? $this->java_outer_classname : '';
+ }
+
+ public function hasJavaOuterClassname()
+ {
+ return isset($this->java_outer_classname);
+ }
+
+ public function clearJavaOuterClassname()
+ {
+ unset($this->java_outer_classname);
+ }
+
+ /**
+ * Controls the name of the wrapper Java class generated for the .proto file.
+ * That class will always contain the .proto file's getDescriptor() method as
+ * well as any top-level extensions defined in the .proto file.
+ * If java_multiple_files is disabled, then all the other classes from the
+ * .proto file will be nested inside the single wrapper outer class.
+ *
+ * Generated from protobuf field optional string java_outer_classname = 8;
+ * @param string $var
+ * @return $this
+ */
+ public function setJavaOuterClassname($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->java_outer_classname = $var;
+
+ return $this;
+ }
+
+ /**
+ * If enabled, then the Java code generator will generate a separate .java
+ * file for each top-level message, enum, and service defined in the .proto
+ * file. Thus, these types will *not* be nested inside the wrapper class
+ * named by java_outer_classname. However, the wrapper class will still be
+ * generated to contain the file's getDescriptor() method as well as any
+ * top-level extensions defined in the file.
+ *
+ * Generated from protobuf field optional bool java_multiple_files = 10 [default = false];
+ * @return bool
+ */
+ public function getJavaMultipleFiles()
+ {
+ return isset($this->java_multiple_files) ? $this->java_multiple_files : false;
+ }
+
+ public function hasJavaMultipleFiles()
+ {
+ return isset($this->java_multiple_files);
+ }
+
+ public function clearJavaMultipleFiles()
+ {
+ unset($this->java_multiple_files);
+ }
+
+ /**
+ * If enabled, then the Java code generator will generate a separate .java
+ * file for each top-level message, enum, and service defined in the .proto
+ * file. Thus, these types will *not* be nested inside the wrapper class
+ * named by java_outer_classname. However, the wrapper class will still be
+ * generated to contain the file's getDescriptor() method as well as any
+ * top-level extensions defined in the file.
+ *
+ * Generated from protobuf field optional bool java_multiple_files = 10 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setJavaMultipleFiles($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->java_multiple_files = $var;
+
+ return $this;
+ }
+
+ /**
+ * This option does nothing.
+ *
+ * Generated from protobuf field optional bool java_generate_equals_and_hash = 20 [deprecated = true];
+ * @return bool
+ * @deprecated
+ */
+ public function getJavaGenerateEqualsAndHash()
+ {
+ @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED);
+ return isset($this->java_generate_equals_and_hash) ? $this->java_generate_equals_and_hash : false;
+ }
+
+ public function hasJavaGenerateEqualsAndHash()
+ {
+ @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED);
+ return isset($this->java_generate_equals_and_hash);
+ }
+
+ public function clearJavaGenerateEqualsAndHash()
+ {
+ @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED);
+ unset($this->java_generate_equals_and_hash);
+ }
+
+ /**
+ * This option does nothing.
+ *
+ * Generated from protobuf field optional bool java_generate_equals_and_hash = 20 [deprecated = true];
+ * @param bool $var
+ * @return $this
+ * @deprecated
+ */
+ public function setJavaGenerateEqualsAndHash($var)
+ {
+ @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED);
+ GPBUtil::checkBool($var);
+ $this->java_generate_equals_and_hash = $var;
+
+ return $this;
+ }
+
+ /**
+ * If set true, then the Java2 code generator will generate code that
+ * throws an exception whenever an attempt is made to assign a non-UTF-8
+ * byte sequence to a string field.
+ * Message reflection will do the same.
+ * However, an extension field still accepts non-UTF-8 byte sequences.
+ * This option has no effect on when used with the lite runtime.
+ *
+ * Generated from protobuf field optional bool java_string_check_utf8 = 27 [default = false];
+ * @return bool
+ */
+ public function getJavaStringCheckUtf8()
+ {
+ return isset($this->java_string_check_utf8) ? $this->java_string_check_utf8 : false;
+ }
+
+ public function hasJavaStringCheckUtf8()
+ {
+ return isset($this->java_string_check_utf8);
+ }
+
+ public function clearJavaStringCheckUtf8()
+ {
+ unset($this->java_string_check_utf8);
+ }
+
+ /**
+ * If set true, then the Java2 code generator will generate code that
+ * throws an exception whenever an attempt is made to assign a non-UTF-8
+ * byte sequence to a string field.
+ * Message reflection will do the same.
+ * However, an extension field still accepts non-UTF-8 byte sequences.
+ * This option has no effect on when used with the lite runtime.
+ *
+ * Generated from protobuf field optional bool java_string_check_utf8 = 27 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setJavaStringCheckUtf8($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->java_string_check_utf8 = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
+ * @return int
+ */
+ public function getOptimizeFor()
+ {
+ return isset($this->optimize_for) ? $this->optimize_for : 0;
+ }
+
+ public function hasOptimizeFor()
+ {
+ return isset($this->optimize_for);
+ }
+
+ public function clearOptimizeFor()
+ {
+ unset($this->optimize_for);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
+ * @param int $var
+ * @return $this
+ */
+ public function setOptimizeFor($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FileOptions\OptimizeMode::class);
+ $this->optimize_for = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the Go package where structs generated from this .proto will be
+ * placed. If omitted, the Go package will be derived from the following:
+ * - The basename of the package import path, if provided.
+ * - Otherwise, the package statement in the .proto file, if present.
+ * - Otherwise, the basename of the .proto file, without extension.
+ *
+ * Generated from protobuf field optional string go_package = 11;
+ * @return string
+ */
+ public function getGoPackage()
+ {
+ return isset($this->go_package) ? $this->go_package : '';
+ }
+
+ public function hasGoPackage()
+ {
+ return isset($this->go_package);
+ }
+
+ public function clearGoPackage()
+ {
+ unset($this->go_package);
+ }
+
+ /**
+ * Sets the Go package where structs generated from this .proto will be
+ * placed. If omitted, the Go package will be derived from the following:
+ * - The basename of the package import path, if provided.
+ * - Otherwise, the package statement in the .proto file, if present.
+ * - Otherwise, the basename of the .proto file, without extension.
+ *
+ * Generated from protobuf field optional string go_package = 11;
+ * @param string $var
+ * @return $this
+ */
+ public function setGoPackage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->go_package = $var;
+
+ return $this;
+ }
+
+ /**
+ * Should generic services be generated in each language? "Generic" services
+ * are not specific to any particular RPC system. They are generated by the
+ * main code generators in each language (without additional plugins).
+ * Generic services were the only kind of service generation supported by
+ * early versions of google.protobuf.
+ * Generic services are now considered deprecated in favor of using plugins
+ * that generate code specific to your particular RPC system. Therefore,
+ * these default to false. Old code which depends on generic services should
+ * explicitly set them to true.
+ *
+ * Generated from protobuf field optional bool cc_generic_services = 16 [default = false];
+ * @return bool
+ */
+ public function getCcGenericServices()
+ {
+ return isset($this->cc_generic_services) ? $this->cc_generic_services : false;
+ }
+
+ public function hasCcGenericServices()
+ {
+ return isset($this->cc_generic_services);
+ }
+
+ public function clearCcGenericServices()
+ {
+ unset($this->cc_generic_services);
+ }
+
+ /**
+ * Should generic services be generated in each language? "Generic" services
+ * are not specific to any particular RPC system. They are generated by the
+ * main code generators in each language (without additional plugins).
+ * Generic services were the only kind of service generation supported by
+ * early versions of google.protobuf.
+ * Generic services are now considered deprecated in favor of using plugins
+ * that generate code specific to your particular RPC system. Therefore,
+ * these default to false. Old code which depends on generic services should
+ * explicitly set them to true.
+ *
+ * Generated from protobuf field optional bool cc_generic_services = 16 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setCcGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->cc_generic_services = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional bool java_generic_services = 17 [default = false];
+ * @return bool
+ */
+ public function getJavaGenericServices()
+ {
+ return isset($this->java_generic_services) ? $this->java_generic_services : false;
+ }
+
+ public function hasJavaGenericServices()
+ {
+ return isset($this->java_generic_services);
+ }
+
+ public function clearJavaGenericServices()
+ {
+ unset($this->java_generic_services);
+ }
+
+ /**
+ * Generated from protobuf field optional bool java_generic_services = 17 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setJavaGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->java_generic_services = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional bool py_generic_services = 18 [default = false];
+ * @return bool
+ */
+ public function getPyGenericServices()
+ {
+ return isset($this->py_generic_services) ? $this->py_generic_services : false;
+ }
+
+ public function hasPyGenericServices()
+ {
+ return isset($this->py_generic_services);
+ }
+
+ public function clearPyGenericServices()
+ {
+ unset($this->py_generic_services);
+ }
+
+ /**
+ * Generated from protobuf field optional bool py_generic_services = 18 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setPyGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->py_generic_services = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional bool php_generic_services = 42 [default = false];
+ * @return bool
+ */
+ public function getPhpGenericServices()
+ {
+ return isset($this->php_generic_services) ? $this->php_generic_services : false;
+ }
+
+ public function hasPhpGenericServices()
+ {
+ return isset($this->php_generic_services);
+ }
+
+ public function clearPhpGenericServices()
+ {
+ unset($this->php_generic_services);
+ }
+
+ /**
+ * Generated from protobuf field optional bool php_generic_services = 42 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setPhpGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->php_generic_services = $var;
+
+ return $this;
+ }
+
+ /**
+ * Is this file deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for everything in the file, or it will be completely ignored; in the very
+ * least, this is a formalization for deprecating files.
+ *
+ * Generated from protobuf field optional bool deprecated = 23 [default = false];
+ * @return bool
+ */
+ public function getDeprecated()
+ {
+ return isset($this->deprecated) ? $this->deprecated : false;
+ }
+
+ public function hasDeprecated()
+ {
+ return isset($this->deprecated);
+ }
+
+ public function clearDeprecated()
+ {
+ unset($this->deprecated);
+ }
+
+ /**
+ * Is this file deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for everything in the file, or it will be completely ignored; in the very
+ * least, this is a formalization for deprecating files.
+ *
+ * Generated from protobuf field optional bool deprecated = 23 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+
+ return $this;
+ }
+
+ /**
+ * Enables the use of arenas for the proto messages in this file. This applies
+ * only to generated classes for C++.
+ *
+ * Generated from protobuf field optional bool cc_enable_arenas = 31 [default = true];
+ * @return bool
+ */
+ public function getCcEnableArenas()
+ {
+ return isset($this->cc_enable_arenas) ? $this->cc_enable_arenas : false;
+ }
+
+ public function hasCcEnableArenas()
+ {
+ return isset($this->cc_enable_arenas);
+ }
+
+ public function clearCcEnableArenas()
+ {
+ unset($this->cc_enable_arenas);
+ }
+
+ /**
+ * Enables the use of arenas for the proto messages in this file. This applies
+ * only to generated classes for C++.
+ *
+ * Generated from protobuf field optional bool cc_enable_arenas = 31 [default = true];
+ * @param bool $var
+ * @return $this
+ */
+ public function setCcEnableArenas($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->cc_enable_arenas = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the objective c class prefix which is prepended to all objective c
+ * generated classes from this .proto. There is no default.
+ *
+ * Generated from protobuf field optional string objc_class_prefix = 36;
+ * @return string
+ */
+ public function getObjcClassPrefix()
+ {
+ return isset($this->objc_class_prefix) ? $this->objc_class_prefix : '';
+ }
+
+ public function hasObjcClassPrefix()
+ {
+ return isset($this->objc_class_prefix);
+ }
+
+ public function clearObjcClassPrefix()
+ {
+ unset($this->objc_class_prefix);
+ }
+
+ /**
+ * Sets the objective c class prefix which is prepended to all objective c
+ * generated classes from this .proto. There is no default.
+ *
+ * Generated from protobuf field optional string objc_class_prefix = 36;
+ * @param string $var
+ * @return $this
+ */
+ public function setObjcClassPrefix($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->objc_class_prefix = $var;
+
+ return $this;
+ }
+
+ /**
+ * Namespace for generated classes; defaults to the package.
+ *
+ * Generated from protobuf field optional string csharp_namespace = 37;
+ * @return string
+ */
+ public function getCsharpNamespace()
+ {
+ return isset($this->csharp_namespace) ? $this->csharp_namespace : '';
+ }
+
+ public function hasCsharpNamespace()
+ {
+ return isset($this->csharp_namespace);
+ }
+
+ public function clearCsharpNamespace()
+ {
+ unset($this->csharp_namespace);
+ }
+
+ /**
+ * Namespace for generated classes; defaults to the package.
+ *
+ * Generated from protobuf field optional string csharp_namespace = 37;
+ * @param string $var
+ * @return $this
+ */
+ public function setCsharpNamespace($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->csharp_namespace = $var;
+
+ return $this;
+ }
+
+ /**
+ * By default Swift generators will take the proto package and CamelCase it
+ * replacing '.' with underscore and use that to prefix the types/symbols
+ * defined. When this options is provided, they will use this value instead
+ * to prefix the types/symbols defined.
+ *
+ * Generated from protobuf field optional string swift_prefix = 39;
+ * @return string
+ */
+ public function getSwiftPrefix()
+ {
+ return isset($this->swift_prefix) ? $this->swift_prefix : '';
+ }
+
+ public function hasSwiftPrefix()
+ {
+ return isset($this->swift_prefix);
+ }
+
+ public function clearSwiftPrefix()
+ {
+ unset($this->swift_prefix);
+ }
+
+ /**
+ * By default Swift generators will take the proto package and CamelCase it
+ * replacing '.' with underscore and use that to prefix the types/symbols
+ * defined. When this options is provided, they will use this value instead
+ * to prefix the types/symbols defined.
+ *
+ * Generated from protobuf field optional string swift_prefix = 39;
+ * @param string $var
+ * @return $this
+ */
+ public function setSwiftPrefix($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->swift_prefix = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the php class prefix which is prepended to all php generated classes
+ * from this .proto. Default is empty.
+ *
+ * Generated from protobuf field optional string php_class_prefix = 40;
+ * @return string
+ */
+ public function getPhpClassPrefix()
+ {
+ return isset($this->php_class_prefix) ? $this->php_class_prefix : '';
+ }
+
+ public function hasPhpClassPrefix()
+ {
+ return isset($this->php_class_prefix);
+ }
+
+ public function clearPhpClassPrefix()
+ {
+ unset($this->php_class_prefix);
+ }
+
+ /**
+ * Sets the php class prefix which is prepended to all php generated classes
+ * from this .proto. Default is empty.
+ *
+ * Generated from protobuf field optional string php_class_prefix = 40;
+ * @param string $var
+ * @return $this
+ */
+ public function setPhpClassPrefix($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->php_class_prefix = $var;
+
+ return $this;
+ }
+
+ /**
+ * Use this option to change the namespace of php generated classes. Default
+ * is empty. When this option is empty, the package name will be used for
+ * determining the namespace.
+ *
+ * Generated from protobuf field optional string php_namespace = 41;
+ * @return string
+ */
+ public function getPhpNamespace()
+ {
+ return isset($this->php_namespace) ? $this->php_namespace : '';
+ }
+
+ public function hasPhpNamespace()
+ {
+ return isset($this->php_namespace);
+ }
+
+ public function clearPhpNamespace()
+ {
+ unset($this->php_namespace);
+ }
+
+ /**
+ * Use this option to change the namespace of php generated classes. Default
+ * is empty. When this option is empty, the package name will be used for
+ * determining the namespace.
+ *
+ * Generated from protobuf field optional string php_namespace = 41;
+ * @param string $var
+ * @return $this
+ */
+ public function setPhpNamespace($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->php_namespace = $var;
+
+ return $this;
+ }
+
+ /**
+ * Use this option to change the namespace of php generated metadata classes.
+ * Default is empty. When this option is empty, the proto file name will be
+ * used for determining the namespace.
+ *
+ * Generated from protobuf field optional string php_metadata_namespace = 44;
+ * @return string
+ */
+ public function getPhpMetadataNamespace()
+ {
+ return isset($this->php_metadata_namespace) ? $this->php_metadata_namespace : '';
+ }
+
+ public function hasPhpMetadataNamespace()
+ {
+ return isset($this->php_metadata_namespace);
+ }
+
+ public function clearPhpMetadataNamespace()
+ {
+ unset($this->php_metadata_namespace);
+ }
+
+ /**
+ * Use this option to change the namespace of php generated metadata classes.
+ * Default is empty. When this option is empty, the proto file name will be
+ * used for determining the namespace.
+ *
+ * Generated from protobuf field optional string php_metadata_namespace = 44;
+ * @param string $var
+ * @return $this
+ */
+ public function setPhpMetadataNamespace($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->php_metadata_namespace = $var;
+
+ return $this;
+ }
+
+ /**
+ * Use this option to change the package of ruby generated classes. Default
+ * is empty. When this option is not set, the package name will be used for
+ * determining the ruby package.
+ *
+ * Generated from protobuf field optional string ruby_package = 45;
+ * @return string
+ */
+ public function getRubyPackage()
+ {
+ return isset($this->ruby_package) ? $this->ruby_package : '';
+ }
+
+ public function hasRubyPackage()
+ {
+ return isset($this->ruby_package);
+ }
+
+ public function clearRubyPackage()
+ {
+ unset($this->ruby_package);
+ }
+
+ /**
+ * Use this option to change the package of ruby generated classes. Default
+ * is empty. When this option is not set, the package name will be used for
+ * determining the ruby package.
+ *
+ * Generated from protobuf field optional string ruby_package = 45;
+ * @param string $var
+ * @return $this
+ */
+ public function setRubyPackage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->ruby_package = $var;
+
+ return $this;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here.
+ * See the documentation for the "Options" section above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here.
+ * See the documentation for the "Options" section above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php
new file mode 100644
index 0000000..0df27b5
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php
@@ -0,0 +1,64 @@
+google.protobuf.FileOptions.OptimizeMode
+ */
+class OptimizeMode
+{
+ /**
+ * Generate complete code for parsing, serialization,
+ *
+ * Generated from protobuf enum SPEED = 1;
+ */
+ const SPEED = 1;
+ /**
+ * etc.
+ *
+ * Generated from protobuf enum CODE_SIZE = 2;
+ */
+ const CODE_SIZE = 2;
+ /**
+ * Generate code using MessageLite and the lite runtime.
+ *
+ * Generated from protobuf enum LITE_RUNTIME = 3;
+ */
+ const LITE_RUNTIME = 3;
+
+ private static $valueToName = [
+ self::SPEED => 'SPEED',
+ self::CODE_SIZE => 'CODE_SIZE',
+ self::LITE_RUNTIME => 'LITE_RUNTIME',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(OptimizeMode::class, \Google\Protobuf\Internal\FileOptions_OptimizeMode::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php
new file mode 100644
index 0000000..8926e63
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php
@@ -0,0 +1,16 @@
+writeRaw("\"", 1);
+ $field_name = GPBJsonWire::formatFieldName($field);
+ $output->writeRaw($field_name, strlen($field_name));
+ $output->writeRaw("\":", 2);
+ }
+ return static::serializeFieldValueToStream(
+ $value,
+ $field,
+ $output,
+ !$has_field_name);
+ }
+
+ public static function serializeFieldValueToStream(
+ $values,
+ $field,
+ &$output,
+ $is_well_known = false)
+ {
+ if ($field->isMap()) {
+ $output->writeRaw("{", 1);
+ $first = true;
+ $map_entry = $field->getMessageType();
+ $key_field = $map_entry->getFieldByNumber(1);
+ $value_field = $map_entry->getFieldByNumber(2);
+
+ switch ($key_field->getType()) {
+ case GPBType::STRING:
+ case GPBType::SFIXED64:
+ case GPBType::INT64:
+ case GPBType::SINT64:
+ case GPBType::FIXED64:
+ case GPBType::UINT64:
+ $additional_quote = false;
+ break;
+ default:
+ $additional_quote = true;
+ }
+
+ foreach ($values as $key => $value) {
+ if ($first) {
+ $first = false;
+ } else {
+ $output->writeRaw(",", 1);
+ }
+ if ($additional_quote) {
+ $output->writeRaw("\"", 1);
+ }
+ if (!static::serializeSingularFieldValueToStream(
+ $key,
+ $key_field,
+ $output,
+ $is_well_known)) {
+ return false;
+ }
+ if ($additional_quote) {
+ $output->writeRaw("\"", 1);
+ }
+ $output->writeRaw(":", 1);
+ if (!static::serializeSingularFieldValueToStream(
+ $value,
+ $value_field,
+ $output,
+ $is_well_known)) {
+ return false;
+ }
+ }
+ $output->writeRaw("}", 1);
+ return true;
+ } elseif ($field->isRepeated()) {
+ $output->writeRaw("[", 1);
+ $first = true;
+ foreach ($values as $value) {
+ if ($first) {
+ $first = false;
+ } else {
+ $output->writeRaw(",", 1);
+ }
+ if (!static::serializeSingularFieldValueToStream(
+ $value,
+ $field,
+ $output,
+ $is_well_known)) {
+ return false;
+ }
+ }
+ $output->writeRaw("]", 1);
+ return true;
+ } else {
+ return static::serializeSingularFieldValueToStream(
+ $values,
+ $field,
+ $output,
+ $is_well_known);
+ }
+ }
+
+ private static function serializeSingularFieldValueToStream(
+ $value,
+ $field,
+ &$output, $is_well_known = false)
+ {
+ switch ($field->getType()) {
+ case GPBType::SFIXED32:
+ case GPBType::SINT32:
+ case GPBType::INT32:
+ $str_value = strval($value);
+ $output->writeRaw($str_value, strlen($str_value));
+ break;
+ case GPBType::FIXED32:
+ case GPBType::UINT32:
+ if ($value < 0) {
+ $value = bcadd($value, "4294967296");
+ }
+ $str_value = strval($value);
+ $output->writeRaw($str_value, strlen($str_value));
+ break;
+ case GPBType::FIXED64:
+ case GPBType::UINT64:
+ if ($value < 0) {
+ $value = bcadd($value, "18446744073709551616");
+ }
+ // Intentional fall through.
+ case GPBType::SFIXED64:
+ case GPBType::INT64:
+ case GPBType::SINT64:
+ $output->writeRaw("\"", 1);
+ $str_value = strval($value);
+ $output->writeRaw($str_value, strlen($str_value));
+ $output->writeRaw("\"", 1);
+ break;
+ case GPBType::FLOAT:
+ if (is_nan($value)) {
+ $str_value = "\"NaN\"";
+ } elseif ($value === INF) {
+ $str_value = "\"Infinity\"";
+ } elseif ($value === -INF) {
+ $str_value = "\"-Infinity\"";
+ } else {
+ $str_value = sprintf("%.8g", $value);
+ }
+ $output->writeRaw($str_value, strlen($str_value));
+ break;
+ case GPBType::DOUBLE:
+ if (is_nan($value)) {
+ $str_value = "\"NaN\"";
+ } elseif ($value === INF) {
+ $str_value = "\"Infinity\"";
+ } elseif ($value === -INF) {
+ $str_value = "\"-Infinity\"";
+ } else {
+ $str_value = sprintf("%.17g", $value);
+ }
+ $output->writeRaw($str_value, strlen($str_value));
+ break;
+ case GPBType::ENUM:
+ $enum_desc = $field->getEnumType();
+ if ($enum_desc->getClass() === "Google\Protobuf\NullValue") {
+ $output->writeRaw("null", 4);
+ break;
+ }
+ $enum_value_desc = $enum_desc->getValueByNumber($value);
+ if (!is_null($enum_value_desc)) {
+ $str_value = $enum_value_desc->getName();
+ $output->writeRaw("\"", 1);
+ $output->writeRaw($str_value, strlen($str_value));
+ $output->writeRaw("\"", 1);
+ } else {
+ $str_value = strval($value);
+ $output->writeRaw($str_value, strlen($str_value));
+ }
+ break;
+ case GPBType::BOOL:
+ if ($value) {
+ $output->writeRaw("true", 4);
+ } else {
+ $output->writeRaw("false", 5);
+ }
+ break;
+ case GPBType::BYTES:
+ $bytes_value = base64_encode($value);
+ $output->writeRaw("\"", 1);
+ $output->writeRaw($bytes_value, strlen($bytes_value));
+ $output->writeRaw("\"", 1);
+ break;
+ case GPBType::STRING:
+ $value = json_encode($value, JSON_UNESCAPED_UNICODE);
+ $output->writeRaw($value, strlen($value));
+ break;
+ // case GPBType::GROUP:
+ // echo "GROUP\xA";
+ // trigger_error("Not implemented.", E_ERROR);
+ // break;
+ case GPBType::MESSAGE:
+ $value->serializeToJsonStream($output);
+ break;
+ default:
+ user_error("Unsupported type.");
+ return false;
+ }
+ return true;
+ }
+
+ private static function formatFieldName($field)
+ {
+ return $field->getJsonName();
+ }
+
+ // Used for escaping control chars in strings.
+ private static $k_control_char_limit = 0x20;
+
+ private static function jsonNiceEscape($c)
+ {
+ switch ($c) {
+ case '"': return "\\\"";
+ case '\\': return "\\\\";
+ case '/': return "\\/";
+ case '\b': return "\\b";
+ case '\f': return "\\f";
+ case '\n': return "\\n";
+ case '\r': return "\\r";
+ case '\t': return "\\t";
+ default: return NULL;
+ }
+ }
+
+ private static function isJsonEscaped($c)
+ {
+ // See RFC 4627.
+ return $c < chr($k_control_char_limit) || $c === "\"" || $c === "\\";
+ }
+
+ public static function escapedJson($value)
+ {
+ $escaped_value = "";
+ $unescaped_run = "";
+ for ($i = 0; $i < strlen($value); $i++) {
+ $c = $value[$i];
+ // Handle escaping.
+ if (static::isJsonEscaped($c)) {
+ // Use a "nice" escape, like \n, if one exists for this
+ // character.
+ $escape = static::jsonNiceEscape($c);
+ if (is_null($escape)) {
+ $escape = "\\u00" . bin2hex($c);
+ }
+ if ($unescaped_run !== "") {
+ $escaped_value .= $unescaped_run;
+ $unescaped_run = "";
+ }
+ $escaped_value .= $escape;
+ } else {
+ if ($unescaped_run === "") {
+ $unescaped_run .= $c;
+ }
+ }
+ }
+ $escaped_value .= $unescaped_run;
+ return $escaped_value;
+ }
+
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBLabel.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBLabel.php
new file mode 100644
index 0000000..7f13998
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBLabel.php
@@ -0,0 +1,17 @@
+ 0) {
+ $high = (int) bcsub($high, 4294967296);
+ } else {
+ $high = (int) $high;
+ }
+ if (bccomp($low, 2147483647) > 0) {
+ $low = (int) bcsub($low, 4294967296);
+ } else {
+ $low = (int) $low;
+ }
+
+ if ($isNeg) {
+ $high = ~$high;
+ $low = ~$low;
+ $low++;
+ if (!$low) {
+ $high = (int)($high + 1);
+ }
+ }
+
+ if ($trim) {
+ $high = 0;
+ }
+ }
+
+ public static function checkString(&$var, $check_utf8)
+ {
+ if (is_array($var) || is_object($var)) {
+ throw new \InvalidArgumentException("Expect string.");
+ }
+ if (!is_string($var)) {
+ $var = strval($var);
+ }
+ if ($check_utf8 && !preg_match('//u', $var)) {
+ throw new \Exception("Expect utf-8 encoding.");
+ }
+ }
+
+ public static function checkEnum(&$var)
+ {
+ static::checkInt32($var);
+ }
+
+ public static function checkInt32(&$var)
+ {
+ if (is_numeric($var)) {
+ $var = intval($var);
+ } else {
+ throw new \Exception("Expect integer.");
+ }
+ }
+
+ public static function checkUint32(&$var)
+ {
+ if (is_numeric($var)) {
+ if (PHP_INT_SIZE === 8) {
+ $var = intval($var);
+ $var |= ((-(($var >> 31) & 0x1)) & ~0xFFFFFFFF);
+ } else {
+ if (bccomp($var, 0x7FFFFFFF) > 0) {
+ $var = bcsub($var, "4294967296");
+ }
+ $var = (int) $var;
+ }
+ } else {
+ throw new \Exception("Expect integer.");
+ }
+ }
+
+ public static function checkInt64(&$var)
+ {
+ if (is_numeric($var)) {
+ if (PHP_INT_SIZE == 8) {
+ $var = intval($var);
+ } else {
+ if (is_float($var) ||
+ is_integer($var) ||
+ (is_string($var) &&
+ bccomp($var, "9223372036854774784") < 0)) {
+ $var = number_format($var, 0, ".", "");
+ }
+ }
+ } else {
+ throw new \Exception("Expect integer.");
+ }
+ }
+
+ public static function checkUint64(&$var)
+ {
+ if (is_numeric($var)) {
+ if (PHP_INT_SIZE == 8) {
+ $var = intval($var);
+ } else {
+ $var = number_format($var, 0, ".", "");
+ }
+ } else {
+ throw new \Exception("Expect integer.");
+ }
+ }
+
+ public static function checkFloat(&$var)
+ {
+ if (is_float($var) || is_numeric($var)) {
+ $var = unpack("f", pack("f", $var))[1];
+ } else {
+ throw new \Exception("Expect float.");
+ }
+ }
+
+ public static function checkDouble(&$var)
+ {
+ if (is_float($var) || is_numeric($var)) {
+ $var = floatval($var);
+ } else {
+ throw new \Exception("Expect float.");
+ }
+ }
+
+ public static function checkBool(&$var)
+ {
+ if (is_array($var) || is_object($var)) {
+ throw new \Exception("Expect boolean.");
+ }
+ $var = boolval($var);
+ }
+
+ public static function checkMessage(&$var, $klass, $newClass = null)
+ {
+ if (!$var instanceof $klass && !is_null($var)) {
+ throw new \Exception("Expect $klass.");
+ }
+ }
+
+ public static function checkRepeatedField(&$var, $type, $klass = null)
+ {
+ if (!$var instanceof RepeatedField && !is_array($var)) {
+ throw new \Exception("Expect array.");
+ }
+ if (is_array($var)) {
+ $tmp = new RepeatedField($type, $klass);
+ foreach ($var as $value) {
+ $tmp[] = $value;
+ }
+ return $tmp;
+ } else {
+ if ($var->getType() != $type) {
+ throw new \Exception(
+ "Expect repeated field of different type.");
+ }
+ if ($var->getType() === GPBType::MESSAGE &&
+ $var->getClass() !== $klass &&
+ $var->getLegacyClass() !== $klass) {
+ throw new \Exception(
+ "Expect repeated field of " . $klass . ".");
+ }
+ return $var;
+ }
+ }
+
+ public static function checkMapField(&$var, $key_type, $value_type, $klass = null)
+ {
+ if (!$var instanceof MapField && !is_array($var)) {
+ throw new \Exception("Expect dict.");
+ }
+ if (is_array($var)) {
+ $tmp = new MapField($key_type, $value_type, $klass);
+ foreach ($var as $key => $value) {
+ $tmp[$key] = $value;
+ }
+ return $tmp;
+ } else {
+ if ($var->getKeyType() != $key_type) {
+ throw new \Exception("Expect map field of key type.");
+ }
+ if ($var->getValueType() != $value_type) {
+ throw new \Exception("Expect map field of value type.");
+ }
+ if ($var->getValueType() === GPBType::MESSAGE &&
+ $var->getValueClass() !== $klass &&
+ $var->getLegacyValueClass() !== $klass) {
+ throw new \Exception(
+ "Expect map field of " . $klass . ".");
+ }
+ return $var;
+ }
+ }
+
+ public static function Int64($value)
+ {
+ return new Int64($value);
+ }
+
+ public static function Uint64($value)
+ {
+ return new Uint64($value);
+ }
+
+ public static function getClassNamePrefix(
+ $classname,
+ $file_proto)
+ {
+ $option = $file_proto->getOptions();
+ $prefix = is_null($option) ? "" : $option->getPhpClassPrefix();
+ if ($prefix !== "") {
+ return $prefix;
+ }
+
+ $reserved_words = array(
+ "abstract"=>0, "and"=>0, "array"=>0, "as"=>0, "break"=>0,
+ "callable"=>0, "case"=>0, "catch"=>0, "class"=>0, "clone"=>0,
+ "const"=>0, "continue"=>0, "declare"=>0, "default"=>0, "die"=>0,
+ "do"=>0, "echo"=>0, "else"=>0, "elseif"=>0, "empty"=>0,
+ "enddeclare"=>0, "endfor"=>0, "endforeach"=>0, "endif"=>0,
+ "endswitch"=>0, "endwhile"=>0, "eval"=>0, "exit"=>0, "extends"=>0,
+ "final"=>0, "finally"=>0, "fn"=>0, "for"=>0, "foreach"=>0,
+ "function"=>0, "global"=>0, "goto"=>0, "if"=>0, "implements"=>0,
+ "include"=>0, "include_once"=>0, "instanceof"=>0, "insteadof"=>0,
+ "interface"=>0, "isset"=>0, "list"=>0, "match"=>0, "namespace"=>0,
+ "new"=>0, "or"=>0, "parent"=>0, "print"=>0, "private"=>0,
+ "protected"=>0,"public"=>0, "readonly" => 0,"require"=>0,
+ "require_once"=>0,"return"=>0, "self"=>0, "static"=>0, "switch"=>0,
+ "throw"=>0,"trait"=>0, "try"=>0,"unset"=>0, "use"=>0, "var"=>0,
+ "while"=>0,"xor"=>0, "yield"=>0, "int"=>0, "float"=>0, "bool"=>0,
+ "string"=>0,"true"=>0, "false"=>0, "null"=>0, "void"=>0,
+ "iterable"=>0
+ );
+
+ if (array_key_exists(strtolower($classname), $reserved_words)) {
+ if ($file_proto->getPackage() === "google.protobuf") {
+ return "GPB";
+ } else {
+ return "PB";
+ }
+ }
+
+ return "";
+ }
+
+ private static function getPreviouslyUnreservedClassNamePrefix(
+ $classname,
+ $file_proto)
+ {
+ $previously_unreserved_words = array(
+ "readonly"=>0
+ );
+
+ if (array_key_exists(strtolower($classname), $previously_unreserved_words)) {
+ $option = $file_proto->getOptions();
+ $prefix = is_null($option) ? "" : $option->getPhpClassPrefix();
+ if ($prefix !== "") {
+ return $prefix;
+ }
+
+ return "";
+ }
+
+ return self::getClassNamePrefix($classname, $file_proto);
+ }
+
+ public static function getLegacyClassNameWithoutPackage(
+ $name,
+ $file_proto)
+ {
+ $classname = implode('_', explode('.', $name));
+ return static::getClassNamePrefix($classname, $file_proto) . $classname;
+ }
+
+ public static function getClassNameWithoutPackage(
+ $name,
+ $file_proto)
+ {
+ $parts = explode('.', $name);
+ foreach ($parts as $i => $part) {
+ $parts[$i] = static::getClassNamePrefix($parts[$i], $file_proto) . $parts[$i];
+ }
+ return implode('\\', $parts);
+ }
+
+ private static function getPreviouslyUnreservedClassNameWithoutPackage(
+ $name,
+ $file_proto)
+ {
+ $parts = explode('.', $name);
+ foreach ($parts as $i => $part) {
+ $parts[$i] = static::getPreviouslyUnreservedClassNamePrefix($parts[$i], $file_proto) . $parts[$i];
+ }
+ return implode('\\', $parts);
+ }
+
+ public static function getFullClassName(
+ $proto,
+ $containing,
+ $file_proto,
+ &$message_name_without_package,
+ &$classname,
+ &$legacy_classname,
+ &$fullname,
+ &$previous_classname)
+ {
+ // Full name needs to start with '.'.
+ $message_name_without_package = $proto->getName();
+ if ($containing !== "") {
+ $message_name_without_package =
+ $containing . "." . $message_name_without_package;
+ }
+
+ $package = $file_proto->getPackage();
+ if ($package === "") {
+ $fullname = $message_name_without_package;
+ } else {
+ $fullname = $package . "." . $message_name_without_package;
+ }
+
+ $class_name_without_package =
+ static::getClassNameWithoutPackage($message_name_without_package, $file_proto);
+ $legacy_class_name_without_package =
+ static::getLegacyClassNameWithoutPackage(
+ $message_name_without_package, $file_proto);
+ $previous_class_name_without_package =
+ static::getPreviouslyUnreservedClassNameWithoutPackage(
+ $message_name_without_package, $file_proto);
+
+ $option = $file_proto->getOptions();
+ if (!is_null($option) && $option->hasPhpNamespace()) {
+ $namespace = $option->getPhpNamespace();
+ if ($namespace !== "") {
+ $classname = $namespace . "\\" . $class_name_without_package;
+ $legacy_classname =
+ $namespace . "\\" . $legacy_class_name_without_package;
+ $previous_classname =
+ $namespace . "\\" . $previous_class_name_without_package;
+ return;
+ } else {
+ $classname = $class_name_without_package;
+ $legacy_classname = $legacy_class_name_without_package;
+ $previous_classname = $previous_class_name_without_package;
+ return;
+ }
+ }
+
+ if ($package === "") {
+ $classname = $class_name_without_package;
+ $legacy_classname = $legacy_class_name_without_package;
+ $previous_classname = $previous_class_name_without_package;
+ } else {
+ $parts = array_map('ucwords', explode('.', $package));
+ foreach ($parts as $i => $part) {
+ $parts[$i] = self::getClassNamePrefix($part, $file_proto).$part;
+ }
+ $classname =
+ implode('\\', $parts) .
+ "\\".self::getClassNamePrefix($class_name_without_package,$file_proto).
+ $class_name_without_package;
+ $legacy_classname =
+ implode('\\', array_map('ucwords', explode('.', $package))).
+ "\\".$legacy_class_name_without_package;
+ $previous_classname =
+ implode('\\', array_map('ucwords', explode('.', $package))).
+ "\\".self::getPreviouslyUnreservedClassNamePrefix(
+ $previous_class_name_without_package, $file_proto).
+ $previous_class_name_without_package;
+ }
+ }
+
+ public static function combineInt32ToInt64($high, $low)
+ {
+ $isNeg = $high < 0;
+ if ($isNeg) {
+ $high = ~$high;
+ $low = ~$low;
+ $low++;
+ if (!$low) {
+ $high = (int) ($high + 1);
+ }
+ }
+ $result = bcadd(bcmul($high, 4294967296), $low);
+ if ($low < 0) {
+ $result = bcadd($result, 4294967296);
+ }
+ if ($isNeg) {
+ $result = bcsub(0, $result);
+ }
+ return $result;
+ }
+
+ public static function parseTimestamp($timestamp)
+ {
+ // prevent parsing timestamps containing with the non-existent year "0000"
+ // DateTime::createFromFormat parses without failing but as a nonsensical date
+ if (substr($timestamp, 0, 4) === "0000") {
+ throw new \Exception("Year cannot be zero.");
+ }
+ // prevent parsing timestamps ending with a lowercase z
+ if (substr($timestamp, -1, 1) === "z") {
+ throw new \Exception("Timezone cannot be a lowercase z.");
+ }
+
+ $nanoseconds = 0;
+ $periodIndex = strpos($timestamp, ".");
+ if ($periodIndex !== false) {
+ $nanosecondsLength = 0;
+ // find the next non-numeric character in the timestamp to calculate
+ // the length of the nanoseconds text
+ for ($i = $periodIndex + 1, $length = strlen($timestamp); $i < $length; $i++) {
+ if (!is_numeric($timestamp[$i])) {
+ $nanosecondsLength = $i - ($periodIndex + 1);
+ break;
+ }
+ }
+ if ($nanosecondsLength % 3 !== 0) {
+ throw new \Exception("Nanoseconds must be disible by 3.");
+ }
+ if ($nanosecondsLength > 9) {
+ throw new \Exception("Nanoseconds must be in the range of 0 to 999,999,999 nanoseconds.");
+ }
+ if ($nanosecondsLength > 0) {
+ $nanoseconds = substr($timestamp, $periodIndex + 1, $nanosecondsLength);
+ $nanoseconds = intval($nanoseconds);
+
+ // remove the nanoseconds and preceding period from the timestamp
+ $date = substr($timestamp, 0, $periodIndex);
+ $timezone = substr($timestamp, $periodIndex + $nanosecondsLength + 1);
+ $timestamp = $date.$timezone;
+ }
+ }
+
+ $date = \DateTime::createFromFormat(\DateTime::RFC3339, $timestamp, new \DateTimeZone("UTC"));
+ if ($date === false) {
+ throw new \Exception("Invalid RFC 3339 timestamp.");
+ }
+
+ $value = new \Google\Protobuf\Timestamp();
+ $seconds = $date->format("U");
+ $value->setSeconds($seconds);
+ $value->setNanos($nanoseconds);
+ return $value;
+ }
+
+ public static function formatTimestamp($value)
+ {
+ if (bccomp($value->getSeconds(), "253402300800") != -1) {
+ throw new GPBDecodeException("Duration number too large.");
+ }
+ if (bccomp($value->getSeconds(), "-62135596801") != 1) {
+ throw new GPBDecodeException("Duration number too small.");
+ }
+ $nanoseconds = static::getNanosecondsForTimestamp($value->getNanos());
+ if (!empty($nanoseconds)) {
+ $nanoseconds = ".".$nanoseconds;
+ }
+ $date = new \DateTime('@'.$value->getSeconds(), new \DateTimeZone("UTC"));
+ return $date->format("Y-m-d\TH:i:s".$nanoseconds."\Z");
+ }
+
+ public static function parseDuration($value)
+ {
+ if (strlen($value) < 2 || substr($value, -1) !== "s") {
+ throw new GPBDecodeException("Missing s after duration string");
+ }
+ $number = substr($value, 0, -1);
+ if (bccomp($number, "315576000001") != -1) {
+ throw new GPBDecodeException("Duration number too large.");
+ }
+ if (bccomp($number, "-315576000001") != 1) {
+ throw new GPBDecodeException("Duration number too small.");
+ }
+ $pos = strrpos($number, ".");
+ if ($pos !== false) {
+ $seconds = substr($number, 0, $pos);
+ if (bccomp($seconds, 0) < 0) {
+ $nanos = bcmul("0" . substr($number, $pos), -1000000000);
+ } else {
+ $nanos = bcmul("0" . substr($number, $pos), 1000000000);
+ }
+ } else {
+ $seconds = $number;
+ $nanos = 0;
+ }
+ $duration = new Duration();
+ $duration->setSeconds($seconds);
+ $duration->setNanos($nanos);
+ return $duration;
+ }
+
+ public static function formatDuration($value)
+ {
+ if (bccomp($value->getSeconds(), '315576000001') != -1) {
+ throw new GPBDecodeException('Duration number too large.');
+ }
+ if (bccomp($value->getSeconds(), '-315576000001') != 1) {
+ throw new GPBDecodeException('Duration number too small.');
+ }
+
+ $nanos = $value->getNanos();
+ if ($nanos === 0) {
+ return (string) $value->getSeconds();
+ }
+
+ if ($nanos % 1000000 === 0) {
+ $digits = 3;
+ } elseif ($nanos % 1000 === 0) {
+ $digits = 6;
+ } else {
+ $digits = 9;
+ }
+
+ $nanos = bcdiv($nanos, '1000000000', $digits);
+ return bcadd($value->getSeconds(), $nanos, $digits);
+ }
+
+ public static function parseFieldMask($paths_string)
+ {
+ $field_mask = new FieldMask();
+ if (strlen($paths_string) === 0) {
+ return $field_mask;
+ }
+ $path_strings = explode(",", $paths_string);
+ $paths = $field_mask->getPaths();
+ foreach($path_strings as &$path_string) {
+ $field_strings = explode(".", $path_string);
+ foreach($field_strings as &$field_string) {
+ $field_string = camel2underscore($field_string);
+ }
+ $path_string = implode(".", $field_strings);
+ $paths[] = $path_string;
+ }
+ return $field_mask;
+ }
+
+ public static function formatFieldMask($field_mask)
+ {
+ $converted_paths = [];
+ foreach($field_mask->getPaths() as $path) {
+ $fields = explode('.', $path);
+ $converted_path = [];
+ foreach ($fields as $field) {
+ $segments = explode('_', $field);
+ $start = true;
+ $converted_segments = "";
+ foreach($segments as $segment) {
+ if (!$start) {
+ $converted = ucfirst($segment);
+ } else {
+ $converted = $segment;
+ $start = false;
+ }
+ $converted_segments .= $converted;
+ }
+ $converted_path []= $converted_segments;
+ }
+ $converted_path = implode(".", $converted_path);
+ $converted_paths []= $converted_path;
+ }
+ return implode(",", $converted_paths);
+ }
+
+ public static function getNanosecondsForTimestamp($nanoseconds)
+ {
+ if ($nanoseconds == 0) {
+ return '';
+ }
+ if ($nanoseconds % static::NANOS_PER_MILLISECOND == 0) {
+ return sprintf('%03d', $nanoseconds / static::NANOS_PER_MILLISECOND);
+ }
+ if ($nanoseconds % static::NANOS_PER_MICROSECOND == 0) {
+ return sprintf('%06d', $nanoseconds / static::NANOS_PER_MICROSECOND);
+ }
+ return sprintf('%09d', $nanoseconds);
+ }
+
+ public static function hasSpecialJsonMapping($msg)
+ {
+ return is_a($msg, 'Google\Protobuf\Any') ||
+ is_a($msg, "Google\Protobuf\ListValue") ||
+ is_a($msg, "Google\Protobuf\Struct") ||
+ is_a($msg, "Google\Protobuf\Value") ||
+ is_a($msg, "Google\Protobuf\Duration") ||
+ is_a($msg, "Google\Protobuf\Timestamp") ||
+ is_a($msg, "Google\Protobuf\FieldMask") ||
+ static::hasJsonValue($msg);
+ }
+
+ public static function hasJsonValue($msg)
+ {
+ return is_a($msg, "Google\Protobuf\DoubleValue") ||
+ is_a($msg, "Google\Protobuf\FloatValue") ||
+ is_a($msg, "Google\Protobuf\Int64Value") ||
+ is_a($msg, "Google\Protobuf\UInt64Value") ||
+ is_a($msg, "Google\Protobuf\Int32Value") ||
+ is_a($msg, "Google\Protobuf\UInt32Value") ||
+ is_a($msg, "Google\Protobuf\BoolValue") ||
+ is_a($msg, "Google\Protobuf\StringValue") ||
+ is_a($msg, "Google\Protobuf\BytesValue");
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php
new file mode 100644
index 0000000..477eadc
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php
@@ -0,0 +1,599 @@
+> self::TAG_TYPE_BITS) & 0x1fffffff;
+ }
+
+ public static function getTagWireType($tag)
+ {
+ return $tag & 0x7;
+ }
+
+ public static function getWireType($type)
+ {
+ switch ($type) {
+ case GPBType::FLOAT:
+ case GPBType::FIXED32:
+ case GPBType::SFIXED32:
+ return self::WIRETYPE_FIXED32;
+ case GPBType::DOUBLE:
+ case GPBType::FIXED64:
+ case GPBType::SFIXED64:
+ return self::WIRETYPE_FIXED64;
+ case GPBType::UINT32:
+ case GPBType::UINT64:
+ case GPBType::INT32:
+ case GPBType::INT64:
+ case GPBType::SINT32:
+ case GPBType::SINT64:
+ case GPBType::ENUM:
+ case GPBType::BOOL:
+ return self::WIRETYPE_VARINT;
+ case GPBType::STRING:
+ case GPBType::BYTES:
+ case GPBType::MESSAGE:
+ return self::WIRETYPE_LENGTH_DELIMITED;
+ case GPBType::GROUP:
+ user_error("Unsupported type.");
+ return 0;
+ default:
+ user_error("Unsupported type.");
+ return 0;
+ }
+ }
+
+ // ZigZag Transform: Encodes signed integers so that they can be effectively
+ // used with varint encoding.
+ //
+ // varint operates on unsigned integers, encoding smaller numbers into fewer
+ // bytes. If you try to use it on a signed integer, it will treat this
+ // number as a very large unsigned integer, which means that even small
+ // signed numbers like -1 will take the maximum number of bytes (10) to
+ // encode. zigZagEncode() maps signed integers to unsigned in such a way
+ // that those with a small absolute value will have smaller encoded values,
+ // making them appropriate for encoding using varint.
+ //
+ // int32 -> uint32
+ // -------------------------
+ // 0 -> 0
+ // -1 -> 1
+ // 1 -> 2
+ // -2 -> 3
+ // ... -> ...
+ // 2147483647 -> 4294967294
+ // -2147483648 -> 4294967295
+ //
+ // >> encode >>
+ // << decode <<
+ public static function zigZagEncode32($int32)
+ {
+ if (PHP_INT_SIZE == 8) {
+ $trim_int32 = $int32 & 0xFFFFFFFF;
+ return (($trim_int32 << 1) ^ ($int32 << 32 >> 63)) & 0xFFFFFFFF;
+ } else {
+ return ($int32 << 1) ^ ($int32 >> 31);
+ }
+ }
+
+ public static function zigZagDecode32($uint32)
+ {
+ // Fill high 32 bits.
+ if (PHP_INT_SIZE === 8) {
+ $uint32 |= ($uint32 & 0xFFFFFFFF);
+ }
+
+ $int32 = (($uint32 >> 1) & 0x7FFFFFFF) ^ (-($uint32 & 1));
+
+ return $int32;
+ }
+
+ public static function zigZagEncode64($int64)
+ {
+ if (PHP_INT_SIZE == 4) {
+ if (bccomp($int64, 0) >= 0) {
+ return bcmul($int64, 2);
+ } else {
+ return bcsub(bcmul(bcsub(0, $int64), 2), 1);
+ }
+ } else {
+ return ((int)$int64 << 1) ^ ((int)$int64 >> 63);
+ }
+ }
+
+ public static function zigZagDecode64($uint64)
+ {
+ if (PHP_INT_SIZE == 4) {
+ if (bcmod($uint64, 2) == 0) {
+ return bcdiv($uint64, 2, 0);
+ } else {
+ return bcsub(0, bcdiv(bcadd($uint64, 1), 2, 0));
+ }
+ } else {
+ return (($uint64 >> 1) & 0x7FFFFFFFFFFFFFFF) ^ (-($uint64 & 1));
+ }
+ }
+
+ public static function readInt32(&$input, &$value)
+ {
+ return $input->readVarint32($value);
+ }
+
+ public static function readInt64(&$input, &$value)
+ {
+ $success = $input->readVarint64($value);
+ if (PHP_INT_SIZE == 4 && bccomp($value, "9223372036854775807") > 0) {
+ $value = bcsub($value, "18446744073709551616");
+ }
+ return $success;
+ }
+
+ public static function readUint32(&$input, &$value)
+ {
+ return self::readInt32($input, $value);
+ }
+
+ public static function readUint64(&$input, &$value)
+ {
+ return self::readInt64($input, $value);
+ }
+
+ public static function readSint32(&$input, &$value)
+ {
+ if (!$input->readVarint32($value)) {
+ return false;
+ }
+ $value = GPBWire::zigZagDecode32($value);
+ return true;
+ }
+
+ public static function readSint64(&$input, &$value)
+ {
+ if (!$input->readVarint64($value)) {
+ return false;
+ }
+ $value = GPBWire::zigZagDecode64($value);
+ return true;
+ }
+
+ public static function readFixed32(&$input, &$value)
+ {
+ return $input->readLittleEndian32($value);
+ }
+
+ public static function readFixed64(&$input, &$value)
+ {
+ return $input->readLittleEndian64($value);
+ }
+
+ public static function readSfixed32(&$input, &$value)
+ {
+ if (!self::readFixed32($input, $value)) {
+ return false;
+ }
+ if (PHP_INT_SIZE === 8) {
+ $value |= (-($value >> 31) << 32);
+ }
+ return true;
+ }
+
+ public static function readSfixed64(&$input, &$value)
+ {
+ $success = $input->readLittleEndian64($value);
+ if (PHP_INT_SIZE == 4 && bccomp($value, "9223372036854775807") > 0) {
+ $value = bcsub($value, "18446744073709551616");
+ }
+ return $success;
+ }
+
+ public static function readFloat(&$input, &$value)
+ {
+ $data = null;
+ if (!$input->readRaw(4, $data)) {
+ return false;
+ }
+ $value = unpack('g', $data)[1];
+ return true;
+ }
+
+ public static function readDouble(&$input, &$value)
+ {
+ $data = null;
+ if (!$input->readRaw(8, $data)) {
+ return false;
+ }
+ $value = unpack('e', $data)[1];
+ return true;
+ }
+
+ public static function readBool(&$input, &$value)
+ {
+ if (!$input->readVarint64($value)) {
+ return false;
+ }
+ if ($value == 0) {
+ $value = false;
+ } else {
+ $value = true;
+ }
+ return true;
+ }
+
+ public static function readString(&$input, &$value)
+ {
+ $length = 0;
+ return $input->readVarintSizeAsInt($length) && $input->readRaw($length, $value);
+ }
+
+ public static function readMessage(&$input, &$message)
+ {
+ $length = 0;
+ if (!$input->readVarintSizeAsInt($length)) {
+ return false;
+ }
+ $old_limit = 0;
+ $recursion_limit = 0;
+ $input->incrementRecursionDepthAndPushLimit(
+ $length,
+ $old_limit,
+ $recursion_limit);
+ if ($recursion_limit < 0 || !$message->parseFromStream($input)) {
+ return false;
+ }
+ return $input->decrementRecursionDepthAndPopLimit($old_limit);
+ }
+
+ public static function writeTag(&$output, $tag)
+ {
+ return $output->writeTag($tag);
+ }
+
+ public static function writeInt32(&$output, $value)
+ {
+ return $output->writeVarint32($value, false);
+ }
+
+ public static function writeInt64(&$output, $value)
+ {
+ return $output->writeVarint64($value);
+ }
+
+ public static function writeUint32(&$output, $value)
+ {
+ return $output->writeVarint32($value, true);
+ }
+
+ public static function writeUint64(&$output, $value)
+ {
+ return $output->writeVarint64($value);
+ }
+
+ public static function writeSint32(&$output, $value)
+ {
+ $value = GPBWire::zigZagEncode32($value);
+ return $output->writeVarint32($value, true);
+ }
+
+ public static function writeSint64(&$output, $value)
+ {
+ $value = GPBWire::zigZagEncode64($value);
+ return $output->writeVarint64($value);
+ }
+
+ public static function writeFixed32(&$output, $value)
+ {
+ return $output->writeLittleEndian32($value);
+ }
+
+ public static function writeFixed64(&$output, $value)
+ {
+ return $output->writeLittleEndian64($value);
+ }
+
+ public static function writeSfixed32(&$output, $value)
+ {
+ return $output->writeLittleEndian32($value);
+ }
+
+ public static function writeSfixed64(&$output, $value)
+ {
+ return $output->writeLittleEndian64($value);
+ }
+
+ public static function writeBool(&$output, $value)
+ {
+ if ($value) {
+ return $output->writeVarint32(1, true);
+ } else {
+ return $output->writeVarint32(0, true);
+ }
+ }
+
+ public static function writeFloat(&$output, $value)
+ {
+ $data = pack("g", $value);
+ return $output->writeRaw($data, 4);
+ }
+
+ public static function writeDouble(&$output, $value)
+ {
+ $data = pack("e", $value);
+ return $output->writeRaw($data, 8);
+ }
+
+ public static function writeString(&$output, $value)
+ {
+ return self::writeBytes($output, $value);
+ }
+
+ public static function writeBytes(&$output, $value)
+ {
+ $size = strlen($value);
+ if (!$output->writeVarint32($size, true)) {
+ return false;
+ }
+ return $output->writeRaw($value, $size);
+ }
+
+ public static function writeMessage(&$output, $value)
+ {
+ $size = $value->byteSize();
+ if (!$output->writeVarint32($size, true)) {
+ return false;
+ }
+ return $value->serializeToStream($output);
+ }
+
+ public static function makeTag($number, $type)
+ {
+ return ($number << 3) | self::getWireType($type);
+ }
+
+ public static function tagSize($field)
+ {
+ $tag = self::makeTag($field->getNumber(), $field->getType());
+ return self::varint32Size($tag);
+ }
+
+ public static function varint32Size($value, $sign_extended = false)
+ {
+ if ($value < 0) {
+ if ($sign_extended) {
+ return 10;
+ } else {
+ return 5;
+ }
+ }
+ if ($value < (1 << 7)) {
+ return 1;
+ }
+ if ($value < (1 << 14)) {
+ return 2;
+ }
+ if ($value < (1 << 21)) {
+ return 3;
+ }
+ if ($value < (1 << 28)) {
+ return 4;
+ }
+ return 5;
+ }
+
+ public static function sint32Size($value)
+ {
+ $value = self::zigZagEncode32($value);
+ return self::varint32Size($value);
+ }
+
+ public static function sint64Size($value)
+ {
+ $value = self::zigZagEncode64($value);
+ return self::varint64Size($value);
+ }
+
+ public static function varint64Size($value)
+ {
+ if (PHP_INT_SIZE == 4) {
+ if (bccomp($value, 0) < 0 ||
+ bccomp($value, "9223372036854775807") > 0) {
+ return 10;
+ }
+ if (bccomp($value, 1 << 7) < 0) {
+ return 1;
+ }
+ if (bccomp($value, 1 << 14) < 0) {
+ return 2;
+ }
+ if (bccomp($value, 1 << 21) < 0) {
+ return 3;
+ }
+ if (bccomp($value, 1 << 28) < 0) {
+ return 4;
+ }
+ if (bccomp($value, '34359738368') < 0) {
+ return 5;
+ }
+ if (bccomp($value, '4398046511104') < 0) {
+ return 6;
+ }
+ if (bccomp($value, '562949953421312') < 0) {
+ return 7;
+ }
+ if (bccomp($value, '72057594037927936') < 0) {
+ return 8;
+ }
+ return 9;
+ } else {
+ if ($value < 0) {
+ return 10;
+ }
+ if ($value < (1 << 7)) {
+ return 1;
+ }
+ if ($value < (1 << 14)) {
+ return 2;
+ }
+ if ($value < (1 << 21)) {
+ return 3;
+ }
+ if ($value < (1 << 28)) {
+ return 4;
+ }
+ if ($value < (1 << 35)) {
+ return 5;
+ }
+ if ($value < (1 << 42)) {
+ return 6;
+ }
+ if ($value < (1 << 49)) {
+ return 7;
+ }
+ if ($value < (1 << 56)) {
+ return 8;
+ }
+ return 9;
+ }
+ }
+
+ public static function serializeFieldToStream(
+ $value,
+ $field,
+ $need_tag,
+ &$output)
+ {
+ if ($need_tag) {
+ if (!GPBWire::writeTag(
+ $output,
+ self::makeTag(
+ $field->getNumber(),
+ $field->getType()))) {
+ return false;
+ }
+ }
+ switch ($field->getType()) {
+ case GPBType::DOUBLE:
+ if (!GPBWire::writeDouble($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::FLOAT:
+ if (!GPBWire::writeFloat($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::INT64:
+ if (!GPBWire::writeInt64($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::UINT64:
+ if (!GPBWire::writeUint64($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::INT32:
+ if (!GPBWire::writeInt32($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::FIXED32:
+ if (!GPBWire::writeFixed32($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::FIXED64:
+ if (!GPBWire::writeFixed64($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::BOOL:
+ if (!GPBWire::writeBool($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::STRING:
+ if (!GPBWire::writeString($output, $value)) {
+ return false;
+ }
+ break;
+ // case GPBType::GROUP:
+ // echo "GROUP\xA";
+ // trigger_error("Not implemented.", E_ERROR);
+ // break;
+ case GPBType::MESSAGE:
+ if (!GPBWire::writeMessage($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::BYTES:
+ if (!GPBWire::writeBytes($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::UINT32:
+ if (PHP_INT_SIZE === 8 && $value < 0) {
+ $value += 4294967296;
+ }
+ if (!GPBWire::writeUint32($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::ENUM:
+ if (!GPBWire::writeInt32($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::SFIXED32:
+ if (!GPBWire::writeSfixed32($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::SFIXED64:
+ if (!GPBWire::writeSfixed64($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::SINT32:
+ if (!GPBWire::writeSint32($output, $value)) {
+ return false;
+ }
+ break;
+ case GPBType::SINT64:
+ if (!GPBWire::writeSint64($output, $value)) {
+ return false;
+ }
+ break;
+ default:
+ user_error("Unsupported type.");
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWireType.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWireType.php
new file mode 100644
index 0000000..7b6e9b0
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWireType.php
@@ -0,0 +1,20 @@
+google.protobuf.GeneratedCodeInfo
+ */
+class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An Annotation connects some span of text in generated code to an element
+ * of its generating .proto file.
+ *
+ * Generated from protobuf field repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
+ */
+ private $annotation;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation>|\Google\Protobuf\Internal\RepeatedField $annotation
+ * An Annotation connects some span of text in generated code to an element
+ * of its generating .proto file.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An Annotation connects some span of text in generated code to an element
+ * of its generating .proto file.
+ *
+ * Generated from protobuf field repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAnnotation()
+ {
+ return $this->annotation;
+ }
+
+ /**
+ * An Annotation connects some span of text in generated code to an element
+ * of its generating .proto file.
+ *
+ * Generated from protobuf field repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
+ * @param array<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAnnotation($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation::class);
+ $this->annotation = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
new file mode 100644
index 0000000..b1ef4ee
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
@@ -0,0 +1,255 @@
+google.protobuf.GeneratedCodeInfo.Annotation
+ */
+class Annotation extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Identifies the element in the original source .proto file. This field
+ * is formatted the same as SourceCodeInfo.Location.path.
+ *
+ * Generated from protobuf field repeated int32 path = 1 [packed = true];
+ */
+ private $path;
+ /**
+ * Identifies the filesystem path to the original source .proto.
+ *
+ * Generated from protobuf field optional string source_file = 2;
+ */
+ protected $source_file = null;
+ /**
+ * Identifies the starting offset in bytes in the generated code
+ * that relates to the identified object.
+ *
+ * Generated from protobuf field optional int32 begin = 3;
+ */
+ protected $begin = null;
+ /**
+ * Identifies the ending offset in bytes in the generated code that
+ * relates to the identified object. The end offset should be one past
+ * the last relevant byte (so the length of the text = end - begin).
+ *
+ * Generated from protobuf field optional int32 end = 4;
+ */
+ protected $end = null;
+ /**
+ * Generated from protobuf field optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;
+ */
+ protected $semantic = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\RepeatedField $path
+ * Identifies the element in the original source .proto file. This field
+ * is formatted the same as SourceCodeInfo.Location.path.
+ * @type string $source_file
+ * Identifies the filesystem path to the original source .proto.
+ * @type int $begin
+ * Identifies the starting offset in bytes in the generated code
+ * that relates to the identified object.
+ * @type int $end
+ * Identifies the ending offset in bytes in the generated code that
+ * relates to the identified object. The end offset should be one past
+ * the last relevant byte (so the length of the text = end - begin).
+ * @type int $semantic
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Identifies the element in the original source .proto file. This field
+ * is formatted the same as SourceCodeInfo.Location.path.
+ *
+ * Generated from protobuf field repeated int32 path = 1 [packed = true];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPath()
+ {
+ return $this->path;
+ }
+
+ /**
+ * Identifies the element in the original source .proto file. This field
+ * is formatted the same as SourceCodeInfo.Location.path.
+ *
+ * Generated from protobuf field repeated int32 path = 1 [packed = true];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPath($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->path = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Identifies the filesystem path to the original source .proto.
+ *
+ * Generated from protobuf field optional string source_file = 2;
+ * @return string
+ */
+ public function getSourceFile()
+ {
+ return isset($this->source_file) ? $this->source_file : '';
+ }
+
+ public function hasSourceFile()
+ {
+ return isset($this->source_file);
+ }
+
+ public function clearSourceFile()
+ {
+ unset($this->source_file);
+ }
+
+ /**
+ * Identifies the filesystem path to the original source .proto.
+ *
+ * Generated from protobuf field optional string source_file = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setSourceFile($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->source_file = $var;
+
+ return $this;
+ }
+
+ /**
+ * Identifies the starting offset in bytes in the generated code
+ * that relates to the identified object.
+ *
+ * Generated from protobuf field optional int32 begin = 3;
+ * @return int
+ */
+ public function getBegin()
+ {
+ return isset($this->begin) ? $this->begin : 0;
+ }
+
+ public function hasBegin()
+ {
+ return isset($this->begin);
+ }
+
+ public function clearBegin()
+ {
+ unset($this->begin);
+ }
+
+ /**
+ * Identifies the starting offset in bytes in the generated code
+ * that relates to the identified object.
+ *
+ * Generated from protobuf field optional int32 begin = 3;
+ * @param int $var
+ * @return $this
+ */
+ public function setBegin($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->begin = $var;
+
+ return $this;
+ }
+
+ /**
+ * Identifies the ending offset in bytes in the generated code that
+ * relates to the identified object. The end offset should be one past
+ * the last relevant byte (so the length of the text = end - begin).
+ *
+ * Generated from protobuf field optional int32 end = 4;
+ * @return int
+ */
+ public function getEnd()
+ {
+ return isset($this->end) ? $this->end : 0;
+ }
+
+ public function hasEnd()
+ {
+ return isset($this->end);
+ }
+
+ public function clearEnd()
+ {
+ unset($this->end);
+ }
+
+ /**
+ * Identifies the ending offset in bytes in the generated code that
+ * relates to the identified object. The end offset should be one past
+ * the last relevant byte (so the length of the text = end - begin).
+ *
+ * Generated from protobuf field optional int32 end = 4;
+ * @param int $var
+ * @return $this
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;
+ * @return int
+ */
+ public function getSemantic()
+ {
+ return isset($this->semantic) ? $this->semantic : 0;
+ }
+
+ public function hasSemantic()
+ {
+ return isset($this->semantic);
+ }
+
+ public function clearSemantic()
+ {
+ unset($this->semantic);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;
+ * @param int $var
+ * @return $this
+ */
+ public function setSemantic($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation\Semantic::class);
+ $this->semantic = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Annotation::class, \Google\Protobuf\Internal\GeneratedCodeInfo_Annotation::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php
new file mode 100644
index 0000000..e36f1e5
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php
@@ -0,0 +1,16 @@
+getPublicDescriptor();
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/HasPublicDescriptorTrait.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/HasPublicDescriptorTrait.php
new file mode 100644
index 0000000..03f06d5
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/HasPublicDescriptorTrait.php
@@ -0,0 +1,20 @@
+public_desc;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MapEntry.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MapEntry.php
new file mode 100644
index 0000000..cc88846
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MapEntry.php
@@ -0,0 +1,48 @@
+getFieldByNumber(2);
+ if ($value_field->getType() == GPBType::MESSAGE) {
+ $klass = $value_field->getMessageType()->getClass();
+ $value = new $klass;
+ $this->setValue($value);
+ }
+ }
+
+ public function setKey($key) {
+ $this->key = $key;
+ }
+
+ public function getKey() {
+ return $this->key;
+ }
+
+ public function setValue($value) {
+ $this->value = $value;
+ }
+
+ public function getValue() {
+ return $this->value;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MapField.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MapField.php
new file mode 100644
index 0000000..b429ad8
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MapField.php
@@ -0,0 +1,275 @@
+container = [];
+ $this->key_type = $key_type;
+ $this->value_type = $value_type;
+ $this->klass = $klass;
+
+ if ($this->value_type == GPBType::MESSAGE) {
+ $pool = DescriptorPool::getGeneratedPool();
+ $desc = $pool->getDescriptorByClassName($klass);
+ if ($desc == NULL) {
+ new $klass; // No msg class instance has been created before.
+ $desc = $pool->getDescriptorByClassName($klass);
+ }
+ $this->klass = $desc->getClass();
+ $this->legacy_klass = $desc->getLegacyClass();
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ public function getKeyType()
+ {
+ return $this->key_type;
+ }
+
+ /**
+ * @ignore
+ */
+ public function getValueType()
+ {
+ return $this->value_type;
+ }
+
+ /**
+ * @ignore
+ */
+ public function getValueClass()
+ {
+ return $this->klass;
+ }
+
+ /**
+ * @ignore
+ */
+ public function getLegacyValueClass()
+ {
+ return $this->legacy_klass;
+ }
+
+ /**
+ * Return the element at the given key.
+ *
+ * This will also be called for: $ele = $arr[$key]
+ *
+ * @param int|string $key The key of the element to be fetched.
+ * @return object The stored element at given key.
+ * @throws \ErrorException Invalid type for index.
+ * @throws \ErrorException Non-existing index.
+ * @todo need to add return type mixed (require update php version to 8.0)
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($key)
+ {
+ return $this->container[$key];
+ }
+
+ /**
+ * Assign the element at the given key.
+ *
+ * This will also be called for: $arr[$key] = $value
+ *
+ * @param int|string $key The key of the element to be fetched.
+ * @param object $value The element to be assigned.
+ * @return void
+ * @throws \ErrorException Invalid type for key.
+ * @throws \ErrorException Invalid type for value.
+ * @throws \ErrorException Non-existing key.
+ * @todo need to add return type void (require update php version to 7.1)
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetSet($key, $value)
+ {
+ $this->checkKey($this->key_type, $key);
+
+ switch ($this->value_type) {
+ case GPBType::SFIXED32:
+ case GPBType::SINT32:
+ case GPBType::INT32:
+ case GPBType::ENUM:
+ GPBUtil::checkInt32($value);
+ break;
+ case GPBType::FIXED32:
+ case GPBType::UINT32:
+ GPBUtil::checkUint32($value);
+ break;
+ case GPBType::SFIXED64:
+ case GPBType::SINT64:
+ case GPBType::INT64:
+ GPBUtil::checkInt64($value);
+ break;
+ case GPBType::FIXED64:
+ case GPBType::UINT64:
+ GPBUtil::checkUint64($value);
+ break;
+ case GPBType::FLOAT:
+ GPBUtil::checkFloat($value);
+ break;
+ case GPBType::DOUBLE:
+ GPBUtil::checkDouble($value);
+ break;
+ case GPBType::BOOL:
+ GPBUtil::checkBool($value);
+ break;
+ case GPBType::STRING:
+ GPBUtil::checkString($value, true);
+ break;
+ case GPBType::MESSAGE:
+ if (is_null($value)) {
+ trigger_error("Map element cannot be null.", E_USER_ERROR);
+ }
+ GPBUtil::checkMessage($value, $this->klass);
+ break;
+ default:
+ break;
+ }
+
+ $this->container[$key] = $value;
+ }
+
+ /**
+ * Remove the element at the given key.
+ *
+ * This will also be called for: unset($arr)
+ *
+ * @param int|string $key The key of the element to be removed.
+ * @return void
+ * @throws \ErrorException Invalid type for key.
+ * @todo need to add return type void (require update php version to 7.1)
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetUnset($key)
+ {
+ $this->checkKey($this->key_type, $key);
+ unset($this->container[$key]);
+ }
+
+ /**
+ * Check the existence of the element at the given key.
+ *
+ * This will also be called for: isset($arr)
+ *
+ * @param int|string $key The key of the element to be removed.
+ * @return bool True if the element at the given key exists.
+ * @throws \ErrorException Invalid type for key.
+ */
+ public function offsetExists($key): bool
+ {
+ $this->checkKey($this->key_type, $key);
+ return isset($this->container[$key]);
+ }
+
+ /**
+ * @ignore
+ */
+ public function getIterator(): Traversable
+ {
+ return new MapFieldIter($this->container, $this->key_type);
+ }
+
+ /**
+ * Return the number of stored elements.
+ *
+ * This will also be called for: count($arr)
+ *
+ * @return integer The number of stored elements.
+ */
+ public function count(): int
+ {
+ return count($this->container);
+ }
+
+ /**
+ * @ignore
+ */
+ private function checkKey($key_type, &$key)
+ {
+ switch ($key_type) {
+ case GPBType::SFIXED32:
+ case GPBType::SINT32:
+ case GPBType::INT32:
+ GPBUtil::checkInt32($key);
+ break;
+ case GPBType::FIXED32:
+ case GPBType::UINT32:
+ GPBUtil::checkUint32($key);
+ break;
+ case GPBType::SFIXED64:
+ case GPBType::SINT64:
+ case GPBType::INT64:
+ GPBUtil::checkInt64($key);
+ break;
+ case GPBType::FIXED64:
+ case GPBType::UINT64:
+ GPBUtil::checkUint64($key);
+ break;
+ case GPBType::BOOL:
+ GPBUtil::checkBool($key);
+ break;
+ case GPBType::STRING:
+ GPBUtil::checkString($key, true);
+ break;
+ default:
+ trigger_error(
+ "Given type cannot be map key.",
+ E_USER_ERROR);
+ break;
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MapFieldIter.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MapFieldIter.php
new file mode 100644
index 0000000..5b07735
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MapFieldIter.php
@@ -0,0 +1,123 @@
+container = $container;
+ $this->key_type = $key_type;
+ }
+
+ /**
+ * Reset the status of the iterator
+ *
+ * @return void
+ * @todo need to add return type void (require update php version to 7.1)
+ */
+ #[\ReturnTypeWillChange]
+ public function rewind()
+ {
+ reset($this->container);
+ }
+
+ /**
+ * Return the element at the current position.
+ *
+ * @return object The element at the current position.
+ * @todo need to add return type mixed (require update php version to 8.0)
+ */
+ #[\ReturnTypeWillChange]
+ public function current()
+ {
+ return current($this->container);
+ }
+
+ /**
+ * Return the current key.
+ *
+ * @return object The current key.
+ * @todo need to add return type mixed (require update php version to 8.0)
+ */
+ #[\ReturnTypeWillChange]
+ public function key()
+ {
+ $key = key($this->container);
+ switch ($this->key_type) {
+ case GPBType::INT64:
+ case GPBType::UINT64:
+ case GPBType::FIXED64:
+ case GPBType::SFIXED64:
+ case GPBType::SINT64:
+ if (PHP_INT_SIZE === 8) {
+ return $key;
+ }
+ // Intentionally fall through
+ case GPBType::STRING:
+ // PHP associative array stores int string as int for key.
+ return strval($key);
+ case GPBType::BOOL:
+ // PHP associative array stores bool as integer for key.
+ return boolval($key);
+ default:
+ return $key;
+ }
+ }
+
+ /**
+ * Move to the next position.
+ *
+ * @return void
+ * @todo need to add return type void (require update php version to 7.1)
+ */
+ #[\ReturnTypeWillChange]
+ public function next()
+ {
+ next($this->container);
+ }
+
+ /**
+ * Check whether there are more elements to iterate.
+ *
+ * @return bool True if there are more elements to iterate.
+ */
+ public function valid(): bool
+ {
+ return key($this->container) !== null;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php
new file mode 100644
index 0000000..578e606
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php
@@ -0,0 +1,2017 @@
+initWithDescriptor($data);
+ } else {
+ $this->initWithGeneratedPool();
+ if (is_array($data)) {
+ $this->mergeFromArray($data);
+ } else if (!empty($data)) {
+ throw new \InvalidArgumentException(
+ 'Message constructor must be an array or null.'
+ );
+ }
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ private function initWithGeneratedPool()
+ {
+ $pool = DescriptorPool::getGeneratedPool();
+ $this->desc = $pool->getDescriptorByClassName(get_class($this));
+ if (is_null($this->desc)) {
+ throw new \InvalidArgumentException(
+ get_class($this) ." is not found in descriptor pool. " .
+ 'Only generated classes may derive from Message.');
+ }
+ foreach ($this->desc->getField() as $field) {
+ $setter = $field->getSetter();
+ if ($field->isMap()) {
+ $message_type = $field->getMessageType();
+ $key_field = $message_type->getFieldByNumber(1);
+ $value_field = $message_type->getFieldByNumber(2);
+ switch ($value_field->getType()) {
+ case GPBType::MESSAGE:
+ case GPBType::GROUP:
+ $map_field = new MapField(
+ $key_field->getType(),
+ $value_field->getType(),
+ $value_field->getMessageType()->getClass());
+ $this->$setter($map_field);
+ break;
+ case GPBType::ENUM:
+ $map_field = new MapField(
+ $key_field->getType(),
+ $value_field->getType(),
+ $value_field->getEnumType()->getClass());
+ $this->$setter($map_field);
+ break;
+ default:
+ $map_field = new MapField(
+ $key_field->getType(),
+ $value_field->getType());
+ $this->$setter($map_field);
+ break;
+ }
+ } else if ($field->getLabel() === GPBLabel::REPEATED) {
+ switch ($field->getType()) {
+ case GPBType::MESSAGE:
+ case GPBType::GROUP:
+ $repeated_field = new RepeatedField(
+ $field->getType(),
+ $field->getMessageType()->getClass());
+ $this->$setter($repeated_field);
+ break;
+ case GPBType::ENUM:
+ $repeated_field = new RepeatedField(
+ $field->getType(),
+ $field->getEnumType()->getClass());
+ $this->$setter($repeated_field);
+ break;
+ default:
+ $repeated_field = new RepeatedField($field->getType());
+ $this->$setter($repeated_field);
+ break;
+ }
+ } else if ($field->getOneofIndex() !== -1) {
+ $oneof = $this->desc->getOneofDecl()[$field->getOneofIndex()];
+ $oneof_name = $oneof->getName();
+ $this->$oneof_name = new OneofField($oneof);
+ } else if ($field->getLabel() === GPBLabel::OPTIONAL &&
+ PHP_INT_SIZE == 4) {
+ switch ($field->getType()) {
+ case GPBType::INT64:
+ case GPBType::UINT64:
+ case GPBType::FIXED64:
+ case GPBType::SFIXED64:
+ case GPBType::SINT64:
+ $this->$setter("0");
+ }
+ }
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ private function initWithDescriptor(Descriptor $desc)
+ {
+ $this->desc = $desc;
+ foreach ($desc->getField() as $field) {
+ $setter = $field->getSetter();
+ $defaultValue = $this->defaultValue($field);
+ $this->$setter($defaultValue);
+ }
+ }
+
+ protected function readWrapperValue($member)
+ {
+ $field = $this->desc->getFieldByName($member);
+ $oneof_index = $field->getOneofIndex();
+ if ($oneof_index === -1) {
+ $wrapper = $this->$member;
+ } else {
+ $wrapper = $this->readOneof($field->getNumber());
+ }
+
+ if (is_null($wrapper)) {
+ return NULL;
+ } else {
+ return $wrapper->getValue();
+ }
+ }
+
+ protected function writeWrapperValue($member, $value)
+ {
+ $field = $this->desc->getFieldByName($member);
+ $wrapped_value = $value;
+ if (!is_null($value)) {
+ $desc = $field->getMessageType();
+ $klass = $desc->getClass();
+ $wrapped_value = new $klass;
+ $wrapped_value->setValue($value);
+ }
+
+ $oneof_index = $field->getOneofIndex();
+ if ($oneof_index === -1) {
+ $this->$member = $wrapped_value;
+ } else {
+ $this->writeOneof($field->getNumber(), $wrapped_value);
+ }
+ }
+
+ protected function readOneof($number)
+ {
+ $field = $this->desc->getFieldByNumber($number);
+ $oneof = $this->desc->getOneofDecl()[$field->getOneofIndex()];
+ $oneof_name = $oneof->getName();
+ $oneof_field = $this->$oneof_name;
+ if ($number === $oneof_field->getNumber()) {
+ return $oneof_field->getValue();
+ } else {
+ return $this->defaultValue($field);
+ }
+ }
+
+ protected function hasOneof($number)
+ {
+ $field = $this->desc->getFieldByNumber($number);
+ $oneof = $this->desc->getOneofDecl()[$field->getOneofIndex()];
+ $oneof_name = $oneof->getName();
+ $oneof_field = $this->$oneof_name;
+ return $number === $oneof_field->getNumber();
+ }
+
+ protected function writeOneof($number, $value)
+ {
+ $field = $this->desc->getFieldByNumber($number);
+ $oneof = $this->desc->getOneofDecl()[$field->getOneofIndex()];
+ $oneof_name = $oneof->getName();
+ if ($value === null) {
+ $this->$oneof_name = new OneofField($oneof);
+ } else {
+ $oneof_field = $this->$oneof_name;
+ $oneof_field->setValue($value);
+ $oneof_field->setFieldName($field->getName());
+ $oneof_field->setNumber($number);
+ }
+ }
+
+ protected function whichOneof($oneof_name)
+ {
+ $oneof_field = $this->$oneof_name;
+ $number = $oneof_field->getNumber();
+ if ($number == 0) {
+ return "";
+ }
+ $field = $this->desc->getFieldByNumber($number);
+ return $field->getName();
+ }
+
+ /**
+ * @ignore
+ */
+ private function defaultValue($field)
+ {
+ $value = null;
+
+ switch ($field->getType()) {
+ case GPBType::DOUBLE:
+ case GPBType::FLOAT:
+ return 0.0;
+ case GPBType::UINT32:
+ case GPBType::INT32:
+ case GPBType::FIXED32:
+ case GPBType::SFIXED32:
+ case GPBType::SINT32:
+ case GPBType::ENUM:
+ return 0;
+ case GPBType::INT64:
+ case GPBType::UINT64:
+ case GPBType::FIXED64:
+ case GPBType::SFIXED64:
+ case GPBType::SINT64:
+ if (PHP_INT_SIZE === 4) {
+ return '0';
+ } else {
+ return 0;
+ }
+ case GPBType::BOOL:
+ return false;
+ case GPBType::STRING:
+ case GPBType::BYTES:
+ return "";
+ case GPBType::GROUP:
+ case GPBType::MESSAGE:
+ return null;
+ default:
+ user_error("Unsupported type.");
+ return false;
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ private function skipField($input, $tag)
+ {
+ $number = GPBWire::getTagFieldNumber($tag);
+ if ($number === 0) {
+ throw new GPBDecodeException("Illegal field number zero.");
+ }
+
+ $start = $input->current();
+ switch (GPBWire::getTagWireType($tag)) {
+ case GPBWireType::VARINT:
+ $uint64 = 0;
+ if (!$input->readVarint64($uint64)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside varint.");
+ }
+ break;
+ case GPBWireType::FIXED64:
+ $uint64 = 0;
+ if (!$input->readLittleEndian64($uint64)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside fixed64.");
+ }
+ break;
+ case GPBWireType::FIXED32:
+ $uint32 = 0;
+ if (!$input->readLittleEndian32($uint32)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside fixed32.");
+ }
+ break;
+ case GPBWireType::LENGTH_DELIMITED:
+ $length = 0;
+ if (!$input->readVarint32($length)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside length.");
+ }
+ $data = NULL;
+ if (!$input->readRaw($length, $data)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside length delimited data.");
+ }
+ break;
+ case GPBWireType::START_GROUP:
+ case GPBWireType::END_GROUP:
+ throw new GPBDecodeException("Unexpected wire type.");
+ default:
+ throw new GPBDecodeException("Unexpected wire type.");
+ }
+ $end = $input->current();
+
+ $bytes = str_repeat(chr(0), CodedOutputStream::MAX_VARINT64_BYTES);
+ $size = CodedOutputStream::writeVarintToArray($tag, $bytes, true);
+ $this->unknown .= substr($bytes, 0, $size) . $input->substr($start, $end);
+ }
+
+ /**
+ * @ignore
+ */
+ private static function parseFieldFromStreamNoTag($input, $field, &$value)
+ {
+ switch ($field->getType()) {
+ case GPBType::DOUBLE:
+ if (!GPBWire::readDouble($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside double field.");
+ }
+ break;
+ case GPBType::FLOAT:
+ if (!GPBWire::readFloat($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside float field.");
+ }
+ break;
+ case GPBType::INT64:
+ if (!GPBWire::readInt64($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside int64 field.");
+ }
+ break;
+ case GPBType::UINT64:
+ if (!GPBWire::readUint64($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside uint64 field.");
+ }
+ break;
+ case GPBType::INT32:
+ if (!GPBWire::readInt32($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside int32 field.");
+ }
+ break;
+ case GPBType::FIXED64:
+ if (!GPBWire::readFixed64($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside fixed64 field.");
+ }
+ break;
+ case GPBType::FIXED32:
+ if (!GPBWire::readFixed32($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside fixed32 field.");
+ }
+ break;
+ case GPBType::BOOL:
+ if (!GPBWire::readBool($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside bool field.");
+ }
+ break;
+ case GPBType::STRING:
+ // TODO: Add utf-8 check.
+ if (!GPBWire::readString($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside string field.");
+ }
+ break;
+ case GPBType::GROUP:
+ trigger_error("Not implemented.", E_USER_ERROR);
+ break;
+ case GPBType::MESSAGE:
+ if ($field->isMap()) {
+ $value = new MapEntry($field->getMessageType());
+ } else {
+ $klass = $field->getMessageType()->getClass();
+ $value = new $klass;
+ }
+ if (!GPBWire::readMessage($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside message.");
+ }
+ break;
+ case GPBType::BYTES:
+ if (!GPBWire::readString($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside bytes field.");
+ }
+ break;
+ case GPBType::UINT32:
+ if (!GPBWire::readUint32($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside uint32 field.");
+ }
+ break;
+ case GPBType::ENUM:
+ // TODO: Check unknown enum value.
+ if (!GPBWire::readInt32($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside enum field.");
+ }
+ break;
+ case GPBType::SFIXED32:
+ if (!GPBWire::readSfixed32($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside sfixed32 field.");
+ }
+ break;
+ case GPBType::SFIXED64:
+ if (!GPBWire::readSfixed64($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside sfixed64 field.");
+ }
+ break;
+ case GPBType::SINT32:
+ if (!GPBWire::readSint32($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside sint32 field.");
+ }
+ break;
+ case GPBType::SINT64:
+ if (!GPBWire::readSint64($input, $value)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside sint64 field.");
+ }
+ break;
+ default:
+ user_error("Unsupported type.");
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * @ignore
+ */
+ private function parseFieldFromStream($tag, $input, $field)
+ {
+ $value = null;
+
+ if (is_null($field)) {
+ $value_format = GPBWire::UNKNOWN;
+ } elseif (GPBWire::getTagWireType($tag) ===
+ GPBWire::getWireType($field->getType())) {
+ $value_format = GPBWire::NORMAL_FORMAT;
+ } elseif ($field->isPackable() &&
+ GPBWire::getTagWireType($tag) ===
+ GPBWire::WIRETYPE_LENGTH_DELIMITED) {
+ $value_format = GPBWire::PACKED_FORMAT;
+ } else {
+ // the wire type doesn't match. Put it in our unknown field set.
+ $value_format = GPBWire::UNKNOWN;
+ }
+
+ if ($value_format === GPBWire::UNKNOWN) {
+ $this->skipField($input, $tag);
+ return;
+ } elseif ($value_format === GPBWire::NORMAL_FORMAT) {
+ self::parseFieldFromStreamNoTag($input, $field, $value);
+ } elseif ($value_format === GPBWire::PACKED_FORMAT) {
+ $length = 0;
+ if (!GPBWire::readInt32($input, $length)) {
+ throw new GPBDecodeException(
+ "Unexpected EOF inside packed length.");
+ }
+ $limit = $input->pushLimit($length);
+ $getter = $field->getGetter();
+ while ($input->bytesUntilLimit() > 0) {
+ self::parseFieldFromStreamNoTag($input, $field, $value);
+ $this->appendHelper($field, $value);
+ }
+ $input->popLimit($limit);
+ return;
+ } else {
+ return;
+ }
+
+ if ($field->isMap()) {
+ $this->kvUpdateHelper($field, $value->getKey(), $value->getValue());
+ } else if ($field->isRepeated()) {
+ $this->appendHelper($field, $value);
+ } else {
+ $setter = $field->getSetter();
+ $this->$setter($value);
+ }
+ }
+
+ /**
+ * Clear all containing fields.
+ * @return null
+ */
+ public function clear()
+ {
+ $this->unknown = "";
+ foreach ($this->desc->getField() as $field) {
+ $setter = $field->getSetter();
+ if ($field->isMap()) {
+ $message_type = $field->getMessageType();
+ $key_field = $message_type->getFieldByNumber(1);
+ $value_field = $message_type->getFieldByNumber(2);
+ switch ($value_field->getType()) {
+ case GPBType::MESSAGE:
+ case GPBType::GROUP:
+ $map_field = new MapField(
+ $key_field->getType(),
+ $value_field->getType(),
+ $value_field->getMessageType()->getClass());
+ $this->$setter($map_field);
+ break;
+ case GPBType::ENUM:
+ $map_field = new MapField(
+ $key_field->getType(),
+ $value_field->getType(),
+ $value_field->getEnumType()->getClass());
+ $this->$setter($map_field);
+ break;
+ default:
+ $map_field = new MapField(
+ $key_field->getType(),
+ $value_field->getType());
+ $this->$setter($map_field);
+ break;
+ }
+ } else if ($field->getLabel() === GPBLabel::REPEATED) {
+ switch ($field->getType()) {
+ case GPBType::MESSAGE:
+ case GPBType::GROUP:
+ $repeated_field = new RepeatedField(
+ $field->getType(),
+ $field->getMessageType()->getClass());
+ $this->$setter($repeated_field);
+ break;
+ case GPBType::ENUM:
+ $repeated_field = new RepeatedField(
+ $field->getType(),
+ $field->getEnumType()->getClass());
+ $this->$setter($repeated_field);
+ break;
+ default:
+ $repeated_field = new RepeatedField($field->getType());
+ $this->$setter($repeated_field);
+ break;
+ }
+ } else if ($field->getOneofIndex() !== -1) {
+ $oneof = $this->desc->getOneofDecl()[$field->getOneofIndex()];
+ $oneof_name = $oneof->getName();
+ $this->$oneof_name = new OneofField($oneof);
+ } else if ($field->getLabel() === GPBLabel::OPTIONAL) {
+ switch ($field->getType()) {
+ case GPBType::DOUBLE :
+ case GPBType::FLOAT :
+ $this->$setter(0.0);
+ break;
+ case GPBType::INT32 :
+ case GPBType::FIXED32 :
+ case GPBType::UINT32 :
+ case GPBType::SFIXED32 :
+ case GPBType::SINT32 :
+ case GPBType::ENUM :
+ $this->$setter(0);
+ break;
+ case GPBType::BOOL :
+ $this->$setter(false);
+ break;
+ case GPBType::STRING :
+ case GPBType::BYTES :
+ $this->$setter("");
+ break;
+ case GPBType::GROUP :
+ case GPBType::MESSAGE :
+ $null = null;
+ $this->$setter($null);
+ break;
+ }
+ if (PHP_INT_SIZE == 4) {
+ switch ($field->getType()) {
+ case GPBType::INT64:
+ case GPBType::UINT64:
+ case GPBType::FIXED64:
+ case GPBType::SFIXED64:
+ case GPBType::SINT64:
+ $this->$setter("0");
+ }
+ } else {
+ switch ($field->getType()) {
+ case GPBType::INT64:
+ case GPBType::UINT64:
+ case GPBType::FIXED64:
+ case GPBType::SFIXED64:
+ case GPBType::SINT64:
+ $this->$setter(0);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Clear all unknown fields previously parsed.
+ * @return null
+ */
+ public function discardUnknownFields()
+ {
+ $this->unknown = "";
+ foreach ($this->desc->getField() as $field) {
+ if ($field->getType() != GPBType::MESSAGE) {
+ continue;
+ }
+ if ($field->isMap()) {
+ $value_field = $field->getMessageType()->getFieldByNumber(2);
+ if ($value_field->getType() != GPBType::MESSAGE) {
+ continue;
+ }
+ $getter = $field->getGetter();
+ $map = $this->$getter();
+ foreach ($map as $key => $value) {
+ $value->discardUnknownFields();
+ }
+ } else if ($field->getLabel() === GPBLabel::REPEATED) {
+ $getter = $field->getGetter();
+ $arr = $this->$getter();
+ foreach ($arr as $sub) {
+ $sub->discardUnknownFields();
+ }
+ } else if ($field->getLabel() === GPBLabel::OPTIONAL) {
+ $getter = $field->getGetter();
+ $sub = $this->$getter();
+ if (!is_null($sub)) {
+ $sub->discardUnknownFields();
+ }
+ }
+ }
+ }
+
+ /**
+ * Merges the contents of the specified message into current message.
+ *
+ * This method merges the contents of the specified message into the
+ * current message. Singular fields that are set in the specified message
+ * overwrite the corresponding fields in the current message. Repeated
+ * fields are appended. Map fields key-value pairs are overwritten.
+ * Singular/Oneof sub-messages are recursively merged. All overwritten
+ * sub-messages are deep-copied.
+ *
+ * @param object $msg Protobuf message to be merged from.
+ * @return null
+ */
+ public function mergeFrom($msg)
+ {
+ if (get_class($this) !== get_class($msg)) {
+ user_error("Cannot merge messages with different class.");
+ return;
+ }
+
+ foreach ($this->desc->getField() as $field) {
+ $setter = $field->getSetter();
+ $getter = $field->getGetter();
+ if ($field->isMap()) {
+ if (count($msg->$getter()) != 0) {
+ $value_field = $field->getMessageType()->getFieldByNumber(2);
+ foreach ($msg->$getter() as $key => $value) {
+ if ($value_field->getType() == GPBType::MESSAGE) {
+ $klass = $value_field->getMessageType()->getClass();
+ $copy = new $klass;
+ $copy->mergeFrom($value);
+
+ $this->kvUpdateHelper($field, $key, $copy);
+ } else {
+ $this->kvUpdateHelper($field, $key, $value);
+ }
+ }
+ }
+ } else if ($field->getLabel() === GPBLabel::REPEATED) {
+ if (count($msg->$getter()) != 0) {
+ foreach ($msg->$getter() as $tmp) {
+ if ($field->getType() == GPBType::MESSAGE) {
+ $klass = $field->getMessageType()->getClass();
+ $copy = new $klass;
+ $copy->mergeFrom($tmp);
+ $this->appendHelper($field, $copy);
+ } else {
+ $this->appendHelper($field, $tmp);
+ }
+ }
+ }
+ } else if ($field->getLabel() === GPBLabel::OPTIONAL) {
+ if($msg->$getter() !== $this->defaultValue($field)) {
+ $tmp = $msg->$getter();
+ if ($field->getType() == GPBType::MESSAGE) {
+ if (is_null($this->$getter())) {
+ $klass = $field->getMessageType()->getClass();
+ $new_msg = new $klass;
+ $this->$setter($new_msg);
+ }
+ $this->$getter()->mergeFrom($tmp);
+ } else {
+ $this->$setter($tmp);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Parses a protocol buffer contained in a string.
+ *
+ * This function takes a string in the (non-human-readable) binary wire
+ * format, matching the encoding output by serializeToString().
+ * See mergeFrom() for merging behavior, if the field is already set in the
+ * specified message.
+ *
+ * @param string $data Binary protobuf data.
+ * @return null
+ * @throws \Exception Invalid data.
+ */
+ public function mergeFromString($data)
+ {
+ $input = new CodedInputStream($data);
+ $this->parseFromStream($input);
+ }
+
+ /**
+ * Parses a json string to protobuf message.
+ *
+ * This function takes a string in the json wire format, matching the
+ * encoding output by serializeToJsonString().
+ * See mergeFrom() for merging behavior, if the field is already set in the
+ * specified message.
+ *
+ * @param string $data Json protobuf data.
+ * @param bool $ignore_unknown
+ * @return null
+ * @throws \Exception Invalid data.
+ */
+ public function mergeFromJsonString($data, $ignore_unknown = false)
+ {
+ $input = new RawInputStream($data);
+ $this->parseFromJsonStream($input, $ignore_unknown);
+ }
+
+ /**
+ * @ignore
+ */
+ public function parseFromStream($input)
+ {
+ while (true) {
+ $tag = $input->readTag();
+ // End of input. This is a valid place to end, so return true.
+ if ($tag === 0) {
+ return true;
+ }
+
+ $number = GPBWire::getTagFieldNumber($tag);
+ $field = $this->desc->getFieldByNumber($number);
+
+ $this->parseFieldFromStream($tag, $input, $field);
+ }
+ }
+
+ private function convertJsonValueToProtoValue(
+ $value,
+ $field,
+ $ignore_unknown,
+ $is_map_key = false)
+ {
+ switch ($field->getType()) {
+ case GPBType::MESSAGE:
+ $klass = $field->getMessageType()->getClass();
+ $submsg = new $klass;
+
+ if (is_a($submsg, "Google\Protobuf\Duration")) {
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ } else if (!is_string($value)) {
+ throw new GPBDecodeException("Expect string.");
+ }
+ return GPBUtil::parseDuration($value);
+ } else if ($field->isTimestamp()) {
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ } else if (!is_string($value)) {
+ throw new GPBDecodeException("Expect string.");
+ }
+ try {
+ $timestamp = GPBUtil::parseTimestamp($value);
+ } catch (\Exception $e) {
+ throw new GPBDecodeException(
+ "Invalid RFC 3339 timestamp: ".$e->getMessage());
+ }
+
+ $submsg->setSeconds($timestamp->getSeconds());
+ $submsg->setNanos($timestamp->getNanos());
+ } else if (is_a($submsg, "Google\Protobuf\FieldMask")) {
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ }
+ try {
+ return GPBUtil::parseFieldMask($value);
+ } catch (\Exception $e) {
+ throw new GPBDecodeException(
+ "Invalid FieldMask: ".$e->getMessage());
+ }
+ } else {
+ if (is_null($value) &&
+ !is_a($submsg, "Google\Protobuf\Value")) {
+ return $this->defaultValue($field);
+ }
+ if (GPBUtil::hasSpecialJsonMapping($submsg)) {
+ } elseif (!is_object($value) && !is_array($value)) {
+ throw new GPBDecodeException("Expect message.");
+ }
+ $submsg->mergeFromJsonArray($value, $ignore_unknown);
+ }
+ return $submsg;
+ case GPBType::ENUM:
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ }
+ if (is_integer($value)) {
+ return $value;
+ }
+ $enum_value = $field->getEnumType()->getValueByName($value);
+ if (!is_null($enum_value)) {
+ return $enum_value->getNumber();
+ } else if ($ignore_unknown) {
+ return $this->defaultValue($field);
+ } else {
+ throw new GPBDecodeException(
+ "Enum field only accepts integer or enum value name");
+ }
+ case GPBType::STRING:
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ }
+ if (is_numeric($value)) {
+ return strval($value);
+ }
+ if (!is_string($value)) {
+ throw new GPBDecodeException(
+ "String field only accepts string value");
+ }
+ return $value;
+ case GPBType::BYTES:
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ }
+ if (!is_string($value)) {
+ throw new GPBDecodeException(
+ "Byte field only accepts string value");
+ }
+ $proto_value = base64_decode($value, true);
+ if ($proto_value === false) {
+ throw new GPBDecodeException("Invalid base64 characters");
+ }
+ return $proto_value;
+ case GPBType::BOOL:
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ }
+ if ($is_map_key) {
+ if ($value === "true") {
+ return true;
+ }
+ if ($value === "false") {
+ return false;
+ }
+ throw new GPBDecodeException(
+ "Bool field only accepts bool value");
+ }
+ if (!is_bool($value)) {
+ throw new GPBDecodeException(
+ "Bool field only accepts bool value");
+ }
+ return $value;
+ case GPBType::FLOAT:
+ case GPBType::DOUBLE:
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ }
+ if ($value === "Infinity") {
+ return INF;
+ }
+ if ($value === "-Infinity") {
+ return -INF;
+ }
+ if ($value === "NaN") {
+ return NAN;
+ }
+ return $value;
+ case GPBType::INT32:
+ case GPBType::SINT32:
+ case GPBType::SFIXED32:
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ }
+ if (!is_numeric($value)) {
+ throw new GPBDecodeException(
+ "Invalid data type for int32 field");
+ }
+ if (is_string($value) && trim($value) !== $value) {
+ throw new GPBDecodeException(
+ "Invalid data type for int32 field");
+ }
+ if (bccomp($value, "2147483647") > 0) {
+ throw new GPBDecodeException(
+ "Int32 too large");
+ }
+ if (bccomp($value, "-2147483648") < 0) {
+ throw new GPBDecodeException(
+ "Int32 too small");
+ }
+ return $value;
+ case GPBType::UINT32:
+ case GPBType::FIXED32:
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ }
+ if (!is_numeric($value)) {
+ throw new GPBDecodeException(
+ "Invalid data type for uint32 field");
+ }
+ if (is_string($value) && trim($value) !== $value) {
+ throw new GPBDecodeException(
+ "Invalid data type for int32 field");
+ }
+ if (bccomp($value, 4294967295) > 0) {
+ throw new GPBDecodeException(
+ "Uint32 too large");
+ }
+ return $value;
+ case GPBType::INT64:
+ case GPBType::SINT64:
+ case GPBType::SFIXED64:
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ }
+ if (!is_numeric($value)) {
+ throw new GPBDecodeException(
+ "Invalid data type for int64 field");
+ }
+ if (is_string($value) && trim($value) !== $value) {
+ throw new GPBDecodeException(
+ "Invalid data type for int64 field");
+ }
+ if (bccomp($value, "9223372036854775807") > 0) {
+ throw new GPBDecodeException(
+ "Int64 too large");
+ }
+ if (bccomp($value, "-9223372036854775808") < 0) {
+ throw new GPBDecodeException(
+ "Int64 too small");
+ }
+ return $value;
+ case GPBType::UINT64:
+ case GPBType::FIXED64:
+ if (is_null($value)) {
+ return $this->defaultValue($field);
+ }
+ if (!is_numeric($value)) {
+ throw new GPBDecodeException(
+ "Invalid data type for int64 field");
+ }
+ if (is_string($value) && trim($value) !== $value) {
+ throw new GPBDecodeException(
+ "Invalid data type for int64 field");
+ }
+ if (bccomp($value, "18446744073709551615") > 0) {
+ throw new GPBDecodeException(
+ "Uint64 too large");
+ }
+ if (bccomp($value, "9223372036854775807") > 0) {
+ $value = bcsub($value, "18446744073709551616");
+ }
+ return $value;
+ default:
+ return $value;
+ }
+ }
+
+ /**
+ * Populates the message from a user-supplied PHP array. Array keys
+ * correspond to Message properties and nested message properties.
+ *
+ * Example:
+ * ```
+ * $message->mergeFromArray([
+ * 'name' => 'This is a message name',
+ * 'interval' => [
+ * 'startTime' => time() - 60,
+ * 'endTime' => time(),
+ * ]
+ * ]);
+ * ```
+ *
+ * This method will trigger an error if it is passed data that cannot
+ * be converted to the correct type. For example, a StringValue field
+ * must receive data that is either a string or a StringValue object.
+ *
+ * @param array $array An array containing message properties and values.
+ * @return null
+ */
+ protected function mergeFromArray(array $array)
+ {
+ // Just call the setters for the field names
+ foreach ($array as $key => $value) {
+ $field = $this->desc->getFieldByName($key);
+ if (is_null($field)) {
+ throw new \UnexpectedValueException(
+ 'Invalid message property: ' . $key);
+ }
+ $setter = $field->getSetter();
+ if ($field->isMap()) {
+ $valueField = $field->getMessageType()->getFieldByName('value');
+ if (!is_null($valueField) && $valueField->isWrapperType()) {
+ self::normalizeArrayElementsToMessageType($value, $valueField->getMessageType()->getClass());
+ }
+ } elseif ($field->isWrapperType()) {
+ $class = $field->getMessageType()->getClass();
+ if ($field->isRepeated()) {
+ self::normalizeArrayElementsToMessageType($value, $class);
+ } else {
+ self::normalizeToMessageType($value, $class);
+ }
+ }
+ $this->$setter($value);
+ }
+ }
+
+ /**
+ * Tries to normalize the elements in $value into a provided protobuf
+ * wrapper type $class. If $value is any type other than array, we do
+ * not do any conversion, and instead rely on the existing protobuf
+ * type checking. If $value is an array, we process each element and
+ * try to convert it to an instance of $class.
+ *
+ * @param mixed $value The array of values to normalize.
+ * @param string $class The expected wrapper class name
+ */
+ private static function normalizeArrayElementsToMessageType(&$value, $class)
+ {
+ if (!is_array($value)) {
+ // In the case that $value is not an array, we do not want to
+ // attempt any conversion. Note that this includes the cases
+ // when $value is a RepeatedField of MapField. In those cases,
+ // we do not need to convert the elements, as they should
+ // already be the correct types.
+ return;
+ } else {
+ // Normalize each element in the array.
+ foreach ($value as $key => &$elementValue) {
+ self::normalizeToMessageType($elementValue, $class);
+ }
+ }
+ }
+
+ /**
+ * Tries to normalize $value into a provided protobuf wrapper type $class.
+ * If $value is any type other than an object, we attempt to construct an
+ * instance of $class and assign $value to it using the setValue method
+ * shared by all wrapper types.
+ *
+ * This method will raise an error if it receives a type that cannot be
+ * assigned to the wrapper type via setValue.
+ *
+ * @param mixed $value The value to normalize.
+ * @param string $class The expected wrapper class name
+ */
+ private static function normalizeToMessageType(&$value, $class)
+ {
+ if (is_null($value) || is_object($value)) {
+ // This handles the case that $value is an instance of $class. We
+ // choose not to do any more strict checking here, relying on the
+ // existing type checking done by GPBUtil.
+ return;
+ } else {
+ // Try to instantiate $class and set the value
+ try {
+ $msg = new $class;
+ $msg->setValue($value);
+ $value = $msg;
+ return;
+ } catch (\Exception $exception) {
+ trigger_error(
+ "Error normalizing value to type '$class': " . $exception->getMessage(),
+ E_USER_ERROR
+ );
+ }
+ }
+ }
+
+ protected function mergeFromJsonArray($array, $ignore_unknown)
+ {
+ if (is_a($this, "Google\Protobuf\Any")) {
+ $this->clear();
+ $this->setTypeUrl($array["@type"]);
+ $msg = $this->unpack();
+ if (GPBUtil::hasSpecialJsonMapping($msg)) {
+ $msg->mergeFromJsonArray($array["value"], $ignore_unknown);
+ } else {
+ unset($array["@type"]);
+ $msg->mergeFromJsonArray($array, $ignore_unknown);
+ }
+ $this->setValue($msg->serializeToString());
+ return;
+ }
+ if (is_a($this, "Google\Protobuf\DoubleValue") ||
+ is_a($this, "Google\Protobuf\FloatValue") ||
+ is_a($this, "Google\Protobuf\Int64Value") ||
+ is_a($this, "Google\Protobuf\UInt64Value") ||
+ is_a($this, "Google\Protobuf\Int32Value") ||
+ is_a($this, "Google\Protobuf\UInt32Value") ||
+ is_a($this, "Google\Protobuf\BoolValue") ||
+ is_a($this, "Google\Protobuf\StringValue")) {
+ $this->setValue($array);
+ return;
+ }
+ if (is_a($this, "Google\Protobuf\BytesValue")) {
+ $this->setValue(base64_decode($array));
+ return;
+ }
+ if (is_a($this, "Google\Protobuf\Duration")) {
+ $this->mergeFrom(GPBUtil::parseDuration($array));
+ return;
+ }
+ if (is_a($this, "Google\Protobuf\FieldMask")) {
+ $this->mergeFrom(GPBUtil::parseFieldMask($array));
+ return;
+ }
+ if (is_a($this, "Google\Protobuf\Timestamp")) {
+ $this->mergeFrom(GPBUtil::parseTimestamp($array));
+ return;
+ }
+ if (is_a($this, "Google\Protobuf\Struct")) {
+ $fields = $this->getFields();
+ foreach($array as $key => $value) {
+ $v = new Value();
+ $v->mergeFromJsonArray($value, $ignore_unknown);
+ $fields[$key] = $v;
+ }
+ return;
+ }
+ if (is_a($this, "Google\Protobuf\Value")) {
+ if (is_bool($array)) {
+ $this->setBoolValue($array);
+ } elseif (is_string($array)) {
+ $this->setStringValue($array);
+ } elseif (is_null($array)) {
+ $this->setNullValue(0);
+ } elseif (is_double($array) || is_integer($array)) {
+ $this->setNumberValue($array);
+ } elseif (is_array($array)) {
+ if (array_values($array) !== $array) {
+ // Associative array
+ $struct_value = $this->getStructValue();
+ if (is_null($struct_value)) {
+ $struct_value = new Struct();
+ $this->setStructValue($struct_value);
+ }
+ foreach ($array as $key => $v) {
+ $value = new Value();
+ $value->mergeFromJsonArray($v, $ignore_unknown);
+ $values = $struct_value->getFields();
+ $values[$key]= $value;
+ }
+ } else {
+ // Array
+ $list_value = $this->getListValue();
+ if (is_null($list_value)) {
+ $list_value = new ListValue();
+ $this->setListValue($list_value);
+ }
+ foreach ($array as $v) {
+ $value = new Value();
+ $value->mergeFromJsonArray($v, $ignore_unknown);
+ $values = $list_value->getValues();
+ $values[]= $value;
+ }
+ }
+ } else {
+ throw new GPBDecodeException("Invalid type for Value.");
+ }
+ return;
+ }
+ $this->mergeFromArrayJsonImpl($array, $ignore_unknown);
+ }
+
+ private function mergeFromArrayJsonImpl($array, $ignore_unknown)
+ {
+ foreach ($array as $key => $value) {
+ $field = $this->desc->getFieldByJsonName($key);
+ if (is_null($field)) {
+ $field = $this->desc->getFieldByName($key);
+ if (is_null($field)) {
+ if ($ignore_unknown) {
+ continue;
+ } else {
+ throw new GPBDecodeException(
+ $key . ' is unknown.'
+ );
+ }
+ }
+ }
+ if ($field->isMap()) {
+ if (is_null($value)) {
+ continue;
+ }
+ $key_field = $field->getMessageType()->getFieldByNumber(1);
+ $value_field = $field->getMessageType()->getFieldByNumber(2);
+ foreach ($value as $tmp_key => $tmp_value) {
+ if (is_null($tmp_value)) {
+ throw new \Exception(
+ "Map value field element cannot be null.");
+ }
+ $proto_key = $this->convertJsonValueToProtoValue(
+ $tmp_key,
+ $key_field,
+ $ignore_unknown,
+ true);
+ $proto_value = $this->convertJsonValueToProtoValue(
+ $tmp_value,
+ $value_field,
+ $ignore_unknown);
+ self::kvUpdateHelper($field, $proto_key, $proto_value);
+ }
+ } else if ($field->isRepeated()) {
+ if (is_null($value)) {
+ continue;
+ }
+ foreach ($value as $tmp) {
+ if (is_null($tmp)) {
+ throw new \Exception(
+ "Repeated field elements cannot be null.");
+ }
+ $proto_value = $this->convertJsonValueToProtoValue(
+ $tmp,
+ $field,
+ $ignore_unknown);
+ self::appendHelper($field, $proto_value);
+ }
+ } else {
+ $setter = $field->getSetter();
+ $proto_value = $this->convertJsonValueToProtoValue(
+ $value,
+ $field,
+ $ignore_unknown);
+ if ($field->getType() === GPBType::MESSAGE) {
+ if (is_null($proto_value)) {
+ continue;
+ }
+ $getter = $field->getGetter();
+ $submsg = $this->$getter();
+ if (!is_null($submsg)) {
+ $submsg->mergeFrom($proto_value);
+ continue;
+ }
+ }
+ $this->$setter($proto_value);
+ }
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ public function parseFromJsonStream($input, $ignore_unknown)
+ {
+ $array = json_decode($input->getData(), true, 512, JSON_BIGINT_AS_STRING);
+ if ($this instanceof \Google\Protobuf\ListValue) {
+ $array = ["values"=>$array];
+ }
+ if (is_null($array)) {
+ if ($this instanceof \Google\Protobuf\Value) {
+ $this->setNullValue(\Google\Protobuf\NullValue::NULL_VALUE);
+ return;
+ } else {
+ throw new GPBDecodeException(
+ "Cannot decode json string: " . $input->getData());
+ }
+ }
+ try {
+ $this->mergeFromJsonArray($array, $ignore_unknown);
+ } catch (\Exception $e) {
+ throw new GPBDecodeException($e->getMessage());
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ private function serializeSingularFieldToStream($field, &$output)
+ {
+ if (!$this->existField($field)) {
+ return true;
+ }
+ $getter = $field->getGetter();
+ $value = $this->$getter();
+ if (!GPBWire::serializeFieldToStream($value, $field, true, $output)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * @ignore
+ */
+ private function serializeRepeatedFieldToStream($field, &$output)
+ {
+ $getter = $field->getGetter();
+ $values = $this->$getter();
+ $count = count($values);
+ if ($count === 0) {
+ return true;
+ }
+
+ $packed = $field->getPacked();
+ if ($packed) {
+ if (!GPBWire::writeTag(
+ $output,
+ GPBWire::makeTag($field->getNumber(), GPBType::STRING))) {
+ return false;
+ }
+ $size = 0;
+ foreach ($values as $value) {
+ $size += $this->fieldDataOnlyByteSize($field, $value);
+ }
+ if (!$output->writeVarint32($size, true)) {
+ return false;
+ }
+ }
+
+ foreach ($values as $value) {
+ if (!GPBWire::serializeFieldToStream(
+ $value,
+ $field,
+ !$packed,
+ $output)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @ignore
+ */
+ private function serializeMapFieldToStream($field, $output)
+ {
+ $getter = $field->getGetter();
+ $values = $this->$getter();
+ $count = count($values);
+ if ($count === 0) {
+ return true;
+ }
+
+ foreach ($values as $key => $value) {
+ $map_entry = new MapEntry($field->getMessageType());
+ $map_entry->setKey($key);
+ $map_entry->setValue($value);
+ if (!GPBWire::serializeFieldToStream(
+ $map_entry,
+ $field,
+ true,
+ $output)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @ignore
+ */
+ private function serializeFieldToStream(&$output, $field)
+ {
+ if ($field->isMap()) {
+ return $this->serializeMapFieldToStream($field, $output);
+ } elseif ($field->isRepeated()) {
+ return $this->serializeRepeatedFieldToStream($field, $output);
+ } else {
+ return $this->serializeSingularFieldToStream($field, $output);
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ private function serializeFieldToJsonStream(&$output, $field)
+ {
+ $getter = $field->getGetter();
+ $values = $this->$getter();
+ return GPBJsonWire::serializeFieldToStream(
+ $values, $field, $output, !GPBUtil::hasSpecialJsonMapping($this));
+ }
+
+ /**
+ * @ignore
+ */
+ public function serializeToStream(&$output)
+ {
+ $fields = $this->desc->getField();
+ foreach ($fields as $field) {
+ if (!$this->serializeFieldToStream($output, $field)) {
+ return false;
+ }
+ }
+ $output->writeRaw($this->unknown, strlen($this->unknown));
+ return true;
+ }
+
+ /**
+ * @ignore
+ */
+ public function serializeToJsonStream(&$output)
+ {
+ if (is_a($this, 'Google\Protobuf\Any')) {
+ $output->writeRaw("{", 1);
+ $type_field = $this->desc->getFieldByNumber(1);
+ $value_msg = $this->unpack();
+
+ // Serialize type url.
+ $output->writeRaw("\"@type\":", 8);
+ $output->writeRaw("\"", 1);
+ $output->writeRaw($this->getTypeUrl(), strlen($this->getTypeUrl()));
+ $output->writeRaw("\"", 1);
+
+ // Serialize value
+ if (GPBUtil::hasSpecialJsonMapping($value_msg)) {
+ $output->writeRaw(",\"value\":", 9);
+ $value_msg->serializeToJsonStream($output);
+ } else {
+ $value_fields = $value_msg->desc->getField();
+ foreach ($value_fields as $field) {
+ if ($value_msg->existField($field)) {
+ $output->writeRaw(",", 1);
+ if (!$value_msg->serializeFieldToJsonStream($output, $field)) {
+ return false;
+ }
+ }
+ }
+ }
+
+ $output->writeRaw("}", 1);
+ } elseif (is_a($this, 'Google\Protobuf\FieldMask')) {
+ $field_mask = GPBUtil::formatFieldMask($this);
+ $output->writeRaw("\"", 1);
+ $output->writeRaw($field_mask, strlen($field_mask));
+ $output->writeRaw("\"", 1);
+ } elseif (is_a($this, 'Google\Protobuf\Duration')) {
+ $duration = GPBUtil::formatDuration($this) . "s";
+ $output->writeRaw("\"", 1);
+ $output->writeRaw($duration, strlen($duration));
+ $output->writeRaw("\"", 1);
+ } elseif (get_class($this) === 'Google\Protobuf\Timestamp') {
+ $timestamp = GPBUtil::formatTimestamp($this);
+ $timestamp = json_encode($timestamp);
+ $output->writeRaw($timestamp, strlen($timestamp));
+ } elseif (get_class($this) === 'Google\Protobuf\ListValue') {
+ $field = $this->desc->getField()[1];
+ if (!$this->existField($field)) {
+ $output->writeRaw("[]", 2);
+ } else {
+ if (!$this->serializeFieldToJsonStream($output, $field)) {
+ return false;
+ }
+ }
+ } elseif (get_class($this) === 'Google\Protobuf\Struct') {
+ $field = $this->desc->getField()[1];
+ if (!$this->existField($field)) {
+ $output->writeRaw("{}", 2);
+ } else {
+ if (!$this->serializeFieldToJsonStream($output, $field)) {
+ return false;
+ }
+ }
+ } else {
+ if (!GPBUtil::hasSpecialJsonMapping($this)) {
+ $output->writeRaw("{", 1);
+ }
+ $fields = $this->desc->getField();
+ $first = true;
+ foreach ($fields as $field) {
+ if ($this->existField($field) ||
+ GPBUtil::hasJsonValue($this)) {
+ if ($first) {
+ $first = false;
+ } else {
+ $output->writeRaw(",", 1);
+ }
+ if (!$this->serializeFieldToJsonStream($output, $field)) {
+ return false;
+ }
+ }
+ }
+ if (!GPBUtil::hasSpecialJsonMapping($this)) {
+ $output->writeRaw("}", 1);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Serialize the message to string.
+ * @return string Serialized binary protobuf data.
+ */
+ public function serializeToString()
+ {
+ $output = new CodedOutputStream($this->byteSize());
+ $this->serializeToStream($output);
+ return $output->getData();
+ }
+
+ /**
+ * Serialize the message to json string.
+ * @return string Serialized json protobuf data.
+ */
+ public function serializeToJsonString()
+ {
+ $output = new CodedOutputStream($this->jsonByteSize());
+ $this->serializeToJsonStream($output);
+ return $output->getData();
+ }
+
+ /**
+ * @ignore
+ */
+ private function existField($field)
+ {
+ $getter = $field->getGetter();
+ $hazzer = "has" . substr($getter, 3);
+
+ if (method_exists($this, $hazzer)) {
+ return $this->$hazzer();
+ } else if ($field->getOneofIndex() !== -1) {
+ // For old generated code, which does not have hazzers for oneof
+ // fields.
+ $oneof = $this->desc->getOneofDecl()[$field->getOneofIndex()];
+ $oneof_name = $oneof->getName();
+ return $this->$oneof_name->getNumber() === $field->getNumber();
+ }
+
+ $values = $this->$getter();
+ if ($field->isMap()) {
+ return count($values) !== 0;
+ } elseif ($field->isRepeated()) {
+ return count($values) !== 0;
+ } else {
+ return $values !== $this->defaultValue($field);
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ private function repeatedFieldDataOnlyByteSize($field)
+ {
+ $size = 0;
+
+ $getter = $field->getGetter();
+ $values = $this->$getter();
+ $count = count($values);
+ if ($count !== 0) {
+ $size += $count * GPBWire::tagSize($field);
+ foreach ($values as $value) {
+ $size += $this->singularFieldDataOnlyByteSize($field);
+ }
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ private function fieldDataOnlyByteSize($field, $value)
+ {
+ $size = 0;
+
+ switch ($field->getType()) {
+ case GPBType::BOOL:
+ $size += 1;
+ break;
+ case GPBType::FLOAT:
+ case GPBType::FIXED32:
+ case GPBType::SFIXED32:
+ $size += 4;
+ break;
+ case GPBType::DOUBLE:
+ case GPBType::FIXED64:
+ case GPBType::SFIXED64:
+ $size += 8;
+ break;
+ case GPBType::INT32:
+ case GPBType::ENUM:
+ $size += GPBWire::varint32Size($value, true);
+ break;
+ case GPBType::UINT32:
+ $size += GPBWire::varint32Size($value);
+ break;
+ case GPBType::UINT64:
+ case GPBType::INT64:
+ $size += GPBWire::varint64Size($value);
+ break;
+ case GPBType::SINT32:
+ $size += GPBWire::sint32Size($value);
+ break;
+ case GPBType::SINT64:
+ $size += GPBWire::sint64Size($value);
+ break;
+ case GPBType::STRING:
+ case GPBType::BYTES:
+ $size += strlen($value);
+ $size += GPBWire::varint32Size($size);
+ break;
+ case GPBType::MESSAGE:
+ $size += $value->byteSize();
+ $size += GPBWire::varint32Size($size);
+ break;
+ case GPBType::GROUP:
+ // TODO: Add support.
+ user_error("Unsupported type.");
+ break;
+ default:
+ user_error("Unsupported type.");
+ return 0;
+ }
+
+ return $size;
+ }
+
+ /**
+ * @ignore
+ */
+ private function fieldDataOnlyJsonByteSize($field, $value)
+ {
+ $size = 0;
+
+ switch ($field->getType()) {
+ case GPBType::SFIXED32:
+ case GPBType::SINT32:
+ case GPBType::INT32:
+ $size += strlen(strval($value));
+ break;
+ case GPBType::FIXED32:
+ case GPBType::UINT32:
+ if ($value < 0) {
+ $value = bcadd($value, "4294967296");
+ }
+ $size += strlen(strval($value));
+ break;
+ case GPBType::FIXED64:
+ case GPBType::UINT64:
+ if ($value < 0) {
+ $value = bcadd($value, "18446744073709551616");
+ }
+ // Intentional fall through.
+ case GPBType::SFIXED64:
+ case GPBType::INT64:
+ case GPBType::SINT64:
+ $size += 2; // size for ""
+ $size += strlen(strval($value));
+ break;
+ case GPBType::FLOAT:
+ if (is_nan($value)) {
+ $size += strlen("NaN") + 2;
+ } elseif ($value === INF) {
+ $size += strlen("Infinity") + 2;
+ } elseif ($value === -INF) {
+ $size += strlen("-Infinity") + 2;
+ } else {
+ $size += strlen(sprintf("%.8g", $value));
+ }
+ break;
+ case GPBType::DOUBLE:
+ if (is_nan($value)) {
+ $size += strlen("NaN") + 2;
+ } elseif ($value === INF) {
+ $size += strlen("Infinity") + 2;
+ } elseif ($value === -INF) {
+ $size += strlen("-Infinity") + 2;
+ } else {
+ $size += strlen(sprintf("%.17g", $value));
+ }
+ break;
+ case GPBType::ENUM:
+ $enum_desc = $field->getEnumType();
+ if ($enum_desc->getClass() === "Google\Protobuf\NullValue") {
+ $size += 4;
+ break;
+ }
+ $enum_value_desc = $enum_desc->getValueByNumber($value);
+ if (!is_null($enum_value_desc)) {
+ $size += 2; // size for ""
+ $size += strlen($enum_value_desc->getName());
+ } else {
+ $str_value = strval($value);
+ $size += strlen($str_value);
+ }
+ break;
+ case GPBType::BOOL:
+ if ($value) {
+ $size += 4;
+ } else {
+ $size += 5;
+ }
+ break;
+ case GPBType::STRING:
+ $value = json_encode($value, JSON_UNESCAPED_UNICODE);
+ $size += strlen($value);
+ break;
+ case GPBType::BYTES:
+ # if (is_a($this, "Google\Protobuf\BytesValue")) {
+ # $size += strlen(json_encode($value));
+ # } else {
+ # $size += strlen(base64_encode($value));
+ # $size += 2; // size for \"\"
+ # }
+ $size += strlen(base64_encode($value));
+ $size += 2; // size for \"\"
+ break;
+ case GPBType::MESSAGE:
+ $size += $value->jsonByteSize();
+ break;
+# case GPBType::GROUP:
+# // TODO: Add support.
+# user_error("Unsupported type.");
+# break;
+ default:
+ user_error("Unsupported type " . $field->getType());
+ return 0;
+ }
+
+ return $size;
+ }
+
+ /**
+ * @ignore
+ */
+ private function fieldByteSize($field)
+ {
+ $size = 0;
+ if ($field->isMap()) {
+ $getter = $field->getGetter();
+ $values = $this->$getter();
+ $count = count($values);
+ if ($count !== 0) {
+ $size += $count * GPBWire::tagSize($field);
+ $message_type = $field->getMessageType();
+ $key_field = $message_type->getFieldByNumber(1);
+ $value_field = $message_type->getFieldByNumber(2);
+ foreach ($values as $key => $value) {
+ $data_size = 0;
+ if ($key != $this->defaultValue($key_field)) {
+ $data_size += $this->fieldDataOnlyByteSize(
+ $key_field,
+ $key);
+ $data_size += GPBWire::tagSize($key_field);
+ }
+ if ($value != $this->defaultValue($value_field)) {
+ $data_size += $this->fieldDataOnlyByteSize(
+ $value_field,
+ $value);
+ $data_size += GPBWire::tagSize($value_field);
+ }
+ $size += GPBWire::varint32Size($data_size) + $data_size;
+ }
+ }
+ } elseif ($field->isRepeated()) {
+ $getter = $field->getGetter();
+ $values = $this->$getter();
+ $count = count($values);
+ if ($count !== 0) {
+ if ($field->getPacked()) {
+ $data_size = 0;
+ foreach ($values as $value) {
+ $data_size += $this->fieldDataOnlyByteSize($field, $value);
+ }
+ $size += GPBWire::tagSize($field);
+ $size += GPBWire::varint32Size($data_size);
+ $size += $data_size;
+ } else {
+ $size += $count * GPBWire::tagSize($field);
+ foreach ($values as $value) {
+ $size += $this->fieldDataOnlyByteSize($field, $value);
+ }
+ }
+ }
+ } elseif ($this->existField($field)) {
+ $size += GPBWire::tagSize($field);
+ $getter = $field->getGetter();
+ $value = $this->$getter();
+ $size += $this->fieldDataOnlyByteSize($field, $value);
+ }
+ return $size;
+ }
+
+ /**
+ * @ignore
+ */
+ private function fieldJsonByteSize($field)
+ {
+ $size = 0;
+
+ if ($field->isMap()) {
+ $getter = $field->getGetter();
+ $values = $this->$getter();
+ $count = count($values);
+ if ($count !== 0) {
+ if (!GPBUtil::hasSpecialJsonMapping($this)) {
+ $size += 3; // size for "\"\":".
+ $size += strlen($field->getJsonName()); // size for field name
+ }
+ $size += 2; // size for "{}".
+ $size += $count - 1; // size for commas
+ $getter = $field->getGetter();
+ $map_entry = $field->getMessageType();
+ $key_field = $map_entry->getFieldByNumber(1);
+ $value_field = $map_entry->getFieldByNumber(2);
+ switch ($key_field->getType()) {
+ case GPBType::STRING:
+ case GPBType::SFIXED64:
+ case GPBType::INT64:
+ case GPBType::SINT64:
+ case GPBType::FIXED64:
+ case GPBType::UINT64:
+ $additional_quote = false;
+ break;
+ default:
+ $additional_quote = true;
+ }
+ foreach ($values as $key => $value) {
+ if ($additional_quote) {
+ $size += 2; // size for ""
+ }
+ $size += $this->fieldDataOnlyJsonByteSize($key_field, $key);
+ $size += $this->fieldDataOnlyJsonByteSize($value_field, $value);
+ $size += 1; // size for :
+ }
+ }
+ } elseif ($field->isRepeated()) {
+ $getter = $field->getGetter();
+ $values = $this->$getter();
+ $count = count($values);
+ if ($count !== 0) {
+ if (!GPBUtil::hasSpecialJsonMapping($this)) {
+ $size += 3; // size for "\"\":".
+ $size += strlen($field->getJsonName()); // size for field name
+ }
+ $size += 2; // size for "[]".
+ $size += $count - 1; // size for commas
+ $getter = $field->getGetter();
+ foreach ($values as $value) {
+ $size += $this->fieldDataOnlyJsonByteSize($field, $value);
+ }
+ }
+ } elseif ($this->existField($field) || GPBUtil::hasJsonValue($this)) {
+ if (!GPBUtil::hasSpecialJsonMapping($this)) {
+ $size += 3; // size for "\"\":".
+ $size += strlen($field->getJsonName()); // size for field name
+ }
+ $getter = $field->getGetter();
+ $value = $this->$getter();
+ $size += $this->fieldDataOnlyJsonByteSize($field, $value);
+ }
+ return $size;
+ }
+
+ /**
+ * @ignore
+ */
+ public function byteSize()
+ {
+ $size = 0;
+
+ $fields = $this->desc->getField();
+ foreach ($fields as $field) {
+ $size += $this->fieldByteSize($field);
+ }
+ $size += strlen($this->unknown);
+ return $size;
+ }
+
+ private function appendHelper($field, $append_value)
+ {
+ $getter = $field->getGetter();
+ $setter = $field->getSetter();
+
+ $field_arr_value = $this->$getter();
+ $field_arr_value[] = $append_value;
+
+ if (!is_object($field_arr_value)) {
+ $this->$setter($field_arr_value);
+ }
+ }
+
+ private function kvUpdateHelper($field, $update_key, $update_value)
+ {
+ $getter = $field->getGetter();
+ $setter = $field->getSetter();
+
+ $field_arr_value = $this->$getter();
+ $field_arr_value[$update_key] = $update_value;
+
+ if (!is_object($field_arr_value)) {
+ $this->$setter($field_arr_value);
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ public function jsonByteSize()
+ {
+ $size = 0;
+ if (is_a($this, 'Google\Protobuf\Any')) {
+ // Size for "{}".
+ $size += 2;
+
+ // Size for "\"@type\":".
+ $size += 8;
+
+ // Size for url. +2 for "" /.
+ $size += strlen($this->getTypeUrl()) + 2;
+
+ $value_msg = $this->unpack();
+ if (GPBUtil::hasSpecialJsonMapping($value_msg)) {
+ // Size for "\",value\":".
+ $size += 9;
+ $size += $value_msg->jsonByteSize();
+ } else {
+ $value_size = $value_msg->jsonByteSize();
+ // size === 2 it's empty message {} which is not serialized inside any
+ if ($value_size !== 2) {
+ // Size for value. +1 for comma, -2 for "{}".
+ $size += $value_size -1;
+ }
+ }
+ } elseif (get_class($this) === 'Google\Protobuf\FieldMask') {
+ $field_mask = GPBUtil::formatFieldMask($this);
+ $size += strlen($field_mask) + 2; // 2 for ""
+ } elseif (get_class($this) === 'Google\Protobuf\Duration') {
+ $duration = GPBUtil::formatDuration($this) . "s";
+ $size += strlen($duration) + 2; // 2 for ""
+ } elseif (get_class($this) === 'Google\Protobuf\Timestamp') {
+ $timestamp = GPBUtil::formatTimestamp($this);
+ $timestamp = json_encode($timestamp);
+ $size += strlen($timestamp);
+ } elseif (get_class($this) === 'Google\Protobuf\ListValue') {
+ $field = $this->desc->getField()[1];
+ if ($this->existField($field)) {
+ $field_size = $this->fieldJsonByteSize($field);
+ $size += $field_size;
+ } else {
+ // Size for "[]".
+ $size += 2;
+ }
+ } elseif (get_class($this) === 'Google\Protobuf\Struct') {
+ $field = $this->desc->getField()[1];
+ if ($this->existField($field)) {
+ $field_size = $this->fieldJsonByteSize($field);
+ $size += $field_size;
+ } else {
+ // Size for "{}".
+ $size += 2;
+ }
+ } else {
+ if (!GPBUtil::hasSpecialJsonMapping($this)) {
+ // Size for "{}".
+ $size += 2;
+ }
+
+ $fields = $this->desc->getField();
+ $count = 0;
+ foreach ($fields as $field) {
+ $field_size = $this->fieldJsonByteSize($field);
+ $size += $field_size;
+ if ($field_size != 0) {
+ $count++;
+ }
+ }
+ // size for comma
+ $size += $count > 0 ? ($count - 1) : 0;
+ }
+ return $size;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageBuilderContext.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageBuilderContext.php
new file mode 100644
index 0000000..d62b276
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageBuilderContext.php
@@ -0,0 +1,97 @@
+descriptor = new Descriptor();
+ $this->descriptor->setFullName($full_name);
+ $this->descriptor->setClass($klass);
+ $this->pool = $pool;
+ }
+
+ private function getFieldDescriptor($name, $label, $type,
+ $number, $type_name = null)
+ {
+ $field = new FieldDescriptor();
+ $field->setName($name);
+ $camel_name = implode('', array_map('ucwords', explode('_', $name)));
+ $field->setGetter('get' . $camel_name);
+ $field->setSetter('set' . $camel_name);
+ $field->setType($type);
+ $field->setNumber($number);
+ $field->setLabel($label);
+
+ // At this time, the message/enum type may have not been added to pool.
+ // So we use the type name as place holder and will replace it with the
+ // actual descriptor in cross building.
+ switch ($type) {
+ case GPBType::MESSAGE:
+ $field->setMessageType($type_name);
+ break;
+ case GPBType::ENUM:
+ $field->setEnumType($type_name);
+ break;
+ default:
+ break;
+ }
+
+ return $field;
+ }
+
+ public function optional($name, $type, $number, $type_name = null)
+ {
+ $this->descriptor->addField($this->getFieldDescriptor(
+ $name,
+ GPBLabel::OPTIONAL,
+ $type,
+ $number,
+ $type_name));
+ return $this;
+ }
+
+ public function repeated($name, $type, $number, $type_name = null)
+ {
+ $this->descriptor->addField($this->getFieldDescriptor(
+ $name,
+ GPBLabel::REPEATED,
+ $type,
+ $number,
+ $type_name));
+ return $this;
+ }
+
+ public function required($name, $type, $number, $type_name = null)
+ {
+ $this->descriptor->addField($this->getFieldDescriptor(
+ $name,
+ GPBLabel::REQUIRED,
+ $type,
+ $number,
+ $type_name));
+ return $this;
+ }
+
+ public function finalizeToPool()
+ {
+ $this->pool->addDescriptor($this->descriptor);
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageOptions.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageOptions.php
new file mode 100644
index 0000000..bb01aa4
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageOptions.php
@@ -0,0 +1,466 @@
+google.protobuf.MessageOptions
+ */
+class MessageOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Set true to use the old proto1 MessageSet wire format for extensions.
+ * This is provided for backwards-compatibility with the MessageSet wire
+ * format. You should not use this for any other reason: It's less
+ * efficient, has fewer features, and is more complicated.
+ * The message must be defined exactly as follows:
+ * message Foo {
+ * option message_set_wire_format = true;
+ * extensions 4 to max;
+ * }
+ * Note that the message cannot have any defined fields; MessageSets only
+ * have extensions.
+ * All extensions of your type must be singular messages; e.g. they cannot
+ * be int32s, enums, or repeated messages.
+ * Because this is an option, the above two restrictions are not enforced by
+ * the protocol compiler.
+ *
+ * Generated from protobuf field optional bool message_set_wire_format = 1 [default = false];
+ */
+ protected $message_set_wire_format = null;
+ /**
+ * Disables the generation of the standard "descriptor()" accessor, which can
+ * conflict with a field of the same name. This is meant to make migration
+ * from proto1 easier; new code should avoid fields named "descriptor".
+ *
+ * Generated from protobuf field optional bool no_standard_descriptor_accessor = 2 [default = false];
+ */
+ protected $no_standard_descriptor_accessor = null;
+ /**
+ * Is this message deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the message, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating messages.
+ *
+ * Generated from protobuf field optional bool deprecated = 3 [default = false];
+ */
+ protected $deprecated = null;
+ /**
+ * NOTE: Do not set the option in .proto files. Always use the maps syntax
+ * instead. The option should only be implicitly set by the proto compiler
+ * parser.
+ * Whether the message is an automatically generated map entry type for the
+ * maps field.
+ * For maps fields:
+ * map map_field = 1;
+ * The parsed descriptor looks like:
+ * message MapFieldEntry {
+ * option map_entry = true;
+ * optional KeyType key = 1;
+ * optional ValueType value = 2;
+ * }
+ * repeated MapFieldEntry map_field = 1;
+ * Implementations may choose not to generate the map_entry=true message, but
+ * use a native map in the target language to hold the keys and values.
+ * The reflection APIs in such implementations still need to work as
+ * if the field is a repeated message field.
+ *
+ * Generated from protobuf field optional bool map_entry = 7;
+ */
+ protected $map_entry = null;
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * This should only be used as a temporary measure against broken builds due
+ * to the change in behavior for JSON field name conflicts.
+ * TODO This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
+ * @deprecated
+ */
+ protected $deprecated_legacy_json_field_conflicts = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ */
+ private $uninterpreted_option;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $message_set_wire_format
+ * Set true to use the old proto1 MessageSet wire format for extensions.
+ * This is provided for backwards-compatibility with the MessageSet wire
+ * format. You should not use this for any other reason: It's less
+ * efficient, has fewer features, and is more complicated.
+ * The message must be defined exactly as follows:
+ * message Foo {
+ * option message_set_wire_format = true;
+ * extensions 4 to max;
+ * }
+ * Note that the message cannot have any defined fields; MessageSets only
+ * have extensions.
+ * All extensions of your type must be singular messages; e.g. they cannot
+ * be int32s, enums, or repeated messages.
+ * Because this is an option, the above two restrictions are not enforced by
+ * the protocol compiler.
+ * @type bool $no_standard_descriptor_accessor
+ * Disables the generation of the standard "descriptor()" accessor, which can
+ * conflict with a field of the same name. This is meant to make migration
+ * from proto1 easier; new code should avoid fields named "descriptor".
+ * @type bool $deprecated
+ * Is this message deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the message, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating messages.
+ * @type bool $map_entry
+ * NOTE: Do not set the option in .proto files. Always use the maps syntax
+ * instead. The option should only be implicitly set by the proto compiler
+ * parser.
+ * Whether the message is an automatically generated map entry type for the
+ * maps field.
+ * For maps fields:
+ * map map_field = 1;
+ * The parsed descriptor looks like:
+ * message MapFieldEntry {
+ * option map_entry = true;
+ * optional KeyType key = 1;
+ * optional ValueType value = 2;
+ * }
+ * repeated MapFieldEntry map_field = 1;
+ * Implementations may choose not to generate the map_entry=true message, but
+ * use a native map in the target language to hold the keys and values.
+ * The reflection APIs in such implementations still need to work as
+ * if the field is a repeated message field.
+ * @type bool $deprecated_legacy_json_field_conflicts
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * This should only be used as a temporary measure against broken builds due
+ * to the change in behavior for JSON field name conflicts.
+ * TODO This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Set true to use the old proto1 MessageSet wire format for extensions.
+ * This is provided for backwards-compatibility with the MessageSet wire
+ * format. You should not use this for any other reason: It's less
+ * efficient, has fewer features, and is more complicated.
+ * The message must be defined exactly as follows:
+ * message Foo {
+ * option message_set_wire_format = true;
+ * extensions 4 to max;
+ * }
+ * Note that the message cannot have any defined fields; MessageSets only
+ * have extensions.
+ * All extensions of your type must be singular messages; e.g. they cannot
+ * be int32s, enums, or repeated messages.
+ * Because this is an option, the above two restrictions are not enforced by
+ * the protocol compiler.
+ *
+ * Generated from protobuf field optional bool message_set_wire_format = 1 [default = false];
+ * @return bool
+ */
+ public function getMessageSetWireFormat()
+ {
+ return isset($this->message_set_wire_format) ? $this->message_set_wire_format : false;
+ }
+
+ public function hasMessageSetWireFormat()
+ {
+ return isset($this->message_set_wire_format);
+ }
+
+ public function clearMessageSetWireFormat()
+ {
+ unset($this->message_set_wire_format);
+ }
+
+ /**
+ * Set true to use the old proto1 MessageSet wire format for extensions.
+ * This is provided for backwards-compatibility with the MessageSet wire
+ * format. You should not use this for any other reason: It's less
+ * efficient, has fewer features, and is more complicated.
+ * The message must be defined exactly as follows:
+ * message Foo {
+ * option message_set_wire_format = true;
+ * extensions 4 to max;
+ * }
+ * Note that the message cannot have any defined fields; MessageSets only
+ * have extensions.
+ * All extensions of your type must be singular messages; e.g. they cannot
+ * be int32s, enums, or repeated messages.
+ * Because this is an option, the above two restrictions are not enforced by
+ * the protocol compiler.
+ *
+ * Generated from protobuf field optional bool message_set_wire_format = 1 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setMessageSetWireFormat($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->message_set_wire_format = $var;
+
+ return $this;
+ }
+
+ /**
+ * Disables the generation of the standard "descriptor()" accessor, which can
+ * conflict with a field of the same name. This is meant to make migration
+ * from proto1 easier; new code should avoid fields named "descriptor".
+ *
+ * Generated from protobuf field optional bool no_standard_descriptor_accessor = 2 [default = false];
+ * @return bool
+ */
+ public function getNoStandardDescriptorAccessor()
+ {
+ return isset($this->no_standard_descriptor_accessor) ? $this->no_standard_descriptor_accessor : false;
+ }
+
+ public function hasNoStandardDescriptorAccessor()
+ {
+ return isset($this->no_standard_descriptor_accessor);
+ }
+
+ public function clearNoStandardDescriptorAccessor()
+ {
+ unset($this->no_standard_descriptor_accessor);
+ }
+
+ /**
+ * Disables the generation of the standard "descriptor()" accessor, which can
+ * conflict with a field of the same name. This is meant to make migration
+ * from proto1 easier; new code should avoid fields named "descriptor".
+ *
+ * Generated from protobuf field optional bool no_standard_descriptor_accessor = 2 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setNoStandardDescriptorAccessor($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->no_standard_descriptor_accessor = $var;
+
+ return $this;
+ }
+
+ /**
+ * Is this message deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the message, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating messages.
+ *
+ * Generated from protobuf field optional bool deprecated = 3 [default = false];
+ * @return bool
+ */
+ public function getDeprecated()
+ {
+ return isset($this->deprecated) ? $this->deprecated : false;
+ }
+
+ public function hasDeprecated()
+ {
+ return isset($this->deprecated);
+ }
+
+ public function clearDeprecated()
+ {
+ unset($this->deprecated);
+ }
+
+ /**
+ * Is this message deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the message, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating messages.
+ *
+ * Generated from protobuf field optional bool deprecated = 3 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+
+ return $this;
+ }
+
+ /**
+ * NOTE: Do not set the option in .proto files. Always use the maps syntax
+ * instead. The option should only be implicitly set by the proto compiler
+ * parser.
+ * Whether the message is an automatically generated map entry type for the
+ * maps field.
+ * For maps fields:
+ * map map_field = 1;
+ * The parsed descriptor looks like:
+ * message MapFieldEntry {
+ * option map_entry = true;
+ * optional KeyType key = 1;
+ * optional ValueType value = 2;
+ * }
+ * repeated MapFieldEntry map_field = 1;
+ * Implementations may choose not to generate the map_entry=true message, but
+ * use a native map in the target language to hold the keys and values.
+ * The reflection APIs in such implementations still need to work as
+ * if the field is a repeated message field.
+ *
+ * Generated from protobuf field optional bool map_entry = 7;
+ * @return bool
+ */
+ public function getMapEntry()
+ {
+ return isset($this->map_entry) ? $this->map_entry : false;
+ }
+
+ public function hasMapEntry()
+ {
+ return isset($this->map_entry);
+ }
+
+ public function clearMapEntry()
+ {
+ unset($this->map_entry);
+ }
+
+ /**
+ * NOTE: Do not set the option in .proto files. Always use the maps syntax
+ * instead. The option should only be implicitly set by the proto compiler
+ * parser.
+ * Whether the message is an automatically generated map entry type for the
+ * maps field.
+ * For maps fields:
+ * map map_field = 1;
+ * The parsed descriptor looks like:
+ * message MapFieldEntry {
+ * option map_entry = true;
+ * optional KeyType key = 1;
+ * optional ValueType value = 2;
+ * }
+ * repeated MapFieldEntry map_field = 1;
+ * Implementations may choose not to generate the map_entry=true message, but
+ * use a native map in the target language to hold the keys and values.
+ * The reflection APIs in such implementations still need to work as
+ * if the field is a repeated message field.
+ *
+ * Generated from protobuf field optional bool map_entry = 7;
+ * @param bool $var
+ * @return $this
+ */
+ public function setMapEntry($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->map_entry = $var;
+
+ return $this;
+ }
+
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * This should only be used as a temporary measure against broken builds due
+ * to the change in behavior for JSON field name conflicts.
+ * TODO This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
+ * @return bool
+ * @deprecated
+ */
+ public function getDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ return isset($this->deprecated_legacy_json_field_conflicts) ? $this->deprecated_legacy_json_field_conflicts : false;
+ }
+
+ public function hasDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ return isset($this->deprecated_legacy_json_field_conflicts);
+ }
+
+ public function clearDeprecatedLegacyJsonFieldConflicts()
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ unset($this->deprecated_legacy_json_field_conflicts);
+ }
+
+ /**
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
+ * and strips underscored from the fields before comparison in proto3 only.
+ * The new behavior takes `json_name` into account and applies to proto2 as
+ * well.
+ * This should only be used as a temporary measure against broken builds due
+ * to the change in behavior for JSON field name conflicts.
+ * TODO This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * Generated from protobuf field optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
+ * @param bool $var
+ * @return $this
+ * @deprecated
+ */
+ public function setDeprecatedLegacyJsonFieldConflicts($var)
+ {
+ @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED);
+ GPBUtil::checkBool($var);
+ $this->deprecated_legacy_json_field_conflicts = $var;
+
+ return $this;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodDescriptorProto.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodDescriptorProto.php
new file mode 100644
index 0000000..96efb02
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodDescriptorProto.php
@@ -0,0 +1,282 @@
+google.protobuf.MethodDescriptorProto
+ */
+class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field optional string name = 1;
+ */
+ protected $name = null;
+ /**
+ * Input and output type names. These are resolved in the same way as
+ * FieldDescriptorProto.type_name, but must refer to a message type.
+ *
+ * Generated from protobuf field optional string input_type = 2;
+ */
+ protected $input_type = null;
+ /**
+ * Generated from protobuf field optional string output_type = 3;
+ */
+ protected $output_type = null;
+ /**
+ * Generated from protobuf field optional .google.protobuf.MethodOptions options = 4;
+ */
+ protected $options = null;
+ /**
+ * Identifies if client streams multiple client messages
+ *
+ * Generated from protobuf field optional bool client_streaming = 5 [default = false];
+ */
+ protected $client_streaming = null;
+ /**
+ * Identifies if server streams multiple server messages
+ *
+ * Generated from protobuf field optional bool server_streaming = 6 [default = false];
+ */
+ protected $server_streaming = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type string $input_type
+ * Input and output type names. These are resolved in the same way as
+ * FieldDescriptorProto.type_name, but must refer to a message type.
+ * @type string $output_type
+ * @type \Google\Protobuf\Internal\MethodOptions $options
+ * @type bool $client_streaming
+ * Identifies if client streams multiple client messages
+ * @type bool $server_streaming
+ * Identifies if server streams multiple server messages
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Input and output type names. These are resolved in the same way as
+ * FieldDescriptorProto.type_name, but must refer to a message type.
+ *
+ * Generated from protobuf field optional string input_type = 2;
+ * @return string
+ */
+ public function getInputType()
+ {
+ return isset($this->input_type) ? $this->input_type : '';
+ }
+
+ public function hasInputType()
+ {
+ return isset($this->input_type);
+ }
+
+ public function clearInputType()
+ {
+ unset($this->input_type);
+ }
+
+ /**
+ * Input and output type names. These are resolved in the same way as
+ * FieldDescriptorProto.type_name, but must refer to a message type.
+ *
+ * Generated from protobuf field optional string input_type = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setInputType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->input_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional string output_type = 3;
+ * @return string
+ */
+ public function getOutputType()
+ {
+ return isset($this->output_type) ? $this->output_type : '';
+ }
+
+ public function hasOutputType()
+ {
+ return isset($this->output_type);
+ }
+
+ public function clearOutputType()
+ {
+ unset($this->output_type);
+ }
+
+ /**
+ * Generated from protobuf field optional string output_type = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setOutputType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->output_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.MethodOptions options = 4;
+ * @return \Google\Protobuf\Internal\MethodOptions|null
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public function hasOptions()
+ {
+ return isset($this->options);
+ }
+
+ public function clearOptions()
+ {
+ unset($this->options);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.MethodOptions options = 4;
+ * @param \Google\Protobuf\Internal\MethodOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MethodOptions::class);
+ $this->options = $var;
+
+ return $this;
+ }
+
+ /**
+ * Identifies if client streams multiple client messages
+ *
+ * Generated from protobuf field optional bool client_streaming = 5 [default = false];
+ * @return bool
+ */
+ public function getClientStreaming()
+ {
+ return isset($this->client_streaming) ? $this->client_streaming : false;
+ }
+
+ public function hasClientStreaming()
+ {
+ return isset($this->client_streaming);
+ }
+
+ public function clearClientStreaming()
+ {
+ unset($this->client_streaming);
+ }
+
+ /**
+ * Identifies if client streams multiple client messages
+ *
+ * Generated from protobuf field optional bool client_streaming = 5 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setClientStreaming($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->client_streaming = $var;
+
+ return $this;
+ }
+
+ /**
+ * Identifies if server streams multiple server messages
+ *
+ * Generated from protobuf field optional bool server_streaming = 6 [default = false];
+ * @return bool
+ */
+ public function getServerStreaming()
+ {
+ return isset($this->server_streaming) ? $this->server_streaming : false;
+ }
+
+ public function hasServerStreaming()
+ {
+ return isset($this->server_streaming);
+ }
+
+ public function clearServerStreaming()
+ {
+ unset($this->server_streaming);
+ }
+
+ /**
+ * Identifies if server streams multiple server messages
+ *
+ * Generated from protobuf field optional bool server_streaming = 6 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setServerStreaming($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->server_streaming = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions.php
new file mode 100644
index 0000000..87af451
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions.php
@@ -0,0 +1,160 @@
+google.protobuf.MethodOptions
+ */
+class MethodOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Is this method deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the method, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating methods.
+ *
+ * Generated from protobuf field optional bool deprecated = 33 [default = false];
+ */
+ protected $deprecated = null;
+ /**
+ * Generated from protobuf field optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
+ */
+ protected $idempotency_level = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ */
+ private $uninterpreted_option;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $deprecated
+ * Is this method deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the method, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating methods.
+ * @type int $idempotency_level
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Is this method deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the method, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating methods.
+ *
+ * Generated from protobuf field optional bool deprecated = 33 [default = false];
+ * @return bool
+ */
+ public function getDeprecated()
+ {
+ return isset($this->deprecated) ? $this->deprecated : false;
+ }
+
+ public function hasDeprecated()
+ {
+ return isset($this->deprecated);
+ }
+
+ public function clearDeprecated()
+ {
+ unset($this->deprecated);
+ }
+
+ /**
+ * Is this method deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the method, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating methods.
+ *
+ * Generated from protobuf field optional bool deprecated = 33 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
+ * @return int
+ */
+ public function getIdempotencyLevel()
+ {
+ return isset($this->idempotency_level) ? $this->idempotency_level : 0;
+ }
+
+ public function hasIdempotencyLevel()
+ {
+ return isset($this->idempotency_level);
+ }
+
+ public function clearIdempotencyLevel()
+ {
+ unset($this->idempotency_level);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
+ * @param int $var
+ * @return $this
+ */
+ public function setIdempotencyLevel($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Internal\MethodOptions\IdempotencyLevel::class);
+ $this->idempotency_level = $var;
+
+ return $this;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php
new file mode 100644
index 0000000..ce3c062
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php
@@ -0,0 +1,64 @@
+google.protobuf.MethodOptions.IdempotencyLevel
+ */
+class IdempotencyLevel
+{
+ /**
+ * Generated from protobuf enum IDEMPOTENCY_UNKNOWN = 0;
+ */
+ const IDEMPOTENCY_UNKNOWN = 0;
+ /**
+ * implies idempotent
+ *
+ * Generated from protobuf enum NO_SIDE_EFFECTS = 1;
+ */
+ const NO_SIDE_EFFECTS = 1;
+ /**
+ * idempotent, but may have side effects
+ *
+ * Generated from protobuf enum IDEMPOTENT = 2;
+ */
+ const IDEMPOTENT = 2;
+
+ private static $valueToName = [
+ self::IDEMPOTENCY_UNKNOWN => 'IDEMPOTENCY_UNKNOWN',
+ self::NO_SIDE_EFFECTS => 'NO_SIDE_EFFECTS',
+ self::IDEMPOTENT => 'IDEMPOTENT',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(IdempotencyLevel::class, \Google\Protobuf\Internal\MethodOptions_IdempotencyLevel::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php
new file mode 100644
index 0000000..a291311
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php
@@ -0,0 +1,16 @@
+public_desc = new \Google\Protobuf\OneofDescriptor($this);
+ }
+
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ public function addField(FieldDescriptor $field)
+ {
+ $this->fields[] = $field;
+ }
+
+ public function getFields()
+ {
+ return $this->fields;
+ }
+
+ public function isSynthetic()
+ {
+ return !is_null($this->fields) && count($this->fields) === 1
+ && $this->fields[0]->getProto3Optional();
+ }
+
+ public static function buildFromProto($oneof_proto, $desc, $index)
+ {
+ $oneof = new OneofDescriptor();
+ $oneof->setName($oneof_proto->getName());
+ foreach ($desc->getField() as $field) {
+ /** @var FieldDescriptor $field */
+ if ($field->getOneofIndex() == $index) {
+ $oneof->addField($field);
+ $field->setContainingOneof($oneof);
+ }
+ }
+ return $oneof;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptorProto.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptorProto.php
new file mode 100644
index 0000000..3cb9f25
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptorProto.php
@@ -0,0 +1,109 @@
+google.protobuf.OneofDescriptorProto
+ */
+class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field optional string name = 1;
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field optional .google.protobuf.OneofOptions options = 2;
+ */
+ protected $options = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type \Google\Protobuf\Internal\OneofOptions $options
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.OneofOptions options = 2;
+ * @return \Google\Protobuf\Internal\OneofOptions|null
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public function hasOptions()
+ {
+ return isset($this->options);
+ }
+
+ public function clearOptions()
+ {
+ unset($this->options);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.OneofOptions options = 2;
+ * @param \Google\Protobuf\Internal\OneofOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\OneofOptions::class);
+ $this->options = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofField.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofField.php
new file mode 100644
index 0000000..4b98992
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofField.php
@@ -0,0 +1,54 @@
+desc = $desc;
+ }
+
+ public function setValue($value)
+ {
+ $this->value = $value;
+ }
+
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ public function setFieldName($field_name)
+ {
+ $this->field_name = $field_name;
+ }
+
+ public function getFieldName()
+ {
+ return $this->field_name;
+ }
+
+ public function setNumber($number)
+ {
+ $this->number = $number;
+ }
+
+ public function getNumber()
+ {
+ return $this->number;
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofOptions.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofOptions.php
new file mode 100644
index 0000000..b44d194
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofOptions.php
@@ -0,0 +1,67 @@
+google.protobuf.OneofOptions
+ */
+class OneofOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ */
+ private $uninterpreted_option;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/RawInputStream.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/RawInputStream.php
new file mode 100644
index 0000000..7ab1b3e
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/RawInputStream.php
@@ -0,0 +1,27 @@
+buffer = $buffer;
+ }
+
+ public function getData()
+ {
+ return $this->buffer;
+ }
+
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php
new file mode 100644
index 0000000..8f56863
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php
@@ -0,0 +1,241 @@
+container = [];
+ $this->type = $type;
+ if ($this->type == GPBType::MESSAGE) {
+ $pool = DescriptorPool::getGeneratedPool();
+ $desc = $pool->getDescriptorByClassName($klass);
+ if ($desc == NULL) {
+ new $klass; // No msg class instance has been created before.
+ $desc = $pool->getDescriptorByClassName($klass);
+ }
+ $this->klass = $desc->getClass();
+ $this->legacy_klass = $desc->getLegacyClass();
+ }
+ }
+
+ /**
+ * @ignore
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * @ignore
+ */
+ public function getClass()
+ {
+ return $this->klass;
+ }
+
+ /**
+ * @ignore
+ */
+ public function getLegacyClass()
+ {
+ return $this->legacy_klass;
+ }
+
+ /**
+ * Return the element at the given index.
+ *
+ * This will also be called for: $ele = $arr[0]
+ *
+ * @param integer $offset The index of the element to be fetched.
+ * @return mixed The stored element at given index.
+ * @throws \ErrorException Invalid type for index.
+ * @throws \ErrorException Non-existing index.
+ * @todo need to add return type mixed (require update php version to 8.0)
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset];
+ }
+
+ /**
+ * Assign the element at the given index.
+ *
+ * This will also be called for: $arr []= $ele and $arr[0] = ele
+ *
+ * @param int|null $offset The index of the element to be assigned.
+ * @param mixed $value The element to be assigned.
+ * @return void
+ * @throws \ErrorException Invalid type for index.
+ * @throws \ErrorException Non-existing index.
+ * @throws \ErrorException Incorrect type of the element.
+ * @todo need to add return type void (require update php version to 7.1)
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetSet($offset, $value)
+ {
+ switch ($this->type) {
+ case GPBType::SFIXED32:
+ case GPBType::SINT32:
+ case GPBType::INT32:
+ case GPBType::ENUM:
+ GPBUtil::checkInt32($value);
+ break;
+ case GPBType::FIXED32:
+ case GPBType::UINT32:
+ GPBUtil::checkUint32($value);
+ break;
+ case GPBType::SFIXED64:
+ case GPBType::SINT64:
+ case GPBType::INT64:
+ GPBUtil::checkInt64($value);
+ break;
+ case GPBType::FIXED64:
+ case GPBType::UINT64:
+ GPBUtil::checkUint64($value);
+ break;
+ case GPBType::FLOAT:
+ GPBUtil::checkFloat($value);
+ break;
+ case GPBType::DOUBLE:
+ GPBUtil::checkDouble($value);
+ break;
+ case GPBType::BOOL:
+ GPBUtil::checkBool($value);
+ break;
+ case GPBType::BYTES:
+ GPBUtil::checkString($value, false);
+ break;
+ case GPBType::STRING:
+ GPBUtil::checkString($value, true);
+ break;
+ case GPBType::MESSAGE:
+ if (is_null($value)) {
+ throw new \TypeError("RepeatedField element cannot be null.");
+ }
+ GPBUtil::checkMessage($value, $this->klass);
+ break;
+ default:
+ break;
+ }
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $count = count($this->container);
+ if (!is_numeric($offset) || $offset < 0 || $offset >= $count) {
+ trigger_error(
+ "Cannot modify element at the given index",
+ E_USER_ERROR);
+ return;
+ }
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Remove the element at the given index.
+ *
+ * This will also be called for: unset($arr)
+ *
+ * @param integer $offset The index of the element to be removed.
+ * @return void
+ * @throws \ErrorException Invalid type for index.
+ * @throws \ErrorException The element to be removed is not at the end of the
+ * RepeatedField.
+ * @todo need to add return type void (require update php version to 7.1)
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetUnset($offset)
+ {
+ $count = count($this->container);
+ if (!is_numeric($offset) || $count === 0 || $offset < 0 || $offset >= $count) {
+ trigger_error(
+ "Cannot remove element at the given index",
+ E_USER_ERROR);
+ return;
+ }
+ array_splice($this->container, $offset, 1);
+ }
+
+ /**
+ * Check the existence of the element at the given index.
+ *
+ * This will also be called for: isset($arr)
+ *
+ * @param integer $offset The index of the element to be removed.
+ * @return bool True if the element at the given offset exists.
+ * @throws \ErrorException Invalid type for index.
+ */
+ public function offsetExists($offset): bool
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * @ignore
+ */
+ public function getIterator(): Traversable
+ {
+ return new RepeatedFieldIter($this->container);
+ }
+
+ /**
+ * Return the number of stored elements.
+ *
+ * This will also be called for: count($arr)
+ *
+ * @return integer The number of stored elements.
+ */
+ public function count(): int
+ {
+ return count($this->container);
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedFieldIter.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedFieldIter.php
new file mode 100644
index 0000000..98b969f
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedFieldIter.php
@@ -0,0 +1,102 @@
+position = 0;
+ $this->container = $container;
+ }
+
+ /**
+ * Reset the status of the iterator
+ *
+ * @return void
+ * @todo need to add return type void (require update php version to 7.1)
+ */
+ #[\ReturnTypeWillChange]
+ public function rewind()
+ {
+ $this->position = 0;
+ }
+
+ /**
+ * Return the element at the current position.
+ *
+ * @return object The element at the current position.
+ * @todo need to add return type mixed (require update php version to 8.0)
+ */
+ #[\ReturnTypeWillChange]
+ public function current()
+ {
+ return $this->container[$this->position];
+ }
+
+ /**
+ * Return the current position.
+ *
+ * @return integer The current position.
+ * @todo need to add return type mixed (require update php version to 8.0)
+ */
+ #[\ReturnTypeWillChange]
+ public function key()
+ {
+ return $this->position;
+ }
+
+ /**
+ * Move to the next position.
+ *
+ * @return void
+ * @todo need to add return type void (require update php version to 7.1)
+ */
+ #[\ReturnTypeWillChange]
+ public function next()
+ {
+ ++$this->position;
+ }
+
+ /**
+ * Check whether there are more elements to iterate.
+ *
+ * @return bool True if there are more elements to iterate.
+ */
+ public function valid(): bool
+ {
+ return isset($this->container[$this->position]);
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceDescriptorProto.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
new file mode 100644
index 0000000..e322e2a
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
@@ -0,0 +1,136 @@
+google.protobuf.ServiceDescriptorProto
+ */
+class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field optional string name = 1;
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field repeated .google.protobuf.MethodDescriptorProto method = 2;
+ */
+ private $method;
+ /**
+ * Generated from protobuf field optional .google.protobuf.ServiceOptions options = 3;
+ */
+ protected $options = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type array<\Google\Protobuf\Internal\MethodDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $method
+ * @type \Google\Protobuf\Internal\ServiceOptions $options
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * Generated from protobuf field optional string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.MethodDescriptorProto method = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.MethodDescriptorProto method = 2;
+ * @param array<\Google\Protobuf\Internal\MethodDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMethod($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\MethodDescriptorProto::class);
+ $this->method = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.ServiceOptions options = 3;
+ * @return \Google\Protobuf\Internal\ServiceOptions|null
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ public function hasOptions()
+ {
+ return isset($this->options);
+ }
+
+ public function clearOptions()
+ {
+ unset($this->options);
+ }
+
+ /**
+ * Generated from protobuf field optional .google.protobuf.ServiceOptions options = 3;
+ * @param \Google\Protobuf\Internal\ServiceOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ServiceOptions::class);
+ $this->options = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceOptions.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceOptions.php
new file mode 100644
index 0000000..8ac27ee
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceOptions.php
@@ -0,0 +1,123 @@
+google.protobuf.ServiceOptions
+ */
+class ServiceOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Is this service deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the service, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating services.
+ *
+ * Generated from protobuf field optional bool deprecated = 33 [default = false];
+ */
+ protected $deprecated = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ */
+ private $uninterpreted_option;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $deprecated
+ * Is this service deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the service, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating services.
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * The parser stores options it doesn't recognize here. See above.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Is this service deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the service, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating services.
+ *
+ * Generated from protobuf field optional bool deprecated = 33 [default = false];
+ * @return bool
+ */
+ public function getDeprecated()
+ {
+ return isset($this->deprecated) ? $this->deprecated : false;
+ }
+
+ public function hasDeprecated()
+ {
+ return isset($this->deprecated);
+ }
+
+ public function clearDeprecated()
+ {
+ unset($this->deprecated);
+ }
+
+ /**
+ * Is this service deprecated?
+ * Depending on the target platform, this can emit Deprecated annotations
+ * for the service, or it will be completely ignored; in the very least,
+ * this is a formalization for deprecating services.
+ *
+ * Generated from protobuf field optional bool deprecated = 33 [default = false];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+
+ return $this;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUninterpretedOption()
+ {
+ return $this->uninterpreted_option;
+ }
+
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUninterpretedOption($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo.php
new file mode 100644
index 0000000..0005bc6
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo.php
@@ -0,0 +1,230 @@
+google.protobuf.SourceCodeInfo
+ */
+class SourceCodeInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A Location identifies a piece of source code in a .proto file which
+ * corresponds to a particular definition. This information is intended
+ * to be useful to IDEs, code indexers, documentation generators, and similar
+ * tools.
+ * For example, say we have a file like:
+ * message Foo {
+ * optional string foo = 1;
+ * }
+ * Let's look at just the field definition:
+ * optional string foo = 1;
+ * ^ ^^ ^^ ^ ^^^
+ * a bc de f ghi
+ * We have the following locations:
+ * span path represents
+ * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
+ * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
+ * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
+ * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
+ * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
+ * Notes:
+ * - A location may refer to a repeated field itself (i.e. not to any
+ * particular index within it). This is used whenever a set of elements are
+ * logically enclosed in a single code segment. For example, an entire
+ * extend block (possibly containing multiple extension definitions) will
+ * have an outer location whose path refers to the "extensions" repeated
+ * field without an index.
+ * - Multiple locations may have the same path. This happens when a single
+ * logical declaration is spread out across multiple places. The most
+ * obvious example is the "extend" block again -- there may be multiple
+ * extend blocks in the same scope, each of which will have the same path.
+ * - A location's span is not always a subset of its parent's span. For
+ * example, the "extendee" of an extension declaration appears at the
+ * beginning of the "extend" block and is shared by all extensions within
+ * the block.
+ * - Just because a location's span is a subset of some other location's span
+ * does not mean that it is a descendant. For example, a "group" defines
+ * both a type and a field in a single declaration. Thus, the locations
+ * corresponding to the type and field and their components will overlap.
+ * - Code which tries to interpret locations should probably be designed to
+ * ignore those that it doesn't understand, as more types of locations could
+ * be recorded in the future.
+ *
+ * Generated from protobuf field repeated .google.protobuf.SourceCodeInfo.Location location = 1;
+ */
+ private $location;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Protobuf\Internal\SourceCodeInfo\Location>|\Google\Protobuf\Internal\RepeatedField $location
+ * A Location identifies a piece of source code in a .proto file which
+ * corresponds to a particular definition. This information is intended
+ * to be useful to IDEs, code indexers, documentation generators, and similar
+ * tools.
+ * For example, say we have a file like:
+ * message Foo {
+ * optional string foo = 1;
+ * }
+ * Let's look at just the field definition:
+ * optional string foo = 1;
+ * ^ ^^ ^^ ^ ^^^
+ * a bc de f ghi
+ * We have the following locations:
+ * span path represents
+ * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
+ * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
+ * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
+ * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
+ * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
+ * Notes:
+ * - A location may refer to a repeated field itself (i.e. not to any
+ * particular index within it). This is used whenever a set of elements are
+ * logically enclosed in a single code segment. For example, an entire
+ * extend block (possibly containing multiple extension definitions) will
+ * have an outer location whose path refers to the "extensions" repeated
+ * field without an index.
+ * - Multiple locations may have the same path. This happens when a single
+ * logical declaration is spread out across multiple places. The most
+ * obvious example is the "extend" block again -- there may be multiple
+ * extend blocks in the same scope, each of which will have the same path.
+ * - A location's span is not always a subset of its parent's span. For
+ * example, the "extendee" of an extension declaration appears at the
+ * beginning of the "extend" block and is shared by all extensions within
+ * the block.
+ * - Just because a location's span is a subset of some other location's span
+ * does not mean that it is a descendant. For example, a "group" defines
+ * both a type and a field in a single declaration. Thus, the locations
+ * corresponding to the type and field and their components will overlap.
+ * - Code which tries to interpret locations should probably be designed to
+ * ignore those that it doesn't understand, as more types of locations could
+ * be recorded in the future.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A Location identifies a piece of source code in a .proto file which
+ * corresponds to a particular definition. This information is intended
+ * to be useful to IDEs, code indexers, documentation generators, and similar
+ * tools.
+ * For example, say we have a file like:
+ * message Foo {
+ * optional string foo = 1;
+ * }
+ * Let's look at just the field definition:
+ * optional string foo = 1;
+ * ^ ^^ ^^ ^ ^^^
+ * a bc de f ghi
+ * We have the following locations:
+ * span path represents
+ * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
+ * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
+ * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
+ * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
+ * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
+ * Notes:
+ * - A location may refer to a repeated field itself (i.e. not to any
+ * particular index within it). This is used whenever a set of elements are
+ * logically enclosed in a single code segment. For example, an entire
+ * extend block (possibly containing multiple extension definitions) will
+ * have an outer location whose path refers to the "extensions" repeated
+ * field without an index.
+ * - Multiple locations may have the same path. This happens when a single
+ * logical declaration is spread out across multiple places. The most
+ * obvious example is the "extend" block again -- there may be multiple
+ * extend blocks in the same scope, each of which will have the same path.
+ * - A location's span is not always a subset of its parent's span. For
+ * example, the "extendee" of an extension declaration appears at the
+ * beginning of the "extend" block and is shared by all extensions within
+ * the block.
+ * - Just because a location's span is a subset of some other location's span
+ * does not mean that it is a descendant. For example, a "group" defines
+ * both a type and a field in a single declaration. Thus, the locations
+ * corresponding to the type and field and their components will overlap.
+ * - Code which tries to interpret locations should probably be designed to
+ * ignore those that it doesn't understand, as more types of locations could
+ * be recorded in the future.
+ *
+ * Generated from protobuf field repeated .google.protobuf.SourceCodeInfo.Location location = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLocation()
+ {
+ return $this->location;
+ }
+
+ /**
+ * A Location identifies a piece of source code in a .proto file which
+ * corresponds to a particular definition. This information is intended
+ * to be useful to IDEs, code indexers, documentation generators, and similar
+ * tools.
+ * For example, say we have a file like:
+ * message Foo {
+ * optional string foo = 1;
+ * }
+ * Let's look at just the field definition:
+ * optional string foo = 1;
+ * ^ ^^ ^^ ^ ^^^
+ * a bc de f ghi
+ * We have the following locations:
+ * span path represents
+ * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
+ * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
+ * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
+ * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
+ * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
+ * Notes:
+ * - A location may refer to a repeated field itself (i.e. not to any
+ * particular index within it). This is used whenever a set of elements are
+ * logically enclosed in a single code segment. For example, an entire
+ * extend block (possibly containing multiple extension definitions) will
+ * have an outer location whose path refers to the "extensions" repeated
+ * field without an index.
+ * - Multiple locations may have the same path. This happens when a single
+ * logical declaration is spread out across multiple places. The most
+ * obvious example is the "extend" block again -- there may be multiple
+ * extend blocks in the same scope, each of which will have the same path.
+ * - A location's span is not always a subset of its parent's span. For
+ * example, the "extendee" of an extension declaration appears at the
+ * beginning of the "extend" block and is shared by all extensions within
+ * the block.
+ * - Just because a location's span is a subset of some other location's span
+ * does not mean that it is a descendant. For example, a "group" defines
+ * both a type and a field in a single declaration. Thus, the locations
+ * corresponding to the type and field and their components will overlap.
+ * - Code which tries to interpret locations should probably be designed to
+ * ignore those that it doesn't understand, as more types of locations could
+ * be recorded in the future.
+ *
+ * Generated from protobuf field repeated .google.protobuf.SourceCodeInfo.Location location = 1;
+ * @param array<\Google\Protobuf\Internal\SourceCodeInfo\Location>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLocation($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\SourceCodeInfo\Location::class);
+ $this->location = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
new file mode 100644
index 0000000..032be39
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
@@ -0,0 +1,448 @@
+google.protobuf.SourceCodeInfo.Location
+ */
+class Location extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Identifies which part of the FileDescriptorProto was defined at this
+ * location.
+ * Each element is a field number or an index. They form a path from
+ * the root FileDescriptorProto to the place where the definition occurs.
+ * For example, this path:
+ * [ 4, 3, 2, 7, 1 ]
+ * refers to:
+ * file.message_type(3) // 4, 3
+ * .field(7) // 2, 7
+ * .name() // 1
+ * This is because FileDescriptorProto.message_type has field number 4:
+ * repeated DescriptorProto message_type = 4;
+ * and DescriptorProto.field has field number 2:
+ * repeated FieldDescriptorProto field = 2;
+ * and FieldDescriptorProto.name has field number 1:
+ * optional string name = 1;
+ * Thus, the above path gives the location of a field name. If we removed
+ * the last element:
+ * [ 4, 3, 2, 7 ]
+ * this path refers to the whole field declaration (from the beginning
+ * of the label to the terminating semicolon).
+ *
+ * Generated from protobuf field repeated int32 path = 1 [packed = true];
+ */
+ private $path;
+ /**
+ * Always has exactly three or four elements: start line, start column,
+ * end line (optional, otherwise assumed same as start line), end column.
+ * These are packed into a single field for efficiency. Note that line
+ * and column numbers are zero-based -- typically you will want to add
+ * 1 to each before displaying to a user.
+ *
+ * Generated from protobuf field repeated int32 span = 2 [packed = true];
+ */
+ private $span;
+ /**
+ * If this SourceCodeInfo represents a complete declaration, these are any
+ * comments appearing before and after the declaration which appear to be
+ * attached to the declaration.
+ * A series of line comments appearing on consecutive lines, with no other
+ * tokens appearing on those lines, will be treated as a single comment.
+ * leading_detached_comments will keep paragraphs of comments that appear
+ * before (but not connected to) the current element. Each paragraph,
+ * separated by empty lines, will be one comment element in the repeated
+ * field.
+ * Only the comment content is provided; comment markers (e.g. //) are
+ * stripped out. For block comments, leading whitespace and an asterisk
+ * will be stripped from the beginning of each line other than the first.
+ * Newlines are included in the output.
+ * Examples:
+ * optional int32 foo = 1; // Comment attached to foo.
+ * // Comment attached to bar.
+ * optional int32 bar = 2;
+ * optional string baz = 3;
+ * // Comment attached to baz.
+ * // Another line attached to baz.
+ * // Comment attached to moo.
+ * //
+ * // Another line attached to moo.
+ * optional double moo = 4;
+ * // Detached comment for corge. This is not leading or trailing comments
+ * // to moo or corge because there are blank lines separating it from
+ * // both.
+ * // Detached comment for corge paragraph 2.
+ * optional string corge = 5;
+ * /* Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. */
+ * /* Block comment attached to
+ * * grault. */
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ *
+ * Generated from protobuf field optional string leading_comments = 3;
+ */
+ protected $leading_comments = null;
+ /**
+ * Generated from protobuf field optional string trailing_comments = 4;
+ */
+ protected $trailing_comments = null;
+ /**
+ * Generated from protobuf field repeated string leading_detached_comments = 6;
+ */
+ private $leading_detached_comments;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\RepeatedField $path
+ * Identifies which part of the FileDescriptorProto was defined at this
+ * location.
+ * Each element is a field number or an index. They form a path from
+ * the root FileDescriptorProto to the place where the definition occurs.
+ * For example, this path:
+ * [ 4, 3, 2, 7, 1 ]
+ * refers to:
+ * file.message_type(3) // 4, 3
+ * .field(7) // 2, 7
+ * .name() // 1
+ * This is because FileDescriptorProto.message_type has field number 4:
+ * repeated DescriptorProto message_type = 4;
+ * and DescriptorProto.field has field number 2:
+ * repeated FieldDescriptorProto field = 2;
+ * and FieldDescriptorProto.name has field number 1:
+ * optional string name = 1;
+ * Thus, the above path gives the location of a field name. If we removed
+ * the last element:
+ * [ 4, 3, 2, 7 ]
+ * this path refers to the whole field declaration (from the beginning
+ * of the label to the terminating semicolon).
+ * @type array|\Google\Protobuf\Internal\RepeatedField $span
+ * Always has exactly three or four elements: start line, start column,
+ * end line (optional, otherwise assumed same as start line), end column.
+ * These are packed into a single field for efficiency. Note that line
+ * and column numbers are zero-based -- typically you will want to add
+ * 1 to each before displaying to a user.
+ * @type string $leading_comments
+ * If this SourceCodeInfo represents a complete declaration, these are any
+ * comments appearing before and after the declaration which appear to be
+ * attached to the declaration.
+ * A series of line comments appearing on consecutive lines, with no other
+ * tokens appearing on those lines, will be treated as a single comment.
+ * leading_detached_comments will keep paragraphs of comments that appear
+ * before (but not connected to) the current element. Each paragraph,
+ * separated by empty lines, will be one comment element in the repeated
+ * field.
+ * Only the comment content is provided; comment markers (e.g. //) are
+ * stripped out. For block comments, leading whitespace and an asterisk
+ * will be stripped from the beginning of each line other than the first.
+ * Newlines are included in the output.
+ * Examples:
+ * optional int32 foo = 1; // Comment attached to foo.
+ * // Comment attached to bar.
+ * optional int32 bar = 2;
+ * optional string baz = 3;
+ * // Comment attached to baz.
+ * // Another line attached to baz.
+ * // Comment attached to moo.
+ * //
+ * // Another line attached to moo.
+ * optional double moo = 4;
+ * // Detached comment for corge. This is not leading or trailing comments
+ * // to moo or corge because there are blank lines separating it from
+ * // both.
+ * // Detached comment for corge paragraph 2.
+ * optional string corge = 5;
+ * /* Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. */
+ * /* Block comment attached to
+ * * grault. */
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ * @type string $trailing_comments
+ * @type array|\Google\Protobuf\Internal\RepeatedField $leading_detached_comments
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Identifies which part of the FileDescriptorProto was defined at this
+ * location.
+ * Each element is a field number or an index. They form a path from
+ * the root FileDescriptorProto to the place where the definition occurs.
+ * For example, this path:
+ * [ 4, 3, 2, 7, 1 ]
+ * refers to:
+ * file.message_type(3) // 4, 3
+ * .field(7) // 2, 7
+ * .name() // 1
+ * This is because FileDescriptorProto.message_type has field number 4:
+ * repeated DescriptorProto message_type = 4;
+ * and DescriptorProto.field has field number 2:
+ * repeated FieldDescriptorProto field = 2;
+ * and FieldDescriptorProto.name has field number 1:
+ * optional string name = 1;
+ * Thus, the above path gives the location of a field name. If we removed
+ * the last element:
+ * [ 4, 3, 2, 7 ]
+ * this path refers to the whole field declaration (from the beginning
+ * of the label to the terminating semicolon).
+ *
+ * Generated from protobuf field repeated int32 path = 1 [packed = true];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPath()
+ {
+ return $this->path;
+ }
+
+ /**
+ * Identifies which part of the FileDescriptorProto was defined at this
+ * location.
+ * Each element is a field number or an index. They form a path from
+ * the root FileDescriptorProto to the place where the definition occurs.
+ * For example, this path:
+ * [ 4, 3, 2, 7, 1 ]
+ * refers to:
+ * file.message_type(3) // 4, 3
+ * .field(7) // 2, 7
+ * .name() // 1
+ * This is because FileDescriptorProto.message_type has field number 4:
+ * repeated DescriptorProto message_type = 4;
+ * and DescriptorProto.field has field number 2:
+ * repeated FieldDescriptorProto field = 2;
+ * and FieldDescriptorProto.name has field number 1:
+ * optional string name = 1;
+ * Thus, the above path gives the location of a field name. If we removed
+ * the last element:
+ * [ 4, 3, 2, 7 ]
+ * this path refers to the whole field declaration (from the beginning
+ * of the label to the terminating semicolon).
+ *
+ * Generated from protobuf field repeated int32 path = 1 [packed = true];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPath($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->path = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Always has exactly three or four elements: start line, start column,
+ * end line (optional, otherwise assumed same as start line), end column.
+ * These are packed into a single field for efficiency. Note that line
+ * and column numbers are zero-based -- typically you will want to add
+ * 1 to each before displaying to a user.
+ *
+ * Generated from protobuf field repeated int32 span = 2 [packed = true];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getSpan()
+ {
+ return $this->span;
+ }
+
+ /**
+ * Always has exactly three or four elements: start line, start column,
+ * end line (optional, otherwise assumed same as start line), end column.
+ * These are packed into a single field for efficiency. Note that line
+ * and column numbers are zero-based -- typically you will want to add
+ * 1 to each before displaying to a user.
+ *
+ * Generated from protobuf field repeated int32 span = 2 [packed = true];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setSpan($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->span = $arr;
+
+ return $this;
+ }
+
+ /**
+ * If this SourceCodeInfo represents a complete declaration, these are any
+ * comments appearing before and after the declaration which appear to be
+ * attached to the declaration.
+ * A series of line comments appearing on consecutive lines, with no other
+ * tokens appearing on those lines, will be treated as a single comment.
+ * leading_detached_comments will keep paragraphs of comments that appear
+ * before (but not connected to) the current element. Each paragraph,
+ * separated by empty lines, will be one comment element in the repeated
+ * field.
+ * Only the comment content is provided; comment markers (e.g. //) are
+ * stripped out. For block comments, leading whitespace and an asterisk
+ * will be stripped from the beginning of each line other than the first.
+ * Newlines are included in the output.
+ * Examples:
+ * optional int32 foo = 1; // Comment attached to foo.
+ * // Comment attached to bar.
+ * optional int32 bar = 2;
+ * optional string baz = 3;
+ * // Comment attached to baz.
+ * // Another line attached to baz.
+ * // Comment attached to moo.
+ * //
+ * // Another line attached to moo.
+ * optional double moo = 4;
+ * // Detached comment for corge. This is not leading or trailing comments
+ * // to moo or corge because there are blank lines separating it from
+ * // both.
+ * // Detached comment for corge paragraph 2.
+ * optional string corge = 5;
+ * /* Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. */
+ * /* Block comment attached to
+ * * grault. */
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ *
+ * Generated from protobuf field optional string leading_comments = 3;
+ * @return string
+ */
+ public function getLeadingComments()
+ {
+ return isset($this->leading_comments) ? $this->leading_comments : '';
+ }
+
+ public function hasLeadingComments()
+ {
+ return isset($this->leading_comments);
+ }
+
+ public function clearLeadingComments()
+ {
+ unset($this->leading_comments);
+ }
+
+ /**
+ * If this SourceCodeInfo represents a complete declaration, these are any
+ * comments appearing before and after the declaration which appear to be
+ * attached to the declaration.
+ * A series of line comments appearing on consecutive lines, with no other
+ * tokens appearing on those lines, will be treated as a single comment.
+ * leading_detached_comments will keep paragraphs of comments that appear
+ * before (but not connected to) the current element. Each paragraph,
+ * separated by empty lines, will be one comment element in the repeated
+ * field.
+ * Only the comment content is provided; comment markers (e.g. //) are
+ * stripped out. For block comments, leading whitespace and an asterisk
+ * will be stripped from the beginning of each line other than the first.
+ * Newlines are included in the output.
+ * Examples:
+ * optional int32 foo = 1; // Comment attached to foo.
+ * // Comment attached to bar.
+ * optional int32 bar = 2;
+ * optional string baz = 3;
+ * // Comment attached to baz.
+ * // Another line attached to baz.
+ * // Comment attached to moo.
+ * //
+ * // Another line attached to moo.
+ * optional double moo = 4;
+ * // Detached comment for corge. This is not leading or trailing comments
+ * // to moo or corge because there are blank lines separating it from
+ * // both.
+ * // Detached comment for corge paragraph 2.
+ * optional string corge = 5;
+ * /* Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. */
+ * /* Block comment attached to
+ * * grault. */
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ *
+ * Generated from protobuf field optional string leading_comments = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setLeadingComments($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->leading_comments = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional string trailing_comments = 4;
+ * @return string
+ */
+ public function getTrailingComments()
+ {
+ return isset($this->trailing_comments) ? $this->trailing_comments : '';
+ }
+
+ public function hasTrailingComments()
+ {
+ return isset($this->trailing_comments);
+ }
+
+ public function clearTrailingComments()
+ {
+ unset($this->trailing_comments);
+ }
+
+ /**
+ * Generated from protobuf field optional string trailing_comments = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setTrailingComments($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trailing_comments = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field repeated string leading_detached_comments = 6;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLeadingDetachedComments()
+ {
+ return $this->leading_detached_comments;
+ }
+
+ /**
+ * Generated from protobuf field repeated string leading_detached_comments = 6;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLeadingDetachedComments($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->leading_detached_comments = $arr;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Location::class, \Google\Protobuf\Internal\SourceCodeInfo_Location::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php
new file mode 100644
index 0000000..1346492
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php
@@ -0,0 +1,16 @@
+seconds = $datetime->getTimestamp();
+ $this->nanos = 1000 * $datetime->format('u');
+ }
+
+ /**
+ * Converts Timestamp to PHP DateTime.
+ *
+ * @return \DateTime $datetime
+ */
+ public function toDateTime()
+ {
+ $time = sprintf('%s.%06d', $this->seconds, $this->nanos / 1000);
+ return \DateTime::createFromFormat('U.u', $time);
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption.php
new file mode 100644
index 0000000..a1cdca5
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption.php
@@ -0,0 +1,300 @@
+google.protobuf.UninterpretedOption
+ */
+class UninterpretedOption extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
+ */
+ private $name;
+ /**
+ * The value of the uninterpreted option, in whatever type the tokenizer
+ * identified it as during parsing. Exactly one of these should be set.
+ *
+ * Generated from protobuf field optional string identifier_value = 3;
+ */
+ protected $identifier_value = null;
+ /**
+ * Generated from protobuf field optional uint64 positive_int_value = 4;
+ */
+ protected $positive_int_value = null;
+ /**
+ * Generated from protobuf field optional int64 negative_int_value = 5;
+ */
+ protected $negative_int_value = null;
+ /**
+ * Generated from protobuf field optional double double_value = 6;
+ */
+ protected $double_value = null;
+ /**
+ * Generated from protobuf field optional bytes string_value = 7;
+ */
+ protected $string_value = null;
+ /**
+ * Generated from protobuf field optional string aggregate_value = 8;
+ */
+ protected $aggregate_value = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption\NamePart>|\Google\Protobuf\Internal\RepeatedField $name
+ * @type string $identifier_value
+ * The value of the uninterpreted option, in whatever type the tokenizer
+ * identified it as during parsing. Exactly one of these should be set.
+ * @type int|string $positive_int_value
+ * @type int|string $negative_int_value
+ * @type float $double_value
+ * @type string $string_value
+ * @type string $aggregate_value
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Generated from protobuf field repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption\NamePart>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption\NamePart::class);
+ $this->name = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The value of the uninterpreted option, in whatever type the tokenizer
+ * identified it as during parsing. Exactly one of these should be set.
+ *
+ * Generated from protobuf field optional string identifier_value = 3;
+ * @return string
+ */
+ public function getIdentifierValue()
+ {
+ return isset($this->identifier_value) ? $this->identifier_value : '';
+ }
+
+ public function hasIdentifierValue()
+ {
+ return isset($this->identifier_value);
+ }
+
+ public function clearIdentifierValue()
+ {
+ unset($this->identifier_value);
+ }
+
+ /**
+ * The value of the uninterpreted option, in whatever type the tokenizer
+ * identified it as during parsing. Exactly one of these should be set.
+ *
+ * Generated from protobuf field optional string identifier_value = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setIdentifierValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->identifier_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional uint64 positive_int_value = 4;
+ * @return int|string
+ */
+ public function getPositiveIntValue()
+ {
+ return isset($this->positive_int_value) ? $this->positive_int_value : 0;
+ }
+
+ public function hasPositiveIntValue()
+ {
+ return isset($this->positive_int_value);
+ }
+
+ public function clearPositiveIntValue()
+ {
+ unset($this->positive_int_value);
+ }
+
+ /**
+ * Generated from protobuf field optional uint64 positive_int_value = 4;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setPositiveIntValue($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->positive_int_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional int64 negative_int_value = 5;
+ * @return int|string
+ */
+ public function getNegativeIntValue()
+ {
+ return isset($this->negative_int_value) ? $this->negative_int_value : 0;
+ }
+
+ public function hasNegativeIntValue()
+ {
+ return isset($this->negative_int_value);
+ }
+
+ public function clearNegativeIntValue()
+ {
+ unset($this->negative_int_value);
+ }
+
+ /**
+ * Generated from protobuf field optional int64 negative_int_value = 5;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setNegativeIntValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->negative_int_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional double double_value = 6;
+ * @return float
+ */
+ public function getDoubleValue()
+ {
+ return isset($this->double_value) ? $this->double_value : 0.0;
+ }
+
+ public function hasDoubleValue()
+ {
+ return isset($this->double_value);
+ }
+
+ public function clearDoubleValue()
+ {
+ unset($this->double_value);
+ }
+
+ /**
+ * Generated from protobuf field optional double double_value = 6;
+ * @param float $var
+ * @return $this
+ */
+ public function setDoubleValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->double_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional bytes string_value = 7;
+ * @return string
+ */
+ public function getStringValue()
+ {
+ return isset($this->string_value) ? $this->string_value : '';
+ }
+
+ public function hasStringValue()
+ {
+ return isset($this->string_value);
+ }
+
+ public function clearStringValue()
+ {
+ unset($this->string_value);
+ }
+
+ /**
+ * Generated from protobuf field optional bytes string_value = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setStringValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->string_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field optional string aggregate_value = 8;
+ * @return string
+ */
+ public function getAggregateValue()
+ {
+ return isset($this->aggregate_value) ? $this->aggregate_value : '';
+ }
+
+ public function hasAggregateValue()
+ {
+ return isset($this->aggregate_value);
+ }
+
+ public function clearAggregateValue()
+ {
+ unset($this->aggregate_value);
+ }
+
+ /**
+ * Generated from protobuf field optional string aggregate_value = 8;
+ * @param string $var
+ * @return $this
+ */
+ public function setAggregateValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->aggregate_value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php
new file mode 100644
index 0000000..2debf83
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php
@@ -0,0 +1,116 @@
+google.protobuf.UninterpretedOption.NamePart
+ */
+class NamePart extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field required string name_part = 1;
+ */
+ protected $name_part = null;
+ /**
+ * Generated from protobuf field required bool is_extension = 2;
+ */
+ protected $is_extension = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name_part
+ * @type bool $is_extension
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field required string name_part = 1;
+ * @return string
+ */
+ public function getNamePart()
+ {
+ return isset($this->name_part) ? $this->name_part : '';
+ }
+
+ public function hasNamePart()
+ {
+ return isset($this->name_part);
+ }
+
+ public function clearNamePart()
+ {
+ unset($this->name_part);
+ }
+
+ /**
+ * Generated from protobuf field required string name_part = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setNamePart($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name_part = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field required bool is_extension = 2;
+ * @return bool
+ */
+ public function getIsExtension()
+ {
+ return isset($this->is_extension) ? $this->is_extension : false;
+ }
+
+ public function hasIsExtension()
+ {
+ return isset($this->is_extension);
+ }
+
+ public function clearIsExtension()
+ {
+ unset($this->is_extension);
+ }
+
+ /**
+ * Generated from protobuf field required bool is_extension = 2;
+ * @param bool $var
+ * @return $this
+ */
+ public function setIsExtension($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->is_extension = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(NamePart::class, \Google\Protobuf\Internal\UninterpretedOption_NamePart::class);
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
new file mode 100644
index 0000000..9750eb0
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
@@ -0,0 +1,16 @@
+google.protobuf.ListValue
+ */
+class ListValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Repeated field of dynamically typed values.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Value values = 1;
+ */
+ private $values;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $values
+ * Repeated field of dynamically typed values.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Struct::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Repeated field of dynamically typed values.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Value values = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * Repeated field of dynamically typed values.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Value values = 1;
+ * @param array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setValues($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class);
+ $this->values = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Method.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Method.php
new file mode 100644
index 0000000..eda00bf
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Method.php
@@ -0,0 +1,271 @@
+google.protobuf.Method
+ */
+class Method extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The simple name of this method.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * A URL of the input message type.
+ *
+ * Generated from protobuf field string request_type_url = 2;
+ */
+ protected $request_type_url = '';
+ /**
+ * If true, the request is streamed.
+ *
+ * Generated from protobuf field bool request_streaming = 3;
+ */
+ protected $request_streaming = false;
+ /**
+ * The URL of the output message type.
+ *
+ * Generated from protobuf field string response_type_url = 4;
+ */
+ protected $response_type_url = '';
+ /**
+ * If true, the response is streamed.
+ *
+ * Generated from protobuf field bool response_streaming = 5;
+ */
+ protected $response_streaming = false;
+ /**
+ * Any metadata attached to the method.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 6;
+ */
+ private $options;
+ /**
+ * The source syntax of this method.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 7;
+ */
+ protected $syntax = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The simple name of this method.
+ * @type string $request_type_url
+ * A URL of the input message type.
+ * @type bool $request_streaming
+ * If true, the request is streamed.
+ * @type string $response_type_url
+ * The URL of the output message type.
+ * @type bool $response_streaming
+ * If true, the response is streamed.
+ * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
+ * Any metadata attached to the method.
+ * @type int $syntax
+ * The source syntax of this method.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Api::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The simple name of this method.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The simple name of this method.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * A URL of the input message type.
+ *
+ * Generated from protobuf field string request_type_url = 2;
+ * @return string
+ */
+ public function getRequestTypeUrl()
+ {
+ return $this->request_type_url;
+ }
+
+ /**
+ * A URL of the input message type.
+ *
+ * Generated from protobuf field string request_type_url = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestTypeUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_type_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * If true, the request is streamed.
+ *
+ * Generated from protobuf field bool request_streaming = 3;
+ * @return bool
+ */
+ public function getRequestStreaming()
+ {
+ return $this->request_streaming;
+ }
+
+ /**
+ * If true, the request is streamed.
+ *
+ * Generated from protobuf field bool request_streaming = 3;
+ * @param bool $var
+ * @return $this
+ */
+ public function setRequestStreaming($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->request_streaming = $var;
+
+ return $this;
+ }
+
+ /**
+ * The URL of the output message type.
+ *
+ * Generated from protobuf field string response_type_url = 4;
+ * @return string
+ */
+ public function getResponseTypeUrl()
+ {
+ return $this->response_type_url;
+ }
+
+ /**
+ * The URL of the output message type.
+ *
+ * Generated from protobuf field string response_type_url = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setResponseTypeUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->response_type_url = $var;
+
+ return $this;
+ }
+
+ /**
+ * If true, the response is streamed.
+ *
+ * Generated from protobuf field bool response_streaming = 5;
+ * @return bool
+ */
+ public function getResponseStreaming()
+ {
+ return $this->response_streaming;
+ }
+
+ /**
+ * If true, the response is streamed.
+ *
+ * Generated from protobuf field bool response_streaming = 5;
+ * @param bool $var
+ * @return $this
+ */
+ public function setResponseStreaming($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->response_streaming = $var;
+
+ return $this;
+ }
+
+ /**
+ * Any metadata attached to the method.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 6;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Any metadata attached to the method.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 6;
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
+ $this->options = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The source syntax of this method.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 7;
+ * @return int
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * The source syntax of this method.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 7;
+ * @param int $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Mixin.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Mixin.php
new file mode 100644
index 0000000..4f7bf84
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Mixin.php
@@ -0,0 +1,166 @@
+google.protobuf.Mixin
+ */
+class Mixin extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The fully qualified name of the interface which is included.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * If non-empty specifies a path under which inherited HTTP paths
+ * are rooted.
+ *
+ * Generated from protobuf field string root = 2;
+ */
+ protected $root = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The fully qualified name of the interface which is included.
+ * @type string $root
+ * If non-empty specifies a path under which inherited HTTP paths
+ * are rooted.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Api::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The fully qualified name of the interface which is included.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The fully qualified name of the interface which is included.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * If non-empty specifies a path under which inherited HTTP paths
+ * are rooted.
+ *
+ * Generated from protobuf field string root = 2;
+ * @return string
+ */
+ public function getRoot()
+ {
+ return $this->root;
+ }
+
+ /**
+ * If non-empty specifies a path under which inherited HTTP paths
+ * are rooted.
+ *
+ * Generated from protobuf field string root = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setRoot($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->root = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/NullValue.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/NullValue.php
new file mode 100644
index 0000000..61569f8
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/NullValue.php
@@ -0,0 +1,49 @@
+google.protobuf.NullValue
+ */
+class NullValue
+{
+ /**
+ * Null value.
+ *
+ * Generated from protobuf enum NULL_VALUE = 0;
+ */
+ const NULL_VALUE = 0;
+
+ private static $valueToName = [
+ self::NULL_VALUE => 'NULL_VALUE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/OneofDescriptor.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/OneofDescriptor.php
new file mode 100644
index 0000000..685a887
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/OneofDescriptor.php
@@ -0,0 +1,64 @@
+internal_desc = $internal_desc;
+ }
+
+ /**
+ * @return string The name of the oneof
+ */
+ public function getName()
+ {
+ return $this->internal_desc->getName();
+ }
+
+ /**
+ * @param int $index Must be >= 0 and < getFieldCount()
+ * @return FieldDescriptor
+ */
+ public function getField($index)
+ {
+ if (
+ is_null($this->internal_desc->getFields())
+ || !isset($this->internal_desc->getFields()[$index])
+ ) {
+ return null;
+ }
+ return $this->getPublicDescriptor($this->internal_desc->getFields()[$index]);
+ }
+
+ /**
+ * @return int Number of fields in the oneof
+ */
+ public function getFieldCount()
+ {
+ return count($this->internal_desc->getFields());
+ }
+
+ public function isSynthetic()
+ {
+ return $this->internal_desc->isSynthetic();
+ }
+}
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Option.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Option.php
new file mode 100644
index 0000000..31249e5
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Option.php
@@ -0,0 +1,136 @@
+google.protobuf.Option
+ */
+class Option extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The option's name. For protobuf built-in options (options defined in
+ * descriptor.proto), this is the short name. For example, `"map_entry"`.
+ * For custom options, it should be the fully-qualified name. For example,
+ * `"google.api.http"`.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The option's value packed in an Any message. If the value is a primitive,
+ * the corresponding wrapper type defined in google/protobuf/wrappers.proto
+ * should be used. If the value is an enum, it should be stored as an int32
+ * value using the google.protobuf.Int32Value type.
+ *
+ * Generated from protobuf field .google.protobuf.Any value = 2;
+ */
+ protected $value = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The option's name. For protobuf built-in options (options defined in
+ * descriptor.proto), this is the short name. For example, `"map_entry"`.
+ * For custom options, it should be the fully-qualified name. For example,
+ * `"google.api.http"`.
+ * @type \Google\Protobuf\Any $value
+ * The option's value packed in an Any message. If the value is a primitive,
+ * the corresponding wrapper type defined in google/protobuf/wrappers.proto
+ * should be used. If the value is an enum, it should be stored as an int32
+ * value using the google.protobuf.Int32Value type.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Type::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The option's name. For protobuf built-in options (options defined in
+ * descriptor.proto), this is the short name. For example, `"map_entry"`.
+ * For custom options, it should be the fully-qualified name. For example,
+ * `"google.api.http"`.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The option's name. For protobuf built-in options (options defined in
+ * descriptor.proto), this is the short name. For example, `"map_entry"`.
+ * For custom options, it should be the fully-qualified name. For example,
+ * `"google.api.http"`.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The option's value packed in an Any message. If the value is a primitive,
+ * the corresponding wrapper type defined in google/protobuf/wrappers.proto
+ * should be used. If the value is an enum, it should be stored as an int32
+ * value using the google.protobuf.Int32Value type.
+ *
+ * Generated from protobuf field .google.protobuf.Any value = 2;
+ * @return \Google\Protobuf\Any|null
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ public function hasValue()
+ {
+ return isset($this->value);
+ }
+
+ public function clearValue()
+ {
+ unset($this->value);
+ }
+
+ /**
+ * The option's value packed in an Any message. If the value is a primitive,
+ * the corresponding wrapper type defined in google/protobuf/wrappers.proto
+ * should be used. If the value is an enum, it should be stored as an int32
+ * value using the google.protobuf.Int32Value type.
+ *
+ * Generated from protobuf field .google.protobuf.Any value = 2;
+ * @param \Google\Protobuf\Any $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/SourceContext.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/SourceContext.php
new file mode 100644
index 0000000..8b3ea11
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/SourceContext.php
@@ -0,0 +1,72 @@
+google.protobuf.SourceContext
+ */
+class SourceContext extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The path-qualified name of the .proto file that contained the associated
+ * protobuf element. For example: `"google/protobuf/source_context.proto"`.
+ *
+ * Generated from protobuf field string file_name = 1;
+ */
+ protected $file_name = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $file_name
+ * The path-qualified name of the .proto file that contained the associated
+ * protobuf element. For example: `"google/protobuf/source_context.proto"`.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\SourceContext::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The path-qualified name of the .proto file that contained the associated
+ * protobuf element. For example: `"google/protobuf/source_context.proto"`.
+ *
+ * Generated from protobuf field string file_name = 1;
+ * @return string
+ */
+ public function getFileName()
+ {
+ return $this->file_name;
+ }
+
+ /**
+ * The path-qualified name of the .proto file that contained the associated
+ * protobuf element. For example: `"google/protobuf/source_context.proto"`.
+ *
+ * Generated from protobuf field string file_name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setFileName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->file_name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/StringValue.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/StringValue.php
new file mode 100644
index 0000000..ad98316
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/StringValue.php
@@ -0,0 +1,68 @@
+google.protobuf.StringValue
+ */
+class StringValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The string value.
+ *
+ * Generated from protobuf field string value = 1;
+ */
+ protected $value = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $value
+ * The string value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The string value.
+ *
+ * Generated from protobuf field string value = 1;
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The string value.
+ *
+ * Generated from protobuf field string value = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Struct.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Struct.php
new file mode 100644
index 0000000..0456541
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Struct.php
@@ -0,0 +1,73 @@
+google.protobuf.Struct
+ */
+class Struct extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Unordered map of dynamically typed values.
+ *
+ * Generated from protobuf field map fields = 1;
+ */
+ private $fields;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\MapField $fields
+ * Unordered map of dynamically typed values.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Struct::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Unordered map of dynamically typed values.
+ *
+ * Generated from protobuf field map fields = 1;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getFields()
+ {
+ return $this->fields;
+ }
+
+ /**
+ * Unordered map of dynamically typed values.
+ *
+ * Generated from protobuf field map fields = 1;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setFields($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class);
+ $this->fields = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Syntax.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Syntax.php
new file mode 100644
index 0000000..10952bf
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Syntax.php
@@ -0,0 +1,54 @@
+google.protobuf.Syntax
+ */
+class Syntax
+{
+ /**
+ * Syntax `proto2`.
+ *
+ * Generated from protobuf enum SYNTAX_PROTO2 = 0;
+ */
+ const SYNTAX_PROTO2 = 0;
+ /**
+ * Syntax `proto3`.
+ *
+ * Generated from protobuf enum SYNTAX_PROTO3 = 1;
+ */
+ const SYNTAX_PROTO3 = 1;
+
+ private static $valueToName = [
+ self::SYNTAX_PROTO2 => 'SYNTAX_PROTO2',
+ self::SYNTAX_PROTO3 => 'SYNTAX_PROTO3',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Timestamp.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Timestamp.php
new file mode 100644
index 0000000..a12f485
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Timestamp.php
@@ -0,0 +1,186 @@
+google.protobuf.Timestamp
+ */
+class Timestamp extends \Google\Protobuf\Internal\TimestampBase
+{
+ /**
+ * Represents seconds of UTC time since Unix epoch
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ * 9999-12-31T23:59:59Z inclusive.
+ *
+ * Generated from protobuf field int64 seconds = 1;
+ */
+ protected $seconds = 0;
+ /**
+ * Non-negative fractions of a second at nanosecond resolution. Negative
+ * second values with fractions must still have non-negative nanos values
+ * that count forward in time. Must be from 0 to 999,999,999
+ * inclusive.
+ *
+ * Generated from protobuf field int32 nanos = 2;
+ */
+ protected $nanos = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $seconds
+ * Represents seconds of UTC time since Unix epoch
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ * 9999-12-31T23:59:59Z inclusive.
+ * @type int $nanos
+ * Non-negative fractions of a second at nanosecond resolution. Negative
+ * second values with fractions must still have non-negative nanos values
+ * that count forward in time. Must be from 0 to 999,999,999
+ * inclusive.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Timestamp::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Represents seconds of UTC time since Unix epoch
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ * 9999-12-31T23:59:59Z inclusive.
+ *
+ * Generated from protobuf field int64 seconds = 1;
+ * @return int|string
+ */
+ public function getSeconds()
+ {
+ return $this->seconds;
+ }
+
+ /**
+ * Represents seconds of UTC time since Unix epoch
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ * 9999-12-31T23:59:59Z inclusive.
+ *
+ * Generated from protobuf field int64 seconds = 1;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setSeconds($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->seconds = $var;
+
+ return $this;
+ }
+
+ /**
+ * Non-negative fractions of a second at nanosecond resolution. Negative
+ * second values with fractions must still have non-negative nanos values
+ * that count forward in time. Must be from 0 to 999,999,999
+ * inclusive.
+ *
+ * Generated from protobuf field int32 nanos = 2;
+ * @return int
+ */
+ public function getNanos()
+ {
+ return $this->nanos;
+ }
+
+ /**
+ * Non-negative fractions of a second at nanosecond resolution. Negative
+ * second values with fractions must still have non-negative nanos values
+ * that count forward in time. Must be from 0 to 999,999,999
+ * inclusive.
+ *
+ * Generated from protobuf field int32 nanos = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setNanos($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->nanos = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Type.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Type.php
new file mode 100644
index 0000000..d4af7df
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Type.php
@@ -0,0 +1,247 @@
+google.protobuf.Type
+ */
+class Type extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The fully qualified message name.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The list of fields.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Field fields = 2;
+ */
+ private $fields;
+ /**
+ * The list of types appearing in `oneof` definitions in this type.
+ *
+ * Generated from protobuf field repeated string oneofs = 3;
+ */
+ private $oneofs;
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 4;
+ */
+ private $options;
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field .google.protobuf.SourceContext source_context = 5;
+ */
+ protected $source_context = null;
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 6;
+ */
+ protected $syntax = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * The fully qualified message name.
+ * @type array<\Google\Protobuf\Field>|\Google\Protobuf\Internal\RepeatedField $fields
+ * The list of fields.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $oneofs
+ * The list of types appearing in `oneof` definitions in this type.
+ * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
+ * The protocol buffer options.
+ * @type \Google\Protobuf\SourceContext $source_context
+ * The source context.
+ * @type int $syntax
+ * The source syntax.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Type::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The fully qualified message name.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The fully qualified message name.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The list of fields.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Field fields = 2;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getFields()
+ {
+ return $this->fields;
+ }
+
+ /**
+ * The list of fields.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Field fields = 2;
+ * @param array<\Google\Protobuf\Field>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setFields($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Field::class);
+ $this->fields = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The list of types appearing in `oneof` definitions in this type.
+ *
+ * Generated from protobuf field repeated string oneofs = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOneofs()
+ {
+ return $this->oneofs;
+ }
+
+ /**
+ * The list of types appearing in `oneof` definitions in this type.
+ *
+ * Generated from protobuf field repeated string oneofs = 3;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOneofs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->oneofs = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field repeated .google.protobuf.Option options = 4;
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
+ $this->options = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field .google.protobuf.SourceContext source_context = 5;
+ * @return \Google\Protobuf\SourceContext|null
+ */
+ public function getSourceContext()
+ {
+ return $this->source_context;
+ }
+
+ public function hasSourceContext()
+ {
+ return isset($this->source_context);
+ }
+
+ public function clearSourceContext()
+ {
+ unset($this->source_context);
+ }
+
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field .google.protobuf.SourceContext source_context = 5;
+ * @param \Google\Protobuf\SourceContext $var
+ * @return $this
+ */
+ public function setSourceContext($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
+ $this->source_context = $var;
+
+ return $this;
+ }
+
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 6;
+ * @return int
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 6;
+ * @param int $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/UInt32Value.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/UInt32Value.php
new file mode 100644
index 0000000..ae5fc5b
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/UInt32Value.php
@@ -0,0 +1,68 @@
+google.protobuf.UInt32Value
+ */
+class UInt32Value extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The uint32 value.
+ *
+ * Generated from protobuf field uint32 value = 1;
+ */
+ protected $value = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $value
+ * The uint32 value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The uint32 value.
+ *
+ * Generated from protobuf field uint32 value = 1;
+ * @return int
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The uint32 value.
+ *
+ * Generated from protobuf field uint32 value = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/UInt64Value.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/UInt64Value.php
new file mode 100644
index 0000000..aa96867
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/UInt64Value.php
@@ -0,0 +1,68 @@
+google.protobuf.UInt64Value
+ */
+class UInt64Value extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The uint64 value.
+ *
+ * Generated from protobuf field uint64 value = 1;
+ */
+ protected $value = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $value
+ * The uint64 value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Wrappers::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The uint64 value.
+ *
+ * Generated from protobuf field uint64 value = 1;
+ * @return int|string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The uint64 value.
+ *
+ * Generated from protobuf field uint64 value = 1;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Value.php b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Value.php
new file mode 100644
index 0000000..dcc0bdf
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/Google/Protobuf/Value.php
@@ -0,0 +1,244 @@
+google.protobuf.Value
+ */
+class Value extends \Google\Protobuf\Internal\Message
+{
+ protected $kind;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $null_value
+ * Represents a null value.
+ * @type float $number_value
+ * Represents a double value.
+ * @type string $string_value
+ * Represents a string value.
+ * @type bool $bool_value
+ * Represents a boolean value.
+ * @type \Google\Protobuf\Struct $struct_value
+ * Represents a structured value.
+ * @type \Google\Protobuf\ListValue $list_value
+ * Represents a repeated `Value`.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Protobuf\Struct::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Represents a null value.
+ *
+ * Generated from protobuf field .google.protobuf.NullValue null_value = 1;
+ * @return int
+ */
+ public function getNullValue()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasNullValue()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Represents a null value.
+ *
+ * Generated from protobuf field .google.protobuf.NullValue null_value = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setNullValue($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * Represents a double value.
+ *
+ * Generated from protobuf field double number_value = 2;
+ * @return float
+ */
+ public function getNumberValue()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasNumberValue()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Represents a double value.
+ *
+ * Generated from protobuf field double number_value = 2;
+ * @param float $var
+ * @return $this
+ */
+ public function setNumberValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Represents a string value.
+ *
+ * Generated from protobuf field string string_value = 3;
+ * @return string
+ */
+ public function getStringValue()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasStringValue()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Represents a string value.
+ *
+ * Generated from protobuf field string string_value = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setStringValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * Represents a boolean value.
+ *
+ * Generated from protobuf field bool bool_value = 4;
+ * @return bool
+ */
+ public function getBoolValue()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasBoolValue()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Represents a boolean value.
+ *
+ * Generated from protobuf field bool bool_value = 4;
+ * @param bool $var
+ * @return $this
+ */
+ public function setBoolValue($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * Represents a structured value.
+ *
+ * Generated from protobuf field .google.protobuf.Struct struct_value = 5;
+ * @return \Google\Protobuf\Struct|null
+ */
+ public function getStructValue()
+ {
+ return $this->readOneof(5);
+ }
+
+ public function hasStructValue()
+ {
+ return $this->hasOneof(5);
+ }
+
+ /**
+ * Represents a structured value.
+ *
+ * Generated from protobuf field .google.protobuf.Struct struct_value = 5;
+ * @param \Google\Protobuf\Struct $var
+ * @return $this
+ */
+ public function setStructValue($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
+ $this->writeOneof(5, $var);
+
+ return $this;
+ }
+
+ /**
+ * Represents a repeated `Value`.
+ *
+ * Generated from protobuf field .google.protobuf.ListValue list_value = 6;
+ * @return \Google\Protobuf\ListValue|null
+ */
+ public function getListValue()
+ {
+ return $this->readOneof(6);
+ }
+
+ public function hasListValue()
+ {
+ return $this->hasOneof(6);
+ }
+
+ /**
+ * Represents a repeated `Value`.
+ *
+ * Generated from protobuf field .google.protobuf.ListValue list_value = 6;
+ * @param \Google\Protobuf\ListValue $var
+ * @return $this
+ */
+ public function setListValue($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\ListValue::class);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getKind()
+ {
+ return $this->whichOneof("kind");
+ }
+
+}
+
diff --git a/tests/php_test_files/vendor/google/protobuf/src/phpdoc.dist.xml b/tests/php_test_files/vendor/google/protobuf/src/phpdoc.dist.xml
new file mode 100644
index 0000000..dd31302
--- /dev/null
+++ b/tests/php_test_files/vendor/google/protobuf/src/phpdoc.dist.xml
@@ -0,0 +1,15 @@
+
+
+
+
+ doc
+
+
+ doc
+
+
+ Google/Protobuf/Internal/MapField.php
+ Google/Protobuf/Internal/Message.php
+ Google/Protobuf/Internal/RepeatedField.php
+
+
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/.php_cs b/tests/php_test_files/vendor/guzzlehttp/guzzle/.php_cs
new file mode 100644
index 0000000..2dd5036
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/.php_cs
@@ -0,0 +1,23 @@
+setRiskyAllowed(true)
+ ->setRules([
+ '@PSR2' => true,
+ 'array_syntax' => ['syntax' => 'short'],
+ 'declare_strict_types' => false,
+ 'concat_space' => ['spacing'=>'one'],
+ 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
+ 'ordered_imports' => true,
+ // 'phpdoc_align' => ['align'=>'vertical'],
+ // 'native_function_invocation' => true,
+ ])
+ ->setFinder(
+ PhpCsFixer\Finder::create()
+ ->in(__DIR__.'/src')
+ ->in(__DIR__.'/tests')
+ ->name('*.php')
+ )
+;
+
+return $config;
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/CHANGELOG.md b/tests/php_test_files/vendor/guzzlehttp/guzzle/CHANGELOG.md
new file mode 100644
index 0000000..b053017
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/CHANGELOG.md
@@ -0,0 +1,1352 @@
+# Change Log
+
+## 6.5.8 - 2022-06-20
+
+* Fix change in port should be considered a change in origin
+* Fix `CURLOPT_HTTPAUTH` option not cleared on change of origin
+
+## 6.5.7 - 2022-06-09
+
+* Fix failure to strip Authorization header on HTTP downgrade
+* Fix failure to strip the Cookie header on change in host or HTTP downgrade
+
+## 6.5.6 - 2022-05-25
+
+* Fix cross-domain cookie leakage
+
+## 6.5.5 - 2020-06-16
+
+* Unpin version constraint for `symfony/polyfill-intl-idn` [#2678](https://github.com/guzzle/guzzle/pull/2678)
+
+## 6.5.4 - 2020-05-25
+
+* Fix various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626)
+
+## 6.5.3 - 2020-04-18
+
+* Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550)
+* Remove use of internal functions [#2548](https://github.com/guzzle/guzzle/pull/2548)
+
+## 6.5.2 - 2019-12-23
+
+* idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489)
+
+## 6.5.1 - 2019-12-21
+
+* Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454)
+* IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424)
+
+## 6.5.0 - 2019-12-07
+
+* Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143)
+* Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287)
+* Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132)
+* Fix: `RetryMiddleware` did not do exponential delay between retries due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
+ Previously, `RetryMiddleware` would sleep for 1 millisecond, then 2 milliseconds, then 4 milliseconds.
+ **After this change, `RetryMiddleware` will sleep for 1 second, then 2 seconds, then 4 seconds.**
+ `Middleware::retry()` accepts a second callback parameter to override the default timeouts if needed.
+* Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
+* Deprecated `ClientInterface::VERSION`
+
+## 6.4.1 - 2019-10-23
+
+* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
+* Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
+
+## 6.4.0 - 2019-10-23
+
+* Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108)
+* Fix: Test if response is readable before returning a summary in `RequestException::getResponseBodySummary()` [#2081](https://github.com/guzzle/guzzle/pull/2081)
+* Fix: Add support for GUZZLE_CURL_SELECT_TIMEOUT environment variable [#2161](https://github.com/guzzle/guzzle/pull/2161)
+* Improvement: Added `GuzzleHttp\Exception\InvalidArgumentException` [#2163](https://github.com/guzzle/guzzle/pull/2163)
+* Improvement: Added `GuzzleHttp\_current_time()` to use `hrtime()` if that function exists. [#2242](https://github.com/guzzle/guzzle/pull/2242)
+* Improvement: Added curl's `appconnect_time` in `TransferStats` [#2284](https://github.com/guzzle/guzzle/pull/2284)
+* Improvement: Make GuzzleException extend Throwable wherever it's available [#2273](https://github.com/guzzle/guzzle/pull/2273)
+* Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335)
+* Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362)
+
+## 6.3.3 - 2018-04-22
+
+* Fix: Default headers when decode_content is specified
+
+
+## 6.3.2 - 2018-03-26
+
+* Fix: Release process
+
+
+## 6.3.1 - 2018-03-26
+
+* Bug fix: Parsing 0 epoch expiry times in cookies [#2014](https://github.com/guzzle/guzzle/pull/2014)
+* Improvement: Better ConnectException detection [#2012](https://github.com/guzzle/guzzle/pull/2012)
+* Bug fix: Malformed domain that contains a "/" [#1999](https://github.com/guzzle/guzzle/pull/1999)
+* Bug fix: Undefined offset when a cookie has no first key-value pair [#1998](https://github.com/guzzle/guzzle/pull/1998)
+* Improvement: Support PHPUnit 6 [#1953](https://github.com/guzzle/guzzle/pull/1953)
+* Bug fix: Support empty headers [#1915](https://github.com/guzzle/guzzle/pull/1915)
+* Bug fix: Ignore case during header modifications [#1916](https://github.com/guzzle/guzzle/pull/1916)
+
++ Minor code cleanups, documentation fixes and clarifications.
+
+
+## 6.3.0 - 2017-06-22
+
+* Feature: force IP resolution (ipv4 or ipv6) [#1608](https://github.com/guzzle/guzzle/pull/1608), [#1659](https://github.com/guzzle/guzzle/pull/1659)
+* Improvement: Don't include summary in exception message when body is empty [#1621](https://github.com/guzzle/guzzle/pull/1621)
+* Improvement: Handle `on_headers` option in MockHandler [#1580](https://github.com/guzzle/guzzle/pull/1580)
+* Improvement: Added SUSE Linux CA path [#1609](https://github.com/guzzle/guzzle/issues/1609)
+* Improvement: Use class reference for getting the name of the class instead of using hardcoded strings [#1641](https://github.com/guzzle/guzzle/pull/1641)
+* Feature: Added `read_timeout` option [#1611](https://github.com/guzzle/guzzle/pull/1611)
+* Bug fix: PHP 7.x fixes [#1685](https://github.com/guzzle/guzzle/pull/1685), [#1686](https://github.com/guzzle/guzzle/pull/1686), [#1811](https://github.com/guzzle/guzzle/pull/1811)
+* Deprecation: BadResponseException instantiation without a response [#1642](https://github.com/guzzle/guzzle/pull/1642)
+* Feature: Added NTLM auth [#1569](https://github.com/guzzle/guzzle/pull/1569)
+* Feature: Track redirect HTTP status codes [#1711](https://github.com/guzzle/guzzle/pull/1711)
+* Improvement: Check handler type during construction [#1745](https://github.com/guzzle/guzzle/pull/1745)
+* Improvement: Always include the Content-Length if there's a body [#1721](https://github.com/guzzle/guzzle/pull/1721)
+* Feature: Added convenience method to access a cookie by name [#1318](https://github.com/guzzle/guzzle/pull/1318)
+* Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684)
+* Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827)
+
+
++ Minor code cleanups, documentation fixes and clarifications.
+
+## 6.2.3 - 2017-02-28
+
+* Fix deprecations with guzzle/psr7 version 1.4
+
+## 6.2.2 - 2016-10-08
+
+* Allow to pass nullable Response to delay callable
+* Only add scheme when host is present
+* Fix drain case where content-length is the literal string zero
+* Obfuscate in-URL credentials in exceptions
+
+## 6.2.1 - 2016-07-18
+
+* Address HTTP_PROXY security vulnerability, CVE-2016-5385:
+ https://httpoxy.org/
+* Fixing timeout bug with StreamHandler:
+ https://github.com/guzzle/guzzle/pull/1488
+* Only read up to `Content-Length` in PHP StreamHandler to avoid timeouts when
+ a server does not honor `Connection: close`.
+* Ignore URI fragment when sending requests.
+
+## 6.2.0 - 2016-03-21
+
+* Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`.
+ https://github.com/guzzle/guzzle/pull/1389
+* Bug fix: Fix sleep calculation when waiting for delayed requests.
+ https://github.com/guzzle/guzzle/pull/1324
+* Feature: More flexible history containers.
+ https://github.com/guzzle/guzzle/pull/1373
+* Bug fix: defer sink stream opening in StreamHandler.
+ https://github.com/guzzle/guzzle/pull/1377
+* Bug fix: do not attempt to escape cookie values.
+ https://github.com/guzzle/guzzle/pull/1406
+* Feature: report original content encoding and length on decoded responses.
+ https://github.com/guzzle/guzzle/pull/1409
+* Bug fix: rewind seekable request bodies before dispatching to cURL.
+ https://github.com/guzzle/guzzle/pull/1422
+* Bug fix: provide an empty string to `http_build_query` for HHVM workaround.
+ https://github.com/guzzle/guzzle/pull/1367
+
+## 6.1.1 - 2015-11-22
+
+* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler
+ https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4
+* Feature: HandlerStack is now more generic.
+ https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e
+* Bug fix: setting verify to false in the StreamHandler now disables peer
+ verification. https://github.com/guzzle/guzzle/issues/1256
+* Feature: Middleware now uses an exception factory, including more error
+ context. https://github.com/guzzle/guzzle/pull/1282
+* Feature: better support for disabled functions.
+ https://github.com/guzzle/guzzle/pull/1287
+* Bug fix: fixed regression where MockHandler was not using `sink`.
+ https://github.com/guzzle/guzzle/pull/1292
+
+## 6.1.0 - 2015-09-08
+
+* Feature: Added the `on_stats` request option to provide access to transfer
+ statistics for requests. https://github.com/guzzle/guzzle/pull/1202
+* Feature: Added the ability to persist session cookies in CookieJars.
+ https://github.com/guzzle/guzzle/pull/1195
+* Feature: Some compatibility updates for Google APP Engine
+ https://github.com/guzzle/guzzle/pull/1216
+* Feature: Added support for NO_PROXY to prevent the use of a proxy based on
+ a simple set of rules. https://github.com/guzzle/guzzle/pull/1197
+* Feature: Cookies can now contain square brackets.
+ https://github.com/guzzle/guzzle/pull/1237
+* Bug fix: Now correctly parsing `=` inside of quotes in Cookies.
+ https://github.com/guzzle/guzzle/pull/1232
+* Bug fix: Cusotm cURL options now correctly override curl options of the
+ same name. https://github.com/guzzle/guzzle/pull/1221
+* Bug fix: Content-Type header is now added when using an explicitly provided
+ multipart body. https://github.com/guzzle/guzzle/pull/1218
+* Bug fix: Now ignoring Set-Cookie headers that have no name.
+* Bug fix: Reason phrase is no longer cast to an int in some cases in the
+ cURL handler. https://github.com/guzzle/guzzle/pull/1187
+* Bug fix: Remove the Authorization header when redirecting if the Host
+ header changes. https://github.com/guzzle/guzzle/pull/1207
+* Bug fix: Cookie path matching fixes
+ https://github.com/guzzle/guzzle/issues/1129
+* Bug fix: Fixing the cURL `body_as_string` setting
+ https://github.com/guzzle/guzzle/pull/1201
+* Bug fix: quotes are no longer stripped when parsing cookies.
+ https://github.com/guzzle/guzzle/issues/1172
+* Bug fix: `form_params` and `query` now always uses the `&` separator.
+ https://github.com/guzzle/guzzle/pull/1163
+* Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set.
+ https://github.com/guzzle/guzzle/pull/1189
+
+## 6.0.2 - 2015-07-04
+
+* Fixed a memory leak in the curl handlers in which references to callbacks
+ were not being removed by `curl_reset`.
+* Cookies are now extracted properly before redirects.
+* Cookies now allow more character ranges.
+* Decoded Content-Encoding responses are now modified to correctly reflect
+ their state if the encoding was automatically removed by a handler. This
+ means that the `Content-Encoding` header may be removed an the
+ `Content-Length` modified to reflect the message size after removing the
+ encoding.
+* Added a more explicit error message when trying to use `form_params` and
+ `multipart` in the same request.
+* Several fixes for HHVM support.
+* Functions are now conditionally required using an additional level of
+ indirection to help with global Composer installations.
+
+## 6.0.1 - 2015-05-27
+
+* Fixed a bug with serializing the `query` request option where the `&`
+ separator was missing.
+* Added a better error message for when `body` is provided as an array. Please
+ use `form_params` or `multipart` instead.
+* Various doc fixes.
+
+## 6.0.0 - 2015-05-26
+
+* See the UPGRADING.md document for more information.
+* Added `multipart` and `form_params` request options.
+* Added `synchronous` request option.
+* Added the `on_headers` request option.
+* Fixed `expect` handling.
+* No longer adding default middlewares in the client ctor. These need to be
+ present on the provided handler in order to work.
+* Requests are no longer initiated when sending async requests with the
+ CurlMultiHandler. This prevents unexpected recursion from requests completing
+ while ticking the cURL loop.
+* Removed the semantics of setting `default` to `true`. This is no longer
+ required now that the cURL loop is not ticked for async requests.
+* Added request and response logging middleware.
+* No longer allowing self signed certificates when using the StreamHandler.
+* Ensuring that `sink` is valid if saving to a file.
+* Request exceptions now include a "handler context" which provides handler
+ specific contextual information.
+* Added `GuzzleHttp\RequestOptions` to allow request options to be applied
+ using constants.
+* `$maxHandles` has been removed from CurlMultiHandler.
+* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package.
+
+## 5.3.0 - 2015-05-19
+
+* Mock now supports `save_to`
+* Marked `AbstractRequestEvent::getTransaction()` as public.
+* Fixed a bug in which multiple headers using different casing would overwrite
+ previous headers in the associative array.
+* Added `Utils::getDefaultHandler()`
+* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated.
+* URL scheme is now always lowercased.
+
+## 6.0.0-beta.1
+
+* Requires PHP >= 5.5
+* Updated to use PSR-7
+ * Requires immutable messages, which basically means an event based system
+ owned by a request instance is no longer possible.
+ * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7).
+ * Removed the dependency on `guzzlehttp/streams`. These stream abstractions
+ are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7`
+ namespace.
+* Added middleware and handler system
+ * Replaced the Guzzle event and subscriber system with a middleware system.
+ * No longer depends on RingPHP, but rather places the HTTP handlers directly
+ in Guzzle, operating on PSR-7 messages.
+ * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which
+ means the `guzzlehttp/retry-subscriber` is now obsolete.
+ * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`.
+* Asynchronous responses
+ * No longer supports the `future` request option to send an async request.
+ Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`,
+ `getAsync`, etc.).
+ * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid
+ recursion required by chaining and forwarding react promises. See
+ https://github.com/guzzle/promises
+ * Added `requestAsync` and `sendAsync` to send request asynchronously.
+ * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests
+ asynchronously.
+* Request options
+ * POST and form updates
+ * Added the `form_fields` and `form_files` request options.
+ * Removed the `GuzzleHttp\Post` namespace.
+ * The `body` request option no longer accepts an array for POST requests.
+ * The `exceptions` request option has been deprecated in favor of the
+ `http_errors` request options.
+ * The `save_to` request option has been deprecated in favor of `sink` request
+ option.
+* Clients no longer accept an array of URI template string and variables for
+ URI variables. You will need to expand URI templates before passing them
+ into a client constructor or request method.
+* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are
+ now magic methods that will send synchronous requests.
+* Replaced `Utils.php` with plain functions in `functions.php`.
+* Removed `GuzzleHttp\Collection`.
+* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as
+ an array.
+* Removed `GuzzleHttp\Query`. Query string handling is now handled using an
+ associative array passed into the `query` request option. The query string
+ is serialized using PHP's `http_build_query`. If you need more control, you
+ can pass the query string in as a string.
+* `GuzzleHttp\QueryParser` has been replaced with the
+ `GuzzleHttp\Psr7\parse_query`.
+
+## 5.2.0 - 2015-01-27
+
+* Added `AppliesHeadersInterface` to make applying headers to a request based
+ on the body more generic and not specific to `PostBodyInterface`.
+* Reduced the number of stack frames needed to send requests.
+* Nested futures are now resolved in the client rather than the RequestFsm
+* Finishing state transitions is now handled in the RequestFsm rather than the
+ RingBridge.
+* Added a guard in the Pool class to not use recursion for request retries.
+
+## 5.1.0 - 2014-12-19
+
+* Pool class no longer uses recursion when a request is intercepted.
+* The size of a Pool can now be dynamically adjusted using a callback.
+ See https://github.com/guzzle/guzzle/pull/943.
+* Setting a request option to `null` when creating a request with a client will
+ ensure that the option is not set. This allows you to overwrite default
+ request options on a per-request basis.
+ See https://github.com/guzzle/guzzle/pull/937.
+* Added the ability to limit which protocols are allowed for redirects by
+ specifying a `protocols` array in the `allow_redirects` request option.
+* Nested futures due to retries are now resolved when waiting for synchronous
+ responses. See https://github.com/guzzle/guzzle/pull/947.
+* `"0"` is now an allowed URI path. See
+ https://github.com/guzzle/guzzle/pull/935.
+* `Query` no longer typehints on the `$query` argument in the constructor,
+ allowing for strings and arrays.
+* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle
+ specific exceptions if necessary.
+
+## 5.0.3 - 2014-11-03
+
+This change updates query strings so that they are treated as un-encoded values
+by default where the value represents an un-encoded value to send over the
+wire. A Query object then encodes the value before sending over the wire. This
+means that even value query string values (e.g., ":") are url encoded. This
+makes the Query class match PHP's http_build_query function. However, if you
+want to send requests over the wire using valid query string characters that do
+not need to be encoded, then you can provide a string to Url::setQuery() and
+pass true as the second argument to specify that the query string is a raw
+string that should not be parsed or encoded (unless a call to getQuery() is
+subsequently made, forcing the query-string to be converted into a Query
+object).
+
+## 5.0.2 - 2014-10-30
+
+* Added a trailing `\r\n` to multipart/form-data payloads. See
+ https://github.com/guzzle/guzzle/pull/871
+* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs.
+* Status codes are now returned as integers. See
+ https://github.com/guzzle/guzzle/issues/881
+* No longer overwriting an existing `application/x-www-form-urlencoded` header
+ when sending POST requests, allowing for customized headers. See
+ https://github.com/guzzle/guzzle/issues/877
+* Improved path URL serialization.
+
+ * No longer double percent-encoding characters in the path or query string if
+ they are already encoded.
+ * Now properly encoding the supplied path to a URL object, instead of only
+ encoding ' ' and '?'.
+ * Note: This has been changed in 5.0.3 to now encode query string values by
+ default unless the `rawString` argument is provided when setting the query
+ string on a URL: Now allowing many more characters to be present in the
+ query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A
+
+## 5.0.1 - 2014-10-16
+
+Bugfix release.
+
+* Fixed an issue where connection errors still returned response object in
+ error and end events event though the response is unusable. This has been
+ corrected so that a response is not returned in the `getResponse` method of
+ these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867
+* Fixed an issue where transfer statistics were not being populated in the
+ RingBridge. https://github.com/guzzle/guzzle/issues/866
+
+## 5.0.0 - 2014-10-12
+
+Adding support for non-blocking responses and some minor API cleanup.
+
+### New Features
+
+* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`.
+* Added a public API for creating a default HTTP adapter.
+* Updated the redirect plugin to be non-blocking so that redirects are sent
+ concurrently. Other plugins like this can now be updated to be non-blocking.
+* Added a "progress" event so that you can get upload and download progress
+ events.
+* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers
+ requests concurrently using a capped pool size as efficiently as possible.
+* Added `hasListeners()` to EmitterInterface.
+* Removed `GuzzleHttp\ClientInterface::sendAll` and marked
+ `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the
+ recommended way).
+
+### Breaking changes
+
+The breaking changes in this release are relatively minor. The biggest thing to
+look out for is that request and response objects no longer implement fluent
+interfaces.
+
+* Removed the fluent interfaces (i.e., `return $this`) from requests,
+ responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
+ `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
+ `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
+ why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
+ This also makes the Guzzle message interfaces compatible with the current
+ PSR-7 message proposal.
+* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
+ for the HTTP request functions from function.php, these functions are now
+ implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode`
+ moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to
+ `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to
+ `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be
+ `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php
+ caused problems for many users: they aren't PSR-4 compliant, require an
+ explicit include, and needed an if-guard to ensure that the functions are not
+ declared multiple times.
+* Rewrote adapter layer.
+ * Removing all classes from `GuzzleHttp\Adapter`, these are now
+ implemented as callables that are stored in `GuzzleHttp\Ring\Client`.
+ * Removed the concept of "parallel adapters". Sending requests serially or
+ concurrently is now handled using a single adapter.
+ * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The
+ Transaction object now exposes the request, response, and client as public
+ properties. The getters and setters have been removed.
+* Removed the "headers" event. This event was only useful for changing the
+ body a response once the headers of the response were known. You can implement
+ a similar behavior in a number of ways. One example might be to use a
+ FnStream that has access to the transaction being sent. For example, when the
+ first byte is written, you could check if the response headers match your
+ expectations, and if so, change the actual stream body that is being
+ written to.
+* Removed the `asArray` parameter from
+ `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
+ value as an array, then use the newly added `getHeaderAsArray()` method of
+ `MessageInterface`. This change makes the Guzzle interfaces compatible with
+ the PSR-7 interfaces.
+* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add
+ custom request options using double-dispatch (this was an implementation
+ detail). Instead, you should now provide an associative array to the
+ constructor which is a mapping of the request option name mapping to a
+ function that applies the option value to a request.
+* Removed the concept of "throwImmediately" from exceptions and error events.
+ This control mechanism was used to stop a transfer of concurrent requests
+ from completing. This can now be handled by throwing the exception or by
+ cancelling a pool of requests or each outstanding future request individually.
+* Updated to "GuzzleHttp\Streams" 3.0.
+ * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a
+ `maxLen` parameter. This update makes the Guzzle streams project
+ compatible with the current PSR-7 proposal.
+ * `GuzzleHttp\Stream\Stream::__construct`,
+ `GuzzleHttp\Stream\Stream::factory`, and
+ `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second
+ argument. They now accept an associative array of options, including the
+ "size" key and "metadata" key which can be used to provide custom metadata.
+
+## 4.2.2 - 2014-09-08
+
+* Fixed a memory leak in the CurlAdapter when reusing cURL handles.
+* No longer using `request_fulluri` in stream adapter proxies.
+* Relative redirects are now based on the last response, not the first response.
+
+## 4.2.1 - 2014-08-19
+
+* Ensuring that the StreamAdapter does not always add a Content-Type header
+* Adding automated github releases with a phar and zip
+
+## 4.2.0 - 2014-08-17
+
+* Now merging in default options using a case-insensitive comparison.
+ Closes https://github.com/guzzle/guzzle/issues/767
+* Added the ability to automatically decode `Content-Encoding` response bodies
+ using the `decode_content` request option. This is set to `true` by default
+ to decode the response body if it comes over the wire with a
+ `Content-Encoding`. Set this value to `false` to disable decoding the
+ response content, and pass a string to provide a request `Accept-Encoding`
+ header and turn on automatic response decoding. This feature now allows you
+ to pass an `Accept-Encoding` header in the headers of a request but still
+ disable automatic response decoding.
+ Closes https://github.com/guzzle/guzzle/issues/764
+* Added the ability to throw an exception immediately when transferring
+ requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760
+* Updating guzzlehttp/streams dependency to ~2.1
+* No longer utilizing the now deprecated namespaced methods from the stream
+ package.
+
+## 4.1.8 - 2014-08-14
+
+* Fixed an issue in the CurlFactory that caused setting the `stream=false`
+ request option to throw an exception.
+ See: https://github.com/guzzle/guzzle/issues/769
+* TransactionIterator now calls rewind on the inner iterator.
+ See: https://github.com/guzzle/guzzle/pull/765
+* You can now set the `Content-Type` header to `multipart/form-data`
+ when creating POST requests to force multipart bodies.
+ See https://github.com/guzzle/guzzle/issues/768
+
+## 4.1.7 - 2014-08-07
+
+* Fixed an error in the HistoryPlugin that caused the same request and response
+ to be logged multiple times when an HTTP protocol error occurs.
+* Ensuring that cURL does not add a default Content-Type when no Content-Type
+ has been supplied by the user. This prevents the adapter layer from modifying
+ the request that is sent over the wire after any listeners may have already
+ put the request in a desired state (e.g., signed the request).
+* Throwing an exception when you attempt to send requests that have the
+ "stream" set to true in parallel using the MultiAdapter.
+* Only calling curl_multi_select when there are active cURL handles. This was
+ previously changed and caused performance problems on some systems due to PHP
+ always selecting until the maximum select timeout.
+* Fixed a bug where multipart/form-data POST fields were not correctly
+ aggregated (e.g., values with "&").
+
+## 4.1.6 - 2014-08-03
+
+* Added helper methods to make it easier to represent messages as strings,
+ including getting the start line and getting headers as a string.
+
+## 4.1.5 - 2014-08-02
+
+* Automatically retrying cURL "Connection died, retrying a fresh connect"
+ errors when possible.
+* cURL implementation cleanup
+* Allowing multiple event subscriber listeners to be registered per event by
+ passing an array of arrays of listener configuration.
+
+## 4.1.4 - 2014-07-22
+
+* Fixed a bug that caused multi-part POST requests with more than one field to
+ serialize incorrectly.
+* Paths can now be set to "0"
+* `ResponseInterface::xml` now accepts a `libxml_options` option and added a
+ missing default argument that was required when parsing XML response bodies.
+* A `save_to` stream is now created lazily, which means that files are not
+ created on disk unless a request succeeds.
+
+## 4.1.3 - 2014-07-15
+
+* Various fixes to multipart/form-data POST uploads
+* Wrapping function.php in an if-statement to ensure Guzzle can be used
+ globally and in a Composer install
+* Fixed an issue with generating and merging in events to an event array
+* POST headers are only applied before sending a request to allow you to change
+ the query aggregator used before uploading
+* Added much more robust query string parsing
+* Fixed various parsing and normalization issues with URLs
+* Fixing an issue where multi-valued headers were not being utilized correctly
+ in the StreamAdapter
+
+## 4.1.2 - 2014-06-18
+
+* Added support for sending payloads with GET requests
+
+## 4.1.1 - 2014-06-08
+
+* Fixed an issue related to using custom message factory options in subclasses
+* Fixed an issue with nested form fields in a multi-part POST
+* Fixed an issue with using the `json` request option for POST requests
+* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar`
+
+## 4.1.0 - 2014-05-27
+
+* Added a `json` request option to easily serialize JSON payloads.
+* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON.
+* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`.
+* Added the ability to provide an emitter to a client in the client constructor.
+* Added the ability to persist a cookie session using $_SESSION.
+* Added a trait that can be used to add event listeners to an iterator.
+* Removed request method constants from RequestInterface.
+* Fixed warning when invalid request start-lines are received.
+* Updated MessageFactory to work with custom request option methods.
+* Updated cacert bundle to latest build.
+
+4.0.2 (2014-04-16)
+------------------
+
+* Proxy requests using the StreamAdapter now properly use request_fulluri (#632)
+* Added the ability to set scalars as POST fields (#628)
+
+## 4.0.1 - 2014-04-04
+
+* The HTTP status code of a response is now set as the exception code of
+ RequestException objects.
+* 303 redirects will now correctly switch from POST to GET requests.
+* The default parallel adapter of a client now correctly uses the MultiAdapter.
+* HasDataTrait now initializes the internal data array as an empty array so
+ that the toArray() method always returns an array.
+
+## 4.0.0 - 2014-03-29
+
+* For more information on the 4.0 transition, see:
+ http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/
+* For information on changes and upgrading, see:
+ https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
+* Added `GuzzleHttp\batch()` as a convenience function for sending requests in
+ parallel without needing to write asynchronous code.
+* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`.
+ You can now pass a callable or an array of associative arrays where each
+ associative array contains the "fn", "priority", and "once" keys.
+
+## 4.0.0.rc-2 - 2014-03-25
+
+* Removed `getConfig()` and `setConfig()` from clients to avoid confusion
+ around whether things like base_url, message_factory, etc. should be able to
+ be retrieved or modified.
+* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface
+* functions.php functions were renamed using snake_case to match PHP idioms
+* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and
+ `GUZZLE_CURL_SELECT_TIMEOUT` environment variables
+* Added the ability to specify custom `sendAll()` event priorities
+* Added the ability to specify custom stream context options to the stream
+ adapter.
+* Added a functions.php function for `get_path()` and `set_path()`
+* CurlAdapter and MultiAdapter now use a callable to generate curl resources
+* MockAdapter now properly reads a body and emits a `headers` event
+* Updated Url class to check if a scheme and host are set before adding ":"
+ and "//". This allows empty Url (e.g., "") to be serialized as "".
+* Parsing invalid XML no longer emits warnings
+* Curl classes now properly throw AdapterExceptions
+* Various performance optimizations
+* Streams are created with the faster `Stream\create()` function
+* Marked deprecation_proxy() as internal
+* Test server is now a collection of static methods on a class
+
+## 4.0.0-rc.1 - 2014-03-15
+
+* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
+
+## 3.8.1 - 2014-01-28
+
+* Bug: Always using GET requests when redirecting from a 303 response
+* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in
+ `Guzzle\Http\ClientInterface::setSslVerification()`
+* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL
+* Bug: The body of a request can now be set to `"0"`
+* Sending PHP stream requests no longer forces `HTTP/1.0`
+* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of
+ each sub-exception
+* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than
+ clobbering everything).
+* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators)
+* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`.
+ For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`.
+* Now properly escaping the regular expression delimiter when matching Cookie domains.
+* Network access is now disabled when loading XML documents
+
+## 3.8.0 - 2013-12-05
+
+* Added the ability to define a POST name for a file
+* JSON response parsing now properly walks additionalProperties
+* cURL error code 18 is now retried automatically in the BackoffPlugin
+* Fixed a cURL error when URLs contain fragments
+* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were
+ CurlExceptions
+* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e)
+* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS`
+* Fixed a bug that was encountered when parsing empty header parameters
+* UriTemplate now has a `setRegex()` method to match the docs
+* The `debug` request parameter now checks if it is truthy rather than if it exists
+* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin
+* Added the ability to combine URLs using strict RFC 3986 compliance
+* Command objects can now return the validation errors encountered by the command
+* Various fixes to cache revalidation (#437 and 29797e5)
+* Various fixes to the AsyncPlugin
+* Cleaned up build scripts
+
+## 3.7.4 - 2013-10-02
+
+* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430)
+* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp
+ (see https://github.com/aws/aws-sdk-php/issues/147)
+* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots
+* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420)
+* Updated the bundled cacert.pem (#419)
+* OauthPlugin now supports adding authentication to headers or query string (#425)
+
+## 3.7.3 - 2013-09-08
+
+* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and
+ `CommandTransferException`.
+* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description
+* Schemas are only injected into response models when explicitly configured.
+* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of
+ an EntityBody.
+* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator.
+* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`.
+* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody()
+* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin
+* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests
+* Bug fix: Properly parsing headers that contain commas contained in quotes
+* Bug fix: mimetype guessing based on a filename is now case-insensitive
+
+## 3.7.2 - 2013-08-02
+
+* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander
+ See https://github.com/guzzle/guzzle/issues/371
+* Bug fix: Cookie domains are now matched correctly according to RFC 6265
+ See https://github.com/guzzle/guzzle/issues/377
+* Bug fix: GET parameters are now used when calculating an OAuth signature
+* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted
+* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched
+* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input.
+ See https://github.com/guzzle/guzzle/issues/379
+* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See
+ https://github.com/guzzle/guzzle/pull/380
+* cURL multi cleanup and optimizations
+
+## 3.7.1 - 2013-07-05
+
+* Bug fix: Setting default options on a client now works
+* Bug fix: Setting options on HEAD requests now works. See #352
+* Bug fix: Moving stream factory before send event to before building the stream. See #353
+* Bug fix: Cookies no longer match on IP addresses per RFC 6265
+* Bug fix: Correctly parsing header parameters that are in `<>` and quotes
+* Added `cert` and `ssl_key` as request options
+* `Host` header can now diverge from the host part of a URL if the header is set manually
+* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter
+* OAuth parameters are only added via the plugin if they aren't already set
+* Exceptions are now thrown when a URL cannot be parsed
+* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails
+* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin
+
+## 3.7.0 - 2013-06-10
+
+* See UPGRADING.md for more information on how to upgrade.
+* Requests now support the ability to specify an array of $options when creating a request to more easily modify a
+ request. You can pass a 'request.options' configuration setting to a client to apply default request options to
+ every request created by a client (e.g. default query string variables, headers, curl options, etc.).
+* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`.
+ See `Guzzle\Http\StaticClient::mount`.
+* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests
+ created by a command (e.g. custom headers, query string variables, timeout settings, etc.).
+* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the
+ headers of a response
+* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key
+ (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`)
+* ServiceBuilders now support storing and retrieving arbitrary data
+* CachePlugin can now purge all resources for a given URI
+* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource
+* CachePlugin now uses the Vary header to determine if a resource is a cache hit
+* `Guzzle\Http\Message\Response` now implements `\Serializable`
+* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters
+* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable
+* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()`
+* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size
+* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message
+* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older
+ Symfony users can still use the old version of Monolog.
+* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`.
+ Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`.
+* Several performance improvements to `Guzzle\Common\Collection`
+* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`:
+ createRequest, head, delete, put, patch, post, options, prepareRequest
+* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()`
+* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface`
+* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to
+ `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a
+ resource, string, or EntityBody into the $options parameter to specify the download location of the response.
+* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a
+ default `array()`
+* Added `Guzzle\Stream\StreamInterface::isRepeatable`
+* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use
+ $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or
+ $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`.
+* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`.
+* Removed `Guzzle\Http\ClientInterface::expandTemplate()`
+* Removed `Guzzle\Http\ClientInterface::setRequestFactory()`
+* Removed `Guzzle\Http\ClientInterface::getCurlMulti()`
+* Removed `Guzzle\Http\Message\RequestInterface::canCache`
+* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`
+* Removed `Guzzle\Http\Message\RequestInterface::isRedirect`
+* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods.
+* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting
+ `Guzzle\Common\Version::$emitWarnings` to true.
+* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use
+ `$request->getResponseBody()->isRepeatable()` instead.
+* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use
+ `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
+* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use
+ `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
+* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead.
+* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead.
+* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated
+* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand.
+ These will work through Guzzle 4.0
+* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params].
+* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client.
+* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`.
+* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`.
+* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8.
+* Marked `Guzzle\Common\Collection::inject()` as deprecated.
+* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');`
+* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a
+ CacheStorageInterface. These two objects and interface will be removed in a future version.
+* Always setting X-cache headers on cached responses
+* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin
+* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface
+ $request, Response $response);`
+* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);`
+* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);`
+* Added `CacheStorageInterface::purge($url)`
+* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin
+ $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache,
+ CanCacheStrategyInterface $canCache = null)`
+* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
+
+## 3.6.0 - 2013-05-29
+
+* ServiceDescription now implements ToArrayInterface
+* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters
+* Guzzle can now correctly parse incomplete URLs
+* Mixed casing of headers are now forced to be a single consistent casing across all values for that header.
+* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution
+* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader().
+* Specific header implementations can be created for complex headers. When a message creates a header, it uses a
+ HeaderFactory which can map specific headers to specific header classes. There is now a Link header and
+ CacheControl header implementation.
+* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate
+* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti()
+* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in
+ Guzzle\Http\Curl\RequestMediator
+* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string.
+* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface
+* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders()
+* Removed Guzzle\Parser\ParserRegister::get(). Use getParser()
+* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser().
+* All response header helper functions return a string rather than mixing Header objects and strings inconsistently
+* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle
+ directly via interfaces
+* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
+ but are a no-op until removed.
+* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a
+ `Guzzle\Service\Command\ArrayCommandInterface`.
+* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
+ on a request while the request is still being transferred
+* The ability to case-insensitively search for header values
+* Guzzle\Http\Message\Header::hasExactHeader
+* Guzzle\Http\Message\Header::raw. Use getAll()
+* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object
+ instead.
+* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
+* Added the ability to cast Model objects to a string to view debug information.
+
+## 3.5.0 - 2013-05-13
+
+* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times
+* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove
+ itself from the EventDispatcher)
+* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values
+* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too
+* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a
+ non-existent key
+* Bug: All __call() method arguments are now required (helps with mocking frameworks)
+* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference
+ to help with refcount based garbage collection of resources created by sending a request
+* Deprecating ZF1 cache and log adapters. These will be removed in the next major version.
+* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the
+ HistoryPlugin for a history.
+* Added a `responseBody` alias for the `response_body` location
+* Refactored internals to no longer rely on Response::getRequest()
+* HistoryPlugin can now be cast to a string
+* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests
+ and responses that are sent over the wire
+* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects
+
+## 3.4.3 - 2013-04-30
+
+* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response
+* Added a check to re-extract the temp cacert bundle from the phar before sending each request
+
+## 3.4.2 - 2013-04-29
+
+* Bug fix: Stream objects now work correctly with "a" and "a+" modes
+* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present
+* Bug fix: AsyncPlugin no longer forces HEAD requests
+* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter
+* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails
+* Setting a response on a request will write to the custom request body from the response body if one is specified
+* LogPlugin now writes to php://output when STDERR is undefined
+* Added the ability to set multiple POST files for the same key in a single call
+* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default
+* Added the ability to queue CurlExceptions to the MockPlugin
+* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send)
+* Configuration loading now allows remote files
+
+## 3.4.1 - 2013-04-16
+
+* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti
+ handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost.
+* Exceptions are now properly grouped when sending requests in parallel
+* Redirects are now properly aggregated when a multi transaction fails
+* Redirects now set the response on the original object even in the event of a failure
+* Bug fix: Model names are now properly set even when using $refs
+* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax
+* Added support for oauth_callback in OAuth signatures
+* Added support for oauth_verifier in OAuth signatures
+* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection
+
+## 3.4.0 - 2013-04-11
+
+* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289
+* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
+* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263
+* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264.
+* Bug fix: Added `number` type to service descriptions.
+* Bug fix: empty parameters are removed from an OAuth signature
+* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header
+* Bug fix: Fixed "array to string" error when validating a union of types in a service description
+* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream
+* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin.
+* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs.
+* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections.
+* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if
+ the Content-Type can be determined based on the entity body or the path of the request.
+* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder.
+* Added support for a PSR-3 LogAdapter.
+* Added a `command.after_prepare` event
+* Added `oauth_callback` parameter to the OauthPlugin
+* Added the ability to create a custom stream class when using a stream factory
+* Added a CachingEntityBody decorator
+* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized.
+* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar.
+* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies
+* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This
+ means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use
+ POST fields or files (the latter is only used when emulating a form POST in the browser).
+* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest
+
+## 3.3.1 - 2013-03-10
+
+* Added the ability to create PHP streaming responses from HTTP requests
+* Bug fix: Running any filters when parsing response headers with service descriptions
+* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing
+* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across
+ response location visitors.
+* Bug fix: Removed the possibility of creating configuration files with circular dependencies
+* RequestFactory::create() now uses the key of a POST file when setting the POST file name
+* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set
+
+## 3.3.0 - 2013-03-03
+
+* A large number of performance optimizations have been made
+* Bug fix: Added 'wb' as a valid write mode for streams
+* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned
+* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()`
+* BC: Removed `Guzzle\Http\Utils` class
+* BC: Setting a service description on a client will no longer modify the client's command factories.
+* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using
+ the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io'
+* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to
+ lowercase
+* Operation parameter objects are now lazy loaded internally
+* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses
+* Added support for instantiating responseType=class responseClass classes. Classes must implement
+ `Guzzle\Service\Command\ResponseClassInterface`
+* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These
+ additional properties also support locations and can be used to parse JSON responses where the outermost part of the
+ JSON is an array
+* Added support for nested renaming of JSON models (rename sentAs to name)
+* CachePlugin
+ * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error
+ * Debug headers can now added to cached response in the CachePlugin
+
+## 3.2.0 - 2013-02-14
+
+* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients.
+* URLs with no path no longer contain a "/" by default
+* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url.
+* BadResponseException no longer includes the full request and response message
+* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface
+* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface
+* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription
+* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list
+* xmlEncoding can now be customized for the XML declaration of a XML service description operation
+* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value
+ aggregation and no longer uses callbacks
+* The URL encoding implementation of Guzzle\Http\QueryString can now be customized
+* Bug fix: Filters were not always invoked for array service description parameters
+* Bug fix: Redirects now use a target response body rather than a temporary response body
+* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded
+* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives
+
+## 3.1.2 - 2013-01-27
+
+* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the
+ response body. For example, the XmlVisitor now parses the XML response into an array in the before() method.
+* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent
+* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444)
+* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse()
+* Setting default headers on a client after setting the user-agent will not erase the user-agent setting
+
+## 3.1.1 - 2013-01-20
+
+* Adding wildcard support to Guzzle\Common\Collection::getPath()
+* Adding alias support to ServiceBuilder configs
+* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface
+
+## 3.1.0 - 2013-01-12
+
+* BC: CurlException now extends from RequestException rather than BadResponseException
+* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse()
+* Added getData to ServiceDescriptionInterface
+* Added context array to RequestInterface::setState()
+* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http
+* Bug: Adding required content-type when JSON request visitor adds JSON to a command
+* Bug: Fixing the serialization of a service description with custom data
+* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing
+ an array of successful and failed responses
+* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection
+* Added Guzzle\Http\IoEmittingEntityBody
+* Moved command filtration from validators to location visitors
+* Added `extends` attributes to service description parameters
+* Added getModels to ServiceDescriptionInterface
+
+## 3.0.7 - 2012-12-19
+
+* Fixing phar detection when forcing a cacert to system if null or true
+* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()`
+* Cleaning up `Guzzle\Common\Collection::inject` method
+* Adding a response_body location to service descriptions
+
+## 3.0.6 - 2012-12-09
+
+* CurlMulti performance improvements
+* Adding setErrorResponses() to Operation
+* composer.json tweaks
+
+## 3.0.5 - 2012-11-18
+
+* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin
+* Bug: Response body can now be a string containing "0"
+* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert
+* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs
+* Added support for XML attributes in service description responses
+* DefaultRequestSerializer now supports array URI parameter values for URI template expansion
+* Added better mimetype guessing to requests and post files
+
+## 3.0.4 - 2012-11-11
+
+* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value
+* Bug: Cookies can now be added that have a name, domain, or value set to "0"
+* Bug: Using the system cacert bundle when using the Phar
+* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures
+* Enhanced cookie jar de-duplication
+* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added
+* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies
+* Added the ability to create any sort of hash for a stream rather than just an MD5 hash
+
+## 3.0.3 - 2012-11-04
+
+* Implementing redirects in PHP rather than cURL
+* Added PECL URI template extension and using as default parser if available
+* Bug: Fixed Content-Length parsing of Response factory
+* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams.
+* Adding ToArrayInterface throughout library
+* Fixing OauthPlugin to create unique nonce values per request
+
+## 3.0.2 - 2012-10-25
+
+* Magic methods are enabled by default on clients
+* Magic methods return the result of a command
+* Service clients no longer require a base_url option in the factory
+* Bug: Fixed an issue with URI templates where null template variables were being expanded
+
+## 3.0.1 - 2012-10-22
+
+* Models can now be used like regular collection objects by calling filter, map, etc.
+* Models no longer require a Parameter structure or initial data in the constructor
+* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator`
+
+## 3.0.0 - 2012-10-15
+
+* Rewrote service description format to be based on Swagger
+ * Now based on JSON schema
+ * Added nested input structures and nested response models
+ * Support for JSON and XML input and output models
+ * Renamed `commands` to `operations`
+ * Removed dot class notation
+ * Removed custom types
+* Broke the project into smaller top-level namespaces to be more component friendly
+* Removed support for XML configs and descriptions. Use arrays or JSON files.
+* Removed the Validation component and Inspector
+* Moved all cookie code to Guzzle\Plugin\Cookie
+* Magic methods on a Guzzle\Service\Client now return the command un-executed.
+* Calling getResult() or getResponse() on a command will lazily execute the command if needed.
+* Now shipping with cURL's CA certs and using it by default
+* Added previousResponse() method to response objects
+* No longer sending Accept and Accept-Encoding headers on every request
+* Only sending an Expect header by default when a payload is greater than 1MB
+* Added/moved client options:
+ * curl.blacklist to curl.option.blacklist
+ * Added ssl.certificate_authority
+* Added a Guzzle\Iterator component
+* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin
+* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin)
+* Added a more robust caching plugin
+* Added setBody to response objects
+* Updating LogPlugin to use a more flexible MessageFormatter
+* Added a completely revamped build process
+* Cleaning up Collection class and removing default values from the get method
+* Fixed ZF2 cache adapters
+
+## 2.8.8 - 2012-10-15
+
+* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did
+
+## 2.8.7 - 2012-09-30
+
+* Bug: Fixed config file aliases for JSON includes
+* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests
+* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload
+* Bug: Hardening request and response parsing to account for missing parts
+* Bug: Fixed PEAR packaging
+* Bug: Fixed Request::getInfo
+* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail
+* Adding the ability for the namespace Iterator factory to look in multiple directories
+* Added more getters/setters/removers from service descriptions
+* Added the ability to remove POST fields from OAuth signatures
+* OAuth plugin now supports 2-legged OAuth
+
+## 2.8.6 - 2012-09-05
+
+* Added the ability to modify and build service descriptions
+* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command
+* Added a `json` parameter location
+* Now allowing dot notation for classes in the CacheAdapterFactory
+* Using the union of two arrays rather than an array_merge when extending service builder services and service params
+* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references
+ in service builder config files.
+* Services defined in two different config files that include one another will by default replace the previously
+ defined service, but you can now create services that extend themselves and merge their settings over the previous
+* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like
+ '_default' with a default JSON configuration file.
+
+## 2.8.5 - 2012-08-29
+
+* Bug: Suppressed empty arrays from URI templates
+* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching
+* Added support for HTTP responses that do not contain a reason phrase in the start-line
+* AbstractCommand commands are now invokable
+* Added a way to get the data used when signing an Oauth request before a request is sent
+
+## 2.8.4 - 2012-08-15
+
+* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin
+* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable.
+* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream
+* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream
+* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5())
+* Added additional response status codes
+* Removed SSL information from the default User-Agent header
+* DELETE requests can now send an entity body
+* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries
+* Added the ability of the MockPlugin to consume mocked request bodies
+* LogPlugin now exposes request and response objects in the extras array
+
+## 2.8.3 - 2012-07-30
+
+* Bug: Fixed a case where empty POST requests were sent as GET requests
+* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body
+* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new
+* Added multiple inheritance to service description commands
+* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()`
+* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything
+* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles
+
+## 2.8.2 - 2012-07-24
+
+* Bug: Query string values set to 0 are no longer dropped from the query string
+* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()`
+* Bug: `+` is now treated as an encoded space when parsing query strings
+* QueryString and Collection performance improvements
+* Allowing dot notation for class paths in filters attribute of a service descriptions
+
+## 2.8.1 - 2012-07-16
+
+* Loosening Event Dispatcher dependency
+* POST redirects can now be customized using CURLOPT_POSTREDIR
+
+## 2.8.0 - 2012-07-15
+
+* BC: Guzzle\Http\Query
+ * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl)
+ * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding()
+ * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool)
+ * Changed the aggregation functions of QueryString to be static methods
+ * Can now use fromString() with querystrings that have a leading ?
+* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters
+* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body
+* Cookies are no longer URL decoded by default
+* Bug: URI template variables set to null are no longer expanded
+
+## 2.7.2 - 2012-07-02
+
+* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser.
+* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty()
+* CachePlugin now allows for a custom request parameter function to check if a request can be cached
+* Bug fix: CachePlugin now only caches GET and HEAD requests by default
+* Bug fix: Using header glue when transferring headers over the wire
+* Allowing deeply nested arrays for composite variables in URI templates
+* Batch divisors can now return iterators or arrays
+
+## 2.7.1 - 2012-06-26
+
+* Minor patch to update version number in UA string
+* Updating build process
+
+## 2.7.0 - 2012-06-25
+
+* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes.
+* BC: Removed magic setX methods from commands
+* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method
+* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable.
+* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity)
+* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace
+* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin
+* Added the ability to set POST fields and files in a service description
+* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method
+* Adding a command.before_prepare event to clients
+* Added BatchClosureTransfer and BatchClosureDivisor
+* BatchTransferException now includes references to the batch divisor and transfer strategies
+* Fixed some tests so that they pass more reliably
+* Added Guzzle\Common\Log\ArrayLogAdapter
+
+## 2.6.6 - 2012-06-10
+
+* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin
+* BC: Removing Guzzle\Service\Command\CommandSet
+* Adding generic batching system (replaces the batch queue plugin and command set)
+* Updating ZF cache and log adapters and now using ZF's composer repository
+* Bug: Setting the name of each ApiParam when creating through an ApiCommand
+* Adding result_type, result_doc, deprecated, and doc_url to service descriptions
+* Bug: Changed the default cookie header casing back to 'Cookie'
+
+## 2.6.5 - 2012-06-03
+
+* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource()
+* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from
+* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data
+* BC: Renaming methods in the CookieJarInterface
+* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations
+* Making the default glue for HTTP headers ';' instead of ','
+* Adding a removeValue to Guzzle\Http\Message\Header
+* Adding getCookies() to request interface.
+* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber()
+
+## 2.6.4 - 2012-05-30
+
+* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class.
+* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand
+* Bug: Fixing magic method command calls on clients
+* Bug: Email constraint only validates strings
+* Bug: Aggregate POST fields when POST files are present in curl handle
+* Bug: Fixing default User-Agent header
+* Bug: Only appending or prepending parameters in commands if they are specified
+* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes
+* Allowing the use of dot notation for class namespaces when using instance_of constraint
+* Added any_match validation constraint
+* Added an AsyncPlugin
+* Passing request object to the calculateWait method of the ExponentialBackoffPlugin
+* Allowing the result of a command object to be changed
+* Parsing location and type sub values when instantiating a service description rather than over and over at runtime
+
+## 2.6.3 - 2012-05-23
+
+* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options.
+* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields.
+* You can now use an array of data when creating PUT request bodies in the request factory.
+* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable.
+* [Http] Adding support for Content-Type in multipart POST uploads per upload
+* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1])
+* Adding more POST data operations for easier manipulation of POST data.
+* You can now set empty POST fields.
+* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files.
+* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate.
+* CS updates
+
+## 2.6.2 - 2012-05-19
+
+* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method.
+
+## 2.6.1 - 2012-05-19
+
+* [BC] Removing 'path' support in service descriptions. Use 'uri'.
+* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache.
+* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it.
+* [BC] Removing Guzzle\Common\XmlElement.
+* All commands, both dynamic and concrete, have ApiCommand objects.
+* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits.
+* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored.
+* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible.
+
+## 2.6.0 - 2012-05-15
+
+* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder
+* [BC] Executing a Command returns the result of the command rather than the command
+* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed.
+* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args.
+* [BC] Moving ResourceIterator* to Guzzle\Service\Resource
+* [BC] Completely refactored ResourceIterators to iterate over a cloned command object
+* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate
+* [BC] Guzzle\Guzzle is now deprecated
+* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject
+* Adding Guzzle\Version class to give version information about Guzzle
+* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate()
+* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data
+* ServiceDescription and ServiceBuilder are now cacheable using similar configs
+* Changing the format of XML and JSON service builder configs. Backwards compatible.
+* Cleaned up Cookie parsing
+* Trimming the default Guzzle User-Agent header
+* Adding a setOnComplete() method to Commands that is called when a command completes
+* Keeping track of requests that were mocked in the MockPlugin
+* Fixed a caching bug in the CacheAdapterFactory
+* Inspector objects can be injected into a Command object
+* Refactoring a lot of code and tests to be case insensitive when dealing with headers
+* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL
+* Adding the ability to set global option overrides to service builder configs
+* Adding the ability to include other service builder config files from within XML and JSON files
+* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method.
+
+## 2.5.0 - 2012-05-08
+
+* Major performance improvements
+* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated.
+* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component.
+* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}"
+* Added the ability to passed parameters to all requests created by a client
+* Added callback functionality to the ExponentialBackoffPlugin
+* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies.
+* Rewinding request stream bodies when retrying requests
+* Exception is thrown when JSON response body cannot be decoded
+* Added configurable magic method calls to clients and commands. This is off by default.
+* Fixed a defect that added a hash to every parsed URL part
+* Fixed duplicate none generation for OauthPlugin.
+* Emitting an event each time a client is generated by a ServiceBuilder
+* Using an ApiParams object instead of a Collection for parameters of an ApiCommand
+* cache.* request parameters should be renamed to params.cache.*
+* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle.
+* Added the ability to disable type validation of service descriptions
+* ServiceDescriptions and ServiceBuilders are now Serializable
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/Dockerfile b/tests/php_test_files/vendor/guzzlehttp/guzzle/Dockerfile
new file mode 100644
index 0000000..f6a0952
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/Dockerfile
@@ -0,0 +1,18 @@
+FROM composer:latest as setup
+
+RUN mkdir /guzzle
+
+WORKDIR /guzzle
+
+RUN set -xe \
+ && composer init --name=guzzlehttp/test --description="Simple project for testing Guzzle scripts" --author="Mรกrk Sรกgi-Kazรกr " --no-interaction \
+ && composer require guzzlehttp/guzzle
+
+
+FROM php:7.3
+
+RUN mkdir /guzzle
+
+WORKDIR /guzzle
+
+COPY --from=setup /guzzle /guzzle
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/LICENSE b/tests/php_test_files/vendor/guzzlehttp/guzzle/LICENSE
new file mode 100644
index 0000000..fd2375d
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/LICENSE
@@ -0,0 +1,27 @@
+The MIT License (MIT)
+
+Copyright (c) 2011 Michael Dowling
+Copyright (c) 2012 Jeremy Lindblom
+Copyright (c) 2014 Graham Campbell
+Copyright (c) 2015 Mรกrk Sรกgi-Kazรกr
+Copyright (c) 2015 Tobias Schultze
+Copyright (c) 2016 Tobias Nyholm
+Copyright (c) 2016 George Mponos
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/README.md b/tests/php_test_files/vendor/guzzlehttp/guzzle/README.md
new file mode 100644
index 0000000..bc98e1a
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/README.md
@@ -0,0 +1,97 @@
+![Guzzle](.github/logo.png?raw=true)
+
+# Guzzle, PHP HTTP client
+
+[![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases)
+[![Build Status](https://img.shields.io/github/workflow/status/guzzle/guzzle/CI?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI)
+[![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle)
+
+Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
+trivial to integrate with web services.
+
+- Simple interface for building query strings, POST requests, streaming large
+ uploads, streaming large downloads, using HTTP cookies, uploading JSON data,
+ etc...
+- Can send both synchronous and asynchronous requests using the same interface.
+- Uses PSR-7 interfaces for requests, responses, and streams. This allows you
+ to utilize other PSR-7 compatible libraries with Guzzle.
+- Abstracts away the underlying HTTP transport, allowing you to write
+ environment and transport agnostic code; i.e., no hard dependency on cURL,
+ PHP streams, sockets, or non-blocking event loops.
+- Middleware system allows you to augment and compose client behavior.
+
+```php
+$client = new \GuzzleHttp\Client();
+$response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
+
+echo $response->getStatusCode(); # 200
+echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8'
+echo $response->getBody(); # '{"id": 1420053, "name": "guzzle", ...}'
+
+# Send an asynchronous request.
+$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
+$promise = $client->sendAsync($request)->then(function ($response) {
+ echo 'I completed! ' . $response->getBody();
+});
+
+$promise->wait();
+```
+
+## Help and docs
+
+We use GitHub issues only to discuss bugs and new features. For support please refer to:
+
+- [Documentation](https://docs.guzzlephp.org)
+- [Stack Overflow](https://stackoverflow.com/questions/tagged/guzzle)
+- [#guzzle](https://app.slack.com/client/T0D2S9JCT/CE6UAAKL4) channel on [PHP-HTTP Slack](https://slack.httplug.io/)
+- [Gitter](https://gitter.im/guzzle/guzzle)
+
+
+## Installing Guzzle
+
+The recommended way to install Guzzle is through
+[Composer](https://getcomposer.org/).
+
+```bash
+# Install Composer
+curl -sS https://getcomposer.org/installer | php
+```
+
+Next, run the Composer command to install the latest stable version of Guzzle:
+
+```bash
+composer require guzzlehttp/guzzle
+```
+
+After installing, you need to require Composer's autoloader:
+
+```php
+require 'vendor/autoload.php';
+```
+
+You can then later update Guzzle using composer:
+
+ ```bash
+composer update
+ ```
+
+
+## Version Guidance
+
+| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version |
+|---------|----------------|---------------------|--------------|---------------------|---------------------|-------|--------------|
+| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 |
+| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 |
+| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 |
+| 6.x | Security fixes | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 |
+| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.2 |
+
+[guzzle-3-repo]: https://github.com/guzzle/guzzle3
+[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
+[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
+[guzzle-6-repo]: https://github.com/guzzle/guzzle/tree/6.5
+[guzzle-7-repo]: https://github.com/guzzle/guzzle
+[guzzle-3-docs]: https://guzzle3.readthedocs.io/
+[guzzle-5-docs]: https://docs.guzzlephp.org/en/5.3/
+[guzzle-6-docs]: https://docs.guzzlephp.org/en/6.5/
+[guzzle-7-docs]: https://docs.guzzlephp.org/en/latest/
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/UPGRADING.md b/tests/php_test_files/vendor/guzzlehttp/guzzle/UPGRADING.md
new file mode 100644
index 0000000..91d1dcc
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/UPGRADING.md
@@ -0,0 +1,1203 @@
+Guzzle Upgrade Guide
+====================
+
+5.0 to 6.0
+----------
+
+Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages.
+Due to the fact that these messages are immutable, this prompted a refactoring
+of Guzzle to use a middleware based system rather than an event system. Any
+HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be
+updated to work with the new immutable PSR-7 request and response objects. Any
+event listeners or subscribers need to be updated to become middleware
+functions that wrap handlers (or are injected into a
+`GuzzleHttp\HandlerStack`).
+
+- Removed `GuzzleHttp\BatchResults`
+- Removed `GuzzleHttp\Collection`
+- Removed `GuzzleHttp\HasDataTrait`
+- Removed `GuzzleHttp\ToArrayInterface`
+- The `guzzlehttp/streams` dependency has been removed. Stream functionality
+ is now present in the `GuzzleHttp\Psr7` namespace provided by the
+ `guzzlehttp/psr7` package.
+- Guzzle no longer uses ReactPHP promises and now uses the
+ `guzzlehttp/promises` library. We use a custom promise library for three
+ significant reasons:
+ 1. React promises (at the time of writing this) are recursive. Promise
+ chaining and promise resolution will eventually blow the stack. Guzzle
+ promises are not recursive as they use a sort of trampolining technique.
+ Note: there has been movement in the React project to modify promises to
+ no longer utilize recursion.
+ 2. Guzzle needs to have the ability to synchronously block on a promise to
+ wait for a result. Guzzle promises allows this functionality (and does
+ not require the use of recursion).
+ 3. Because we need to be able to wait on a result, doing so using React
+ promises requires wrapping react promises with RingPHP futures. This
+ overhead is no longer needed, reducing stack sizes, reducing complexity,
+ and improving performance.
+- `GuzzleHttp\Mimetypes` has been moved to a function in
+ `GuzzleHttp\Psr7\mimetype_from_extension` and
+ `GuzzleHttp\Psr7\mimetype_from_filename`.
+- `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query
+ strings must now be passed into request objects as strings, or provided to
+ the `query` request option when creating requests with clients. The `query`
+ option uses PHP's `http_build_query` to convert an array to a string. If you
+ need a different serialization technique, you will need to pass the query
+ string in as a string. There are a couple helper functions that will make
+ working with query strings easier: `GuzzleHttp\Psr7\parse_query` and
+ `GuzzleHttp\Psr7\build_query`.
+- Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware
+ system based on PSR-7, using RingPHP and it's middleware system as well adds
+ more complexity than the benefits it provides. All HTTP handlers that were
+ present in RingPHP have been modified to work directly with PSR-7 messages
+ and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces
+ complexity in Guzzle, removes a dependency, and improves performance. RingPHP
+ will be maintained for Guzzle 5 support, but will no longer be a part of
+ Guzzle 6.
+- As Guzzle now uses a middleware based systems the event system and RingPHP
+ integration has been removed. Note: while the event system has been removed,
+ it is possible to add your own type of event system that is powered by the
+ middleware system.
+ - Removed the `Event` namespace.
+ - Removed the `Subscriber` namespace.
+ - Removed `Transaction` class
+ - Removed `RequestFsm`
+ - Removed `RingBridge`
+ - `GuzzleHttp\Subscriber\Cookie` is now provided by
+ `GuzzleHttp\Middleware::cookies`
+ - `GuzzleHttp\Subscriber\HttpError` is now provided by
+ `GuzzleHttp\Middleware::httpError`
+ - `GuzzleHttp\Subscriber\History` is now provided by
+ `GuzzleHttp\Middleware::history`
+ - `GuzzleHttp\Subscriber\Mock` is now provided by
+ `GuzzleHttp\Handler\MockHandler`
+ - `GuzzleHttp\Subscriber\Prepare` is now provided by
+ `GuzzleHttp\PrepareBodyMiddleware`
+ - `GuzzleHttp\Subscriber\Redirect` is now provided by
+ `GuzzleHttp\RedirectMiddleware`
+- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in
+ `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone.
+- Static functions in `GuzzleHttp\Utils` have been moved to namespaced
+ functions under the `GuzzleHttp` namespace. This requires either a Composer
+ based autoloader or you to include functions.php.
+- `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to
+ `GuzzleHttp\ClientInterface::getConfig`.
+- `GuzzleHttp\ClientInterface::setDefaultOption` has been removed.
+- The `json` and `xml` methods of response objects has been removed. With the
+ migration to strictly adhering to PSR-7 as the interface for Guzzle messages,
+ adding methods to message interfaces would actually require Guzzle messages
+ to extend from PSR-7 messages rather then work with them directly.
+
+## Migrating to middleware
+
+The change to PSR-7 unfortunately required significant refactoring to Guzzle
+due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event
+system from plugins. The event system relied on mutability of HTTP messages and
+side effects in order to work. With immutable messages, you have to change your
+workflow to become more about either returning a value (e.g., functional
+middlewares) or setting a value on an object. Guzzle v6 has chosen the
+functional middleware approach.
+
+Instead of using the event system to listen for things like the `before` event,
+you now create a stack based middleware function that intercepts a request on
+the way in and the promise of the response on the way out. This is a much
+simpler and more predictable approach than the event system and works nicely
+with PSR-7 middleware. Due to the use of promises, the middleware system is
+also asynchronous.
+
+v5:
+
+```php
+use GuzzleHttp\Event\BeforeEvent;
+$client = new GuzzleHttp\Client();
+// Get the emitter and listen to the before event.
+$client->getEmitter()->on('before', function (BeforeEvent $e) {
+ // Guzzle v5 events relied on mutation
+ $e->getRequest()->setHeader('X-Foo', 'Bar');
+});
+```
+
+v6:
+
+In v6, you can modify the request before it is sent using the `mapRequest`
+middleware. The idiomatic way in v6 to modify the request/response lifecycle is
+to setup a handler middleware stack up front and inject the handler into a
+client.
+
+```php
+use GuzzleHttp\Middleware;
+// Create a handler stack that has all of the default middlewares attached
+$handler = GuzzleHttp\HandlerStack::create();
+// Push the handler onto the handler stack
+$handler->push(Middleware::mapRequest(function (RequestInterface $request) {
+ // Notice that we have to return a request object
+ return $request->withHeader('X-Foo', 'Bar');
+}));
+// Inject the handler into the client
+$client = new GuzzleHttp\Client(['handler' => $handler]);
+```
+
+## POST Requests
+
+This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params)
+and `multipart` request options. `form_params` is an associative array of
+strings or array of strings and is used to serialize an
+`application/x-www-form-urlencoded` POST request. The
+[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart)
+option is now used to send a multipart/form-data POST request.
+
+`GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add
+POST files to a multipart/form-data request.
+
+The `body` option no longer accepts an array to send POST requests. Please use
+`multipart` or `form_params` instead.
+
+The `base_url` option has been renamed to `base_uri`.
+
+4.x to 5.0
+----------
+
+## Rewritten Adapter Layer
+
+Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send
+HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor
+is still supported, but it has now been renamed to `handler`. Instead of
+passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP
+`callable` that follows the RingPHP specification.
+
+## Removed Fluent Interfaces
+
+[Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil)
+from the following classes:
+
+- `GuzzleHttp\Collection`
+- `GuzzleHttp\Url`
+- `GuzzleHttp\Query`
+- `GuzzleHttp\Post\PostBody`
+- `GuzzleHttp\Cookie\SetCookie`
+
+## Removed functions.php
+
+Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following
+functions can be used as replacements.
+
+- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode`
+- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath`
+- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path`
+- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however,
+ deprecated in favor of using `GuzzleHttp\Pool::batch()`.
+
+The "procedural" global client has been removed with no replacement (e.g.,
+`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client`
+object as a replacement.
+
+## `throwImmediately` has been removed
+
+The concept of "throwImmediately" has been removed from exceptions and error
+events. This control mechanism was used to stop a transfer of concurrent
+requests from completing. This can now be handled by throwing the exception or
+by cancelling a pool of requests or each outstanding future request
+individually.
+
+## headers event has been removed
+
+Removed the "headers" event. This event was only useful for changing the
+body a response once the headers of the response were known. You can implement
+a similar behavior in a number of ways. One example might be to use a
+FnStream that has access to the transaction being sent. For example, when the
+first byte is written, you could check if the response headers match your
+expectations, and if so, change the actual stream body that is being
+written to.
+
+## Updates to HTTP Messages
+
+Removed the `asArray` parameter from
+`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
+value as an array, then use the newly added `getHeaderAsArray()` method of
+`MessageInterface`. This change makes the Guzzle interfaces compatible with
+the PSR-7 interfaces.
+
+3.x to 4.0
+----------
+
+## Overarching changes:
+
+- Now requires PHP 5.4 or greater.
+- No longer requires cURL to send requests.
+- Guzzle no longer wraps every exception it throws. Only exceptions that are
+ recoverable are now wrapped by Guzzle.
+- Various namespaces have been removed or renamed.
+- No longer requiring the Symfony EventDispatcher. A custom event dispatcher
+ based on the Symfony EventDispatcher is
+ now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant
+ speed and functionality improvements).
+
+Changes per Guzzle 3.x namespace are described below.
+
+## Batch
+
+The `Guzzle\Batch` namespace has been removed. This is best left to
+third-parties to implement on top of Guzzle's core HTTP library.
+
+## Cache
+
+The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement
+has been implemented yet, but hoping to utilize a PSR cache interface).
+
+## Common
+
+- Removed all of the wrapped exceptions. It's better to use the standard PHP
+ library for unrecoverable exceptions.
+- `FromConfigInterface` has been removed.
+- `Guzzle\Common\Version` has been removed. The VERSION constant can be found
+ at `GuzzleHttp\ClientInterface::VERSION`.
+
+### Collection
+
+- `getAll` has been removed. Use `toArray` to convert a collection to an array.
+- `inject` has been removed.
+- `keySearch` has been removed.
+- `getPath` no longer supports wildcard expressions. Use something better like
+ JMESPath for this.
+- `setPath` now supports appending to an existing array via the `[]` notation.
+
+### Events
+
+Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses
+`GuzzleHttp\Event\Emitter`.
+
+- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by
+ `GuzzleHttp\Event\EmitterInterface`.
+- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by
+ `GuzzleHttp\Event\Emitter`.
+- `Symfony\Component\EventDispatcher\Event` is replaced by
+ `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in
+ `GuzzleHttp\Event\EventInterface`.
+- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and
+ `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the
+ event emitter of a request, client, etc. now uses the `getEmitter` method
+ rather than the `getDispatcher` method.
+
+#### Emitter
+
+- Use the `once()` method to add a listener that automatically removes itself
+ the first time it is invoked.
+- Use the `listeners()` method to retrieve a list of event listeners rather than
+ the `getListeners()` method.
+- Use `emit()` instead of `dispatch()` to emit an event from an emitter.
+- Use `attach()` instead of `addSubscriber()` and `detach()` instead of
+ `removeSubscriber()`.
+
+```php
+$mock = new Mock();
+// 3.x
+$request->getEventDispatcher()->addSubscriber($mock);
+$request->getEventDispatcher()->removeSubscriber($mock);
+// 4.x
+$request->getEmitter()->attach($mock);
+$request->getEmitter()->detach($mock);
+```
+
+Use the `on()` method to add a listener rather than the `addListener()` method.
+
+```php
+// 3.x
+$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } );
+// 4.x
+$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } );
+```
+
+## Http
+
+### General changes
+
+- The cacert.pem certificate has been moved to `src/cacert.pem`.
+- Added the concept of adapters that are used to transfer requests over the
+ wire.
+- Simplified the event system.
+- Sending requests in parallel is still possible, but batching is no longer a
+ concept of the HTTP layer. Instead, you must use the `complete` and `error`
+ events to asynchronously manage parallel request transfers.
+- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`.
+- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`.
+- QueryAggregators have been rewritten so that they are simply callable
+ functions.
+- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in
+ `functions.php` for an easy to use static client instance.
+- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from
+ `GuzzleHttp\Exception\TransferException`.
+
+### Client
+
+Calling methods like `get()`, `post()`, `head()`, etc. no longer create and
+return a request, but rather creates a request, sends the request, and returns
+the response.
+
+```php
+// 3.0
+$request = $client->get('/');
+$response = $request->send();
+
+// 4.0
+$response = $client->get('/');
+
+// or, to mirror the previous behavior
+$request = $client->createRequest('GET', '/');
+$response = $client->send($request);
+```
+
+`GuzzleHttp\ClientInterface` has changed.
+
+- The `send` method no longer accepts more than one request. Use `sendAll` to
+ send multiple requests in parallel.
+- `setUserAgent()` has been removed. Use a default request option instead. You
+ could, for example, do something like:
+ `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`.
+- `setSslVerification()` has been removed. Use default request options instead,
+ like `$client->setConfig('defaults/verify', true)`.
+
+`GuzzleHttp\Client` has changed.
+
+- The constructor now accepts only an associative array. You can include a
+ `base_url` string or array to use a URI template as the base URL of a client.
+ You can also specify a `defaults` key that is an associative array of default
+ request options. You can pass an `adapter` to use a custom adapter,
+ `batch_adapter` to use a custom adapter for sending requests in parallel, or
+ a `message_factory` to change the factory used to create HTTP requests and
+ responses.
+- The client no longer emits a `client.create_request` event.
+- Creating requests with a client no longer automatically utilize a URI
+ template. You must pass an array into a creational method (e.g.,
+ `createRequest`, `get`, `put`, etc.) in order to expand a URI template.
+
+### Messages
+
+Messages no longer have references to their counterparts (i.e., a request no
+longer has a reference to it's response, and a response no loger has a
+reference to its request). This association is now managed through a
+`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to
+these transaction objects using request events that are emitted over the
+lifecycle of a request.
+
+#### Requests with a body
+
+- `GuzzleHttp\Message\EntityEnclosingRequest` and
+ `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The
+ separation between requests that contain a body and requests that do not
+ contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface`
+ handles both use cases.
+- Any method that previously accepts a `GuzzleHttp\Response` object now accept a
+ `GuzzleHttp\Message\ResponseInterface`.
+- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to
+ `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create
+ both requests and responses and is implemented in
+ `GuzzleHttp\Message\MessageFactory`.
+- POST field and file methods have been removed from the request object. You
+ must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface`
+ to control the format of a POST body. Requests that are created using a
+ standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use
+ a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if
+ the method is POST and no body is provided.
+
+```php
+$request = $client->createRequest('POST', '/');
+$request->getBody()->setField('foo', 'bar');
+$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r')));
+```
+
+#### Headers
+
+- `GuzzleHttp\Message\Header` has been removed. Header values are now simply
+ represented by an array of values or as a string. Header values are returned
+ as a string by default when retrieving a header value from a message. You can
+ pass an optional argument of `true` to retrieve a header value as an array
+ of strings instead of a single concatenated string.
+- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to
+ `GuzzleHttp\Post`. This interface has been simplified and now allows the
+ addition of arbitrary headers.
+- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most
+ of the custom headers are now handled separately in specific
+ subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has
+ been updated to properly handle headers that contain parameters (like the
+ `Link` header).
+
+#### Responses
+
+- `GuzzleHttp\Message\Response::getInfo()` and
+ `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event
+ system to retrieve this type of information.
+- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed.
+- `GuzzleHttp\Message\Response::getMessage()` has been removed.
+- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific
+ methods have moved to the CacheSubscriber.
+- Header specific helper functions like `getContentMd5()` have been removed.
+ Just use `getHeader('Content-MD5')` instead.
+- `GuzzleHttp\Message\Response::setRequest()` and
+ `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event
+ system to work with request and response objects as a transaction.
+- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the
+ Redirect subscriber instead.
+- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have
+ been removed. Use `getStatusCode()` instead.
+
+#### Streaming responses
+
+Streaming requests can now be created by a client directly, returning a
+`GuzzleHttp\Message\ResponseInterface` object that contains a body stream
+referencing an open PHP HTTP stream.
+
+```php
+// 3.0
+use Guzzle\Stream\PhpStreamRequestFactory;
+$request = $client->get('/');
+$factory = new PhpStreamRequestFactory();
+$stream = $factory->fromRequest($request);
+$data = $stream->read(1024);
+
+// 4.0
+$response = $client->get('/', ['stream' => true]);
+// Read some data off of the stream in the response body
+$data = $response->getBody()->read(1024);
+```
+
+#### Redirects
+
+The `configureRedirects()` method has been removed in favor of a
+`allow_redirects` request option.
+
+```php
+// Standard redirects with a default of a max of 5 redirects
+$request = $client->createRequest('GET', '/', ['allow_redirects' => true]);
+
+// Strict redirects with a custom number of redirects
+$request = $client->createRequest('GET', '/', [
+ 'allow_redirects' => ['max' => 5, 'strict' => true]
+]);
+```
+
+#### EntityBody
+
+EntityBody interfaces and classes have been removed or moved to
+`GuzzleHttp\Stream`. All classes and interfaces that once required
+`GuzzleHttp\EntityBodyInterface` now require
+`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no
+longer uses `GuzzleHttp\EntityBody::factory` but now uses
+`GuzzleHttp\Stream\Stream::factory` or even better:
+`GuzzleHttp\Stream\create()`.
+
+- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface`
+- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream`
+- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream`
+- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream`
+- `Guzzle\Http\IoEmittyinEntityBody` has been removed.
+
+#### Request lifecycle events
+
+Requests previously submitted a large number of requests. The number of events
+emitted over the lifecycle of a request has been significantly reduced to make
+it easier to understand how to extend the behavior of a request. All events
+emitted during the lifecycle of a request now emit a custom
+`GuzzleHttp\Event\EventInterface` object that contains context providing
+methods and a way in which to modify the transaction at that specific point in
+time (e.g., intercept the request and set a response on the transaction).
+
+- `request.before_send` has been renamed to `before` and now emits a
+ `GuzzleHttp\Event\BeforeEvent`
+- `request.complete` has been renamed to `complete` and now emits a
+ `GuzzleHttp\Event\CompleteEvent`.
+- `request.sent` has been removed. Use `complete`.
+- `request.success` has been removed. Use `complete`.
+- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`.
+- `request.exception` has been removed. Use `error`.
+- `request.receive.status_line` has been removed.
+- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to
+ maintain a status update.
+- `curl.callback.write` has been removed. Use a custom `StreamInterface` to
+ intercept writes.
+- `curl.callback.read` has been removed. Use a custom `StreamInterface` to
+ intercept reads.
+
+`headers` is a new event that is emitted after the response headers of a
+request have been received before the body of the response is downloaded. This
+event emits a `GuzzleHttp\Event\HeadersEvent`.
+
+You can intercept a request and inject a response using the `intercept()` event
+of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and
+`GuzzleHttp\Event\ErrorEvent` event.
+
+See: http://docs.guzzlephp.org/en/latest/events.html
+
+## Inflection
+
+The `Guzzle\Inflection` namespace has been removed. This is not a core concern
+of Guzzle.
+
+## Iterator
+
+The `Guzzle\Iterator` namespace has been removed.
+
+- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and
+ `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of
+ Guzzle itself.
+- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent
+ class is shipped with PHP 5.4.
+- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because
+ it's easier to just wrap an iterator in a generator that maps values.
+
+For a replacement of these iterators, see https://github.com/nikic/iter
+
+## Log
+
+The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The
+`Guzzle\Log` namespace has been removed. Guzzle now relies on
+`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been
+moved to `GuzzleHttp\Subscriber\Log\Formatter`.
+
+## Parser
+
+The `Guzzle\Parser` namespace has been removed. This was previously used to
+make it possible to plug in custom parsers for cookies, messages, URI
+templates, and URLs; however, this level of complexity is not needed in Guzzle
+so it has been removed.
+
+- Cookie: Cookie parsing logic has been moved to
+ `GuzzleHttp\Cookie\SetCookie::fromString`.
+- Message: Message parsing logic for both requests and responses has been moved
+ to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only
+ used in debugging or deserializing messages, so it doesn't make sense for
+ Guzzle as a library to add this level of complexity to parsing messages.
+- UriTemplate: URI template parsing has been moved to
+ `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL
+ URI template library if it is installed.
+- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously
+ it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary,
+ then developers are free to subclass `GuzzleHttp\Url`.
+
+## Plugin
+
+The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`.
+Several plugins are shipping with the core Guzzle library under this namespace.
+
+- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar
+ code has moved to `GuzzleHttp\Cookie`.
+- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin.
+- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is
+ received.
+- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin.
+- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before
+ sending. This subscriber is attached to all requests by default.
+- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin.
+
+The following plugins have been removed (third-parties are free to re-implement
+these if needed):
+
+- `GuzzleHttp\Plugin\Async` has been removed.
+- `GuzzleHttp\Plugin\CurlAuth` has been removed.
+- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This
+ functionality should instead be implemented with event listeners that occur
+ after normal response parsing occurs in the guzzle/command package.
+
+The following plugins are not part of the core Guzzle package, but are provided
+in separate repositories:
+
+- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler
+ to build custom retry policies using simple functions rather than various
+ chained classes. See: https://github.com/guzzle/retry-subscriber
+- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to
+ https://github.com/guzzle/cache-subscriber
+- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to
+ https://github.com/guzzle/log-subscriber
+- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to
+ https://github.com/guzzle/message-integrity-subscriber
+- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to
+ `GuzzleHttp\Subscriber\MockSubscriber`.
+- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to
+ https://github.com/guzzle/oauth-subscriber
+
+## Service
+
+The service description layer of Guzzle has moved into two separate packages:
+
+- http://github.com/guzzle/command Provides a high level abstraction over web
+ services by representing web service operations using commands.
+- http://github.com/guzzle/guzzle-services Provides an implementation of
+ guzzle/command that provides request serialization and response parsing using
+ Guzzle service descriptions.
+
+## Stream
+
+Stream have moved to a separate package available at
+https://github.com/guzzle/streams.
+
+`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take
+on the responsibilities of `Guzzle\Http\EntityBody` and
+`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number
+of methods implemented by the `StreamInterface` has been drastically reduced to
+allow developers to more easily extend and decorate stream behavior.
+
+## Removed methods from StreamInterface
+
+- `getStream` and `setStream` have been removed to better encapsulate streams.
+- `getMetadata` and `setMetadata` have been removed in favor of
+ `GuzzleHttp\Stream\MetadataStreamInterface`.
+- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been
+ removed. This data is accessible when
+ using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`.
+- `rewind` has been removed. Use `seek(0)` for a similar behavior.
+
+## Renamed methods
+
+- `detachStream` has been renamed to `detach`.
+- `feof` has been renamed to `eof`.
+- `ftell` has been renamed to `tell`.
+- `readLine` has moved from an instance method to a static class method of
+ `GuzzleHttp\Stream\Stream`.
+
+## Metadata streams
+
+`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams
+that contain additional metadata accessible via `getMetadata()`.
+`GuzzleHttp\Stream\StreamInterface::getMetadata` and
+`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed.
+
+## StreamRequestFactory
+
+The entire concept of the StreamRequestFactory has been removed. The way this
+was used in Guzzle 3 broke the actual interface of sending streaming requests
+(instead of getting back a Response, you got a StreamInterface). Streaming
+PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`.
+
+3.6 to 3.7
+----------
+
+### Deprecations
+
+- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.:
+
+```php
+\Guzzle\Common\Version::$emitWarnings = true;
+```
+
+The following APIs and options have been marked as deprecated:
+
+- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead.
+- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
+- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
+- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead.
+- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead.
+- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated
+- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client.
+- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8.
+- Marked `Guzzle\Common\Collection::inject()` as deprecated.
+- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use
+ `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or
+ `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));`
+
+3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational
+request methods. When paired with a client's configuration settings, these options allow you to specify default settings
+for various aspects of a request. Because these options make other previous configuration options redundant, several
+configuration options and methods of a client and AbstractCommand have been deprecated.
+
+- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`.
+- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`.
+- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')`
+- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0
+
+ $command = $client->getCommand('foo', array(
+ 'command.headers' => array('Test' => '123'),
+ 'command.response_body' => '/path/to/file'
+ ));
+
+ // Should be changed to:
+
+ $command = $client->getCommand('foo', array(
+ 'command.request_options' => array(
+ 'headers' => array('Test' => '123'),
+ 'save_as' => '/path/to/file'
+ )
+ ));
+
+### Interface changes
+
+Additions and changes (you will need to update any implementations or subclasses you may have created):
+
+- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`:
+ createRequest, head, delete, put, patch, post, options, prepareRequest
+- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()`
+- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface`
+- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to
+ `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a
+ resource, string, or EntityBody into the $options parameter to specify the download location of the response.
+- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a
+ default `array()`
+- Added `Guzzle\Stream\StreamInterface::isRepeatable`
+- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods.
+
+The following methods were removed from interfaces. All of these methods are still available in the concrete classes
+that implement them, but you should update your code to use alternative methods:
+
+- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use
+ `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or
+ `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or
+ `$client->setDefaultOption('headers/{header_name}', 'value')`. or
+ `$client->setDefaultOption('headers', array('header_name' => 'value'))`.
+- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`.
+- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail.
+- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail.
+- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail.
+- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin.
+- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin.
+- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin.
+
+### Cache plugin breaking changes
+
+- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a
+ CacheStorageInterface. These two objects and interface will be removed in a future version.
+- Always setting X-cache headers on cached responses
+- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin
+- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface
+ $request, Response $response);`
+- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);`
+- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);`
+- Added `CacheStorageInterface::purge($url)`
+- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin
+ $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache,
+ CanCacheStrategyInterface $canCache = null)`
+- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
+
+3.5 to 3.6
+----------
+
+* Mixed casing of headers are now forced to be a single consistent casing across all values for that header.
+* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution
+* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader().
+ For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader().
+ Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request.
+* Specific header implementations can be created for complex headers. When a message creates a header, it uses a
+ HeaderFactory which can map specific headers to specific header classes. There is now a Link header and
+ CacheControl header implementation.
+* Moved getLinks() from Response to just be used on a Link header object.
+
+If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the
+HeaderInterface (e.g. toArray(), getAll(), etc.).
+
+### Interface changes
+
+* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate
+* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti()
+* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in
+ Guzzle\Http\Curl\RequestMediator
+* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string.
+* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface
+* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders()
+
+### Removed deprecated functions
+
+* Removed Guzzle\Parser\ParserRegister::get(). Use getParser()
+* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser().
+
+### Deprecations
+
+* The ability to case-insensitively search for header values
+* Guzzle\Http\Message\Header::hasExactHeader
+* Guzzle\Http\Message\Header::raw. Use getAll()
+* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object
+ instead.
+
+### Other changes
+
+* All response header helper functions return a string rather than mixing Header objects and strings inconsistently
+* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle
+ directly via interfaces
+* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
+ but are a no-op until removed.
+* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a
+ `Guzzle\Service\Command\ArrayCommandInterface`.
+* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
+ on a request while the request is still being transferred
+* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
+
+3.3 to 3.4
+----------
+
+Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs.
+
+3.2 to 3.3
+----------
+
+### Response::getEtag() quote stripping removed
+
+`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header
+
+### Removed `Guzzle\Http\Utils`
+
+The `Guzzle\Http\Utils` class was removed. This class was only used for testing.
+
+### Stream wrapper and type
+
+`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase.
+
+### curl.emit_io became emit_io
+
+Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the
+'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io'
+
+3.1 to 3.2
+----------
+
+### CurlMulti is no longer reused globally
+
+Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added
+to a single client can pollute requests dispatched from other clients.
+
+If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the
+ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is
+created.
+
+```php
+$multi = new Guzzle\Http\Curl\CurlMulti();
+$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json');
+$builder->addListener('service_builder.create_client', function ($event) use ($multi) {
+ $event['client']->setCurlMulti($multi);
+}
+});
+```
+
+### No default path
+
+URLs no longer have a default path value of '/' if no path was specified.
+
+Before:
+
+```php
+$request = $client->get('http://www.foo.com');
+echo $request->getUrl();
+// >> http://www.foo.com/
+```
+
+After:
+
+```php
+$request = $client->get('http://www.foo.com');
+echo $request->getUrl();
+// >> http://www.foo.com
+```
+
+### Less verbose BadResponseException
+
+The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and
+response information. You can, however, get access to the request and response object by calling `getRequest()` or
+`getResponse()` on the exception object.
+
+### Query parameter aggregation
+
+Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a
+setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is
+responsible for handling the aggregation of multi-valued query string variables into a flattened hash.
+
+2.8 to 3.x
+----------
+
+### Guzzle\Service\Inspector
+
+Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig`
+
+**Before**
+
+```php
+use Guzzle\Service\Inspector;
+
+class YourClient extends \Guzzle\Service\Client
+{
+ public static function factory($config = array())
+ {
+ $default = array();
+ $required = array('base_url', 'username', 'api_key');
+ $config = Inspector::fromConfig($config, $default, $required);
+
+ $client = new self(
+ $config->get('base_url'),
+ $config->get('username'),
+ $config->get('api_key')
+ );
+ $client->setConfig($config);
+
+ $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json'));
+
+ return $client;
+ }
+```
+
+**After**
+
+```php
+use Guzzle\Common\Collection;
+
+class YourClient extends \Guzzle\Service\Client
+{
+ public static function factory($config = array())
+ {
+ $default = array();
+ $required = array('base_url', 'username', 'api_key');
+ $config = Collection::fromConfig($config, $default, $required);
+
+ $client = new self(
+ $config->get('base_url'),
+ $config->get('username'),
+ $config->get('api_key')
+ );
+ $client->setConfig($config);
+
+ $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json'));
+
+ return $client;
+ }
+```
+
+### Convert XML Service Descriptions to JSON
+
+**Before**
+
+```xml
+
+
+
+
+
+ Get a list of groups
+
+
+ Uses a search query to get a list of groups
+
+
+
+ Create a group
+
+
+
+
+ Delete a group by ID
+
+
+
+
+
+
+ Update a group
+
+
+
+
+
+
+```
+
+**After**
+
+```json
+{
+ "name": "Zendesk REST API v2",
+ "apiVersion": "2012-12-31",
+ "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users",
+ "operations": {
+ "list_groups": {
+ "httpMethod":"GET",
+ "uri": "groups.json",
+ "summary": "Get a list of groups"
+ },
+ "search_groups":{
+ "httpMethod":"GET",
+ "uri": "search.json?query=\"{query} type:group\"",
+ "summary": "Uses a search query to get a list of groups",
+ "parameters":{
+ "query":{
+ "location": "uri",
+ "description":"Zendesk Search Query",
+ "type": "string",
+ "required": true
+ }
+ }
+ },
+ "create_group": {
+ "httpMethod":"POST",
+ "uri": "groups.json",
+ "summary": "Create a group",
+ "parameters":{
+ "data": {
+ "type": "array",
+ "location": "body",
+ "description":"Group JSON",
+ "filters": "json_encode",
+ "required": true
+ },
+ "Content-Type":{
+ "type": "string",
+ "location":"header",
+ "static": "application/json"
+ }
+ }
+ },
+ "delete_group": {
+ "httpMethod":"DELETE",
+ "uri": "groups/{id}.json",
+ "summary": "Delete a group",
+ "parameters":{
+ "id":{
+ "location": "uri",
+ "description":"Group to delete by ID",
+ "type": "integer",
+ "required": true
+ }
+ }
+ },
+ "get_group": {
+ "httpMethod":"GET",
+ "uri": "groups/{id}.json",
+ "summary": "Get a ticket",
+ "parameters":{
+ "id":{
+ "location": "uri",
+ "description":"Group to get by ID",
+ "type": "integer",
+ "required": true
+ }
+ }
+ },
+ "update_group": {
+ "httpMethod":"PUT",
+ "uri": "groups/{id}.json",
+ "summary": "Update a group",
+ "parameters":{
+ "id": {
+ "location": "uri",
+ "description":"Group to update by ID",
+ "type": "integer",
+ "required": true
+ },
+ "data": {
+ "type": "array",
+ "location": "body",
+ "description":"Group JSON",
+ "filters": "json_encode",
+ "required": true
+ },
+ "Content-Type":{
+ "type": "string",
+ "location":"header",
+ "static": "application/json"
+ }
+ }
+ }
+}
+```
+
+### Guzzle\Service\Description\ServiceDescription
+
+Commands are now called Operations
+
+**Before**
+
+```php
+use Guzzle\Service\Description\ServiceDescription;
+
+$sd = new ServiceDescription();
+$sd->getCommands(); // @returns ApiCommandInterface[]
+$sd->hasCommand($name);
+$sd->getCommand($name); // @returns ApiCommandInterface|null
+$sd->addCommand($command); // @param ApiCommandInterface $command
+```
+
+**After**
+
+```php
+use Guzzle\Service\Description\ServiceDescription;
+
+$sd = new ServiceDescription();
+$sd->getOperations(); // @returns OperationInterface[]
+$sd->hasOperation($name);
+$sd->getOperation($name); // @returns OperationInterface|null
+$sd->addOperation($operation); // @param OperationInterface $operation
+```
+
+### Guzzle\Common\Inflection\Inflector
+
+Namespace is now `Guzzle\Inflection\Inflector`
+
+### Guzzle\Http\Plugin
+
+Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below.
+
+### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log
+
+Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively.
+
+**Before**
+
+```php
+use Guzzle\Common\Log\ClosureLogAdapter;
+use Guzzle\Http\Plugin\LogPlugin;
+
+/** @var \Guzzle\Http\Client */
+$client;
+
+// $verbosity is an integer indicating desired message verbosity level
+$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE);
+```
+
+**After**
+
+```php
+use Guzzle\Log\ClosureLogAdapter;
+use Guzzle\Log\MessageFormatter;
+use Guzzle\Plugin\Log\LogPlugin;
+
+/** @var \Guzzle\Http\Client */
+$client;
+
+// $format is a string indicating desired message format -- @see MessageFormatter
+$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT);
+```
+
+### Guzzle\Http\Plugin\CurlAuthPlugin
+
+Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`.
+
+### Guzzle\Http\Plugin\ExponentialBackoffPlugin
+
+Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes.
+
+**Before**
+
+```php
+use Guzzle\Http\Plugin\ExponentialBackoffPlugin;
+
+$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge(
+ ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429)
+ ));
+
+$client->addSubscriber($backoffPlugin);
+```
+
+**After**
+
+```php
+use Guzzle\Plugin\Backoff\BackoffPlugin;
+use Guzzle\Plugin\Backoff\HttpBackoffStrategy;
+
+// Use convenient factory method instead -- see implementation for ideas of what
+// you can do with chaining backoff strategies
+$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge(
+ HttpBackoffStrategy::getDefaultFailureCodes(), array(429)
+ ));
+$client->addSubscriber($backoffPlugin);
+```
+
+### Known Issues
+
+#### [BUG] Accept-Encoding header behavior changed unintentionally.
+
+(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e)
+
+In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to
+properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen.
+See issue #217 for a workaround, or use a version containing the fix.
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/composer.json b/tests/php_test_files/vendor/guzzlehttp/guzzle/composer.json
new file mode 100644
index 0000000..a57d78f
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/composer.json
@@ -0,0 +1,92 @@
+{
+ "name": "guzzlehttp/guzzle",
+ "type": "library",
+ "description": "Guzzle is a PHP HTTP client library",
+ "keywords": [
+ "framework",
+ "http",
+ "rest",
+ "web service",
+ "curl",
+ "client",
+ "HTTP client"
+ ],
+ "homepage": "http://guzzlephp.org/",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Jeremy Lindblom",
+ "email": "jeremeamia@gmail.com",
+ "homepage": "https://github.com/jeremeamia"
+ },
+ {
+ "name": "George Mponos",
+ "email": "gmponos@gmail.com",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Mรกrk Sรกgi-Kazรกr",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "require": {
+ "php": ">=5.5",
+ "ext-json": "*",
+ "symfony/polyfill-intl-idn": "^1.17",
+ "guzzlehttp/promises": "^1.0",
+ "guzzlehttp/psr7": "^1.9"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
+ "psr/log": "^1.1"
+ },
+ "suggest": {
+ "psr/log": "Required for using the Log middleware"
+ },
+ "config": {
+ "sort-packages": true,
+ "allow-plugins": {
+ "bamarni/composer-bin-plugin": true
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "6.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "GuzzleHttp\\Tests\\": "tests/"
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Client.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Client.php
new file mode 100644
index 0000000..315a022
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Client.php
@@ -0,0 +1,501 @@
+ 'http://www.foo.com/1.0/',
+ * 'timeout' => 0,
+ * 'allow_redirects' => false,
+ * 'proxy' => '192.168.16.1:10'
+ * ]);
+ *
+ * Client configuration settings include the following options:
+ *
+ * - handler: (callable) Function that transfers HTTP requests over the
+ * wire. The function is called with a Psr7\Http\Message\RequestInterface
+ * and array of transfer options, and must return a
+ * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a
+ * Psr7\Http\Message\ResponseInterface on success.
+ * If no handler is provided, a default handler will be created
+ * that enables all of the request options below by attaching all of the
+ * default middleware to the handler.
+ * - base_uri: (string|UriInterface) Base URI of the client that is merged
+ * into relative URIs. Can be a string or instance of UriInterface.
+ * - **: any request option
+ *
+ * @param array $config Client configuration settings.
+ *
+ * @see \GuzzleHttp\RequestOptions for a list of available request options.
+ */
+ public function __construct(array $config = [])
+ {
+ if (!isset($config['handler'])) {
+ $config['handler'] = HandlerStack::create();
+ } elseif (!is_callable($config['handler'])) {
+ throw new \InvalidArgumentException('handler must be a callable');
+ }
+
+ // Convert the base_uri to a UriInterface
+ if (isset($config['base_uri'])) {
+ $config['base_uri'] = Psr7\uri_for($config['base_uri']);
+ }
+
+ $this->configureDefaults($config);
+ }
+
+ /**
+ * @param string $method
+ * @param array $args
+ *
+ * @return Promise\PromiseInterface
+ */
+ public function __call($method, $args)
+ {
+ if (count($args) < 1) {
+ throw new \InvalidArgumentException('Magic request methods require a URI and optional options array');
+ }
+
+ $uri = $args[0];
+ $opts = isset($args[1]) ? $args[1] : [];
+
+ return substr($method, -5) === 'Async'
+ ? $this->requestAsync(substr($method, 0, -5), $uri, $opts)
+ : $this->request($method, $uri, $opts);
+ }
+
+ /**
+ * Asynchronously send an HTTP request.
+ *
+ * @param array $options Request options to apply to the given
+ * request and to the transfer. See \GuzzleHttp\RequestOptions.
+ *
+ * @return Promise\PromiseInterface
+ */
+ public function sendAsync(RequestInterface $request, array $options = [])
+ {
+ // Merge the base URI into the request URI if needed.
+ $options = $this->prepareDefaults($options);
+
+ return $this->transfer(
+ $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')),
+ $options
+ );
+ }
+
+ /**
+ * Send an HTTP request.
+ *
+ * @param array $options Request options to apply to the given
+ * request and to the transfer. See \GuzzleHttp\RequestOptions.
+ *
+ * @return ResponseInterface
+ * @throws GuzzleException
+ */
+ public function send(RequestInterface $request, array $options = [])
+ {
+ $options[RequestOptions::SYNCHRONOUS] = true;
+ return $this->sendAsync($request, $options)->wait();
+ }
+
+ /**
+ * Create and send an asynchronous HTTP request.
+ *
+ * Use an absolute path to override the base path of the client, or a
+ * relative path to append to the base path of the client. The URL can
+ * contain the query string as well. Use an array to provide a URL
+ * template and additional variables to use in the URL template expansion.
+ *
+ * @param string $method HTTP method
+ * @param string|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
+ *
+ * @return Promise\PromiseInterface
+ */
+ public function requestAsync($method, $uri = '', array $options = [])
+ {
+ $options = $this->prepareDefaults($options);
+ // Remove request modifying parameter because it can be done up-front.
+ $headers = isset($options['headers']) ? $options['headers'] : [];
+ $body = isset($options['body']) ? $options['body'] : null;
+ $version = isset($options['version']) ? $options['version'] : '1.1';
+ // Merge the URI into the base URI.
+ $uri = $this->buildUri($uri, $options);
+ if (is_array($body)) {
+ $this->invalidBody();
+ }
+ $request = new Psr7\Request($method, $uri, $headers, $body, $version);
+ // Remove the option so that they are not doubly-applied.
+ unset($options['headers'], $options['body'], $options['version']);
+
+ return $this->transfer($request, $options);
+ }
+
+ /**
+ * Create and send an HTTP request.
+ *
+ * Use an absolute path to override the base path of the client, or a
+ * relative path to append to the base path of the client. The URL can
+ * contain the query string as well.
+ *
+ * @param string $method HTTP method.
+ * @param string|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
+ *
+ * @return ResponseInterface
+ * @throws GuzzleException
+ */
+ public function request($method, $uri = '', array $options = [])
+ {
+ $options[RequestOptions::SYNCHRONOUS] = true;
+ return $this->requestAsync($method, $uri, $options)->wait();
+ }
+
+ /**
+ * Get a client configuration option.
+ *
+ * These options include default request options of the client, a "handler"
+ * (if utilized by the concrete client), and a "base_uri" if utilized by
+ * the concrete client.
+ *
+ * @param string|null $option The config option to retrieve.
+ *
+ * @return mixed
+ */
+ public function getConfig($option = null)
+ {
+ return $option === null
+ ? $this->config
+ : (isset($this->config[$option]) ? $this->config[$option] : null);
+ }
+
+ /**
+ * @param string|null $uri
+ *
+ * @return UriInterface
+ */
+ private function buildUri($uri, array $config)
+ {
+ // for BC we accept null which would otherwise fail in uri_for
+ $uri = Psr7\uri_for($uri === null ? '' : $uri);
+
+ if (isset($config['base_uri'])) {
+ $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
+ }
+
+ if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) {
+ $idnOptions = ($config['idn_conversion'] === true) ? IDNA_DEFAULT : $config['idn_conversion'];
+ $uri = Utils::idnUriConvert($uri, $idnOptions);
+ }
+
+ return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri;
+ }
+
+ /**
+ * Configures the default options for a client.
+ *
+ * @param array $config
+ * @return void
+ */
+ private function configureDefaults(array $config)
+ {
+ $defaults = [
+ 'allow_redirects' => RedirectMiddleware::$defaultSettings,
+ 'http_errors' => true,
+ 'decode_content' => true,
+ 'verify' => true,
+ 'cookies' => false,
+ 'idn_conversion' => true,
+ ];
+
+ // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
+
+ // We can only trust the HTTP_PROXY environment variable in a CLI
+ // process due to the fact that PHP has no reliable mechanism to
+ // get environment variables that start with "HTTP_".
+ if (php_sapi_name() === 'cli' && getenv('HTTP_PROXY')) {
+ $defaults['proxy']['http'] = getenv('HTTP_PROXY');
+ }
+
+ if ($proxy = getenv('HTTPS_PROXY')) {
+ $defaults['proxy']['https'] = $proxy;
+ }
+
+ if ($noProxy = getenv('NO_PROXY')) {
+ $cleanedNoProxy = str_replace(' ', '', $noProxy);
+ $defaults['proxy']['no'] = explode(',', $cleanedNoProxy);
+ }
+
+ $this->config = $config + $defaults;
+
+ if (!empty($config['cookies']) && $config['cookies'] === true) {
+ $this->config['cookies'] = new CookieJar();
+ }
+
+ // Add the default user-agent header.
+ if (!isset($this->config['headers'])) {
+ $this->config['headers'] = ['User-Agent' => default_user_agent()];
+ } else {
+ // Add the User-Agent header if one was not already set.
+ foreach (array_keys($this->config['headers']) as $name) {
+ if (strtolower($name) === 'user-agent') {
+ return;
+ }
+ }
+ $this->config['headers']['User-Agent'] = default_user_agent();
+ }
+ }
+
+ /**
+ * Merges default options into the array.
+ *
+ * @param array $options Options to modify by reference
+ *
+ * @return array
+ */
+ private function prepareDefaults(array $options)
+ {
+ $defaults = $this->config;
+
+ if (!empty($defaults['headers'])) {
+ // Default headers are only added if they are not present.
+ $defaults['_conditional'] = $defaults['headers'];
+ unset($defaults['headers']);
+ }
+
+ // Special handling for headers is required as they are added as
+ // conditional headers and as headers passed to a request ctor.
+ if (array_key_exists('headers', $options)) {
+ // Allows default headers to be unset.
+ if ($options['headers'] === null) {
+ $defaults['_conditional'] = [];
+ unset($options['headers']);
+ } elseif (!is_array($options['headers'])) {
+ throw new \InvalidArgumentException('headers must be an array');
+ }
+ }
+
+ // Shallow merge defaults underneath options.
+ $result = $options + $defaults;
+
+ // Remove null values.
+ foreach ($result as $k => $v) {
+ if ($v === null) {
+ unset($result[$k]);
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Transfers the given request and applies request options.
+ *
+ * The URI of the request is not modified and the request options are used
+ * as-is without merging in default options.
+ *
+ * @param array $options See \GuzzleHttp\RequestOptions.
+ *
+ * @return Promise\PromiseInterface
+ */
+ private function transfer(RequestInterface $request, array $options)
+ {
+ // save_to -> sink
+ if (isset($options['save_to'])) {
+ $options['sink'] = $options['save_to'];
+ unset($options['save_to']);
+ }
+
+ // exceptions -> http_errors
+ if (isset($options['exceptions'])) {
+ $options['http_errors'] = $options['exceptions'];
+ unset($options['exceptions']);
+ }
+
+ $request = $this->applyOptions($request, $options);
+ /** @var HandlerStack $handler */
+ $handler = $options['handler'];
+
+ try {
+ return Promise\promise_for($handler($request, $options));
+ } catch (\Exception $e) {
+ return Promise\rejection_for($e);
+ }
+ }
+
+ /**
+ * Applies the array of request options to a request.
+ *
+ * @param RequestInterface $request
+ * @param array $options
+ *
+ * @return RequestInterface
+ */
+ private function applyOptions(RequestInterface $request, array &$options)
+ {
+ $modify = [
+ 'set_headers' => [],
+ ];
+
+ if (isset($options['headers'])) {
+ $modify['set_headers'] = $options['headers'];
+ unset($options['headers']);
+ }
+
+ if (isset($options['form_params'])) {
+ if (isset($options['multipart'])) {
+ throw new \InvalidArgumentException('You cannot use '
+ . 'form_params and multipart at the same time. Use the '
+ . 'form_params option if you want to send application/'
+ . 'x-www-form-urlencoded requests, and the multipart '
+ . 'option to send multipart/form-data requests.');
+ }
+ $options['body'] = http_build_query($options['form_params'], '', '&');
+ unset($options['form_params']);
+ // Ensure that we don't have the header in different case and set the new value.
+ $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
+ $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
+ }
+
+ if (isset($options['multipart'])) {
+ $options['body'] = new Psr7\MultipartStream($options['multipart']);
+ unset($options['multipart']);
+ }
+
+ if (isset($options['json'])) {
+ $options['body'] = \GuzzleHttp\json_encode($options['json']);
+ unset($options['json']);
+ // Ensure that we don't have the header in different case and set the new value.
+ $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
+ $options['_conditional']['Content-Type'] = 'application/json';
+ }
+
+ if (!empty($options['decode_content'])
+ && $options['decode_content'] !== true
+ ) {
+ // Ensure that we don't have the header in different case and set the new value.
+ $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']);
+ $modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
+ }
+
+ if (isset($options['body'])) {
+ if (is_array($options['body'])) {
+ $this->invalidBody();
+ }
+ $modify['body'] = Psr7\stream_for($options['body']);
+ unset($options['body']);
+ }
+
+ if (!empty($options['auth']) && is_array($options['auth'])) {
+ $value = $options['auth'];
+ $type = isset($value[2]) ? strtolower($value[2]) : 'basic';
+ switch ($type) {
+ case 'basic':
+ // Ensure that we don't have the header in different case and set the new value.
+ $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']);
+ $modify['set_headers']['Authorization'] = 'Basic '
+ . base64_encode("$value[0]:$value[1]");
+ break;
+ case 'digest':
+ // @todo: Do not rely on curl
+ $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;
+ $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
+ break;
+ case 'ntlm':
+ $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM;
+ $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
+ break;
+ }
+ }
+
+ if (isset($options['query'])) {
+ $value = $options['query'];
+ if (is_array($value)) {
+ $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986);
+ }
+ if (!is_string($value)) {
+ throw new \InvalidArgumentException('query must be a string or array');
+ }
+ $modify['query'] = $value;
+ unset($options['query']);
+ }
+
+ // Ensure that sink is not an invalid value.
+ if (isset($options['sink'])) {
+ // TODO: Add more sink validation?
+ if (is_bool($options['sink'])) {
+ throw new \InvalidArgumentException('sink must not be a boolean');
+ }
+ }
+
+ $request = Psr7\modify_request($request, $modify);
+ if ($request->getBody() instanceof Psr7\MultipartStream) {
+ // Use a multipart/form-data POST if a Content-Type is not set.
+ // Ensure that we don't have the header in different case and set the new value.
+ $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
+ $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
+ . $request->getBody()->getBoundary();
+ }
+
+ // Merge in conditional headers if they are not present.
+ if (isset($options['_conditional'])) {
+ // Build up the changes so it's in a single clone of the message.
+ $modify = [];
+ foreach ($options['_conditional'] as $k => $v) {
+ if (!$request->hasHeader($k)) {
+ $modify['set_headers'][$k] = $v;
+ }
+ }
+ $request = Psr7\modify_request($request, $modify);
+ // Don't pass this internal value along to middleware/handlers.
+ unset($options['_conditional']);
+ }
+
+ return $request;
+ }
+
+ /**
+ * Throw Exception with pre-set message.
+ * @return void
+ * @throws \InvalidArgumentException Invalid body.
+ */
+ private function invalidBody()
+ {
+ throw new \InvalidArgumentException('Passing in the "body" request '
+ . 'option as an array to send a POST request has been deprecated. '
+ . 'Please use the "form_params" request option to send a '
+ . 'application/x-www-form-urlencoded request, or the "multipart" '
+ . 'request option to send a multipart/form-data request.');
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/ClientInterface.php
new file mode 100644
index 0000000..638b75d
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/ClientInterface.php
@@ -0,0 +1,87 @@
+strictMode = $strictMode;
+
+ foreach ($cookieArray as $cookie) {
+ if (!($cookie instanceof SetCookie)) {
+ $cookie = new SetCookie($cookie);
+ }
+ $this->setCookie($cookie);
+ }
+ }
+
+ /**
+ * Create a new Cookie jar from an associative array and domain.
+ *
+ * @param array $cookies Cookies to create the jar from
+ * @param string $domain Domain to set the cookies to
+ *
+ * @return self
+ */
+ public static function fromArray(array $cookies, $domain)
+ {
+ $cookieJar = new self();
+ foreach ($cookies as $name => $value) {
+ $cookieJar->setCookie(new SetCookie([
+ 'Domain' => $domain,
+ 'Name' => $name,
+ 'Value' => $value,
+ 'Discard' => true
+ ]));
+ }
+
+ return $cookieJar;
+ }
+
+ /**
+ * @deprecated
+ */
+ public static function getCookieValue($value)
+ {
+ return $value;
+ }
+
+ /**
+ * Evaluate if this cookie should be persisted to storage
+ * that survives between requests.
+ *
+ * @param SetCookie $cookie Being evaluated.
+ * @param bool $allowSessionCookies If we should persist session cookies
+ * @return bool
+ */
+ public static function shouldPersist(
+ SetCookie $cookie,
+ $allowSessionCookies = false
+ ) {
+ if ($cookie->getExpires() || $allowSessionCookies) {
+ if (!$cookie->getDiscard()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Finds and returns the cookie based on the name
+ *
+ * @param string $name cookie name to search for
+ * @return SetCookie|null cookie that was found or null if not found
+ */
+ public function getCookieByName($name)
+ {
+ // don't allow a non string name
+ if ($name === null || !is_scalar($name)) {
+ return null;
+ }
+ foreach ($this->cookies as $cookie) {
+ if ($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) {
+ return $cookie;
+ }
+ }
+
+ return null;
+ }
+
+ public function toArray()
+ {
+ return array_map(function (SetCookie $cookie) {
+ return $cookie->toArray();
+ }, $this->getIterator()->getArrayCopy());
+ }
+
+ public function clear($domain = null, $path = null, $name = null)
+ {
+ if (!$domain) {
+ $this->cookies = [];
+ return;
+ } elseif (!$path) {
+ $this->cookies = array_filter(
+ $this->cookies,
+ function (SetCookie $cookie) use ($domain) {
+ return !$cookie->matchesDomain($domain);
+ }
+ );
+ } elseif (!$name) {
+ $this->cookies = array_filter(
+ $this->cookies,
+ function (SetCookie $cookie) use ($path, $domain) {
+ return !($cookie->matchesPath($path) &&
+ $cookie->matchesDomain($domain));
+ }
+ );
+ } else {
+ $this->cookies = array_filter(
+ $this->cookies,
+ function (SetCookie $cookie) use ($path, $domain, $name) {
+ return !($cookie->getName() == $name &&
+ $cookie->matchesPath($path) &&
+ $cookie->matchesDomain($domain));
+ }
+ );
+ }
+ }
+
+ public function clearSessionCookies()
+ {
+ $this->cookies = array_filter(
+ $this->cookies,
+ function (SetCookie $cookie) {
+ return !$cookie->getDiscard() && $cookie->getExpires();
+ }
+ );
+ }
+
+ public function setCookie(SetCookie $cookie)
+ {
+ // If the name string is empty (but not 0), ignore the set-cookie
+ // string entirely.
+ $name = $cookie->getName();
+ if (!$name && $name !== '0') {
+ return false;
+ }
+
+ // Only allow cookies with set and valid domain, name, value
+ $result = $cookie->validate();
+ if ($result !== true) {
+ if ($this->strictMode) {
+ throw new \RuntimeException('Invalid cookie: ' . $result);
+ } else {
+ $this->removeCookieIfEmpty($cookie);
+ return false;
+ }
+ }
+
+ // Resolve conflicts with previously set cookies
+ foreach ($this->cookies as $i => $c) {
+
+ // Two cookies are identical, when their path, and domain are
+ // identical.
+ if ($c->getPath() != $cookie->getPath() ||
+ $c->getDomain() != $cookie->getDomain() ||
+ $c->getName() != $cookie->getName()
+ ) {
+ continue;
+ }
+
+ // The previously set cookie is a discard cookie and this one is
+ // not so allow the new cookie to be set
+ if (!$cookie->getDiscard() && $c->getDiscard()) {
+ unset($this->cookies[$i]);
+ continue;
+ }
+
+ // If the new cookie's expiration is further into the future, then
+ // replace the old cookie
+ if ($cookie->getExpires() > $c->getExpires()) {
+ unset($this->cookies[$i]);
+ continue;
+ }
+
+ // If the value has changed, we better change it
+ if ($cookie->getValue() !== $c->getValue()) {
+ unset($this->cookies[$i]);
+ continue;
+ }
+
+ // The cookie exists, so no need to continue
+ return false;
+ }
+
+ $this->cookies[] = $cookie;
+
+ return true;
+ }
+
+ public function count()
+ {
+ return count($this->cookies);
+ }
+
+ public function getIterator()
+ {
+ return new \ArrayIterator(array_values($this->cookies));
+ }
+
+ public function extractCookies(
+ RequestInterface $request,
+ ResponseInterface $response
+ ) {
+ if ($cookieHeader = $response->getHeader('Set-Cookie')) {
+ foreach ($cookieHeader as $cookie) {
+ $sc = SetCookie::fromString($cookie);
+ if (!$sc->getDomain()) {
+ $sc->setDomain($request->getUri()->getHost());
+ }
+ if (0 !== strpos($sc->getPath(), '/')) {
+ $sc->setPath($this->getCookiePathFromRequest($request));
+ }
+ if (!$sc->matchesDomain($request->getUri()->getHost())) {
+ continue;
+ }
+ // Note: At this point `$sc->getDomain()` being a public suffix should
+ // be rejected, but we don't want to pull in the full PSL dependency.
+ $this->setCookie($sc);
+ }
+ }
+ }
+
+ /**
+ * Computes cookie path following RFC 6265 section 5.1.4
+ *
+ * @link https://tools.ietf.org/html/rfc6265#section-5.1.4
+ *
+ * @param RequestInterface $request
+ * @return string
+ */
+ private function getCookiePathFromRequest(RequestInterface $request)
+ {
+ $uriPath = $request->getUri()->getPath();
+ if ('' === $uriPath) {
+ return '/';
+ }
+ if (0 !== strpos($uriPath, '/')) {
+ return '/';
+ }
+ if ('/' === $uriPath) {
+ return '/';
+ }
+ if (0 === $lastSlashPos = strrpos($uriPath, '/')) {
+ return '/';
+ }
+
+ return substr($uriPath, 0, $lastSlashPos);
+ }
+
+ public function withCookieHeader(RequestInterface $request)
+ {
+ $values = [];
+ $uri = $request->getUri();
+ $scheme = $uri->getScheme();
+ $host = $uri->getHost();
+ $path = $uri->getPath() ?: '/';
+
+ foreach ($this->cookies as $cookie) {
+ if ($cookie->matchesPath($path) &&
+ $cookie->matchesDomain($host) &&
+ !$cookie->isExpired() &&
+ (!$cookie->getSecure() || $scheme === 'https')
+ ) {
+ $values[] = $cookie->getName() . '='
+ . $cookie->getValue();
+ }
+ }
+
+ return $values
+ ? $request->withHeader('Cookie', implode('; ', $values))
+ : $request;
+ }
+
+ /**
+ * If a cookie already exists and the server asks to set it again with a
+ * null value, the cookie must be deleted.
+ *
+ * @param SetCookie $cookie
+ */
+ private function removeCookieIfEmpty(SetCookie $cookie)
+ {
+ $cookieValue = $cookie->getValue();
+ if ($cookieValue === null || $cookieValue === '') {
+ $this->clear(
+ $cookie->getDomain(),
+ $cookie->getPath(),
+ $cookie->getName()
+ );
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
new file mode 100644
index 0000000..6ee1188
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
@@ -0,0 +1,84 @@
+filename = $cookieFile;
+ $this->storeSessionCookies = $storeSessionCookies;
+
+ if (file_exists($cookieFile)) {
+ $this->load($cookieFile);
+ }
+ }
+
+ /**
+ * Saves the file when shutting down
+ */
+ public function __destruct()
+ {
+ $this->save($this->filename);
+ }
+
+ /**
+ * Saves the cookies to a file.
+ *
+ * @param string $filename File to save
+ * @throws \RuntimeException if the file cannot be found or created
+ */
+ public function save($filename)
+ {
+ $json = [];
+ foreach ($this as $cookie) {
+ /** @var SetCookie $cookie */
+ if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
+ $json[] = $cookie->toArray();
+ }
+ }
+
+ $jsonStr = \GuzzleHttp\json_encode($json);
+ if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) {
+ throw new \RuntimeException("Unable to save file {$filename}");
+ }
+ }
+
+ /**
+ * Load cookies from a JSON formatted file.
+ *
+ * Old cookies are kept unless overwritten by newly loaded ones.
+ *
+ * @param string $filename Cookie file to load.
+ * @throws \RuntimeException if the file cannot be loaded.
+ */
+ public function load($filename)
+ {
+ $json = file_get_contents($filename);
+ if (false === $json) {
+ throw new \RuntimeException("Unable to load file {$filename}");
+ } elseif ($json === '') {
+ return;
+ }
+
+ $data = \GuzzleHttp\json_decode($json, true);
+ if (is_array($data)) {
+ foreach (json_decode($json, true) as $cookie) {
+ $this->setCookie(new SetCookie($cookie));
+ }
+ } elseif (strlen($data)) {
+ throw new \RuntimeException("Invalid cookie file: {$filename}");
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php
new file mode 100644
index 0000000..0224a24
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php
@@ -0,0 +1,72 @@
+sessionKey = $sessionKey;
+ $this->storeSessionCookies = $storeSessionCookies;
+ $this->load();
+ }
+
+ /**
+ * Saves cookies to session when shutting down
+ */
+ public function __destruct()
+ {
+ $this->save();
+ }
+
+ /**
+ * Save cookies to the client session
+ */
+ public function save()
+ {
+ $json = [];
+ foreach ($this as $cookie) {
+ /** @var SetCookie $cookie */
+ if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
+ $json[] = $cookie->toArray();
+ }
+ }
+
+ $_SESSION[$this->sessionKey] = json_encode($json);
+ }
+
+ /**
+ * Load the contents of the client session into the data array
+ */
+ protected function load()
+ {
+ if (!isset($_SESSION[$this->sessionKey])) {
+ return;
+ }
+ $data = json_decode($_SESSION[$this->sessionKey], true);
+ if (is_array($data)) {
+ foreach ($data as $cookie) {
+ $this->setCookie(new SetCookie($cookie));
+ }
+ } elseif (strlen($data)) {
+ throw new \RuntimeException("Invalid cookie data");
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
new file mode 100644
index 0000000..55f6901
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
@@ -0,0 +1,410 @@
+ null,
+ 'Value' => null,
+ 'Domain' => null,
+ 'Path' => '/',
+ 'Max-Age' => null,
+ 'Expires' => null,
+ 'Secure' => false,
+ 'Discard' => false,
+ 'HttpOnly' => false
+ ];
+
+ /** @var array Cookie data */
+ private $data;
+
+ /**
+ * Create a new SetCookie object from a string
+ *
+ * @param string $cookie Set-Cookie header string
+ *
+ * @return self
+ */
+ public static function fromString($cookie)
+ {
+ // Create the default return array
+ $data = self::$defaults;
+ // Explode the cookie string using a series of semicolons
+ $pieces = array_filter(array_map('trim', explode(';', $cookie)));
+ // The name of the cookie (first kvp) must exist and include an equal sign.
+ if (empty($pieces[0]) || !strpos($pieces[0], '=')) {
+ return new self($data);
+ }
+
+ // Add the cookie pieces into the parsed data array
+ foreach ($pieces as $part) {
+ $cookieParts = explode('=', $part, 2);
+ $key = trim($cookieParts[0]);
+ $value = isset($cookieParts[1])
+ ? trim($cookieParts[1], " \n\r\t\0\x0B")
+ : true;
+
+ // Only check for non-cookies when cookies have been found
+ if (empty($data['Name'])) {
+ $data['Name'] = $key;
+ $data['Value'] = $value;
+ } else {
+ foreach (array_keys(self::$defaults) as $search) {
+ if (!strcasecmp($search, $key)) {
+ $data[$search] = $value;
+ continue 2;
+ }
+ }
+ $data[$key] = $value;
+ }
+ }
+
+ return new self($data);
+ }
+
+ /**
+ * @param array $data Array of cookie data provided by a Cookie parser
+ */
+ public function __construct(array $data = [])
+ {
+ $this->data = array_replace(self::$defaults, $data);
+ // Extract the Expires value and turn it into a UNIX timestamp if needed
+ if (!$this->getExpires() && $this->getMaxAge()) {
+ // Calculate the Expires date
+ $this->setExpires(time() + $this->getMaxAge());
+ } elseif ($this->getExpires() && !is_numeric($this->getExpires())) {
+ $this->setExpires($this->getExpires());
+ }
+ }
+
+ public function __toString()
+ {
+ $str = $this->data['Name'] . '=' . $this->data['Value'] . '; ';
+ foreach ($this->data as $k => $v) {
+ if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) {
+ if ($k === 'Expires') {
+ $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
+ } else {
+ $str .= ($v === true ? $k : "{$k}={$v}") . '; ';
+ }
+ }
+ }
+
+ return rtrim($str, '; ');
+ }
+
+ public function toArray()
+ {
+ return $this->data;
+ }
+
+ /**
+ * Get the cookie name
+ *
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->data['Name'];
+ }
+
+ /**
+ * Set the cookie name
+ *
+ * @param string $name Cookie name
+ */
+ public function setName($name)
+ {
+ $this->data['Name'] = $name;
+ }
+
+ /**
+ * Get the cookie value
+ *
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->data['Value'];
+ }
+
+ /**
+ * Set the cookie value
+ *
+ * @param string $value Cookie value
+ */
+ public function setValue($value)
+ {
+ $this->data['Value'] = $value;
+ }
+
+ /**
+ * Get the domain
+ *
+ * @return string|null
+ */
+ public function getDomain()
+ {
+ return $this->data['Domain'];
+ }
+
+ /**
+ * Set the domain of the cookie
+ *
+ * @param string $domain
+ */
+ public function setDomain($domain)
+ {
+ $this->data['Domain'] = $domain;
+ }
+
+ /**
+ * Get the path
+ *
+ * @return string
+ */
+ public function getPath()
+ {
+ return $this->data['Path'];
+ }
+
+ /**
+ * Set the path of the cookie
+ *
+ * @param string $path Path of the cookie
+ */
+ public function setPath($path)
+ {
+ $this->data['Path'] = $path;
+ }
+
+ /**
+ * Maximum lifetime of the cookie in seconds
+ *
+ * @return int|null
+ */
+ public function getMaxAge()
+ {
+ return $this->data['Max-Age'];
+ }
+
+ /**
+ * Set the max-age of the cookie
+ *
+ * @param int $maxAge Max age of the cookie in seconds
+ */
+ public function setMaxAge($maxAge)
+ {
+ $this->data['Max-Age'] = $maxAge;
+ }
+
+ /**
+ * The UNIX timestamp when the cookie Expires
+ *
+ * @return mixed
+ */
+ public function getExpires()
+ {
+ return $this->data['Expires'];
+ }
+
+ /**
+ * Set the unix timestamp for which the cookie will expire
+ *
+ * @param int $timestamp Unix timestamp
+ */
+ public function setExpires($timestamp)
+ {
+ $this->data['Expires'] = is_numeric($timestamp)
+ ? (int) $timestamp
+ : strtotime($timestamp);
+ }
+
+ /**
+ * Get whether or not this is a secure cookie
+ *
+ * @return bool|null
+ */
+ public function getSecure()
+ {
+ return $this->data['Secure'];
+ }
+
+ /**
+ * Set whether or not the cookie is secure
+ *
+ * @param bool $secure Set to true or false if secure
+ */
+ public function setSecure($secure)
+ {
+ $this->data['Secure'] = $secure;
+ }
+
+ /**
+ * Get whether or not this is a session cookie
+ *
+ * @return bool|null
+ */
+ public function getDiscard()
+ {
+ return $this->data['Discard'];
+ }
+
+ /**
+ * Set whether or not this is a session cookie
+ *
+ * @param bool $discard Set to true or false if this is a session cookie
+ */
+ public function setDiscard($discard)
+ {
+ $this->data['Discard'] = $discard;
+ }
+
+ /**
+ * Get whether or not this is an HTTP only cookie
+ *
+ * @return bool
+ */
+ public function getHttpOnly()
+ {
+ return $this->data['HttpOnly'];
+ }
+
+ /**
+ * Set whether or not this is an HTTP only cookie
+ *
+ * @param bool $httpOnly Set to true or false if this is HTTP only
+ */
+ public function setHttpOnly($httpOnly)
+ {
+ $this->data['HttpOnly'] = $httpOnly;
+ }
+
+ /**
+ * Check if the cookie matches a path value.
+ *
+ * A request-path path-matches a given cookie-path if at least one of
+ * the following conditions holds:
+ *
+ * - The cookie-path and the request-path are identical.
+ * - The cookie-path is a prefix of the request-path, and the last
+ * character of the cookie-path is %x2F ("/").
+ * - The cookie-path is a prefix of the request-path, and the first
+ * character of the request-path that is not included in the cookie-
+ * path is a %x2F ("/") character.
+ *
+ * @param string $requestPath Path to check against
+ *
+ * @return bool
+ */
+ public function matchesPath($requestPath)
+ {
+ $cookiePath = $this->getPath();
+
+ // Match on exact matches or when path is the default empty "/"
+ if ($cookiePath === '/' || $cookiePath == $requestPath) {
+ return true;
+ }
+
+ // Ensure that the cookie-path is a prefix of the request path.
+ if (0 !== strpos($requestPath, $cookiePath)) {
+ return false;
+ }
+
+ // Match if the last character of the cookie-path is "/"
+ if (substr($cookiePath, -1, 1) === '/') {
+ return true;
+ }
+
+ // Match if the first character not included in cookie path is "/"
+ return substr($requestPath, strlen($cookiePath), 1) === '/';
+ }
+
+ /**
+ * Check if the cookie matches a domain value
+ *
+ * @param string $domain Domain to check against
+ *
+ * @return bool
+ */
+ public function matchesDomain($domain)
+ {
+ $cookieDomain = $this->getDomain();
+ if (null === $cookieDomain) {
+ return true;
+ }
+
+ // Remove the leading '.' as per spec in RFC 6265.
+ // http://tools.ietf.org/html/rfc6265#section-5.2.3
+ $cookieDomain = ltrim(strtolower($cookieDomain), '.');
+
+ $domain = strtolower($domain);
+
+ // Domain not set or exact match.
+ if ('' === $cookieDomain || $domain === $cookieDomain) {
+ return true;
+ }
+
+ // Matching the subdomain according to RFC 6265.
+ // http://tools.ietf.org/html/rfc6265#section-5.1.3
+ if (filter_var($domain, FILTER_VALIDATE_IP)) {
+ return false;
+ }
+
+ return (bool) preg_match('/\.' . preg_quote($cookieDomain, '/') . '$/', $domain);
+ }
+
+ /**
+ * Check if the cookie is expired
+ *
+ * @return bool
+ */
+ public function isExpired()
+ {
+ return $this->getExpires() !== null && time() > $this->getExpires();
+ }
+
+ /**
+ * Check if the cookie is valid according to RFC 6265
+ *
+ * @return bool|string Returns true if valid or an error message if invalid
+ */
+ public function validate()
+ {
+ // Names must not be empty, but can be 0
+ $name = $this->getName();
+ if (empty($name) && !is_numeric($name)) {
+ return 'The cookie name must not be empty';
+ }
+
+ // Check if any of the invalid characters are present in the cookie name
+ if (preg_match(
+ '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/',
+ $name
+ )) {
+ return 'Cookie name must not contain invalid characters: ASCII '
+ . 'Control characters (0-31;127), space, tab and the '
+ . 'following characters: ()<>@,;:\"/?={}';
+ }
+
+ // Value must not be empty, but can be 0
+ $value = $this->getValue();
+ if (empty($value) && !is_numeric($value)) {
+ return 'The cookie value must not be empty';
+ }
+
+ // Domains must not be empty, but can be 0
+ // A "0" is not a valid internet domain, but may be used as server name
+ // in a private network.
+ $domain = $this->getDomain();
+ if (empty($domain) && !is_numeric($domain)) {
+ return 'The cookie domain must not be empty';
+ }
+
+ return true;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php
new file mode 100644
index 0000000..427d896
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php
@@ -0,0 +1,27 @@
+getStatusCode()
+ : 0;
+ parent::__construct($message, $code, $previous);
+ $this->request = $request;
+ $this->response = $response;
+ $this->handlerContext = $handlerContext;
+ }
+
+ /**
+ * Wrap non-RequestExceptions with a RequestException
+ *
+ * @param RequestInterface $request
+ * @param \Exception $e
+ *
+ * @return RequestException
+ */
+ public static function wrapException(RequestInterface $request, \Exception $e)
+ {
+ return $e instanceof RequestException
+ ? $e
+ : new RequestException($e->getMessage(), $request, null, $e);
+ }
+
+ /**
+ * Factory method to create a new exception with a normalized error message
+ *
+ * @param RequestInterface $request Request
+ * @param ResponseInterface $response Response received
+ * @param \Exception $previous Previous exception
+ * @param array $ctx Optional handler context.
+ *
+ * @return self
+ */
+ public static function create(
+ RequestInterface $request,
+ ResponseInterface $response = null,
+ \Exception $previous = null,
+ array $ctx = []
+ ) {
+ if (!$response) {
+ return new self(
+ 'Error completing request',
+ $request,
+ null,
+ $previous,
+ $ctx
+ );
+ }
+
+ $level = (int) floor($response->getStatusCode() / 100);
+ if ($level === 4) {
+ $label = 'Client error';
+ $className = ClientException::class;
+ } elseif ($level === 5) {
+ $label = 'Server error';
+ $className = ServerException::class;
+ } else {
+ $label = 'Unsuccessful request';
+ $className = __CLASS__;
+ }
+
+ $uri = $request->getUri();
+ $uri = static::obfuscateUri($uri);
+
+ // Client Error: `GET /` resulted in a `404 Not Found` response:
+ // ... (truncated)
+ $message = sprintf(
+ '%s: `%s %s` resulted in a `%s %s` response',
+ $label,
+ $request->getMethod(),
+ $uri,
+ $response->getStatusCode(),
+ $response->getReasonPhrase()
+ );
+
+ $summary = static::getResponseBodySummary($response);
+
+ if ($summary !== null) {
+ $message .= ":\n{$summary}\n";
+ }
+
+ return new $className($message, $request, $response, $previous, $ctx);
+ }
+
+ /**
+ * Get a short summary of the response
+ *
+ * Will return `null` if the response is not printable.
+ *
+ * @param ResponseInterface $response
+ *
+ * @return string|null
+ */
+ public static function getResponseBodySummary(ResponseInterface $response)
+ {
+ return \GuzzleHttp\Psr7\get_message_body_summary($response);
+ }
+
+ /**
+ * Obfuscates URI if there is a username and a password present
+ *
+ * @param UriInterface $uri
+ *
+ * @return UriInterface
+ */
+ private static function obfuscateUri(UriInterface $uri)
+ {
+ $userInfo = $uri->getUserInfo();
+
+ if (false !== ($pos = strpos($userInfo, ':'))) {
+ return $uri->withUserInfo(substr($userInfo, 0, $pos), '***');
+ }
+
+ return $uri;
+ }
+
+ /**
+ * Get the request that caused the exception
+ *
+ * @return RequestInterface
+ */
+ public function getRequest()
+ {
+ return $this->request;
+ }
+
+ /**
+ * Get the associated response
+ *
+ * @return ResponseInterface|null
+ */
+ public function getResponse()
+ {
+ return $this->response;
+ }
+
+ /**
+ * Check if a response was received
+ *
+ * @return bool
+ */
+ public function hasResponse()
+ {
+ return $this->response !== null;
+ }
+
+ /**
+ * Get contextual information about the error from the underlying handler.
+ *
+ * The contents of this array will vary depending on which handler you are
+ * using. It may also be just an empty array. Relying on this data will
+ * couple you to a specific handler, but can give more debug information
+ * when needed.
+ *
+ * @return array
+ */
+ public function getHandlerContext()
+ {
+ return $this->handlerContext;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php
new file mode 100644
index 0000000..a77c289
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php
@@ -0,0 +1,27 @@
+stream = $stream;
+ $msg = $msg ?: 'Could not seek the stream to position ' . $pos;
+ parent::__construct($msg);
+ }
+
+ /**
+ * @return StreamInterface
+ */
+ public function getStream()
+ {
+ return $this->stream;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php
new file mode 100644
index 0000000..127094c
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php
@@ -0,0 +1,9 @@
+maxHandles = $maxHandles;
+ }
+
+ public function create(RequestInterface $request, array $options)
+ {
+ if (isset($options['curl']['body_as_string'])) {
+ $options['_body_as_string'] = $options['curl']['body_as_string'];
+ unset($options['curl']['body_as_string']);
+ }
+
+ $easy = new EasyHandle;
+ $easy->request = $request;
+ $easy->options = $options;
+ $conf = $this->getDefaultConf($easy);
+ $this->applyMethod($easy, $conf);
+ $this->applyHandlerOptions($easy, $conf);
+ $this->applyHeaders($easy, $conf);
+ unset($conf['_headers']);
+
+ // Add handler options from the request configuration options
+ if (isset($options['curl'])) {
+ $conf = array_replace($conf, $options['curl']);
+ }
+
+ $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy);
+ $easy->handle = $this->handles
+ ? array_pop($this->handles)
+ : curl_init();
+ curl_setopt_array($easy->handle, $conf);
+
+ return $easy;
+ }
+
+ public function release(EasyHandle $easy)
+ {
+ $resource = $easy->handle;
+ unset($easy->handle);
+
+ if (count($this->handles) >= $this->maxHandles) {
+ curl_close($resource);
+ } else {
+ // Remove all callback functions as they can hold onto references
+ // and are not cleaned up by curl_reset. Using curl_setopt_array
+ // does not work for some reason, so removing each one
+ // individually.
+ curl_setopt($resource, CURLOPT_HEADERFUNCTION, null);
+ curl_setopt($resource, CURLOPT_READFUNCTION, null);
+ curl_setopt($resource, CURLOPT_WRITEFUNCTION, null);
+ curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null);
+ curl_reset($resource);
+ $this->handles[] = $resource;
+ }
+ }
+
+ /**
+ * Completes a cURL transaction, either returning a response promise or a
+ * rejected promise.
+ *
+ * @param callable $handler
+ * @param EasyHandle $easy
+ * @param CurlFactoryInterface $factory Dictates how the handle is released
+ *
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public static function finish(
+ callable $handler,
+ EasyHandle $easy,
+ CurlFactoryInterface $factory
+ ) {
+ if (isset($easy->options['on_stats'])) {
+ self::invokeStats($easy);
+ }
+
+ if (!$easy->response || $easy->errno) {
+ return self::finishError($handler, $easy, $factory);
+ }
+
+ // Return the response if it is present and there is no error.
+ $factory->release($easy);
+
+ // Rewind the body of the response if possible.
+ $body = $easy->response->getBody();
+ if ($body->isSeekable()) {
+ $body->rewind();
+ }
+
+ return new FulfilledPromise($easy->response);
+ }
+
+ private static function invokeStats(EasyHandle $easy)
+ {
+ $curlStats = curl_getinfo($easy->handle);
+ $curlStats['appconnect_time'] = curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME);
+ $stats = new TransferStats(
+ $easy->request,
+ $easy->response,
+ $curlStats['total_time'],
+ $easy->errno,
+ $curlStats
+ );
+ call_user_func($easy->options['on_stats'], $stats);
+ }
+
+ private static function finishError(
+ callable $handler,
+ EasyHandle $easy,
+ CurlFactoryInterface $factory
+ ) {
+ // Get error information and release the handle to the factory.
+ $ctx = [
+ 'errno' => $easy->errno,
+ 'error' => curl_error($easy->handle),
+ 'appconnect_time' => curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME),
+ ] + curl_getinfo($easy->handle);
+ $ctx[self::CURL_VERSION_STR] = curl_version()['version'];
+ $factory->release($easy);
+
+ // Retry when nothing is present or when curl failed to rewind.
+ if (empty($easy->options['_err_message'])
+ && (!$easy->errno || $easy->errno == 65)
+ ) {
+ return self::retryFailedRewind($handler, $easy, $ctx);
+ }
+
+ return self::createRejection($easy, $ctx);
+ }
+
+ private static function createRejection(EasyHandle $easy, array $ctx)
+ {
+ static $connectionErrors = [
+ CURLE_OPERATION_TIMEOUTED => true,
+ CURLE_COULDNT_RESOLVE_HOST => true,
+ CURLE_COULDNT_CONNECT => true,
+ CURLE_SSL_CONNECT_ERROR => true,
+ CURLE_GOT_NOTHING => true,
+ ];
+
+ // If an exception was encountered during the onHeaders event, then
+ // return a rejected promise that wraps that exception.
+ if ($easy->onHeadersException) {
+ return \GuzzleHttp\Promise\rejection_for(
+ new RequestException(
+ 'An error was encountered during the on_headers event',
+ $easy->request,
+ $easy->response,
+ $easy->onHeadersException,
+ $ctx
+ )
+ );
+ }
+ if (version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) {
+ $message = sprintf(
+ 'cURL error %s: %s (%s)',
+ $ctx['errno'],
+ $ctx['error'],
+ 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
+ );
+ } else {
+ $message = sprintf(
+ 'cURL error %s: %s (%s) for %s',
+ $ctx['errno'],
+ $ctx['error'],
+ 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html',
+ $easy->request->getUri()
+ );
+ }
+
+ // Create a connection exception if it was a specific error code.
+ $error = isset($connectionErrors[$easy->errno])
+ ? new ConnectException($message, $easy->request, null, $ctx)
+ : new RequestException($message, $easy->request, $easy->response, null, $ctx);
+
+ return \GuzzleHttp\Promise\rejection_for($error);
+ }
+
+ private function getDefaultConf(EasyHandle $easy)
+ {
+ $conf = [
+ '_headers' => $easy->request->getHeaders(),
+ CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(),
+ CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''),
+ CURLOPT_RETURNTRANSFER => false,
+ CURLOPT_HEADER => false,
+ CURLOPT_CONNECTTIMEOUT => 150,
+ ];
+
+ if (defined('CURLOPT_PROTOCOLS')) {
+ $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;
+ }
+
+ $version = $easy->request->getProtocolVersion();
+ if ($version == 1.1) {
+ $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1;
+ } elseif ($version == 2.0) {
+ $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0;
+ } else {
+ $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;
+ }
+
+ return $conf;
+ }
+
+ private function applyMethod(EasyHandle $easy, array &$conf)
+ {
+ $body = $easy->request->getBody();
+ $size = $body->getSize();
+
+ if ($size === null || $size > 0) {
+ $this->applyBody($easy->request, $easy->options, $conf);
+ return;
+ }
+
+ $method = $easy->request->getMethod();
+ if ($method === 'PUT' || $method === 'POST') {
+ // See http://tools.ietf.org/html/rfc7230#section-3.3.2
+ if (!$easy->request->hasHeader('Content-Length')) {
+ $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0';
+ }
+ } elseif ($method === 'HEAD') {
+ $conf[CURLOPT_NOBODY] = true;
+ unset(
+ $conf[CURLOPT_WRITEFUNCTION],
+ $conf[CURLOPT_READFUNCTION],
+ $conf[CURLOPT_FILE],
+ $conf[CURLOPT_INFILE]
+ );
+ }
+ }
+
+ private function applyBody(RequestInterface $request, array $options, array &$conf)
+ {
+ $size = $request->hasHeader('Content-Length')
+ ? (int) $request->getHeaderLine('Content-Length')
+ : null;
+
+ // Send the body as a string if the size is less than 1MB OR if the
+ // [curl][body_as_string] request value is set.
+ if (($size !== null && $size < 1000000) ||
+ !empty($options['_body_as_string'])
+ ) {
+ $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody();
+ // Don't duplicate the Content-Length header
+ $this->removeHeader('Content-Length', $conf);
+ $this->removeHeader('Transfer-Encoding', $conf);
+ } else {
+ $conf[CURLOPT_UPLOAD] = true;
+ if ($size !== null) {
+ $conf[CURLOPT_INFILESIZE] = $size;
+ $this->removeHeader('Content-Length', $conf);
+ }
+ $body = $request->getBody();
+ if ($body->isSeekable()) {
+ $body->rewind();
+ }
+ $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) {
+ return $body->read($length);
+ };
+ }
+
+ // If the Expect header is not present, prevent curl from adding it
+ if (!$request->hasHeader('Expect')) {
+ $conf[CURLOPT_HTTPHEADER][] = 'Expect:';
+ }
+
+ // cURL sometimes adds a content-type by default. Prevent this.
+ if (!$request->hasHeader('Content-Type')) {
+ $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:';
+ }
+ }
+
+ private function applyHeaders(EasyHandle $easy, array &$conf)
+ {
+ foreach ($conf['_headers'] as $name => $values) {
+ foreach ($values as $value) {
+ $value = (string) $value;
+ if ($value === '') {
+ // cURL requires a special format for empty headers.
+ // See https://github.com/guzzle/guzzle/issues/1882 for more details.
+ $conf[CURLOPT_HTTPHEADER][] = "$name;";
+ } else {
+ $conf[CURLOPT_HTTPHEADER][] = "$name: $value";
+ }
+ }
+ }
+
+ // Remove the Accept header if one was not set
+ if (!$easy->request->hasHeader('Accept')) {
+ $conf[CURLOPT_HTTPHEADER][] = 'Accept:';
+ }
+ }
+
+ /**
+ * Remove a header from the options array.
+ *
+ * @param string $name Case-insensitive header to remove
+ * @param array $options Array of options to modify
+ */
+ private function removeHeader($name, array &$options)
+ {
+ foreach (array_keys($options['_headers']) as $key) {
+ if (!strcasecmp($key, $name)) {
+ unset($options['_headers'][$key]);
+ return;
+ }
+ }
+ }
+
+ private function applyHandlerOptions(EasyHandle $easy, array &$conf)
+ {
+ $options = $easy->options;
+ if (isset($options['verify'])) {
+ if ($options['verify'] === false) {
+ unset($conf[CURLOPT_CAINFO]);
+ $conf[CURLOPT_SSL_VERIFYHOST] = 0;
+ $conf[CURLOPT_SSL_VERIFYPEER] = false;
+ } else {
+ $conf[CURLOPT_SSL_VERIFYHOST] = 2;
+ $conf[CURLOPT_SSL_VERIFYPEER] = true;
+ if (is_string($options['verify'])) {
+ // Throw an error if the file/folder/link path is not valid or doesn't exist.
+ if (!file_exists($options['verify'])) {
+ throw new \InvalidArgumentException(
+ "SSL CA bundle not found: {$options['verify']}"
+ );
+ }
+ // If it's a directory or a link to a directory use CURLOPT_CAPATH.
+ // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO.
+ if (is_dir($options['verify']) ||
+ (is_link($options['verify']) && is_dir(readlink($options['verify'])))) {
+ $conf[CURLOPT_CAPATH] = $options['verify'];
+ } else {
+ $conf[CURLOPT_CAINFO] = $options['verify'];
+ }
+ }
+ }
+ }
+
+ if (!empty($options['decode_content'])) {
+ $accept = $easy->request->getHeaderLine('Accept-Encoding');
+ if ($accept) {
+ $conf[CURLOPT_ENCODING] = $accept;
+ } else {
+ $conf[CURLOPT_ENCODING] = '';
+ // Don't let curl send the header over the wire
+ $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
+ }
+ }
+
+ if (isset($options['sink'])) {
+ $sink = $options['sink'];
+ if (!is_string($sink)) {
+ $sink = \GuzzleHttp\Psr7\stream_for($sink);
+ } elseif (!is_dir(dirname($sink))) {
+ // Ensure that the directory exists before failing in curl.
+ throw new \RuntimeException(sprintf(
+ 'Directory %s does not exist for sink value of %s',
+ dirname($sink),
+ $sink
+ ));
+ } else {
+ $sink = new LazyOpenStream($sink, 'w+');
+ }
+ $easy->sink = $sink;
+ $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) {
+ return $sink->write($write);
+ };
+ } else {
+ // Use a default temp stream if no sink was set.
+ $conf[CURLOPT_FILE] = fopen('php://temp', 'w+');
+ $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]);
+ }
+ $timeoutRequiresNoSignal = false;
+ if (isset($options['timeout'])) {
+ $timeoutRequiresNoSignal |= $options['timeout'] < 1;
+ $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000;
+ }
+
+ // CURL default value is CURL_IPRESOLVE_WHATEVER
+ if (isset($options['force_ip_resolve'])) {
+ if ('v4' === $options['force_ip_resolve']) {
+ $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;
+ } elseif ('v6' === $options['force_ip_resolve']) {
+ $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V6;
+ }
+ }
+
+ if (isset($options['connect_timeout'])) {
+ $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1;
+ $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000;
+ }
+
+ if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
+ $conf[CURLOPT_NOSIGNAL] = true;
+ }
+
+ if (isset($options['proxy'])) {
+ if (!is_array($options['proxy'])) {
+ $conf[CURLOPT_PROXY] = $options['proxy'];
+ } else {
+ $scheme = $easy->request->getUri()->getScheme();
+ if (isset($options['proxy'][$scheme])) {
+ $host = $easy->request->getUri()->getHost();
+ if (!isset($options['proxy']['no']) ||
+ !\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no'])
+ ) {
+ $conf[CURLOPT_PROXY] = $options['proxy'][$scheme];
+ }
+ }
+ }
+ }
+
+ if (isset($options['cert'])) {
+ $cert = $options['cert'];
+ if (is_array($cert)) {
+ $conf[CURLOPT_SSLCERTPASSWD] = $cert[1];
+ $cert = $cert[0];
+ }
+ if (!file_exists($cert)) {
+ throw new \InvalidArgumentException(
+ "SSL certificate not found: {$cert}"
+ );
+ }
+ $conf[CURLOPT_SSLCERT] = $cert;
+ }
+
+ if (isset($options['ssl_key'])) {
+ if (is_array($options['ssl_key'])) {
+ if (count($options['ssl_key']) === 2) {
+ list($sslKey, $conf[CURLOPT_SSLKEYPASSWD]) = $options['ssl_key'];
+ } else {
+ list($sslKey) = $options['ssl_key'];
+ }
+ }
+
+ $sslKey = isset($sslKey) ? $sslKey: $options['ssl_key'];
+
+ if (!file_exists($sslKey)) {
+ throw new \InvalidArgumentException(
+ "SSL private key not found: {$sslKey}"
+ );
+ }
+ $conf[CURLOPT_SSLKEY] = $sslKey;
+ }
+
+ if (isset($options['progress'])) {
+ $progress = $options['progress'];
+ if (!is_callable($progress)) {
+ throw new \InvalidArgumentException(
+ 'progress client option must be callable'
+ );
+ }
+ $conf[CURLOPT_NOPROGRESS] = false;
+ $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) {
+ $args = func_get_args();
+ // PHP 5.5 pushed the handle onto the start of the args
+ if (is_resource($args[0])) {
+ array_shift($args);
+ }
+ call_user_func_array($progress, $args);
+ };
+ }
+
+ if (!empty($options['debug'])) {
+ $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']);
+ $conf[CURLOPT_VERBOSE] = true;
+ }
+ }
+
+ /**
+ * This function ensures that a response was set on a transaction. If one
+ * was not set, then the request is retried if possible. This error
+ * typically means you are sending a payload, curl encountered a
+ * "Connection died, retrying a fresh connect" error, tried to rewind the
+ * stream, and then encountered a "necessary data rewind wasn't possible"
+ * error, causing the request to be sent through curl_multi_info_read()
+ * without an error status.
+ */
+ private static function retryFailedRewind(
+ callable $handler,
+ EasyHandle $easy,
+ array $ctx
+ ) {
+ try {
+ // Only rewind if the body has been read from.
+ $body = $easy->request->getBody();
+ if ($body->tell() > 0) {
+ $body->rewind();
+ }
+ } catch (\RuntimeException $e) {
+ $ctx['error'] = 'The connection unexpectedly failed without '
+ . 'providing an error. The request would have been retried, '
+ . 'but attempting to rewind the request body failed. '
+ . 'Exception: ' . $e;
+ return self::createRejection($easy, $ctx);
+ }
+
+ // Retry no more than 3 times before giving up.
+ if (!isset($easy->options['_curl_retries'])) {
+ $easy->options['_curl_retries'] = 1;
+ } elseif ($easy->options['_curl_retries'] == 2) {
+ $ctx['error'] = 'The cURL request was retried 3 times '
+ . 'and did not succeed. The most likely reason for the failure '
+ . 'is that cURL was unable to rewind the body of the request '
+ . 'and subsequent retries resulted in the same error. Turn on '
+ . 'the debug option to see what went wrong. See '
+ . 'https://bugs.php.net/bug.php?id=47204 for more information.';
+ return self::createRejection($easy, $ctx);
+ } else {
+ $easy->options['_curl_retries']++;
+ }
+
+ return $handler($easy->request, $easy->options);
+ }
+
+ private function createHeaderFn(EasyHandle $easy)
+ {
+ if (isset($easy->options['on_headers'])) {
+ $onHeaders = $easy->options['on_headers'];
+
+ if (!is_callable($onHeaders)) {
+ throw new \InvalidArgumentException('on_headers must be callable');
+ }
+ } else {
+ $onHeaders = null;
+ }
+
+ return function ($ch, $h) use (
+ $onHeaders,
+ $easy,
+ &$startingResponse
+ ) {
+ $value = trim($h);
+ if ($value === '') {
+ $startingResponse = true;
+ $easy->createResponse();
+ if ($onHeaders !== null) {
+ try {
+ $onHeaders($easy->response);
+ } catch (\Exception $e) {
+ // Associate the exception with the handle and trigger
+ // a curl header write error by returning 0.
+ $easy->onHeadersException = $e;
+ return -1;
+ }
+ }
+ } elseif ($startingResponse) {
+ $startingResponse = false;
+ $easy->headers = [$value];
+ } else {
+ $easy->headers[] = $value;
+ }
+ return strlen($h);
+ };
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php
new file mode 100644
index 0000000..b0fc236
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php
@@ -0,0 +1,27 @@
+factory = isset($options['handle_factory'])
+ ? $options['handle_factory']
+ : new CurlFactory(3);
+ }
+
+ public function __invoke(RequestInterface $request, array $options)
+ {
+ if (isset($options['delay'])) {
+ usleep($options['delay'] * 1000);
+ }
+
+ $easy = $this->factory->create($request, $options);
+ curl_exec($easy->handle);
+ $easy->errno = curl_errno($easy->handle);
+
+ return CurlFactory::finish($this, $easy, $this->factory);
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
new file mode 100644
index 0000000..564c95f
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
@@ -0,0 +1,219 @@
+factory = isset($options['handle_factory'])
+ ? $options['handle_factory'] : new CurlFactory(50);
+
+ if (isset($options['select_timeout'])) {
+ $this->selectTimeout = $options['select_timeout'];
+ } elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
+ $this->selectTimeout = $selectTimeout;
+ } else {
+ $this->selectTimeout = 1;
+ }
+
+ $this->options = isset($options['options']) ? $options['options'] : [];
+ }
+
+ public function __get($name)
+ {
+ if ($name === '_mh') {
+ $this->_mh = curl_multi_init();
+
+ foreach ($this->options as $option => $value) {
+ // A warning is raised in case of a wrong option.
+ curl_multi_setopt($this->_mh, $option, $value);
+ }
+
+ // Further calls to _mh will return the value directly, without entering the
+ // __get() method at all.
+ return $this->_mh;
+ }
+
+ throw new \BadMethodCallException();
+ }
+
+ public function __destruct()
+ {
+ if (isset($this->_mh)) {
+ curl_multi_close($this->_mh);
+ unset($this->_mh);
+ }
+ }
+
+ public function __invoke(RequestInterface $request, array $options)
+ {
+ $easy = $this->factory->create($request, $options);
+ $id = (int) $easy->handle;
+
+ $promise = new Promise(
+ [$this, 'execute'],
+ function () use ($id) {
+ return $this->cancel($id);
+ }
+ );
+
+ $this->addRequest(['easy' => $easy, 'deferred' => $promise]);
+
+ return $promise;
+ }
+
+ /**
+ * Ticks the curl event loop.
+ */
+ public function tick()
+ {
+ // Add any delayed handles if needed.
+ if ($this->delays) {
+ $currentTime = Utils::currentTime();
+ foreach ($this->delays as $id => $delay) {
+ if ($currentTime >= $delay) {
+ unset($this->delays[$id]);
+ curl_multi_add_handle(
+ $this->_mh,
+ $this->handles[$id]['easy']->handle
+ );
+ }
+ }
+ }
+
+ // Step through the task queue which may add additional requests.
+ P\queue()->run();
+
+ if ($this->active &&
+ curl_multi_select($this->_mh, $this->selectTimeout) === -1
+ ) {
+ // Perform a usleep if a select returns -1.
+ // See: https://bugs.php.net/bug.php?id=61141
+ usleep(250);
+ }
+
+ while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM);
+
+ $this->processMessages();
+ }
+
+ /**
+ * Runs until all outstanding connections have completed.
+ */
+ public function execute()
+ {
+ $queue = P\queue();
+
+ while ($this->handles || !$queue->isEmpty()) {
+ // If there are no transfers, then sleep for the next delay
+ if (!$this->active && $this->delays) {
+ usleep($this->timeToNext());
+ }
+ $this->tick();
+ }
+ }
+
+ private function addRequest(array $entry)
+ {
+ $easy = $entry['easy'];
+ $id = (int) $easy->handle;
+ $this->handles[$id] = $entry;
+ if (empty($easy->options['delay'])) {
+ curl_multi_add_handle($this->_mh, $easy->handle);
+ } else {
+ $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000);
+ }
+ }
+
+ /**
+ * Cancels a handle from sending and removes references to it.
+ *
+ * @param int $id Handle ID to cancel and remove.
+ *
+ * @return bool True on success, false on failure.
+ */
+ private function cancel($id)
+ {
+ // Cannot cancel if it has been processed.
+ if (!isset($this->handles[$id])) {
+ return false;
+ }
+
+ $handle = $this->handles[$id]['easy']->handle;
+ unset($this->delays[$id], $this->handles[$id]);
+ curl_multi_remove_handle($this->_mh, $handle);
+ curl_close($handle);
+
+ return true;
+ }
+
+ private function processMessages()
+ {
+ while ($done = curl_multi_info_read($this->_mh)) {
+ $id = (int) $done['handle'];
+ curl_multi_remove_handle($this->_mh, $done['handle']);
+
+ if (!isset($this->handles[$id])) {
+ // Probably was cancelled.
+ continue;
+ }
+
+ $entry = $this->handles[$id];
+ unset($this->handles[$id], $this->delays[$id]);
+ $entry['easy']->errno = $done['result'];
+ $entry['deferred']->resolve(
+ CurlFactory::finish(
+ $this,
+ $entry['easy'],
+ $this->factory
+ )
+ );
+ }
+ }
+
+ private function timeToNext()
+ {
+ $currentTime = Utils::currentTime();
+ $nextTime = PHP_INT_MAX;
+ foreach ($this->delays as $time) {
+ if ($time < $nextTime) {
+ $nextTime = $time;
+ }
+ }
+
+ return max(0, $nextTime - $currentTime) * 1000000;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php
new file mode 100644
index 0000000..7754e91
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php
@@ -0,0 +1,92 @@
+headers)) {
+ throw new \RuntimeException('No headers have been received');
+ }
+
+ // HTTP-version SP status-code SP reason-phrase
+ $startLine = explode(' ', array_shift($this->headers), 3);
+ $headers = \GuzzleHttp\headers_from_lines($this->headers);
+ $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
+
+ if (!empty($this->options['decode_content'])
+ && isset($normalizedKeys['content-encoding'])
+ ) {
+ $headers['x-encoded-content-encoding']
+ = $headers[$normalizedKeys['content-encoding']];
+ unset($headers[$normalizedKeys['content-encoding']]);
+ if (isset($normalizedKeys['content-length'])) {
+ $headers['x-encoded-content-length']
+ = $headers[$normalizedKeys['content-length']];
+
+ $bodyLength = (int) $this->sink->getSize();
+ if ($bodyLength) {
+ $headers[$normalizedKeys['content-length']] = $bodyLength;
+ } else {
+ unset($headers[$normalizedKeys['content-length']]);
+ }
+ }
+ }
+
+ // Attach a response to the easy handle with the parsed headers.
+ $this->response = new Response(
+ $startLine[1],
+ $headers,
+ $this->sink,
+ substr($startLine[0], 5),
+ isset($startLine[2]) ? (string) $startLine[2] : null
+ );
+ }
+
+ public function __get($name)
+ {
+ $msg = $name === 'handle'
+ ? 'The EasyHandle has been released'
+ : 'Invalid property: ' . $name;
+ throw new \BadMethodCallException($msg);
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php
new file mode 100644
index 0000000..5b312bc
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php
@@ -0,0 +1,195 @@
+onFulfilled = $onFulfilled;
+ $this->onRejected = $onRejected;
+
+ if ($queue) {
+ call_user_func_array([$this, 'append'], $queue);
+ }
+ }
+
+ public function __invoke(RequestInterface $request, array $options)
+ {
+ if (!$this->queue) {
+ throw new \OutOfBoundsException('Mock queue is empty');
+ }
+
+ if (isset($options['delay']) && is_numeric($options['delay'])) {
+ usleep($options['delay'] * 1000);
+ }
+
+ $this->lastRequest = $request;
+ $this->lastOptions = $options;
+ $response = array_shift($this->queue);
+
+ if (isset($options['on_headers'])) {
+ if (!is_callable($options['on_headers'])) {
+ throw new \InvalidArgumentException('on_headers must be callable');
+ }
+ try {
+ $options['on_headers']($response);
+ } catch (\Exception $e) {
+ $msg = 'An error was encountered during the on_headers event';
+ $response = new RequestException($msg, $request, $response, $e);
+ }
+ }
+
+ if (is_callable($response)) {
+ $response = call_user_func($response, $request, $options);
+ }
+
+ $response = $response instanceof \Exception
+ ? \GuzzleHttp\Promise\rejection_for($response)
+ : \GuzzleHttp\Promise\promise_for($response);
+
+ return $response->then(
+ function ($value) use ($request, $options) {
+ $this->invokeStats($request, $options, $value);
+ if ($this->onFulfilled) {
+ call_user_func($this->onFulfilled, $value);
+ }
+ if (isset($options['sink'])) {
+ $contents = (string) $value->getBody();
+ $sink = $options['sink'];
+
+ if (is_resource($sink)) {
+ fwrite($sink, $contents);
+ } elseif (is_string($sink)) {
+ file_put_contents($sink, $contents);
+ } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) {
+ $sink->write($contents);
+ }
+ }
+
+ return $value;
+ },
+ function ($reason) use ($request, $options) {
+ $this->invokeStats($request, $options, null, $reason);
+ if ($this->onRejected) {
+ call_user_func($this->onRejected, $reason);
+ }
+ return \GuzzleHttp\Promise\rejection_for($reason);
+ }
+ );
+ }
+
+ /**
+ * Adds one or more variadic requests, exceptions, callables, or promises
+ * to the queue.
+ */
+ public function append()
+ {
+ foreach (func_get_args() as $value) {
+ if ($value instanceof ResponseInterface
+ || $value instanceof \Exception
+ || $value instanceof PromiseInterface
+ || is_callable($value)
+ ) {
+ $this->queue[] = $value;
+ } else {
+ throw new \InvalidArgumentException('Expected a response or '
+ . 'exception. Found ' . \GuzzleHttp\describe_type($value));
+ }
+ }
+ }
+
+ /**
+ * Get the last received request.
+ *
+ * @return RequestInterface
+ */
+ public function getLastRequest()
+ {
+ return $this->lastRequest;
+ }
+
+ /**
+ * Get the last received request options.
+ *
+ * @return array
+ */
+ public function getLastOptions()
+ {
+ return $this->lastOptions;
+ }
+
+ /**
+ * Returns the number of remaining items in the queue.
+ *
+ * @return int
+ */
+ public function count()
+ {
+ return count($this->queue);
+ }
+
+ public function reset()
+ {
+ $this->queue = [];
+ }
+
+ private function invokeStats(
+ RequestInterface $request,
+ array $options,
+ ResponseInterface $response = null,
+ $reason = null
+ ) {
+ if (isset($options['on_stats'])) {
+ $transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0;
+ $stats = new TransferStats($request, $response, $transferTime, $reason);
+ call_user_func($options['on_stats'], $stats);
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
new file mode 100644
index 0000000..f8b00be
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
@@ -0,0 +1,55 @@
+withoutHeader('Expect');
+
+ // Append a content-length header if body size is zero to match
+ // cURL's behavior.
+ if (0 === $request->getBody()->getSize()) {
+ $request = $request->withHeader('Content-Length', '0');
+ }
+
+ return $this->createResponse(
+ $request,
+ $options,
+ $this->createStream($request, $options),
+ $startTime
+ );
+ } catch (\InvalidArgumentException $e) {
+ throw $e;
+ } catch (\Exception $e) {
+ // Determine if the error was a networking error.
+ $message = $e->getMessage();
+ // This list can probably get more comprehensive.
+ if (strpos($message, 'getaddrinfo') // DNS lookup failed
+ || strpos($message, 'Connection refused')
+ || strpos($message, "couldn't connect to host") // error on HHVM
+ || strpos($message, "connection attempt failed")
+ ) {
+ $e = new ConnectException($e->getMessage(), $request, $e);
+ }
+ $e = RequestException::wrapException($request, $e);
+ $this->invokeStats($options, $request, $startTime, null, $e);
+
+ return \GuzzleHttp\Promise\rejection_for($e);
+ }
+ }
+
+ private function invokeStats(
+ array $options,
+ RequestInterface $request,
+ $startTime,
+ ResponseInterface $response = null,
+ $error = null
+ ) {
+ if (isset($options['on_stats'])) {
+ $stats = new TransferStats(
+ $request,
+ $response,
+ Utils::currentTime() - $startTime,
+ $error,
+ []
+ );
+ call_user_func($options['on_stats'], $stats);
+ }
+ }
+
+ private function createResponse(
+ RequestInterface $request,
+ array $options,
+ $stream,
+ $startTime
+ ) {
+ $hdrs = $this->lastHeaders;
+ $this->lastHeaders = [];
+ $parts = explode(' ', array_shift($hdrs), 3);
+ $ver = explode('/', $parts[0])[1];
+ $status = $parts[1];
+ $reason = isset($parts[2]) ? $parts[2] : null;
+ $headers = \GuzzleHttp\headers_from_lines($hdrs);
+ list($stream, $headers) = $this->checkDecode($options, $headers, $stream);
+ $stream = Psr7\stream_for($stream);
+ $sink = $stream;
+
+ if (strcasecmp('HEAD', $request->getMethod())) {
+ $sink = $this->createSink($stream, $options);
+ }
+
+ $response = new Psr7\Response($status, $headers, $sink, $ver, $reason);
+
+ if (isset($options['on_headers'])) {
+ try {
+ $options['on_headers']($response);
+ } catch (\Exception $e) {
+ $msg = 'An error was encountered during the on_headers event';
+ $ex = new RequestException($msg, $request, $response, $e);
+ return \GuzzleHttp\Promise\rejection_for($ex);
+ }
+ }
+
+ // Do not drain when the request is a HEAD request because they have
+ // no body.
+ if ($sink !== $stream) {
+ $this->drain(
+ $stream,
+ $sink,
+ $response->getHeaderLine('Content-Length')
+ );
+ }
+
+ $this->invokeStats($options, $request, $startTime, $response, null);
+
+ return new FulfilledPromise($response);
+ }
+
+ private function createSink(StreamInterface $stream, array $options)
+ {
+ if (!empty($options['stream'])) {
+ return $stream;
+ }
+
+ $sink = isset($options['sink'])
+ ? $options['sink']
+ : fopen('php://temp', 'r+');
+
+ return is_string($sink)
+ ? new Psr7\LazyOpenStream($sink, 'w+')
+ : Psr7\stream_for($sink);
+ }
+
+ private function checkDecode(array $options, array $headers, $stream)
+ {
+ // Automatically decode responses when instructed.
+ if (!empty($options['decode_content'])) {
+ $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
+ if (isset($normalizedKeys['content-encoding'])) {
+ $encoding = $headers[$normalizedKeys['content-encoding']];
+ if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') {
+ $stream = new Psr7\InflateStream(
+ Psr7\stream_for($stream)
+ );
+ $headers['x-encoded-content-encoding']
+ = $headers[$normalizedKeys['content-encoding']];
+ // Remove content-encoding header
+ unset($headers[$normalizedKeys['content-encoding']]);
+ // Fix content-length header
+ if (isset($normalizedKeys['content-length'])) {
+ $headers['x-encoded-content-length']
+ = $headers[$normalizedKeys['content-length']];
+
+ $length = (int) $stream->getSize();
+ if ($length === 0) {
+ unset($headers[$normalizedKeys['content-length']]);
+ } else {
+ $headers[$normalizedKeys['content-length']] = [$length];
+ }
+ }
+ }
+ }
+ }
+
+ return [$stream, $headers];
+ }
+
+ /**
+ * Drains the source stream into the "sink" client option.
+ *
+ * @param StreamInterface $source
+ * @param StreamInterface $sink
+ * @param string $contentLength Header specifying the amount of
+ * data to read.
+ *
+ * @return StreamInterface
+ * @throws \RuntimeException when the sink option is invalid.
+ */
+ private function drain(
+ StreamInterface $source,
+ StreamInterface $sink,
+ $contentLength
+ ) {
+ // If a content-length header is provided, then stop reading once
+ // that number of bytes has been read. This can prevent infinitely
+ // reading from a stream when dealing with servers that do not honor
+ // Connection: Close headers.
+ Psr7\copy_to_stream(
+ $source,
+ $sink,
+ (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
+ );
+
+ $sink->seek(0);
+ $source->close();
+
+ return $sink;
+ }
+
+ /**
+ * Create a resource and check to ensure it was created successfully
+ *
+ * @param callable $callback Callable that returns stream resource
+ *
+ * @return resource
+ * @throws \RuntimeException on error
+ */
+ private function createResource(callable $callback)
+ {
+ $errors = null;
+ set_error_handler(function ($_, $msg, $file, $line) use (&$errors) {
+ $errors[] = [
+ 'message' => $msg,
+ 'file' => $file,
+ 'line' => $line
+ ];
+ return true;
+ });
+
+ $resource = $callback();
+ restore_error_handler();
+
+ if (!$resource) {
+ $message = 'Error creating resource: ';
+ foreach ($errors as $err) {
+ foreach ($err as $key => $value) {
+ $message .= "[$key] $value" . PHP_EOL;
+ }
+ }
+ throw new \RuntimeException(trim($message));
+ }
+
+ return $resource;
+ }
+
+ private function createStream(RequestInterface $request, array $options)
+ {
+ static $methods;
+ if (!$methods) {
+ $methods = array_flip(get_class_methods(__CLASS__));
+ }
+
+ // HTTP/1.1 streams using the PHP stream wrapper require a
+ // Connection: close header
+ if ($request->getProtocolVersion() == '1.1'
+ && !$request->hasHeader('Connection')
+ ) {
+ $request = $request->withHeader('Connection', 'close');
+ }
+
+ // Ensure SSL is verified by default
+ if (!isset($options['verify'])) {
+ $options['verify'] = true;
+ }
+
+ $params = [];
+ $context = $this->getDefaultContext($request);
+
+ if (isset($options['on_headers']) && !is_callable($options['on_headers'])) {
+ throw new \InvalidArgumentException('on_headers must be callable');
+ }
+
+ if (!empty($options)) {
+ foreach ($options as $key => $value) {
+ $method = "add_{$key}";
+ if (isset($methods[$method])) {
+ $this->{$method}($request, $context, $value, $params);
+ }
+ }
+ }
+
+ if (isset($options['stream_context'])) {
+ if (!is_array($options['stream_context'])) {
+ throw new \InvalidArgumentException('stream_context must be an array');
+ }
+ $context = array_replace_recursive(
+ $context,
+ $options['stream_context']
+ );
+ }
+
+ // Microsoft NTLM authentication only supported with curl handler
+ if (isset($options['auth'])
+ && is_array($options['auth'])
+ && isset($options['auth'][2])
+ && 'ntlm' == $options['auth'][2]
+ ) {
+ throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler');
+ }
+
+ $uri = $this->resolveHost($request, $options);
+
+ $context = $this->createResource(
+ function () use ($context, $params) {
+ return stream_context_create($context, $params);
+ }
+ );
+
+ return $this->createResource(
+ function () use ($uri, &$http_response_header, $context, $options) {
+ $resource = fopen((string) $uri, 'r', null, $context);
+ $this->lastHeaders = $http_response_header;
+
+ if (isset($options['read_timeout'])) {
+ $readTimeout = $options['read_timeout'];
+ $sec = (int) $readTimeout;
+ $usec = ($readTimeout - $sec) * 100000;
+ stream_set_timeout($resource, $sec, $usec);
+ }
+
+ return $resource;
+ }
+ );
+ }
+
+ private function resolveHost(RequestInterface $request, array $options)
+ {
+ $uri = $request->getUri();
+
+ if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) {
+ if ('v4' === $options['force_ip_resolve']) {
+ $records = dns_get_record($uri->getHost(), DNS_A);
+ if (!isset($records[0]['ip'])) {
+ throw new ConnectException(
+ sprintf(
+ "Could not resolve IPv4 address for host '%s'",
+ $uri->getHost()
+ ),
+ $request
+ );
+ }
+ $uri = $uri->withHost($records[0]['ip']);
+ } elseif ('v6' === $options['force_ip_resolve']) {
+ $records = dns_get_record($uri->getHost(), DNS_AAAA);
+ if (!isset($records[0]['ipv6'])) {
+ throw new ConnectException(
+ sprintf(
+ "Could not resolve IPv6 address for host '%s'",
+ $uri->getHost()
+ ),
+ $request
+ );
+ }
+ $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']');
+ }
+ }
+
+ return $uri;
+ }
+
+ private function getDefaultContext(RequestInterface $request)
+ {
+ $headers = '';
+ foreach ($request->getHeaders() as $name => $value) {
+ foreach ($value as $val) {
+ $headers .= "$name: $val\r\n";
+ }
+ }
+
+ $context = [
+ 'http' => [
+ 'method' => $request->getMethod(),
+ 'header' => $headers,
+ 'protocol_version' => $request->getProtocolVersion(),
+ 'ignore_errors' => true,
+ 'follow_location' => 0,
+ ],
+ ];
+
+ $body = (string) $request->getBody();
+
+ if (!empty($body)) {
+ $context['http']['content'] = $body;
+ // Prevent the HTTP handler from adding a Content-Type header.
+ if (!$request->hasHeader('Content-Type')) {
+ $context['http']['header'] .= "Content-Type:\r\n";
+ }
+ }
+
+ $context['http']['header'] = rtrim($context['http']['header']);
+
+ return $context;
+ }
+
+ private function add_proxy(RequestInterface $request, &$options, $value, &$params)
+ {
+ if (!is_array($value)) {
+ $options['http']['proxy'] = $value;
+ } else {
+ $scheme = $request->getUri()->getScheme();
+ if (isset($value[$scheme])) {
+ if (!isset($value['no'])
+ || !\GuzzleHttp\is_host_in_noproxy(
+ $request->getUri()->getHost(),
+ $value['no']
+ )
+ ) {
+ $options['http']['proxy'] = $value[$scheme];
+ }
+ }
+ }
+ }
+
+ private function add_timeout(RequestInterface $request, &$options, $value, &$params)
+ {
+ if ($value > 0) {
+ $options['http']['timeout'] = $value;
+ }
+ }
+
+ private function add_verify(RequestInterface $request, &$options, $value, &$params)
+ {
+ if ($value === true) {
+ // PHP 5.6 or greater will find the system cert by default. When
+ // < 5.6, use the Guzzle bundled cacert.
+ if (PHP_VERSION_ID < 50600) {
+ $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle();
+ }
+ } elseif (is_string($value)) {
+ $options['ssl']['cafile'] = $value;
+ if (!file_exists($value)) {
+ throw new \RuntimeException("SSL CA bundle not found: $value");
+ }
+ } elseif ($value === false) {
+ $options['ssl']['verify_peer'] = false;
+ $options['ssl']['verify_peer_name'] = false;
+ return;
+ } else {
+ throw new \InvalidArgumentException('Invalid verify request option');
+ }
+
+ $options['ssl']['verify_peer'] = true;
+ $options['ssl']['verify_peer_name'] = true;
+ $options['ssl']['allow_self_signed'] = false;
+ }
+
+ private function add_cert(RequestInterface $request, &$options, $value, &$params)
+ {
+ if (is_array($value)) {
+ $options['ssl']['passphrase'] = $value[1];
+ $value = $value[0];
+ }
+
+ if (!file_exists($value)) {
+ throw new \RuntimeException("SSL certificate not found: {$value}");
+ }
+
+ $options['ssl']['local_cert'] = $value;
+ }
+
+ private function add_progress(RequestInterface $request, &$options, $value, &$params)
+ {
+ $this->addNotification(
+ $params,
+ function ($code, $a, $b, $c, $transferred, $total) use ($value) {
+ if ($code == STREAM_NOTIFY_PROGRESS) {
+ $value($total, $transferred, null, null);
+ }
+ }
+ );
+ }
+
+ private function add_debug(RequestInterface $request, &$options, $value, &$params)
+ {
+ if ($value === false) {
+ return;
+ }
+
+ static $map = [
+ STREAM_NOTIFY_CONNECT => 'CONNECT',
+ STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED',
+ STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT',
+ STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS',
+ STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS',
+ STREAM_NOTIFY_REDIRECTED => 'REDIRECTED',
+ STREAM_NOTIFY_PROGRESS => 'PROGRESS',
+ STREAM_NOTIFY_FAILURE => 'FAILURE',
+ STREAM_NOTIFY_COMPLETED => 'COMPLETED',
+ STREAM_NOTIFY_RESOLVE => 'RESOLVE',
+ ];
+ static $args = ['severity', 'message', 'message_code',
+ 'bytes_transferred', 'bytes_max'];
+
+ $value = \GuzzleHttp\debug_resource($value);
+ $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment('');
+ $this->addNotification(
+ $params,
+ function () use ($ident, $value, $map, $args) {
+ $passed = func_get_args();
+ $code = array_shift($passed);
+ fprintf($value, '<%s> [%s] ', $ident, $map[$code]);
+ foreach (array_filter($passed) as $i => $v) {
+ fwrite($value, $args[$i] . ': "' . $v . '" ');
+ }
+ fwrite($value, "\n");
+ }
+ );
+ }
+
+ private function addNotification(array &$params, callable $notify)
+ {
+ // Wrap the existing function if needed.
+ if (!isset($params['notification'])) {
+ $params['notification'] = $notify;
+ } else {
+ $params['notification'] = $this->callArray([
+ $params['notification'],
+ $notify
+ ]);
+ }
+ }
+
+ private function callArray(array $functions)
+ {
+ return function () use ($functions) {
+ $args = func_get_args();
+ foreach ($functions as $fn) {
+ call_user_func_array($fn, $args);
+ }
+ };
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/HandlerStack.php
new file mode 100644
index 0000000..6a49cc0
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/HandlerStack.php
@@ -0,0 +1,277 @@
+push(Middleware::httpErrors(), 'http_errors');
+ $stack->push(Middleware::redirect(), 'allow_redirects');
+ $stack->push(Middleware::cookies(), 'cookies');
+ $stack->push(Middleware::prepareBody(), 'prepare_body');
+
+ return $stack;
+ }
+
+ /**
+ * @param callable $handler Underlying HTTP handler.
+ */
+ public function __construct(callable $handler = null)
+ {
+ $this->handler = $handler;
+ }
+
+ /**
+ * Invokes the handler stack as a composed handler
+ *
+ * @param RequestInterface $request
+ * @param array $options
+ *
+ * @return ResponseInterface|PromiseInterface
+ */
+ public function __invoke(RequestInterface $request, array $options)
+ {
+ $handler = $this->resolve();
+
+ return $handler($request, $options);
+ }
+
+ /**
+ * Dumps a string representation of the stack.
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ $depth = 0;
+ $stack = [];
+ if ($this->handler) {
+ $stack[] = "0) Handler: " . $this->debugCallable($this->handler);
+ }
+
+ $result = '';
+ foreach (array_reverse($this->stack) as $tuple) {
+ $depth++;
+ $str = "{$depth}) Name: '{$tuple[1]}', ";
+ $str .= "Function: " . $this->debugCallable($tuple[0]);
+ $result = "> {$str}\n{$result}";
+ $stack[] = $str;
+ }
+
+ foreach (array_keys($stack) as $k) {
+ $result .= "< {$stack[$k]}\n";
+ }
+
+ return $result;
+ }
+
+ /**
+ * Set the HTTP handler that actually returns a promise.
+ *
+ * @param callable $handler Accepts a request and array of options and
+ * returns a Promise.
+ */
+ public function setHandler(callable $handler)
+ {
+ $this->handler = $handler;
+ $this->cached = null;
+ }
+
+ /**
+ * Returns true if the builder has a handler.
+ *
+ * @return bool
+ */
+ public function hasHandler()
+ {
+ return (bool) $this->handler;
+ }
+
+ /**
+ * Unshift a middleware to the bottom of the stack.
+ *
+ * @param callable $middleware Middleware function
+ * @param string $name Name to register for this middleware.
+ */
+ public function unshift(callable $middleware, $name = null)
+ {
+ array_unshift($this->stack, [$middleware, $name]);
+ $this->cached = null;
+ }
+
+ /**
+ * Push a middleware to the top of the stack.
+ *
+ * @param callable $middleware Middleware function
+ * @param string $name Name to register for this middleware.
+ */
+ public function push(callable $middleware, $name = '')
+ {
+ $this->stack[] = [$middleware, $name];
+ $this->cached = null;
+ }
+
+ /**
+ * Add a middleware before another middleware by name.
+ *
+ * @param string $findName Middleware to find
+ * @param callable $middleware Middleware function
+ * @param string $withName Name to register for this middleware.
+ */
+ public function before($findName, callable $middleware, $withName = '')
+ {
+ $this->splice($findName, $withName, $middleware, true);
+ }
+
+ /**
+ * Add a middleware after another middleware by name.
+ *
+ * @param string $findName Middleware to find
+ * @param callable $middleware Middleware function
+ * @param string $withName Name to register for this middleware.
+ */
+ public function after($findName, callable $middleware, $withName = '')
+ {
+ $this->splice($findName, $withName, $middleware, false);
+ }
+
+ /**
+ * Remove a middleware by instance or name from the stack.
+ *
+ * @param callable|string $remove Middleware to remove by instance or name.
+ */
+ public function remove($remove)
+ {
+ $this->cached = null;
+ $idx = is_callable($remove) ? 0 : 1;
+ $this->stack = array_values(array_filter(
+ $this->stack,
+ function ($tuple) use ($idx, $remove) {
+ return $tuple[$idx] !== $remove;
+ }
+ ));
+ }
+
+ /**
+ * Compose the middleware and handler into a single callable function.
+ *
+ * @return callable
+ */
+ public function resolve()
+ {
+ if (!$this->cached) {
+ if (!($prev = $this->handler)) {
+ throw new \LogicException('No handler has been specified');
+ }
+
+ foreach (array_reverse($this->stack) as $fn) {
+ $prev = $fn[0]($prev);
+ }
+
+ $this->cached = $prev;
+ }
+
+ return $this->cached;
+ }
+
+ /**
+ * @param string $name
+ * @return int
+ */
+ private function findByName($name)
+ {
+ foreach ($this->stack as $k => $v) {
+ if ($v[1] === $name) {
+ return $k;
+ }
+ }
+
+ throw new \InvalidArgumentException("Middleware not found: $name");
+ }
+
+ /**
+ * Splices a function into the middleware list at a specific position.
+ *
+ * @param string $findName
+ * @param string $withName
+ * @param callable $middleware
+ * @param bool $before
+ */
+ private function splice($findName, $withName, callable $middleware, $before)
+ {
+ $this->cached = null;
+ $idx = $this->findByName($findName);
+ $tuple = [$middleware, $withName];
+
+ if ($before) {
+ if ($idx === 0) {
+ array_unshift($this->stack, $tuple);
+ } else {
+ $replacement = [$tuple, $this->stack[$idx]];
+ array_splice($this->stack, $idx, 1, $replacement);
+ }
+ } elseif ($idx === count($this->stack) - 1) {
+ $this->stack[] = $tuple;
+ } else {
+ $replacement = [$this->stack[$idx], $tuple];
+ array_splice($this->stack, $idx, 1, $replacement);
+ }
+ }
+
+ /**
+ * Provides a debug string for a given callable.
+ *
+ * @param array|callable $fn Function to write as a string.
+ *
+ * @return string
+ */
+ private function debugCallable($fn)
+ {
+ if (is_string($fn)) {
+ return "callable({$fn})";
+ }
+
+ if (is_array($fn)) {
+ return is_string($fn[0])
+ ? "callable({$fn[0]}::{$fn[1]})"
+ : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])";
+ }
+
+ return 'callable(' . spl_object_hash($fn) . ')';
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/MessageFormatter.php
new file mode 100644
index 0000000..dc36bb5
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/MessageFormatter.php
@@ -0,0 +1,185 @@
+>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}";
+ const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}';
+
+ /** @var string Template used to format log messages */
+ private $template;
+
+ /**
+ * @param string $template Log message template
+ */
+ public function __construct($template = self::CLF)
+ {
+ $this->template = $template ?: self::CLF;
+ }
+
+ /**
+ * Returns a formatted message string.
+ *
+ * @param RequestInterface $request Request that was sent
+ * @param ResponseInterface $response Response that was received
+ * @param \Exception $error Exception that was received
+ *
+ * @return string
+ */
+ public function format(
+ RequestInterface $request,
+ ResponseInterface $response = null,
+ \Exception $error = null
+ ) {
+ $cache = [];
+
+ return preg_replace_callback(
+ '/{\s*([A-Za-z_\-\.0-9]+)\s*}/',
+ function (array $matches) use ($request, $response, $error, &$cache) {
+ if (isset($cache[$matches[1]])) {
+ return $cache[$matches[1]];
+ }
+
+ $result = '';
+ switch ($matches[1]) {
+ case 'request':
+ $result = Psr7\str($request);
+ break;
+ case 'response':
+ $result = $response ? Psr7\str($response) : '';
+ break;
+ case 'req_headers':
+ $result = trim($request->getMethod()
+ . ' ' . $request->getRequestTarget())
+ . ' HTTP/' . $request->getProtocolVersion() . "\r\n"
+ . $this->headers($request);
+ break;
+ case 'res_headers':
+ $result = $response ?
+ sprintf(
+ 'HTTP/%s %d %s',
+ $response->getProtocolVersion(),
+ $response->getStatusCode(),
+ $response->getReasonPhrase()
+ ) . "\r\n" . $this->headers($response)
+ : 'NULL';
+ break;
+ case 'req_body':
+ $result = $request->getBody();
+ break;
+ case 'res_body':
+ $result = $response ? $response->getBody() : 'NULL';
+ break;
+ case 'ts':
+ case 'date_iso_8601':
+ $result = gmdate('c');
+ break;
+ case 'date_common_log':
+ $result = date('d/M/Y:H:i:s O');
+ break;
+ case 'method':
+ $result = $request->getMethod();
+ break;
+ case 'version':
+ $result = $request->getProtocolVersion();
+ break;
+ case 'uri':
+ case 'url':
+ $result = $request->getUri();
+ break;
+ case 'target':
+ $result = $request->getRequestTarget();
+ break;
+ case 'req_version':
+ $result = $request->getProtocolVersion();
+ break;
+ case 'res_version':
+ $result = $response
+ ? $response->getProtocolVersion()
+ : 'NULL';
+ break;
+ case 'host':
+ $result = $request->getHeaderLine('Host');
+ break;
+ case 'hostname':
+ $result = gethostname();
+ break;
+ case 'code':
+ $result = $response ? $response->getStatusCode() : 'NULL';
+ break;
+ case 'phrase':
+ $result = $response ? $response->getReasonPhrase() : 'NULL';
+ break;
+ case 'error':
+ $result = $error ? $error->getMessage() : 'NULL';
+ break;
+ default:
+ // handle prefixed dynamic headers
+ if (strpos($matches[1], 'req_header_') === 0) {
+ $result = $request->getHeaderLine(substr($matches[1], 11));
+ } elseif (strpos($matches[1], 'res_header_') === 0) {
+ $result = $response
+ ? $response->getHeaderLine(substr($matches[1], 11))
+ : 'NULL';
+ }
+ }
+
+ $cache[$matches[1]] = $result;
+ return $result;
+ },
+ $this->template
+ );
+ }
+
+ /**
+ * Get headers from message as string
+ *
+ * @return string
+ */
+ private function headers(MessageInterface $message)
+ {
+ $result = '';
+ foreach ($message->getHeaders() as $name => $values) {
+ $result .= $name . ': ' . implode(', ', $values) . "\r\n";
+ }
+
+ return trim($result);
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Middleware.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Middleware.php
new file mode 100644
index 0000000..bffc197
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Middleware.php
@@ -0,0 +1,254 @@
+withCookieHeader($request);
+ return $handler($request, $options)
+ ->then(
+ function ($response) use ($cookieJar, $request) {
+ $cookieJar->extractCookies($request, $response);
+ return $response;
+ }
+ );
+ };
+ };
+ }
+
+ /**
+ * Middleware that throws exceptions for 4xx or 5xx responses when the
+ * "http_error" request option is set to true.
+ *
+ * @return callable Returns a function that accepts the next handler.
+ */
+ public static function httpErrors()
+ {
+ return function (callable $handler) {
+ return function ($request, array $options) use ($handler) {
+ if (empty($options['http_errors'])) {
+ return $handler($request, $options);
+ }
+ return $handler($request, $options)->then(
+ function (ResponseInterface $response) use ($request) {
+ $code = $response->getStatusCode();
+ if ($code < 400) {
+ return $response;
+ }
+ throw RequestException::create($request, $response);
+ }
+ );
+ };
+ };
+ }
+
+ /**
+ * Middleware that pushes history data to an ArrayAccess container.
+ *
+ * @param array|\ArrayAccess $container Container to hold the history (by reference).
+ *
+ * @return callable Returns a function that accepts the next handler.
+ * @throws \InvalidArgumentException if container is not an array or ArrayAccess.
+ */
+ public static function history(&$container)
+ {
+ if (!is_array($container) && !$container instanceof \ArrayAccess) {
+ throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess');
+ }
+
+ return function (callable $handler) use (&$container) {
+ return function ($request, array $options) use ($handler, &$container) {
+ return $handler($request, $options)->then(
+ function ($value) use ($request, &$container, $options) {
+ $container[] = [
+ 'request' => $request,
+ 'response' => $value,
+ 'error' => null,
+ 'options' => $options
+ ];
+ return $value;
+ },
+ function ($reason) use ($request, &$container, $options) {
+ $container[] = [
+ 'request' => $request,
+ 'response' => null,
+ 'error' => $reason,
+ 'options' => $options
+ ];
+ return \GuzzleHttp\Promise\rejection_for($reason);
+ }
+ );
+ };
+ };
+ }
+
+ /**
+ * Middleware that invokes a callback before and after sending a request.
+ *
+ * The provided listener cannot modify or alter the response. It simply
+ * "taps" into the chain to be notified before returning the promise. The
+ * before listener accepts a request and options array, and the after
+ * listener accepts a request, options array, and response promise.
+ *
+ * @param callable $before Function to invoke before forwarding the request.
+ * @param callable $after Function invoked after forwarding.
+ *
+ * @return callable Returns a function that accepts the next handler.
+ */
+ public static function tap(callable $before = null, callable $after = null)
+ {
+ return function (callable $handler) use ($before, $after) {
+ return function ($request, array $options) use ($handler, $before, $after) {
+ if ($before) {
+ $before($request, $options);
+ }
+ $response = $handler($request, $options);
+ if ($after) {
+ $after($request, $options, $response);
+ }
+ return $response;
+ };
+ };
+ }
+
+ /**
+ * Middleware that handles request redirects.
+ *
+ * @return callable Returns a function that accepts the next handler.
+ */
+ public static function redirect()
+ {
+ return function (callable $handler) {
+ return new RedirectMiddleware($handler);
+ };
+ }
+
+ /**
+ * Middleware that retries requests based on the boolean result of
+ * invoking the provided "decider" function.
+ *
+ * If no delay function is provided, a simple implementation of exponential
+ * backoff will be utilized.
+ *
+ * @param callable $decider Function that accepts the number of retries,
+ * a request, [response], and [exception] and
+ * returns true if the request is to be retried.
+ * @param callable $delay Function that accepts the number of retries and
+ * returns the number of milliseconds to delay.
+ *
+ * @return callable Returns a function that accepts the next handler.
+ */
+ public static function retry(callable $decider, callable $delay = null)
+ {
+ return function (callable $handler) use ($decider, $delay) {
+ return new RetryMiddleware($decider, $handler, $delay);
+ };
+ }
+
+ /**
+ * Middleware that logs requests, responses, and errors using a message
+ * formatter.
+ *
+ * @param LoggerInterface $logger Logs messages.
+ * @param MessageFormatter $formatter Formatter used to create message strings.
+ * @param string $logLevel Level at which to log requests.
+ *
+ * @return callable Returns a function that accepts the next handler.
+ */
+ public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = 'info' /* \Psr\Log\LogLevel::INFO */)
+ {
+ return function (callable $handler) use ($logger, $formatter, $logLevel) {
+ return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) {
+ return $handler($request, $options)->then(
+ function ($response) use ($logger, $request, $formatter, $logLevel) {
+ $message = $formatter->format($request, $response);
+ $logger->log($logLevel, $message);
+ return $response;
+ },
+ function ($reason) use ($logger, $request, $formatter) {
+ $response = $reason instanceof RequestException
+ ? $reason->getResponse()
+ : null;
+ $message = $formatter->format($request, $response, $reason);
+ $logger->notice($message);
+ return \GuzzleHttp\Promise\rejection_for($reason);
+ }
+ );
+ };
+ };
+ }
+
+ /**
+ * This middleware adds a default content-type if possible, a default
+ * content-length or transfer-encoding header, and the expect header.
+ *
+ * @return callable
+ */
+ public static function prepareBody()
+ {
+ return function (callable $handler) {
+ return new PrepareBodyMiddleware($handler);
+ };
+ }
+
+ /**
+ * Middleware that applies a map function to the request before passing to
+ * the next handler.
+ *
+ * @param callable $fn Function that accepts a RequestInterface and returns
+ * a RequestInterface.
+ * @return callable
+ */
+ public static function mapRequest(callable $fn)
+ {
+ return function (callable $handler) use ($fn) {
+ return function ($request, array $options) use ($handler, $fn) {
+ return $handler($fn($request), $options);
+ };
+ };
+ }
+
+ /**
+ * Middleware that applies a map function to the resolved promise's
+ * response.
+ *
+ * @param callable $fn Function that accepts a ResponseInterface and
+ * returns a ResponseInterface.
+ * @return callable
+ */
+ public static function mapResponse(callable $fn)
+ {
+ return function (callable $handler) use ($fn) {
+ return function ($request, array $options) use ($handler, $fn) {
+ return $handler($request, $options)->then($fn);
+ };
+ };
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Pool.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Pool.php
new file mode 100644
index 0000000..5838db4
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Pool.php
@@ -0,0 +1,134 @@
+ $rfn) {
+ if ($rfn instanceof RequestInterface) {
+ yield $key => $client->sendAsync($rfn, $opts);
+ } elseif (is_callable($rfn)) {
+ yield $key => $rfn($opts);
+ } else {
+ throw new \InvalidArgumentException('Each value yielded by '
+ . 'the iterator must be a Psr7\Http\Message\RequestInterface '
+ . 'or a callable that returns a promise that fulfills '
+ . 'with a Psr7\Message\Http\ResponseInterface object.');
+ }
+ }
+ };
+
+ $this->each = new EachPromise($requests(), $config);
+ }
+
+ /**
+ * Get promise
+ *
+ * @return PromiseInterface
+ */
+ public function promise()
+ {
+ return $this->each->promise();
+ }
+
+ /**
+ * Sends multiple requests concurrently and returns an array of responses
+ * and exceptions that uses the same ordering as the provided requests.
+ *
+ * IMPORTANT: This method keeps every request and response in memory, and
+ * as such, is NOT recommended when sending a large number or an
+ * indeterminate number of requests concurrently.
+ *
+ * @param ClientInterface $client Client used to send the requests
+ * @param array|\Iterator $requests Requests to send concurrently.
+ * @param array $options Passes through the options available in
+ * {@see GuzzleHttp\Pool::__construct}
+ *
+ * @return array Returns an array containing the response or an exception
+ * in the same order that the requests were sent.
+ * @throws \InvalidArgumentException if the event format is incorrect.
+ */
+ public static function batch(
+ ClientInterface $client,
+ $requests,
+ array $options = []
+ ) {
+ $res = [];
+ self::cmpCallback($options, 'fulfilled', $res);
+ self::cmpCallback($options, 'rejected', $res);
+ $pool = new static($client, $requests, $options);
+ $pool->promise()->wait();
+ ksort($res);
+
+ return $res;
+ }
+
+ /**
+ * Execute callback(s)
+ *
+ * @return void
+ */
+ private static function cmpCallback(array &$options, $name, array &$results)
+ {
+ if (!isset($options[$name])) {
+ $options[$name] = function ($v, $k) use (&$results) {
+ $results[$k] = $v;
+ };
+ } else {
+ $currentFn = $options[$name];
+ $options[$name] = function ($v, $k) use (&$results, $currentFn) {
+ $currentFn($v, $k);
+ $results[$k] = $v;
+ };
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
new file mode 100644
index 0000000..568a1e9
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
@@ -0,0 +1,111 @@
+nextHandler = $nextHandler;
+ }
+
+ /**
+ * @param RequestInterface $request
+ * @param array $options
+ *
+ * @return PromiseInterface
+ */
+ public function __invoke(RequestInterface $request, array $options)
+ {
+ $fn = $this->nextHandler;
+
+ // Don't do anything if the request has no body.
+ if ($request->getBody()->getSize() === 0) {
+ return $fn($request, $options);
+ }
+
+ $modify = [];
+
+ // Add a default content-type if possible.
+ if (!$request->hasHeader('Content-Type')) {
+ if ($uri = $request->getBody()->getMetadata('uri')) {
+ if ($type = Psr7\mimetype_from_filename($uri)) {
+ $modify['set_headers']['Content-Type'] = $type;
+ }
+ }
+ }
+
+ // Add a default content-length or transfer-encoding header.
+ if (!$request->hasHeader('Content-Length')
+ && !$request->hasHeader('Transfer-Encoding')
+ ) {
+ $size = $request->getBody()->getSize();
+ if ($size !== null) {
+ $modify['set_headers']['Content-Length'] = $size;
+ } else {
+ $modify['set_headers']['Transfer-Encoding'] = 'chunked';
+ }
+ }
+
+ // Add the expect header if needed.
+ $this->addExpectHeader($request, $options, $modify);
+
+ return $fn(Psr7\modify_request($request, $modify), $options);
+ }
+
+ /**
+ * Add expect header
+ *
+ * @return void
+ */
+ private function addExpectHeader(
+ RequestInterface $request,
+ array $options,
+ array &$modify
+ ) {
+ // Determine if the Expect header should be used
+ if ($request->hasHeader('Expect')) {
+ return;
+ }
+
+ $expect = isset($options['expect']) ? $options['expect'] : null;
+
+ // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
+ if ($expect === false || $request->getProtocolVersion() < 1.1) {
+ return;
+ }
+
+ // The expect header is unconditionally enabled
+ if ($expect === true) {
+ $modify['set_headers']['Expect'] = '100-Continue';
+ return;
+ }
+
+ // By default, send the expect header when the payload is > 1mb
+ if ($expect === null) {
+ $expect = 1048576;
+ }
+
+ // Always add if the body cannot be rewound, the size cannot be
+ // determined, or the size is greater than the cutoff threshold
+ $body = $request->getBody();
+ $size = $body->getSize();
+
+ if ($size === null || $size >= (int) $expect || !$body->isSeekable()) {
+ $modify['set_headers']['Expect'] = '100-Continue';
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php
new file mode 100644
index 0000000..008a29b
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php
@@ -0,0 +1,264 @@
+ 5,
+ 'protocols' => ['http', 'https'],
+ 'strict' => false,
+ 'referer' => false,
+ 'track_redirects' => false,
+ ];
+
+ /** @var callable */
+ private $nextHandler;
+
+ /**
+ * @param callable $nextHandler Next handler to invoke.
+ */
+ public function __construct(callable $nextHandler)
+ {
+ $this->nextHandler = $nextHandler;
+ }
+
+ /**
+ * @param RequestInterface $request
+ * @param array $options
+ *
+ * @return PromiseInterface
+ */
+ public function __invoke(RequestInterface $request, array $options)
+ {
+ $fn = $this->nextHandler;
+
+ if (empty($options['allow_redirects'])) {
+ return $fn($request, $options);
+ }
+
+ if ($options['allow_redirects'] === true) {
+ $options['allow_redirects'] = self::$defaultSettings;
+ } elseif (!is_array($options['allow_redirects'])) {
+ throw new \InvalidArgumentException('allow_redirects must be true, false, or array');
+ } else {
+ // Merge the default settings with the provided settings
+ $options['allow_redirects'] += self::$defaultSettings;
+ }
+
+ if (empty($options['allow_redirects']['max'])) {
+ return $fn($request, $options);
+ }
+
+ return $fn($request, $options)
+ ->then(function (ResponseInterface $response) use ($request, $options) {
+ return $this->checkRedirect($request, $options, $response);
+ });
+ }
+
+ /**
+ * @param RequestInterface $request
+ * @param array $options
+ * @param ResponseInterface $response
+ *
+ * @return ResponseInterface|PromiseInterface
+ */
+ public function checkRedirect(
+ RequestInterface $request,
+ array $options,
+ ResponseInterface $response
+ ) {
+ if (substr($response->getStatusCode(), 0, 1) != '3'
+ || !$response->hasHeader('Location')
+ ) {
+ return $response;
+ }
+
+ $this->guardMax($request, $options);
+ $nextRequest = $this->modifyRequest($request, $options, $response);
+
+ // If authorization is handled by curl, unset it if URI is cross-origin.
+ if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $nextRequest->getUri()) && defined('\CURLOPT_HTTPAUTH')) {
+ unset(
+ $options['curl'][\CURLOPT_HTTPAUTH],
+ $options['curl'][\CURLOPT_USERPWD]
+ );
+ }
+
+ if (isset($options['allow_redirects']['on_redirect'])) {
+ call_user_func(
+ $options['allow_redirects']['on_redirect'],
+ $request,
+ $response,
+ $nextRequest->getUri()
+ );
+ }
+
+ /** @var PromiseInterface|ResponseInterface $promise */
+ $promise = $this($nextRequest, $options);
+
+ // Add headers to be able to track history of redirects.
+ if (!empty($options['allow_redirects']['track_redirects'])) {
+ return $this->withTracking(
+ $promise,
+ (string) $nextRequest->getUri(),
+ $response->getStatusCode()
+ );
+ }
+
+ return $promise;
+ }
+
+ /**
+ * Enable tracking on promise.
+ *
+ * @return PromiseInterface
+ */
+ private function withTracking(PromiseInterface $promise, $uri, $statusCode)
+ {
+ return $promise->then(
+ function (ResponseInterface $response) use ($uri, $statusCode) {
+ // Note that we are pushing to the front of the list as this
+ // would be an earlier response than what is currently present
+ // in the history header.
+ $historyHeader = $response->getHeader(self::HISTORY_HEADER);
+ $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER);
+ array_unshift($historyHeader, $uri);
+ array_unshift($statusHeader, $statusCode);
+ return $response->withHeader(self::HISTORY_HEADER, $historyHeader)
+ ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader);
+ }
+ );
+ }
+
+ /**
+ * Check for too many redirects.
+ *
+ * @return void
+ *
+ * @throws TooManyRedirectsException Too many redirects.
+ */
+ private function guardMax(RequestInterface $request, array &$options)
+ {
+ $current = isset($options['__redirect_count'])
+ ? $options['__redirect_count']
+ : 0;
+ $options['__redirect_count'] = $current + 1;
+ $max = $options['allow_redirects']['max'];
+
+ if ($options['__redirect_count'] > $max) {
+ throw new TooManyRedirectsException(
+ "Will not follow more than {$max} redirects",
+ $request
+ );
+ }
+ }
+
+ /**
+ * @param RequestInterface $request
+ * @param array $options
+ * @param ResponseInterface $response
+ *
+ * @return RequestInterface
+ */
+ public function modifyRequest(
+ RequestInterface $request,
+ array $options,
+ ResponseInterface $response
+ ) {
+ // Request modifications to apply.
+ $modify = [];
+ $protocols = $options['allow_redirects']['protocols'];
+
+ // Use a GET request if this is an entity enclosing request and we are
+ // not forcing RFC compliance, but rather emulating what all browsers
+ // would do.
+ $statusCode = $response->getStatusCode();
+ if ($statusCode == 303 ||
+ ($statusCode <= 302 && !$options['allow_redirects']['strict'])
+ ) {
+ $modify['method'] = 'GET';
+ $modify['body'] = '';
+ }
+
+ $uri = self::redirectUri($request, $response, $protocols);
+ if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) {
+ $idnOptions = ($options['idn_conversion'] === true) ? IDNA_DEFAULT : $options['idn_conversion'];
+ $uri = Utils::idnUriConvert($uri, $idnOptions);
+ }
+
+ $modify['uri'] = $uri;
+ Psr7\rewind_body($request);
+
+ // Add the Referer header if it is told to do so and only
+ // add the header if we are not redirecting from https to http.
+ if ($options['allow_redirects']['referer']
+ && $modify['uri']->getScheme() === $request->getUri()->getScheme()
+ ) {
+ $uri = $request->getUri()->withUserInfo('');
+ $modify['set_headers']['Referer'] = (string) $uri;
+ } else {
+ $modify['remove_headers'][] = 'Referer';
+ }
+
+ // Remove Authorization and Cookie headers if URI is cross-origin.
+ if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $modify['uri'])) {
+ $modify['remove_headers'][] = 'Authorization';
+ $modify['remove_headers'][] = 'Cookie';
+ }
+
+ return Psr7\modify_request($request, $modify);
+ }
+
+ /**
+ * Set the appropriate URL on the request based on the location header.
+ *
+ * @param RequestInterface $request
+ * @param ResponseInterface $response
+ * @param array $protocols
+ *
+ * @return UriInterface
+ */
+ private static function redirectUri(
+ RequestInterface $request,
+ ResponseInterface $response,
+ array $protocols
+ ) {
+ $location = Psr7\UriResolver::resolve(
+ $request->getUri(),
+ new Psr7\Uri($response->getHeaderLine('Location'))
+ );
+
+ // Ensure that the redirect URI is allowed based on the protocols.
+ if (!in_array($location->getScheme(), $protocols)) {
+ throw new BadResponseException(
+ sprintf(
+ 'Redirect URI, %s, does not use one of the allowed redirect protocols: %s',
+ $location,
+ implode(', ', $protocols)
+ ),
+ $request,
+ $response
+ );
+ }
+
+ return $location;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/RequestOptions.php
new file mode 100644
index 0000000..355f658
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/RequestOptions.php
@@ -0,0 +1,263 @@
+decider = $decider;
+ $this->nextHandler = $nextHandler;
+ $this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
+ }
+
+ /**
+ * Default exponential backoff delay function.
+ *
+ * @param int $retries
+ *
+ * @return int milliseconds.
+ */
+ public static function exponentialDelay($retries)
+ {
+ return (int) pow(2, $retries - 1) * 1000;
+ }
+
+ /**
+ * @param RequestInterface $request
+ * @param array $options
+ *
+ * @return PromiseInterface
+ */
+ public function __invoke(RequestInterface $request, array $options)
+ {
+ if (!isset($options['retries'])) {
+ $options['retries'] = 0;
+ }
+
+ $fn = $this->nextHandler;
+ return $fn($request, $options)
+ ->then(
+ $this->onFulfilled($request, $options),
+ $this->onRejected($request, $options)
+ );
+ }
+
+ /**
+ * Execute fulfilled closure
+ *
+ * @return mixed
+ */
+ private function onFulfilled(RequestInterface $req, array $options)
+ {
+ return function ($value) use ($req, $options) {
+ if (!call_user_func(
+ $this->decider,
+ $options['retries'],
+ $req,
+ $value,
+ null
+ )) {
+ return $value;
+ }
+ return $this->doRetry($req, $options, $value);
+ };
+ }
+
+ /**
+ * Execute rejected closure
+ *
+ * @return callable
+ */
+ private function onRejected(RequestInterface $req, array $options)
+ {
+ return function ($reason) use ($req, $options) {
+ if (!call_user_func(
+ $this->decider,
+ $options['retries'],
+ $req,
+ null,
+ $reason
+ )) {
+ return \GuzzleHttp\Promise\rejection_for($reason);
+ }
+ return $this->doRetry($req, $options);
+ };
+ }
+
+ /**
+ * @return self
+ */
+ private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null)
+ {
+ $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response);
+
+ return $this($request, $options);
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/TransferStats.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/TransferStats.php
new file mode 100644
index 0000000..87fb3c0
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/TransferStats.php
@@ -0,0 +1,126 @@
+request = $request;
+ $this->response = $response;
+ $this->transferTime = $transferTime;
+ $this->handlerErrorData = $handlerErrorData;
+ $this->handlerStats = $handlerStats;
+ }
+
+ /**
+ * @return RequestInterface
+ */
+ public function getRequest()
+ {
+ return $this->request;
+ }
+
+ /**
+ * Returns the response that was received (if any).
+ *
+ * @return ResponseInterface|null
+ */
+ public function getResponse()
+ {
+ return $this->response;
+ }
+
+ /**
+ * Returns true if a response was received.
+ *
+ * @return bool
+ */
+ public function hasResponse()
+ {
+ return $this->response !== null;
+ }
+
+ /**
+ * Gets handler specific error data.
+ *
+ * This might be an exception, a integer representing an error code, or
+ * anything else. Relying on this value assumes that you know what handler
+ * you are using.
+ *
+ * @return mixed
+ */
+ public function getHandlerErrorData()
+ {
+ return $this->handlerErrorData;
+ }
+
+ /**
+ * Get the effective URI the request was sent to.
+ *
+ * @return UriInterface
+ */
+ public function getEffectiveUri()
+ {
+ return $this->request->getUri();
+ }
+
+ /**
+ * Get the estimated time the request was being transferred by the handler.
+ *
+ * @return float|null Time in seconds.
+ */
+ public function getTransferTime()
+ {
+ return $this->transferTime;
+ }
+
+ /**
+ * Gets an array of all of the handler specific transfer data.
+ *
+ * @return array
+ */
+ public function getHandlerStats()
+ {
+ return $this->handlerStats;
+ }
+
+ /**
+ * Get a specific handler statistic from the handler by name.
+ *
+ * @param string $stat Handler specific transfer stat to retrieve.
+ *
+ * @return mixed|null
+ */
+ public function getHandlerStat($stat)
+ {
+ return isset($this->handlerStats[$stat])
+ ? $this->handlerStats[$stat]
+ : null;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/UriTemplate.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/UriTemplate.php
new file mode 100644
index 0000000..96dcfd0
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/UriTemplate.php
@@ -0,0 +1,237 @@
+ ['prefix' => '', 'joiner' => ',', 'query' => false],
+ '+' => ['prefix' => '', 'joiner' => ',', 'query' => false],
+ '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false],
+ '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false],
+ '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false],
+ ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true],
+ '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true],
+ '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true]
+ ];
+
+ /** @var array Delimiters */
+ private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$',
+ '&', '\'', '(', ')', '*', '+', ',', ';', '='];
+
+ /** @var array Percent encoded delimiters */
+ private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D',
+ '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C',
+ '%3B', '%3D'];
+
+ public function expand($template, array $variables)
+ {
+ if (false === strpos($template, '{')) {
+ return $template;
+ }
+
+ $this->template = $template;
+ $this->variables = $variables;
+
+ return preg_replace_callback(
+ '/\{([^\}]+)\}/',
+ [$this, 'expandMatch'],
+ $this->template
+ );
+ }
+
+ /**
+ * Parse an expression into parts
+ *
+ * @param string $expression Expression to parse
+ *
+ * @return array Returns an associative array of parts
+ */
+ private function parseExpression($expression)
+ {
+ $result = [];
+
+ if (isset(self::$operatorHash[$expression[0]])) {
+ $result['operator'] = $expression[0];
+ $expression = substr($expression, 1);
+ } else {
+ $result['operator'] = '';
+ }
+
+ foreach (explode(',', $expression) as $value) {
+ $value = trim($value);
+ $varspec = [];
+ if ($colonPos = strpos($value, ':')) {
+ $varspec['value'] = substr($value, 0, $colonPos);
+ $varspec['modifier'] = ':';
+ $varspec['position'] = (int) substr($value, $colonPos + 1);
+ } elseif (substr($value, -1) === '*') {
+ $varspec['modifier'] = '*';
+ $varspec['value'] = substr($value, 0, -1);
+ } else {
+ $varspec['value'] = (string) $value;
+ $varspec['modifier'] = '';
+ }
+ $result['values'][] = $varspec;
+ }
+
+ return $result;
+ }
+
+ /**
+ * Process an expansion
+ *
+ * @param array $matches Matches met in the preg_replace_callback
+ *
+ * @return string Returns the replacement string
+ */
+ private function expandMatch(array $matches)
+ {
+ static $rfc1738to3986 = ['+' => '%20', '%7e' => '~'];
+
+ $replacements = [];
+ $parsed = self::parseExpression($matches[1]);
+ $prefix = self::$operatorHash[$parsed['operator']]['prefix'];
+ $joiner = self::$operatorHash[$parsed['operator']]['joiner'];
+ $useQuery = self::$operatorHash[$parsed['operator']]['query'];
+
+ foreach ($parsed['values'] as $value) {
+ if (!isset($this->variables[$value['value']])) {
+ continue;
+ }
+
+ $variable = $this->variables[$value['value']];
+ $actuallyUseQuery = $useQuery;
+ $expanded = '';
+
+ if (is_array($variable)) {
+ $isAssoc = $this->isAssoc($variable);
+ $kvp = [];
+ foreach ($variable as $key => $var) {
+ if ($isAssoc) {
+ $key = rawurlencode($key);
+ $isNestedArray = is_array($var);
+ } else {
+ $isNestedArray = false;
+ }
+
+ if (!$isNestedArray) {
+ $var = rawurlencode($var);
+ if ($parsed['operator'] === '+' ||
+ $parsed['operator'] === '#'
+ ) {
+ $var = $this->decodeReserved($var);
+ }
+ }
+
+ if ($value['modifier'] === '*') {
+ if ($isAssoc) {
+ if ($isNestedArray) {
+ // Nested arrays must allow for deeply nested
+ // structures.
+ $var = strtr(
+ http_build_query([$key => $var]),
+ $rfc1738to3986
+ );
+ } else {
+ $var = $key . '=' . $var;
+ }
+ } elseif ($key > 0 && $actuallyUseQuery) {
+ $var = $value['value'] . '=' . $var;
+ }
+ }
+
+ $kvp[$key] = $var;
+ }
+
+ if (empty($variable)) {
+ $actuallyUseQuery = false;
+ } elseif ($value['modifier'] === '*') {
+ $expanded = implode($joiner, $kvp);
+ if ($isAssoc) {
+ // Don't prepend the value name when using the explode
+ // modifier with an associative array.
+ $actuallyUseQuery = false;
+ }
+ } else {
+ if ($isAssoc) {
+ // When an associative array is encountered and the
+ // explode modifier is not set, then the result must be
+ // a comma separated list of keys followed by their
+ // respective values.
+ foreach ($kvp as $k => &$v) {
+ $v = $k . ',' . $v;
+ }
+ }
+ $expanded = implode(',', $kvp);
+ }
+ } else {
+ if ($value['modifier'] === ':') {
+ $variable = substr($variable, 0, $value['position']);
+ }
+ $expanded = rawurlencode($variable);
+ if ($parsed['operator'] === '+' || $parsed['operator'] === '#') {
+ $expanded = $this->decodeReserved($expanded);
+ }
+ }
+
+ if ($actuallyUseQuery) {
+ if (!$expanded && $joiner !== '&') {
+ $expanded = $value['value'];
+ } else {
+ $expanded = $value['value'] . '=' . $expanded;
+ }
+ }
+
+ $replacements[] = $expanded;
+ }
+
+ $ret = implode($joiner, $replacements);
+ if ($ret && $prefix) {
+ return $prefix . $ret;
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Determines if an array is associative.
+ *
+ * This makes the assumption that input arrays are sequences or hashes.
+ * This assumption is a tradeoff for accuracy in favor of speed, but it
+ * should work in almost every case where input is supplied for a URI
+ * template.
+ *
+ * @param array $array Array to check
+ *
+ * @return bool
+ */
+ private function isAssoc(array $array)
+ {
+ return $array && array_keys($array)[0] !== 0;
+ }
+
+ /**
+ * Removes percent encoding on reserved characters (used with + and #
+ * modifiers).
+ *
+ * @param string $string String to fix
+ *
+ * @return string
+ */
+ private function decodeReserved($string)
+ {
+ return str_replace(self::$delimsPct, self::$delims, $string);
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Utils.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Utils.php
new file mode 100644
index 0000000..c698acb
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/Utils.php
@@ -0,0 +1,92 @@
+getHost()) {
+ $asciiHost = self::idnToAsci($uri->getHost(), $options, $info);
+ if ($asciiHost === false) {
+ $errorBitSet = isset($info['errors']) ? $info['errors'] : 0;
+
+ $errorConstants = array_filter(array_keys(get_defined_constants()), function ($name) {
+ return substr($name, 0, 11) === 'IDNA_ERROR_';
+ });
+
+ $errors = [];
+ foreach ($errorConstants as $errorConstant) {
+ if ($errorBitSet & constant($errorConstant)) {
+ $errors[] = $errorConstant;
+ }
+ }
+
+ $errorMessage = 'IDN conversion failed';
+ if ($errors) {
+ $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')';
+ }
+
+ throw new InvalidArgumentException($errorMessage);
+ } else {
+ if ($uri->getHost() !== $asciiHost) {
+ // Replace URI only if the ASCII version is different
+ $uri = $uri->withHost($asciiHost);
+ }
+ }
+ }
+
+ return $uri;
+ }
+
+ /**
+ * @param string $domain
+ * @param int $options
+ * @param array $info
+ *
+ * @return string|false
+ */
+ private static function idnToAsci($domain, $options, &$info = [])
+ {
+ if (\preg_match('%^[ -~]+$%', $domain) === 1) {
+ return $domain;
+ }
+
+ if (\extension_loaded('intl') && defined('INTL_IDNA_VARIANT_UTS46')) {
+ return \idn_to_ascii($domain, $options, INTL_IDNA_VARIANT_UTS46, $info);
+ }
+
+ /*
+ * The Idn class is marked as @internal. Verify that class and method exists.
+ */
+ if (method_exists(Idn::class, 'idn_to_ascii')) {
+ return Idn::idn_to_ascii($domain, $options, Idn::INTL_IDNA_VARIANT_UTS46, $info);
+ }
+
+ throw new \RuntimeException('ext-intl or symfony/polyfill-intl-idn not loaded or too old');
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/functions.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/functions.php
new file mode 100644
index 0000000..c2afd8c
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/functions.php
@@ -0,0 +1,334 @@
+expand($template, $variables);
+}
+
+/**
+ * Debug function used to describe the provided value type and class.
+ *
+ * @param mixed $input
+ *
+ * @return string Returns a string containing the type of the variable and
+ * if a class is provided, the class name.
+ */
+function describe_type($input)
+{
+ switch (gettype($input)) {
+ case 'object':
+ return 'object(' . get_class($input) . ')';
+ case 'array':
+ return 'array(' . count($input) . ')';
+ default:
+ ob_start();
+ var_dump($input);
+ // normalize float vs double
+ return str_replace('double(', 'float(', rtrim(ob_get_clean()));
+ }
+}
+
+/**
+ * Parses an array of header lines into an associative array of headers.
+ *
+ * @param iterable $lines Header lines array of strings in the following
+ * format: "Name: Value"
+ * @return array
+ */
+function headers_from_lines($lines)
+{
+ $headers = [];
+
+ foreach ($lines as $line) {
+ $parts = explode(':', $line, 2);
+ $headers[trim($parts[0])][] = isset($parts[1])
+ ? trim($parts[1])
+ : null;
+ }
+
+ return $headers;
+}
+
+/**
+ * Returns a debug stream based on the provided variable.
+ *
+ * @param mixed $value Optional value
+ *
+ * @return resource
+ */
+function debug_resource($value = null)
+{
+ if (is_resource($value)) {
+ return $value;
+ } elseif (defined('STDOUT')) {
+ return STDOUT;
+ }
+
+ return fopen('php://output', 'w');
+}
+
+/**
+ * Chooses and creates a default handler to use based on the environment.
+ *
+ * The returned handler is not wrapped by any default middlewares.
+ *
+ * @return callable Returns the best handler for the given system.
+ * @throws \RuntimeException if no viable Handler is available.
+ */
+function choose_handler()
+{
+ $handler = null;
+ if (function_exists('curl_multi_exec') && function_exists('curl_exec')) {
+ $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
+ } elseif (function_exists('curl_exec')) {
+ $handler = new CurlHandler();
+ } elseif (function_exists('curl_multi_exec')) {
+ $handler = new CurlMultiHandler();
+ }
+
+ if (ini_get('allow_url_fopen')) {
+ $handler = $handler
+ ? Proxy::wrapStreaming($handler, new StreamHandler())
+ : new StreamHandler();
+ } elseif (!$handler) {
+ throw new \RuntimeException('GuzzleHttp requires cURL, the '
+ . 'allow_url_fopen ini setting, or a custom HTTP handler.');
+ }
+
+ return $handler;
+}
+
+/**
+ * Get the default User-Agent string to use with Guzzle
+ *
+ * @return string
+ */
+function default_user_agent()
+{
+ static $defaultAgent = '';
+
+ if (!$defaultAgent) {
+ $defaultAgent = 'GuzzleHttp/' . Client::VERSION;
+ if (extension_loaded('curl') && function_exists('curl_version')) {
+ $defaultAgent .= ' curl/' . \curl_version()['version'];
+ }
+ $defaultAgent .= ' PHP/' . PHP_VERSION;
+ }
+
+ return $defaultAgent;
+}
+
+/**
+ * Returns the default cacert bundle for the current system.
+ *
+ * First, the openssl.cafile and curl.cainfo php.ini settings are checked.
+ * If those settings are not configured, then the common locations for
+ * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X
+ * and Windows are checked. If any of these file locations are found on
+ * disk, they will be utilized.
+ *
+ * Note: the result of this function is cached for subsequent calls.
+ *
+ * @return string
+ * @throws \RuntimeException if no bundle can be found.
+ */
+function default_ca_bundle()
+{
+ static $cached = null;
+ static $cafiles = [
+ // Red Hat, CentOS, Fedora (provided by the ca-certificates package)
+ '/etc/pki/tls/certs/ca-bundle.crt',
+ // Ubuntu, Debian (provided by the ca-certificates package)
+ '/etc/ssl/certs/ca-certificates.crt',
+ // FreeBSD (provided by the ca_root_nss package)
+ '/usr/local/share/certs/ca-root-nss.crt',
+ // SLES 12 (provided by the ca-certificates package)
+ '/var/lib/ca-certificates/ca-bundle.pem',
+ // OS X provided by homebrew (using the default path)
+ '/usr/local/etc/openssl/cert.pem',
+ // Google app engine
+ '/etc/ca-certificates.crt',
+ // Windows?
+ 'C:\\windows\\system32\\curl-ca-bundle.crt',
+ 'C:\\windows\\curl-ca-bundle.crt',
+ ];
+
+ if ($cached) {
+ return $cached;
+ }
+
+ if ($ca = ini_get('openssl.cafile')) {
+ return $cached = $ca;
+ }
+
+ if ($ca = ini_get('curl.cainfo')) {
+ return $cached = $ca;
+ }
+
+ foreach ($cafiles as $filename) {
+ if (file_exists($filename)) {
+ return $cached = $filename;
+ }
+ }
+
+ throw new \RuntimeException(
+ <<< EOT
+No system CA bundle could be found in any of the the common system locations.
+PHP versions earlier than 5.6 are not properly configured to use the system's
+CA bundle by default. In order to verify peer certificates, you will need to
+supply the path on disk to a certificate bundle to the 'verify' request
+option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not
+need a specific certificate bundle, then Mozilla provides a commonly used CA
+bundle which can be downloaded here (provided by the maintainer of cURL):
+https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once
+you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP
+ini setting to point to the path to the file, allowing you to omit the 'verify'
+request option. See http://curl.haxx.se/docs/sslcerts.html for more
+information.
+EOT
+ );
+}
+
+/**
+ * Creates an associative array of lowercase header names to the actual
+ * header casing.
+ *
+ * @param array $headers
+ *
+ * @return array
+ */
+function normalize_header_keys(array $headers)
+{
+ $result = [];
+ foreach (array_keys($headers) as $key) {
+ $result[strtolower($key)] = $key;
+ }
+
+ return $result;
+}
+
+/**
+ * Returns true if the provided host matches any of the no proxy areas.
+ *
+ * This method will strip a port from the host if it is present. Each pattern
+ * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a
+ * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" ==
+ * "baz.foo.com", but ".foo.com" != "foo.com").
+ *
+ * Areas are matched in the following cases:
+ * 1. "*" (without quotes) always matches any hosts.
+ * 2. An exact match.
+ * 3. The area starts with "." and the area is the last part of the host. e.g.
+ * '.mit.edu' will match any host that ends with '.mit.edu'.
+ *
+ * @param string $host Host to check against the patterns.
+ * @param array $noProxyArray An array of host patterns.
+ *
+ * @return bool
+ */
+function is_host_in_noproxy($host, array $noProxyArray)
+{
+ if (strlen($host) === 0) {
+ throw new \InvalidArgumentException('Empty host provided');
+ }
+
+ // Strip port if present.
+ if (strpos($host, ':')) {
+ $host = explode($host, ':', 2)[0];
+ }
+
+ foreach ($noProxyArray as $area) {
+ // Always match on wildcards.
+ if ($area === '*') {
+ return true;
+ } elseif (empty($area)) {
+ // Don't match on empty values.
+ continue;
+ } elseif ($area === $host) {
+ // Exact matches.
+ return true;
+ } else {
+ // Special match if the area when prefixed with ".". Remove any
+ // existing leading "." and add a new leading ".".
+ $area = '.' . ltrim($area, '.');
+ if (substr($host, -(strlen($area))) === $area) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+/**
+ * Wrapper for json_decode that throws when an error occurs.
+ *
+ * @param string $json JSON data to parse
+ * @param bool $assoc When true, returned objects will be converted
+ * into associative arrays.
+ * @param int $depth User specified recursion depth.
+ * @param int $options Bitmask of JSON decode options.
+ *
+ * @return mixed
+ * @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
+ * @link http://www.php.net/manual/en/function.json-decode.php
+ */
+function json_decode($json, $assoc = false, $depth = 512, $options = 0)
+{
+ $data = \json_decode($json, $assoc, $depth, $options);
+ if (JSON_ERROR_NONE !== json_last_error()) {
+ throw new Exception\InvalidArgumentException(
+ 'json_decode error: ' . json_last_error_msg()
+ );
+ }
+
+ return $data;
+}
+
+/**
+ * Wrapper for JSON encoding that throws when an error occurs.
+ *
+ * @param mixed $value The value being encoded
+ * @param int $options JSON encode option bitmask
+ * @param int $depth Set the maximum depth. Must be greater than zero.
+ *
+ * @return string
+ * @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
+ * @link http://www.php.net/manual/en/function.json-encode.php
+ */
+function json_encode($value, $options = 0, $depth = 512)
+{
+ $json = \json_encode($value, $options, $depth);
+ if (JSON_ERROR_NONE !== json_last_error()) {
+ throw new Exception\InvalidArgumentException(
+ 'json_encode error: ' . json_last_error_msg()
+ );
+ }
+
+ return $json;
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/guzzle/src/functions_include.php b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/functions_include.php
new file mode 100644
index 0000000..a93393a
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/guzzle/src/functions_include.php
@@ -0,0 +1,6 @@
+
+Copyright (c) 2015 Graham Campbell
+Copyright (c) 2017 Tobias Schultze
+Copyright (c) 2020 Tobias Nyholm
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/README.md b/tests/php_test_files/vendor/guzzlehttp/promises/README.md
new file mode 100644
index 0000000..1ea667a
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/README.md
@@ -0,0 +1,546 @@
+# Guzzle Promises
+
+[Promises/A+](https://promisesaplus.com/) implementation that handles promise
+chaining and resolution iteratively, allowing for "infinite" promise chaining
+while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/)
+for a general introduction to promises.
+
+- [Features](#features)
+- [Quick start](#quick-start)
+- [Synchronous wait](#synchronous-wait)
+- [Cancellation](#cancellation)
+- [API](#api)
+ - [Promise](#promise)
+ - [FulfilledPromise](#fulfilledpromise)
+ - [RejectedPromise](#rejectedpromise)
+- [Promise interop](#promise-interop)
+- [Implementation notes](#implementation-notes)
+
+
+## Features
+
+- [Promises/A+](https://promisesaplus.com/) implementation.
+- Promise resolution and chaining is handled iteratively, allowing for
+ "infinite" promise chaining.
+- Promises have a synchronous `wait` method.
+- Promises can be cancelled.
+- Works with any object that has a `then` function.
+- C# style async/await coroutine promises using
+ `GuzzleHttp\Promise\Coroutine::of()`.
+
+
+## Quick Start
+
+A *promise* represents the eventual result of an asynchronous operation. The
+primary way of interacting with a promise is through its `then` method, which
+registers callbacks to receive either a promise's eventual value or the reason
+why the promise cannot be fulfilled.
+
+### Callbacks
+
+Callbacks are registered with the `then` method by providing an optional
+`$onFulfilled` followed by an optional `$onRejected` function.
+
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$promise->then(
+ // $onFulfilled
+ function ($value) {
+ echo 'The promise was fulfilled.';
+ },
+ // $onRejected
+ function ($reason) {
+ echo 'The promise was rejected.';
+ }
+);
+```
+
+*Resolving* a promise means that you either fulfill a promise with a *value* or
+reject a promise with a *reason*. Resolving a promise triggers callbacks
+registered with the promise's `then` method. These callbacks are triggered
+only once and in the order in which they were added.
+
+### Resolving a Promise
+
+Promises are fulfilled using the `resolve($value)` method. Resolving a promise
+with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger
+all of the onFulfilled callbacks (resolving a promise with a rejected promise
+will reject the promise and trigger the `$onRejected` callbacks).
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$promise
+ ->then(function ($value) {
+ // Return a value and don't break the chain
+ return "Hello, " . $value;
+ })
+ // This then is executed after the first then and receives the value
+ // returned from the first then.
+ ->then(function ($value) {
+ echo $value;
+ });
+
+// Resolving the promise triggers the $onFulfilled callbacks and outputs
+// "Hello, reader."
+$promise->resolve('reader.');
+```
+
+### Promise Forwarding
+
+Promises can be chained one after the other. Each then in the chain is a new
+promise. The return value of a promise is what's forwarded to the next
+promise in the chain. Returning a promise in a `then` callback will cause the
+subsequent promises in the chain to only be fulfilled when the returned promise
+has been fulfilled. The next promise in the chain will be invoked with the
+resolved value of the promise.
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$nextPromise = new Promise();
+
+$promise
+ ->then(function ($value) use ($nextPromise) {
+ echo $value;
+ return $nextPromise;
+ })
+ ->then(function ($value) {
+ echo $value;
+ });
+
+// Triggers the first callback and outputs "A"
+$promise->resolve('A');
+// Triggers the second callback and outputs "B"
+$nextPromise->resolve('B');
+```
+
+### Promise Rejection
+
+When a promise is rejected, the `$onRejected` callbacks are invoked with the
+rejection reason.
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$promise->then(null, function ($reason) {
+ echo $reason;
+});
+
+$promise->reject('Error!');
+// Outputs "Error!"
+```
+
+### Rejection Forwarding
+
+If an exception is thrown in an `$onRejected` callback, subsequent
+`$onRejected` callbacks are invoked with the thrown exception as the reason.
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$promise->then(null, function ($reason) {
+ throw new Exception($reason);
+})->then(null, function ($reason) {
+ assert($reason->getMessage() === 'Error!');
+});
+
+$promise->reject('Error!');
+```
+
+You can also forward a rejection down the promise chain by returning a
+`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or
+`$onRejected` callback.
+
+```php
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Promise\RejectedPromise;
+
+$promise = new Promise();
+$promise->then(null, function ($reason) {
+ return new RejectedPromise($reason);
+})->then(null, function ($reason) {
+ assert($reason === 'Error!');
+});
+
+$promise->reject('Error!');
+```
+
+If an exception is not thrown in a `$onRejected` callback and the callback
+does not return a rejected promise, downstream `$onFulfilled` callbacks are
+invoked using the value returned from the `$onRejected` callback.
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$promise
+ ->then(null, function ($reason) {
+ return "It's ok";
+ })
+ ->then(function ($value) {
+ assert($value === "It's ok");
+ });
+
+$promise->reject('Error!');
+```
+
+
+## Synchronous Wait
+
+You can synchronously force promises to complete using a promise's `wait`
+method. When creating a promise, you can provide a wait function that is used
+to synchronously force a promise to complete. When a wait function is invoked
+it is expected to deliver a value to the promise or reject the promise. If the
+wait function does not deliver a value, then an exception is thrown. The wait
+function provided to a promise constructor is invoked when the `wait` function
+of the promise is called.
+
+```php
+$promise = new Promise(function () use (&$promise) {
+ $promise->resolve('foo');
+});
+
+// Calling wait will return the value of the promise.
+echo $promise->wait(); // outputs "foo"
+```
+
+If an exception is encountered while invoking the wait function of a promise,
+the promise is rejected with the exception and the exception is thrown.
+
+```php
+$promise = new Promise(function () use (&$promise) {
+ throw new Exception('foo');
+});
+
+$promise->wait(); // throws the exception.
+```
+
+Calling `wait` on a promise that has been fulfilled will not trigger the wait
+function. It will simply return the previously resolved value.
+
+```php
+$promise = new Promise(function () { die('this is not called!'); });
+$promise->resolve('foo');
+echo $promise->wait(); // outputs "foo"
+```
+
+Calling `wait` on a promise that has been rejected will throw an exception. If
+the rejection reason is an instance of `\Exception` the reason is thrown.
+Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason
+can be obtained by calling the `getReason` method of the exception.
+
+```php
+$promise = new Promise();
+$promise->reject('foo');
+$promise->wait();
+```
+
+> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo'
+
+### Unwrapping a Promise
+
+When synchronously waiting on a promise, you are joining the state of the
+promise into the current state of execution (i.e., return the value of the
+promise if it was fulfilled or throw an exception if it was rejected). This is
+called "unwrapping" the promise. Waiting on a promise will by default unwrap
+the promise state.
+
+You can force a promise to resolve and *not* unwrap the state of the promise
+by passing `false` to the first argument of the `wait` function:
+
+```php
+$promise = new Promise();
+$promise->reject('foo');
+// This will not throw an exception. It simply ensures the promise has
+// been resolved.
+$promise->wait(false);
+```
+
+When unwrapping a promise, the resolved value of the promise will be waited
+upon until the unwrapped value is not a promise. This means that if you resolve
+promise A with a promise B and unwrap promise A, the value returned by the
+wait function will be the value delivered to promise B.
+
+**Note**: when you do not unwrap the promise, no value is returned.
+
+
+## Cancellation
+
+You can cancel a promise that has not yet been fulfilled using the `cancel()`
+method of a promise. When creating a promise you can provide an optional
+cancel function that when invoked cancels the action of computing a resolution
+of the promise.
+
+
+## API
+
+### Promise
+
+When creating a promise object, you can provide an optional `$waitFn` and
+`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is
+expected to resolve the promise. `$cancelFn` is a function with no arguments
+that is expected to cancel the computation of a promise. It is invoked when the
+`cancel()` method of a promise is called.
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise(
+ function () use (&$promise) {
+ $promise->resolve('waited');
+ },
+ function () {
+ // do something that will cancel the promise computation (e.g., close
+ // a socket, cancel a database query, etc...)
+ }
+);
+
+assert('waited' === $promise->wait());
+```
+
+A promise has the following methods:
+
+- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface`
+
+ Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler.
+
+- `otherwise(callable $onRejected) : PromiseInterface`
+
+ Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled.
+
+- `wait($unwrap = true) : mixed`
+
+ Synchronously waits on the promise to complete.
+
+ `$unwrap` controls whether or not the value of the promise is returned for a
+ fulfilled promise or if an exception is thrown if the promise is rejected.
+ This is set to `true` by default.
+
+- `cancel()`
+
+ Attempts to cancel the promise if possible. The promise being cancelled and
+ the parent most ancestor that has not yet been resolved will also be
+ cancelled. Any promises waiting on the cancelled promise to resolve will also
+ be cancelled.
+
+- `getState() : string`
+
+ Returns the state of the promise. One of `pending`, `fulfilled`, or
+ `rejected`.
+
+- `resolve($value)`
+
+ Fulfills the promise with the given `$value`.
+
+- `reject($reason)`
+
+ Rejects the promise with the given `$reason`.
+
+
+### FulfilledPromise
+
+A fulfilled promise can be created to represent a promise that has been
+fulfilled.
+
+```php
+use GuzzleHttp\Promise\FulfilledPromise;
+
+$promise = new FulfilledPromise('value');
+
+// Fulfilled callbacks are immediately invoked.
+$promise->then(function ($value) {
+ echo $value;
+});
+```
+
+
+### RejectedPromise
+
+A rejected promise can be created to represent a promise that has been
+rejected.
+
+```php
+use GuzzleHttp\Promise\RejectedPromise;
+
+$promise = new RejectedPromise('Error');
+
+// Rejected callbacks are immediately invoked.
+$promise->then(null, function ($reason) {
+ echo $reason;
+});
+```
+
+
+## Promise Interoperability
+
+This library works with foreign promises that have a `then` method. This means
+you can use Guzzle promises with [React promises](https://github.com/reactphp/promise)
+for example. When a foreign promise is returned inside of a then method
+callback, promise resolution will occur recursively.
+
+```php
+// Create a React promise
+$deferred = new React\Promise\Deferred();
+$reactPromise = $deferred->promise();
+
+// Create a Guzzle promise that is fulfilled with a React promise.
+$guzzlePromise = new GuzzleHttp\Promise\Promise();
+$guzzlePromise->then(function ($value) use ($reactPromise) {
+ // Do something something with the value...
+ // Return the React promise
+ return $reactPromise;
+});
+```
+
+Please note that wait and cancel chaining is no longer possible when forwarding
+a foreign promise. You will need to wrap a third-party promise with a Guzzle
+promise in order to utilize wait and cancel functions with foreign promises.
+
+
+### Event Loop Integration
+
+In order to keep the stack size constant, Guzzle promises are resolved
+asynchronously using a task queue. When waiting on promises synchronously, the
+task queue will be automatically run to ensure that the blocking promise and
+any forwarded promises are resolved. When using promises asynchronously in an
+event loop, you will need to run the task queue on each tick of the loop. If
+you do not run the task queue, then promises will not be resolved.
+
+You can run the task queue using the `run()` method of the global task queue
+instance.
+
+```php
+// Get the global task queue
+$queue = GuzzleHttp\Promise\Utils::queue();
+$queue->run();
+```
+
+For example, you could use Guzzle promises with React using a periodic timer:
+
+```php
+$loop = React\EventLoop\Factory::create();
+$loop->addPeriodicTimer(0, [$queue, 'run']);
+```
+
+*TODO*: Perhaps adding a `futureTick()` on each tick would be faster?
+
+
+## Implementation Notes
+
+### Promise Resolution and Chaining is Handled Iteratively
+
+By shuffling pending handlers from one owner to another, promises are
+resolved iteratively, allowing for "infinite" then chaining.
+
+```php
+then(function ($v) {
+ // The stack size remains constant (a good thing)
+ echo xdebug_get_stack_depth() . ', ';
+ return $v + 1;
+ });
+}
+
+$parent->resolve(0);
+var_dump($p->wait()); // int(1000)
+
+```
+
+When a promise is fulfilled or rejected with a non-promise value, the promise
+then takes ownership of the handlers of each child promise and delivers values
+down the chain without using recursion.
+
+When a promise is resolved with another promise, the original promise transfers
+all of its pending handlers to the new promise. When the new promise is
+eventually resolved, all of the pending handlers are delivered the forwarded
+value.
+
+### A Promise is the Deferred
+
+Some promise libraries implement promises using a deferred object to represent
+a computation and a promise object to represent the delivery of the result of
+the computation. This is a nice separation of computation and delivery because
+consumers of the promise cannot modify the value that will be eventually
+delivered.
+
+One side effect of being able to implement promise resolution and chaining
+iteratively is that you need to be able for one promise to reach into the state
+of another promise to shuffle around ownership of handlers. In order to achieve
+this without making the handlers of a promise publicly mutable, a promise is
+also the deferred value, allowing promises of the same parent class to reach
+into and modify the private properties of promises of the same type. While this
+does allow consumers of the value to modify the resolution or rejection of the
+deferred, it is a small price to pay for keeping the stack size constant.
+
+```php
+$promise = new Promise();
+$promise->then(function ($value) { echo $value; });
+// The promise is the deferred value, so you can deliver a value to it.
+$promise->resolve('foo');
+// prints "foo"
+```
+
+
+## Upgrading from Function API
+
+A static API was first introduced in 1.4.0, in order to mitigate problems with
+functions conflicting between global and local copies of the package. The
+function API will be removed in 2.0.0. A migration table has been provided here
+for your convenience:
+
+| Original Function | Replacement Method |
+|----------------|----------------|
+| `queue` | `Utils::queue` |
+| `task` | `Utils::task` |
+| `promise_for` | `Create::promiseFor` |
+| `rejection_for` | `Create::rejectionFor` |
+| `exception_for` | `Create::exceptionFor` |
+| `iter_for` | `Create::iterFor` |
+| `inspect` | `Utils::inspect` |
+| `inspect_all` | `Utils::inspectAll` |
+| `unwrap` | `Utils::unwrap` |
+| `all` | `Utils::all` |
+| `some` | `Utils::some` |
+| `any` | `Utils::any` |
+| `settle` | `Utils::settle` |
+| `each` | `Each::of` |
+| `each_limit` | `Each::ofLimit` |
+| `each_limit_all` | `Each::ofLimitAll` |
+| `!is_fulfilled` | `Is::pending` |
+| `is_fulfilled` | `Is::fulfilled` |
+| `is_rejected` | `Is::rejected` |
+| `is_settled` | `Is::settled` |
+| `coroutine` | `Coroutine::of` |
+
+
+## Security
+
+If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information.
+
+
+## License
+
+Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.
+
+
+## For Enterprise
+
+Available as part of the Tidelift Subscription
+
+The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-promises?utm_source=packagist-guzzlehttp-promises&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/composer.json b/tests/php_test_files/vendor/guzzlehttp/promises/composer.json
new file mode 100644
index 0000000..966e3e3
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/composer.json
@@ -0,0 +1,53 @@
+{
+ "name": "guzzlehttp/promises",
+ "description": "Guzzle promises library",
+ "keywords": ["promise"],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "require": {
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ },
+ "files": ["src/functions_include.php"]
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "GuzzleHttp\\Promise\\Tests\\": "tests/"
+ }
+ },
+ "scripts": {
+ "test": "vendor/bin/simple-phpunit",
+ "test-ci": "vendor/bin/simple-phpunit --coverage-text"
+ },
+ "config": {
+ "preferred-install": "dist",
+ "sort-packages": true
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/AggregateException.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/AggregateException.php
new file mode 100644
index 0000000..d2b5712
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/AggregateException.php
@@ -0,0 +1,17 @@
+then(function ($v) { echo $v; });
+ *
+ * @param callable $generatorFn Generator function to wrap into a promise.
+ *
+ * @return Promise
+ *
+ * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
+ */
+final class Coroutine implements PromiseInterface
+{
+ /**
+ * @var PromiseInterface|null
+ */
+ private $currentPromise;
+
+ /**
+ * @var Generator
+ */
+ private $generator;
+
+ /**
+ * @var Promise
+ */
+ private $result;
+
+ public function __construct(callable $generatorFn)
+ {
+ $this->generator = $generatorFn();
+ $this->result = new Promise(function () {
+ while (isset($this->currentPromise)) {
+ $this->currentPromise->wait();
+ }
+ });
+ try {
+ $this->nextCoroutine($this->generator->current());
+ } catch (\Exception $exception) {
+ $this->result->reject($exception);
+ } catch (Throwable $throwable) {
+ $this->result->reject($throwable);
+ }
+ }
+
+ /**
+ * Create a new coroutine.
+ *
+ * @return self
+ */
+ public static function of(callable $generatorFn)
+ {
+ return new self($generatorFn);
+ }
+
+ public function then(
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ) {
+ return $this->result->then($onFulfilled, $onRejected);
+ }
+
+ public function otherwise(callable $onRejected)
+ {
+ return $this->result->otherwise($onRejected);
+ }
+
+ public function wait($unwrap = true)
+ {
+ return $this->result->wait($unwrap);
+ }
+
+ public function getState()
+ {
+ return $this->result->getState();
+ }
+
+ public function resolve($value)
+ {
+ $this->result->resolve($value);
+ }
+
+ public function reject($reason)
+ {
+ $this->result->reject($reason);
+ }
+
+ public function cancel()
+ {
+ $this->currentPromise->cancel();
+ $this->result->cancel();
+ }
+
+ private function nextCoroutine($yielded)
+ {
+ $this->currentPromise = Create::promiseFor($yielded)
+ ->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
+ }
+
+ /**
+ * @internal
+ */
+ public function _handleSuccess($value)
+ {
+ unset($this->currentPromise);
+ try {
+ $next = $this->generator->send($value);
+ if ($this->generator->valid()) {
+ $this->nextCoroutine($next);
+ } else {
+ $this->result->resolve($value);
+ }
+ } catch (Exception $exception) {
+ $this->result->reject($exception);
+ } catch (Throwable $throwable) {
+ $this->result->reject($throwable);
+ }
+ }
+
+ /**
+ * @internal
+ */
+ public function _handleFailure($reason)
+ {
+ unset($this->currentPromise);
+ try {
+ $nextYield = $this->generator->throw(Create::exceptionFor($reason));
+ // The throw was caught, so keep iterating on the coroutine
+ $this->nextCoroutine($nextYield);
+ } catch (Exception $exception) {
+ $this->result->reject($exception);
+ } catch (Throwable $throwable) {
+ $this->result->reject($throwable);
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/Create.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/Create.php
new file mode 100644
index 0000000..8d038e9
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/Create.php
@@ -0,0 +1,84 @@
+then([$promise, 'resolve'], [$promise, 'reject']);
+ return $promise;
+ }
+
+ return new FulfilledPromise($value);
+ }
+
+ /**
+ * Creates a rejected promise for a reason if the reason is not a promise.
+ * If the provided reason is a promise, then it is returned as-is.
+ *
+ * @param mixed $reason Promise or reason.
+ *
+ * @return PromiseInterface
+ */
+ public static function rejectionFor($reason)
+ {
+ if ($reason instanceof PromiseInterface) {
+ return $reason;
+ }
+
+ return new RejectedPromise($reason);
+ }
+
+ /**
+ * Create an exception for a rejected promise value.
+ *
+ * @param mixed $reason
+ *
+ * @return \Exception|\Throwable
+ */
+ public static function exceptionFor($reason)
+ {
+ if ($reason instanceof \Exception || $reason instanceof \Throwable) {
+ return $reason;
+ }
+
+ return new RejectionException($reason);
+ }
+
+ /**
+ * Returns an iterator for the given value.
+ *
+ * @param mixed $value
+ *
+ * @return \Iterator
+ */
+ public static function iterFor($value)
+ {
+ if ($value instanceof \Iterator) {
+ return $value;
+ }
+
+ if (is_array($value)) {
+ return new \ArrayIterator($value);
+ }
+
+ return new \ArrayIterator([$value]);
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/Each.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/Each.php
new file mode 100644
index 0000000..ff8efd7
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/Each.php
@@ -0,0 +1,90 @@
+ $onFulfilled,
+ 'rejected' => $onRejected
+ ]))->promise();
+ }
+
+ /**
+ * Like of, but only allows a certain number of outstanding promises at any
+ * given time.
+ *
+ * $concurrency may be an integer or a function that accepts the number of
+ * pending promises and returns a numeric concurrency limit value to allow
+ * for dynamic a concurrency size.
+ *
+ * @param mixed $iterable
+ * @param int|callable $concurrency
+ * @param callable $onFulfilled
+ * @param callable $onRejected
+ *
+ * @return PromiseInterface
+ */
+ public static function ofLimit(
+ $iterable,
+ $concurrency,
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ) {
+ return (new EachPromise($iterable, [
+ 'fulfilled' => $onFulfilled,
+ 'rejected' => $onRejected,
+ 'concurrency' => $concurrency
+ ]))->promise();
+ }
+
+ /**
+ * Like limit, but ensures that no promise in the given $iterable argument
+ * is rejected. If any promise is rejected, then the aggregate promise is
+ * rejected with the encountered rejection.
+ *
+ * @param mixed $iterable
+ * @param int|callable $concurrency
+ * @param callable $onFulfilled
+ *
+ * @return PromiseInterface
+ */
+ public static function ofLimitAll(
+ $iterable,
+ $concurrency,
+ callable $onFulfilled = null
+ ) {
+ return self::ofLimit(
+ $iterable,
+ $concurrency,
+ $onFulfilled,
+ function ($reason, $idx, PromiseInterface $aggregate) {
+ $aggregate->reject($reason);
+ }
+ );
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/EachPromise.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/EachPromise.php
new file mode 100644
index 0000000..280d799
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/EachPromise.php
@@ -0,0 +1,247 @@
+iterable = Create::iterFor($iterable);
+
+ if (isset($config['concurrency'])) {
+ $this->concurrency = $config['concurrency'];
+ }
+
+ if (isset($config['fulfilled'])) {
+ $this->onFulfilled = $config['fulfilled'];
+ }
+
+ if (isset($config['rejected'])) {
+ $this->onRejected = $config['rejected'];
+ }
+ }
+
+ /** @psalm-suppress InvalidNullableReturnType */
+ public function promise()
+ {
+ if ($this->aggregate) {
+ return $this->aggregate;
+ }
+
+ try {
+ $this->createPromise();
+ /** @psalm-assert Promise $this->aggregate */
+ $this->iterable->rewind();
+ $this->refillPending();
+ } catch (\Throwable $e) {
+ $this->aggregate->reject($e);
+ } catch (\Exception $e) {
+ $this->aggregate->reject($e);
+ }
+
+ /**
+ * @psalm-suppress NullableReturnStatement
+ * @phpstan-ignore-next-line
+ */
+ return $this->aggregate;
+ }
+
+ private function createPromise()
+ {
+ $this->mutex = false;
+ $this->aggregate = new Promise(function () {
+ if ($this->checkIfFinished()) {
+ return;
+ }
+ reset($this->pending);
+ // Consume a potentially fluctuating list of promises while
+ // ensuring that indexes are maintained (precluding array_shift).
+ while ($promise = current($this->pending)) {
+ next($this->pending);
+ $promise->wait();
+ if (Is::settled($this->aggregate)) {
+ return;
+ }
+ }
+ });
+
+ // Clear the references when the promise is resolved.
+ $clearFn = function () {
+ $this->iterable = $this->concurrency = $this->pending = null;
+ $this->onFulfilled = $this->onRejected = null;
+ $this->nextPendingIndex = 0;
+ };
+
+ $this->aggregate->then($clearFn, $clearFn);
+ }
+
+ private function refillPending()
+ {
+ if (!$this->concurrency) {
+ // Add all pending promises.
+ while ($this->addPending() && $this->advanceIterator());
+ return;
+ }
+
+ // Add only up to N pending promises.
+ $concurrency = is_callable($this->concurrency)
+ ? call_user_func($this->concurrency, count($this->pending))
+ : $this->concurrency;
+ $concurrency = max($concurrency - count($this->pending), 0);
+ // Concurrency may be set to 0 to disallow new promises.
+ if (!$concurrency) {
+ return;
+ }
+ // Add the first pending promise.
+ $this->addPending();
+ // Note this is special handling for concurrency=1 so that we do
+ // not advance the iterator after adding the first promise. This
+ // helps work around issues with generators that might not have the
+ // next value to yield until promise callbacks are called.
+ while (--$concurrency
+ && $this->advanceIterator()
+ && $this->addPending());
+ }
+
+ private function addPending()
+ {
+ if (!$this->iterable || !$this->iterable->valid()) {
+ return false;
+ }
+
+ $promise = Create::promiseFor($this->iterable->current());
+ $key = $this->iterable->key();
+
+ // Iterable keys may not be unique, so we use a counter to
+ // guarantee uniqueness
+ $idx = $this->nextPendingIndex++;
+
+ $this->pending[$idx] = $promise->then(
+ function ($value) use ($idx, $key) {
+ if ($this->onFulfilled) {
+ call_user_func(
+ $this->onFulfilled,
+ $value,
+ $key,
+ $this->aggregate
+ );
+ }
+ $this->step($idx);
+ },
+ function ($reason) use ($idx, $key) {
+ if ($this->onRejected) {
+ call_user_func(
+ $this->onRejected,
+ $reason,
+ $key,
+ $this->aggregate
+ );
+ }
+ $this->step($idx);
+ }
+ );
+
+ return true;
+ }
+
+ private function advanceIterator()
+ {
+ // Place a lock on the iterator so that we ensure to not recurse,
+ // preventing fatal generator errors.
+ if ($this->mutex) {
+ return false;
+ }
+
+ $this->mutex = true;
+
+ try {
+ $this->iterable->next();
+ $this->mutex = false;
+ return true;
+ } catch (\Throwable $e) {
+ $this->aggregate->reject($e);
+ $this->mutex = false;
+ return false;
+ } catch (\Exception $e) {
+ $this->aggregate->reject($e);
+ $this->mutex = false;
+ return false;
+ }
+ }
+
+ private function step($idx)
+ {
+ // If the promise was already resolved, then ignore this step.
+ if (Is::settled($this->aggregate)) {
+ return;
+ }
+
+ unset($this->pending[$idx]);
+
+ // Only refill pending promises if we are not locked, preventing the
+ // EachPromise to recursively invoke the provided iterator, which
+ // cause a fatal error: "Cannot resume an already running generator"
+ if ($this->advanceIterator() && !$this->checkIfFinished()) {
+ // Add more pending promises if possible.
+ $this->refillPending();
+ }
+ }
+
+ private function checkIfFinished()
+ {
+ if (!$this->pending && !$this->iterable->valid()) {
+ // Resolve the promise if there's nothing left to do.
+ $this->aggregate->resolve(null);
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/FulfilledPromise.php
new file mode 100644
index 0000000..98f72a6
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/FulfilledPromise.php
@@ -0,0 +1,84 @@
+value = $value;
+ }
+
+ public function then(
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ) {
+ // Return itself if there is no onFulfilled function.
+ if (!$onFulfilled) {
+ return $this;
+ }
+
+ $queue = Utils::queue();
+ $p = new Promise([$queue, 'run']);
+ $value = $this->value;
+ $queue->add(static function () use ($p, $value, $onFulfilled) {
+ if (Is::pending($p)) {
+ try {
+ $p->resolve($onFulfilled($value));
+ } catch (\Throwable $e) {
+ $p->reject($e);
+ } catch (\Exception $e) {
+ $p->reject($e);
+ }
+ }
+ });
+
+ return $p;
+ }
+
+ public function otherwise(callable $onRejected)
+ {
+ return $this->then(null, $onRejected);
+ }
+
+ public function wait($unwrap = true, $defaultDelivery = null)
+ {
+ return $unwrap ? $this->value : null;
+ }
+
+ public function getState()
+ {
+ return self::FULFILLED;
+ }
+
+ public function resolve($value)
+ {
+ if ($value !== $this->value) {
+ throw new \LogicException("Cannot resolve a fulfilled promise");
+ }
+ }
+
+ public function reject($reason)
+ {
+ throw new \LogicException("Cannot reject a fulfilled promise");
+ }
+
+ public function cancel()
+ {
+ // pass
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/Is.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/Is.php
new file mode 100644
index 0000000..c3ed8d0
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/Is.php
@@ -0,0 +1,46 @@
+getState() === PromiseInterface::PENDING;
+ }
+
+ /**
+ * Returns true if a promise is fulfilled or rejected.
+ *
+ * @return bool
+ */
+ public static function settled(PromiseInterface $promise)
+ {
+ return $promise->getState() !== PromiseInterface::PENDING;
+ }
+
+ /**
+ * Returns true if a promise is fulfilled.
+ *
+ * @return bool
+ */
+ public static function fulfilled(PromiseInterface $promise)
+ {
+ return $promise->getState() === PromiseInterface::FULFILLED;
+ }
+
+ /**
+ * Returns true if a promise is rejected.
+ *
+ * @return bool
+ */
+ public static function rejected(PromiseInterface $promise)
+ {
+ return $promise->getState() === PromiseInterface::REJECTED;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/Promise.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/Promise.php
new file mode 100644
index 0000000..7593905
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/Promise.php
@@ -0,0 +1,278 @@
+waitFn = $waitFn;
+ $this->cancelFn = $cancelFn;
+ }
+
+ public function then(
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ) {
+ if ($this->state === self::PENDING) {
+ $p = new Promise(null, [$this, 'cancel']);
+ $this->handlers[] = [$p, $onFulfilled, $onRejected];
+ $p->waitList = $this->waitList;
+ $p->waitList[] = $this;
+ return $p;
+ }
+
+ // Return a fulfilled promise and immediately invoke any callbacks.
+ if ($this->state === self::FULFILLED) {
+ $promise = Create::promiseFor($this->result);
+ return $onFulfilled ? $promise->then($onFulfilled) : $promise;
+ }
+
+ // It's either cancelled or rejected, so return a rejected promise
+ // and immediately invoke any callbacks.
+ $rejection = Create::rejectionFor($this->result);
+ return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
+ }
+
+ public function otherwise(callable $onRejected)
+ {
+ return $this->then(null, $onRejected);
+ }
+
+ public function wait($unwrap = true)
+ {
+ $this->waitIfPending();
+
+ if ($this->result instanceof PromiseInterface) {
+ return $this->result->wait($unwrap);
+ }
+ if ($unwrap) {
+ if ($this->state === self::FULFILLED) {
+ return $this->result;
+ }
+ // It's rejected so "unwrap" and throw an exception.
+ throw Create::exceptionFor($this->result);
+ }
+ }
+
+ public function getState()
+ {
+ return $this->state;
+ }
+
+ public function cancel()
+ {
+ if ($this->state !== self::PENDING) {
+ return;
+ }
+
+ $this->waitFn = $this->waitList = null;
+
+ if ($this->cancelFn) {
+ $fn = $this->cancelFn;
+ $this->cancelFn = null;
+ try {
+ $fn();
+ } catch (\Throwable $e) {
+ $this->reject($e);
+ } catch (\Exception $e) {
+ $this->reject($e);
+ }
+ }
+
+ // Reject the promise only if it wasn't rejected in a then callback.
+ /** @psalm-suppress RedundantCondition */
+ if ($this->state === self::PENDING) {
+ $this->reject(new CancellationException('Promise has been cancelled'));
+ }
+ }
+
+ public function resolve($value)
+ {
+ $this->settle(self::FULFILLED, $value);
+ }
+
+ public function reject($reason)
+ {
+ $this->settle(self::REJECTED, $reason);
+ }
+
+ private function settle($state, $value)
+ {
+ if ($this->state !== self::PENDING) {
+ // Ignore calls with the same resolution.
+ if ($state === $this->state && $value === $this->result) {
+ return;
+ }
+ throw $this->state === $state
+ ? new \LogicException("The promise is already {$state}.")
+ : new \LogicException("Cannot change a {$this->state} promise to {$state}");
+ }
+
+ if ($value === $this) {
+ throw new \LogicException('Cannot fulfill or reject a promise with itself');
+ }
+
+ // Clear out the state of the promise but stash the handlers.
+ $this->state = $state;
+ $this->result = $value;
+ $handlers = $this->handlers;
+ $this->handlers = null;
+ $this->waitList = $this->waitFn = null;
+ $this->cancelFn = null;
+
+ if (!$handlers) {
+ return;
+ }
+
+ // If the value was not a settled promise or a thenable, then resolve
+ // it in the task queue using the correct ID.
+ if (!is_object($value) || !method_exists($value, 'then')) {
+ $id = $state === self::FULFILLED ? 1 : 2;
+ // It's a success, so resolve the handlers in the queue.
+ Utils::queue()->add(static function () use ($id, $value, $handlers) {
+ foreach ($handlers as $handler) {
+ self::callHandler($id, $value, $handler);
+ }
+ });
+ } elseif ($value instanceof Promise && Is::pending($value)) {
+ // We can just merge our handlers onto the next promise.
+ $value->handlers = array_merge($value->handlers, $handlers);
+ } else {
+ // Resolve the handlers when the forwarded promise is resolved.
+ $value->then(
+ static function ($value) use ($handlers) {
+ foreach ($handlers as $handler) {
+ self::callHandler(1, $value, $handler);
+ }
+ },
+ static function ($reason) use ($handlers) {
+ foreach ($handlers as $handler) {
+ self::callHandler(2, $reason, $handler);
+ }
+ }
+ );
+ }
+ }
+
+ /**
+ * Call a stack of handlers using a specific callback index and value.
+ *
+ * @param int $index 1 (resolve) or 2 (reject).
+ * @param mixed $value Value to pass to the callback.
+ * @param array $handler Array of handler data (promise and callbacks).
+ */
+ private static function callHandler($index, $value, array $handler)
+ {
+ /** @var PromiseInterface $promise */
+ $promise = $handler[0];
+
+ // The promise may have been cancelled or resolved before placing
+ // this thunk in the queue.
+ if (Is::settled($promise)) {
+ return;
+ }
+
+ try {
+ if (isset($handler[$index])) {
+ /*
+ * If $f throws an exception, then $handler will be in the exception
+ * stack trace. Since $handler contains a reference to the callable
+ * itself we get a circular reference. We clear the $handler
+ * here to avoid that memory leak.
+ */
+ $f = $handler[$index];
+ unset($handler);
+ $promise->resolve($f($value));
+ } elseif ($index === 1) {
+ // Forward resolution values as-is.
+ $promise->resolve($value);
+ } else {
+ // Forward rejections down the chain.
+ $promise->reject($value);
+ }
+ } catch (\Throwable $reason) {
+ $promise->reject($reason);
+ } catch (\Exception $reason) {
+ $promise->reject($reason);
+ }
+ }
+
+ private function waitIfPending()
+ {
+ if ($this->state !== self::PENDING) {
+ return;
+ } elseif ($this->waitFn) {
+ $this->invokeWaitFn();
+ } elseif ($this->waitList) {
+ $this->invokeWaitList();
+ } else {
+ // If there's no wait function, then reject the promise.
+ $this->reject('Cannot wait on a promise that has '
+ . 'no internal wait function. You must provide a wait '
+ . 'function when constructing the promise to be able to '
+ . 'wait on a promise.');
+ }
+
+ Utils::queue()->run();
+
+ /** @psalm-suppress RedundantCondition */
+ if ($this->state === self::PENDING) {
+ $this->reject('Invoking the wait callback did not resolve the promise');
+ }
+ }
+
+ private function invokeWaitFn()
+ {
+ try {
+ $wfn = $this->waitFn;
+ $this->waitFn = null;
+ $wfn(true);
+ } catch (\Exception $reason) {
+ if ($this->state === self::PENDING) {
+ // The promise has not been resolved yet, so reject the promise
+ // with the exception.
+ $this->reject($reason);
+ } else {
+ // The promise was already resolved, so there's a problem in
+ // the application.
+ throw $reason;
+ }
+ }
+ }
+
+ private function invokeWaitList()
+ {
+ $waitList = $this->waitList;
+ $this->waitList = null;
+
+ foreach ($waitList as $result) {
+ do {
+ $result->waitIfPending();
+ $result = $result->result;
+ } while ($result instanceof Promise);
+
+ if ($result instanceof PromiseInterface) {
+ $result->wait(false);
+ }
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/PromiseInterface.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/PromiseInterface.php
new file mode 100644
index 0000000..e598331
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/PromiseInterface.php
@@ -0,0 +1,97 @@
+reason = $reason;
+ }
+
+ public function then(
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ) {
+ // If there's no onRejected callback then just return self.
+ if (!$onRejected) {
+ return $this;
+ }
+
+ $queue = Utils::queue();
+ $reason = $this->reason;
+ $p = new Promise([$queue, 'run']);
+ $queue->add(static function () use ($p, $reason, $onRejected) {
+ if (Is::pending($p)) {
+ try {
+ // Return a resolved promise if onRejected does not throw.
+ $p->resolve($onRejected($reason));
+ } catch (\Throwable $e) {
+ // onRejected threw, so return a rejected promise.
+ $p->reject($e);
+ } catch (\Exception $e) {
+ // onRejected threw, so return a rejected promise.
+ $p->reject($e);
+ }
+ }
+ });
+
+ return $p;
+ }
+
+ public function otherwise(callable $onRejected)
+ {
+ return $this->then(null, $onRejected);
+ }
+
+ public function wait($unwrap = true, $defaultDelivery = null)
+ {
+ if ($unwrap) {
+ throw Create::exceptionFor($this->reason);
+ }
+
+ return null;
+ }
+
+ public function getState()
+ {
+ return self::REJECTED;
+ }
+
+ public function resolve($value)
+ {
+ throw new \LogicException("Cannot resolve a rejected promise");
+ }
+
+ public function reject($reason)
+ {
+ if ($reason !== $this->reason) {
+ throw new \LogicException("Cannot reject a rejected promise");
+ }
+ }
+
+ public function cancel()
+ {
+ // pass
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/RejectionException.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/RejectionException.php
new file mode 100644
index 0000000..e2f1377
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/RejectionException.php
@@ -0,0 +1,48 @@
+reason = $reason;
+
+ $message = 'The promise was rejected';
+
+ if ($description) {
+ $message .= ' with reason: ' . $description;
+ } elseif (is_string($reason)
+ || (is_object($reason) && method_exists($reason, '__toString'))
+ ) {
+ $message .= ' with reason: ' . $this->reason;
+ } elseif ($reason instanceof \JsonSerializable) {
+ $message .= ' with reason: '
+ . json_encode($this->reason, JSON_PRETTY_PRINT);
+ }
+
+ parent::__construct($message);
+ }
+
+ /**
+ * Returns the rejection reason.
+ *
+ * @return mixed
+ */
+ public function getReason()
+ {
+ return $this->reason;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/TaskQueue.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/TaskQueue.php
new file mode 100644
index 0000000..f0fba2c
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/TaskQueue.php
@@ -0,0 +1,67 @@
+run();
+ */
+class TaskQueue implements TaskQueueInterface
+{
+ private $enableShutdown = true;
+ private $queue = [];
+
+ public function __construct($withShutdown = true)
+ {
+ if ($withShutdown) {
+ register_shutdown_function(function () {
+ if ($this->enableShutdown) {
+ // Only run the tasks if an E_ERROR didn't occur.
+ $err = error_get_last();
+ if (!$err || ($err['type'] ^ E_ERROR)) {
+ $this->run();
+ }
+ }
+ });
+ }
+ }
+
+ public function isEmpty()
+ {
+ return !$this->queue;
+ }
+
+ public function add(callable $task)
+ {
+ $this->queue[] = $task;
+ }
+
+ public function run()
+ {
+ while ($task = array_shift($this->queue)) {
+ /** @var callable $task */
+ $task();
+ }
+ }
+
+ /**
+ * The task queue will be run and exhausted by default when the process
+ * exits IFF the exit is not the result of a PHP E_ERROR error.
+ *
+ * You can disable running the automatic shutdown of the queue by calling
+ * this function. If you disable the task queue shutdown process, then you
+ * MUST either run the task queue (as a result of running your event loop
+ * or manually using the run() method) or wait on each outstanding promise.
+ *
+ * Note: This shutdown will occur before any destructors are triggered.
+ */
+ public function disableShutdown()
+ {
+ $this->enableShutdown = false;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/TaskQueueInterface.php
new file mode 100644
index 0000000..723d4d5
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/TaskQueueInterface.php
@@ -0,0 +1,24 @@
+
+ * while ($eventLoop->isRunning()) {
+ * GuzzleHttp\Promise\Utils::queue()->run();
+ * }
+ *
+ *
+ * @param TaskQueueInterface $assign Optionally specify a new queue instance.
+ *
+ * @return TaskQueueInterface
+ */
+ public static function queue(TaskQueueInterface $assign = null)
+ {
+ static $queue;
+
+ if ($assign) {
+ $queue = $assign;
+ } elseif (!$queue) {
+ $queue = new TaskQueue();
+ }
+
+ return $queue;
+ }
+
+ /**
+ * Adds a function to run in the task queue when it is next `run()` and
+ * returns a promise that is fulfilled or rejected with the result.
+ *
+ * @param callable $task Task function to run.
+ *
+ * @return PromiseInterface
+ */
+ public static function task(callable $task)
+ {
+ $queue = self::queue();
+ $promise = new Promise([$queue, 'run']);
+ $queue->add(function () use ($task, $promise) {
+ try {
+ if (Is::pending($promise)) {
+ $promise->resolve($task());
+ }
+ } catch (\Throwable $e) {
+ $promise->reject($e);
+ } catch (\Exception $e) {
+ $promise->reject($e);
+ }
+ });
+
+ return $promise;
+ }
+
+ /**
+ * Synchronously waits on a promise to resolve and returns an inspection
+ * state array.
+ *
+ * Returns a state associative array containing a "state" key mapping to a
+ * valid promise state. If the state of the promise is "fulfilled", the
+ * array will contain a "value" key mapping to the fulfilled value of the
+ * promise. If the promise is rejected, the array will contain a "reason"
+ * key mapping to the rejection reason of the promise.
+ *
+ * @param PromiseInterface $promise Promise or value.
+ *
+ * @return array
+ */
+ public static function inspect(PromiseInterface $promise)
+ {
+ try {
+ return [
+ 'state' => PromiseInterface::FULFILLED,
+ 'value' => $promise->wait()
+ ];
+ } catch (RejectionException $e) {
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
+ } catch (\Throwable $e) {
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
+ } catch (\Exception $e) {
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
+ }
+ }
+
+ /**
+ * Waits on all of the provided promises, but does not unwrap rejected
+ * promises as thrown exception.
+ *
+ * Returns an array of inspection state arrays.
+ *
+ * @see inspect for the inspection state array format.
+ *
+ * @param PromiseInterface[] $promises Traversable of promises to wait upon.
+ *
+ * @return array
+ */
+ public static function inspectAll($promises)
+ {
+ $results = [];
+ foreach ($promises as $key => $promise) {
+ $results[$key] = self::inspect($promise);
+ }
+
+ return $results;
+ }
+
+ /**
+ * Waits on all of the provided promises and returns the fulfilled values.
+ *
+ * Returns an array that contains the value of each promise (in the same
+ * order the promises were provided). An exception is thrown if any of the
+ * promises are rejected.
+ *
+ * @param iterable $promises Iterable of PromiseInterface objects to wait on.
+ *
+ * @return array
+ *
+ * @throws \Exception on error
+ * @throws \Throwable on error in PHP >=7
+ */
+ public static function unwrap($promises)
+ {
+ $results = [];
+ foreach ($promises as $key => $promise) {
+ $results[$key] = $promise->wait();
+ }
+
+ return $results;
+ }
+
+ /**
+ * Given an array of promises, return a promise that is fulfilled when all
+ * the items in the array are fulfilled.
+ *
+ * The promise's fulfillment value is an array with fulfillment values at
+ * respective positions to the original array. If any promise in the array
+ * rejects, the returned promise is rejected with the rejection reason.
+ *
+ * @param mixed $promises Promises or values.
+ * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
+ *
+ * @return PromiseInterface
+ */
+ public static function all($promises, $recursive = false)
+ {
+ $results = [];
+ $promise = Each::of(
+ $promises,
+ function ($value, $idx) use (&$results) {
+ $results[$idx] = $value;
+ },
+ function ($reason, $idx, Promise $aggregate) {
+ $aggregate->reject($reason);
+ }
+ )->then(function () use (&$results) {
+ ksort($results);
+ return $results;
+ });
+
+ if (true === $recursive) {
+ $promise = $promise->then(function ($results) use ($recursive, &$promises) {
+ foreach ($promises as $promise) {
+ if (Is::pending($promise)) {
+ return self::all($promises, $recursive);
+ }
+ }
+ return $results;
+ });
+ }
+
+ return $promise;
+ }
+
+ /**
+ * Initiate a competitive race between multiple promises or values (values
+ * will become immediately fulfilled promises).
+ *
+ * When count amount of promises have been fulfilled, the returned promise
+ * is fulfilled with an array that contains the fulfillment values of the
+ * winners in order of resolution.
+ *
+ * This promise is rejected with a {@see AggregateException} if the number
+ * of fulfilled promises is less than the desired $count.
+ *
+ * @param int $count Total number of promises.
+ * @param mixed $promises Promises or values.
+ *
+ * @return PromiseInterface
+ */
+ public static function some($count, $promises)
+ {
+ $results = [];
+ $rejections = [];
+
+ return Each::of(
+ $promises,
+ function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
+ if (Is::settled($p)) {
+ return;
+ }
+ $results[$idx] = $value;
+ if (count($results) >= $count) {
+ $p->resolve(null);
+ }
+ },
+ function ($reason) use (&$rejections) {
+ $rejections[] = $reason;
+ }
+ )->then(
+ function () use (&$results, &$rejections, $count) {
+ if (count($results) !== $count) {
+ throw new AggregateException(
+ 'Not enough promises to fulfill count',
+ $rejections
+ );
+ }
+ ksort($results);
+ return array_values($results);
+ }
+ );
+ }
+
+ /**
+ * Like some(), with 1 as count. However, if the promise fulfills, the
+ * fulfillment value is not an array of 1 but the value directly.
+ *
+ * @param mixed $promises Promises or values.
+ *
+ * @return PromiseInterface
+ */
+ public static function any($promises)
+ {
+ return self::some(1, $promises)->then(function ($values) {
+ return $values[0];
+ });
+ }
+
+ /**
+ * Returns a promise that is fulfilled when all of the provided promises have
+ * been fulfilled or rejected.
+ *
+ * The returned promise is fulfilled with an array of inspection state arrays.
+ *
+ * @see inspect for the inspection state array format.
+ *
+ * @param mixed $promises Promises or values.
+ *
+ * @return PromiseInterface
+ */
+ public static function settle($promises)
+ {
+ $results = [];
+
+ return Each::of(
+ $promises,
+ function ($value, $idx) use (&$results) {
+ $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
+ },
+ function ($reason, $idx) use (&$results) {
+ $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
+ }
+ )->then(function () use (&$results) {
+ ksort($results);
+ return $results;
+ });
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/functions.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/functions.php
new file mode 100644
index 0000000..c03d39d
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/functions.php
@@ -0,0 +1,363 @@
+
+ * while ($eventLoop->isRunning()) {
+ * GuzzleHttp\Promise\queue()->run();
+ * }
+ *
+ *
+ * @param TaskQueueInterface $assign Optionally specify a new queue instance.
+ *
+ * @return TaskQueueInterface
+ *
+ * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead.
+ */
+function queue(TaskQueueInterface $assign = null)
+{
+ return Utils::queue($assign);
+}
+
+/**
+ * Adds a function to run in the task queue when it is next `run()` and returns
+ * a promise that is fulfilled or rejected with the result.
+ *
+ * @param callable $task Task function to run.
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead.
+ */
+function task(callable $task)
+{
+ return Utils::task($task);
+}
+
+/**
+ * Creates a promise for a value if the value is not a promise.
+ *
+ * @param mixed $value Promise or value.
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead.
+ */
+function promise_for($value)
+{
+ return Create::promiseFor($value);
+}
+
+/**
+ * Creates a rejected promise for a reason if the reason is not a promise. If
+ * the provided reason is a promise, then it is returned as-is.
+ *
+ * @param mixed $reason Promise or reason.
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead.
+ */
+function rejection_for($reason)
+{
+ return Create::rejectionFor($reason);
+}
+
+/**
+ * Create an exception for a rejected promise value.
+ *
+ * @param mixed $reason
+ *
+ * @return \Exception|\Throwable
+ *
+ * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead.
+ */
+function exception_for($reason)
+{
+ return Create::exceptionFor($reason);
+}
+
+/**
+ * Returns an iterator for the given value.
+ *
+ * @param mixed $value
+ *
+ * @return \Iterator
+ *
+ * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead.
+ */
+function iter_for($value)
+{
+ return Create::iterFor($value);
+}
+
+/**
+ * Synchronously waits on a promise to resolve and returns an inspection state
+ * array.
+ *
+ * Returns a state associative array containing a "state" key mapping to a
+ * valid promise state. If the state of the promise is "fulfilled", the array
+ * will contain a "value" key mapping to the fulfilled value of the promise. If
+ * the promise is rejected, the array will contain a "reason" key mapping to
+ * the rejection reason of the promise.
+ *
+ * @param PromiseInterface $promise Promise or value.
+ *
+ * @return array
+ *
+ * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead.
+ */
+function inspect(PromiseInterface $promise)
+{
+ return Utils::inspect($promise);
+}
+
+/**
+ * Waits on all of the provided promises, but does not unwrap rejected promises
+ * as thrown exception.
+ *
+ * Returns an array of inspection state arrays.
+ *
+ * @see inspect for the inspection state array format.
+ *
+ * @param PromiseInterface[] $promises Traversable of promises to wait upon.
+ *
+ * @return array
+ *
+ * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead.
+ */
+function inspect_all($promises)
+{
+ return Utils::inspectAll($promises);
+}
+
+/**
+ * Waits on all of the provided promises and returns the fulfilled values.
+ *
+ * Returns an array that contains the value of each promise (in the same order
+ * the promises were provided). An exception is thrown if any of the promises
+ * are rejected.
+ *
+ * @param iterable $promises Iterable of PromiseInterface objects to wait on.
+ *
+ * @return array
+ *
+ * @throws \Exception on error
+ * @throws \Throwable on error in PHP >=7
+ *
+ * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead.
+ */
+function unwrap($promises)
+{
+ return Utils::unwrap($promises);
+}
+
+/**
+ * Given an array of promises, return a promise that is fulfilled when all the
+ * items in the array are fulfilled.
+ *
+ * The promise's fulfillment value is an array with fulfillment values at
+ * respective positions to the original array. If any promise in the array
+ * rejects, the returned promise is rejected with the rejection reason.
+ *
+ * @param mixed $promises Promises or values.
+ * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead.
+ */
+function all($promises, $recursive = false)
+{
+ return Utils::all($promises, $recursive);
+}
+
+/**
+ * Initiate a competitive race between multiple promises or values (values will
+ * become immediately fulfilled promises).
+ *
+ * When count amount of promises have been fulfilled, the returned promise is
+ * fulfilled with an array that contains the fulfillment values of the winners
+ * in order of resolution.
+ *
+ * This promise is rejected with a {@see AggregateException} if the number of
+ * fulfilled promises is less than the desired $count.
+ *
+ * @param int $count Total number of promises.
+ * @param mixed $promises Promises or values.
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead.
+ */
+function some($count, $promises)
+{
+ return Utils::some($count, $promises);
+}
+
+/**
+ * Like some(), with 1 as count. However, if the promise fulfills, the
+ * fulfillment value is not an array of 1 but the value directly.
+ *
+ * @param mixed $promises Promises or values.
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead.
+ */
+function any($promises)
+{
+ return Utils::any($promises);
+}
+
+/**
+ * Returns a promise that is fulfilled when all of the provided promises have
+ * been fulfilled or rejected.
+ *
+ * The returned promise is fulfilled with an array of inspection state arrays.
+ *
+ * @see inspect for the inspection state array format.
+ *
+ * @param mixed $promises Promises or values.
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead.
+ */
+function settle($promises)
+{
+ return Utils::settle($promises);
+}
+
+/**
+ * Given an iterator that yields promises or values, returns a promise that is
+ * fulfilled with a null value when the iterator has been consumed or the
+ * aggregate promise has been fulfilled or rejected.
+ *
+ * $onFulfilled is a function that accepts the fulfilled value, iterator index,
+ * and the aggregate promise. The callback can invoke any necessary side
+ * effects and choose to resolve or reject the aggregate if needed.
+ *
+ * $onRejected is a function that accepts the rejection reason, iterator index,
+ * and the aggregate promise. The callback can invoke any necessary side
+ * effects and choose to resolve or reject the aggregate if needed.
+ *
+ * @param mixed $iterable Iterator or array to iterate over.
+ * @param callable $onFulfilled
+ * @param callable $onRejected
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead.
+ */
+function each(
+ $iterable,
+ callable $onFulfilled = null,
+ callable $onRejected = null
+) {
+ return Each::of($iterable, $onFulfilled, $onRejected);
+}
+
+/**
+ * Like each, but only allows a certain number of outstanding promises at any
+ * given time.
+ *
+ * $concurrency may be an integer or a function that accepts the number of
+ * pending promises and returns a numeric concurrency limit value to allow for
+ * dynamic a concurrency size.
+ *
+ * @param mixed $iterable
+ * @param int|callable $concurrency
+ * @param callable $onFulfilled
+ * @param callable $onRejected
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead.
+ */
+function each_limit(
+ $iterable,
+ $concurrency,
+ callable $onFulfilled = null,
+ callable $onRejected = null
+) {
+ return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected);
+}
+
+/**
+ * Like each_limit, but ensures that no promise in the given $iterable argument
+ * is rejected. If any promise is rejected, then the aggregate promise is
+ * rejected with the encountered rejection.
+ *
+ * @param mixed $iterable
+ * @param int|callable $concurrency
+ * @param callable $onFulfilled
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead.
+ */
+function each_limit_all(
+ $iterable,
+ $concurrency,
+ callable $onFulfilled = null
+) {
+ return Each::ofLimitAll($iterable, $concurrency, $onFulfilled);
+}
+
+/**
+ * Returns true if a promise is fulfilled.
+ *
+ * @return bool
+ *
+ * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead.
+ */
+function is_fulfilled(PromiseInterface $promise)
+{
+ return Is::fulfilled($promise);
+}
+
+/**
+ * Returns true if a promise is rejected.
+ *
+ * @return bool
+ *
+ * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead.
+ */
+function is_rejected(PromiseInterface $promise)
+{
+ return Is::rejected($promise);
+}
+
+/**
+ * Returns true if a promise is fulfilled or rejected.
+ *
+ * @return bool
+ *
+ * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead.
+ */
+function is_settled(PromiseInterface $promise)
+{
+ return Is::settled($promise);
+}
+
+/**
+ * Create a new coroutine.
+ *
+ * @see Coroutine
+ *
+ * @return PromiseInterface
+ *
+ * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead.
+ */
+function coroutine(callable $generatorFn)
+{
+ return Coroutine::of($generatorFn);
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/promises/src/functions_include.php b/tests/php_test_files/vendor/guzzlehttp/promises/src/functions_include.php
new file mode 100644
index 0000000..34cd171
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/promises/src/functions_include.php
@@ -0,0 +1,6 @@
+
+ This issue has been automatically marked as stale because it has not had
+ recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you
+ for your contributions.
+# Comment to post when closing a stale issue. Set to `false` to disable
+closeComment: false
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/.github/workflows/ci.yml b/tests/php_test_files/vendor/guzzlehttp/psr7/.github/workflows/ci.yml
new file mode 100644
index 0000000..0850470
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/.github/workflows/ci.yml
@@ -0,0 +1,30 @@
+name: CI
+
+on:
+ pull_request:
+
+jobs:
+ build:
+ name: Build
+ runs-on: ubuntu-22.04
+ strategy:
+ max-parallel: 10
+ matrix:
+ php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
+
+ steps:
+ - name: Set up PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ coverage: 'none'
+ extensions: mbstring
+
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Install dependencies
+ run: composer update --no-interaction --no-progress
+
+ - name: Run tests
+ run: make test
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/.github/workflows/integration.yml b/tests/php_test_files/vendor/guzzlehttp/psr7/.github/workflows/integration.yml
new file mode 100644
index 0000000..a55a256
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/.github/workflows/integration.yml
@@ -0,0 +1,36 @@
+name: Integration
+
+on:
+ pull_request:
+
+jobs:
+ build:
+ name: Test
+ runs-on: ubuntu-22.04
+ strategy:
+ max-parallel: 10
+ matrix:
+ php: ['7.2', '7.3', '7.4', '8.0', '8.1']
+
+ steps:
+ - name: Set up PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ coverage: none
+
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Download dependencies
+ uses: ramsey/composer-install@v1
+ with:
+ composer-options: --no-interaction --optimize-autoloader
+
+ - name: Start server
+ run: php -S 127.0.0.1:10002 tests/Integration/server.php &
+
+ - name: Run tests
+ env:
+ TEST_SERVER: 127.0.0.1:10002
+ run: ./vendor/bin/phpunit --testsuite Integration
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/.github/workflows/static.yml b/tests/php_test_files/vendor/guzzlehttp/psr7/.github/workflows/static.yml
new file mode 100644
index 0000000..f00351b
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/.github/workflows/static.yml
@@ -0,0 +1,29 @@
+name: Static analysis
+
+on:
+ pull_request:
+
+jobs:
+ php-cs-fixer:
+ name: PHP-CS-Fixer
+ runs-on: ubuntu-22.04
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '7.4'
+ coverage: none
+ extensions: mbstring
+
+ - name: Download dependencies
+ run: composer update --no-interaction --no-progress
+
+ - name: Download PHP CS Fixer
+ run: composer require "friendsofphp/php-cs-fixer:2.18.4"
+
+ - name: Execute PHP CS Fixer
+ run: vendor/bin/php-cs-fixer fix --diff-format udiff --dry-run
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/.php_cs.dist b/tests/php_test_files/vendor/guzzlehttp/psr7/.php_cs.dist
new file mode 100644
index 0000000..e4f0bd5
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/.php_cs.dist
@@ -0,0 +1,56 @@
+setRiskyAllowed(true)
+ ->setRules([
+ '@PSR2' => true,
+ 'array_syntax' => ['syntax' => 'short'],
+ 'concat_space' => ['spacing' => 'one'],
+ 'declare_strict_types' => false,
+ 'final_static_access' => true,
+ 'fully_qualified_strict_types' => true,
+ 'header_comment' => false,
+ 'is_null' => ['use_yoda_style' => true],
+ 'list_syntax' => ['syntax' => 'long'],
+ 'lowercase_cast' => true,
+ 'magic_method_casing' => true,
+ 'modernize_types_casting' => true,
+ 'multiline_comment_opening_closing' => true,
+ 'no_alias_functions' => true,
+ 'no_alternative_syntax' => true,
+ 'no_blank_lines_after_phpdoc' => true,
+ 'no_empty_comment' => true,
+ 'no_empty_phpdoc' => true,
+ 'no_empty_statement' => true,
+ 'no_extra_blank_lines' => true,
+ 'no_leading_import_slash' => true,
+ 'no_trailing_comma_in_singleline_array' => true,
+ 'no_unset_cast' => true,
+ 'no_unused_imports' => true,
+ 'no_whitespace_in_blank_line' => true,
+ 'ordered_imports' => true,
+ 'php_unit_ordered_covers' => true,
+ 'php_unit_test_annotation' => ['style' => 'prefix'],
+ 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
+ 'phpdoc_align' => ['align' => 'vertical'],
+ 'phpdoc_no_useless_inheritdoc' => true,
+ 'phpdoc_scalar' => true,
+ 'phpdoc_separation' => true,
+ 'phpdoc_single_line_var_spacing' => true,
+ 'phpdoc_trim' => true,
+ 'phpdoc_trim_consecutive_blank_line_separation' => true,
+ 'phpdoc_types' => true,
+ 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
+ 'phpdoc_var_without_name' => true,
+ 'single_trait_insert_per_statement' => true,
+ 'standardize_not_equals' => true,
+ ])
+ ->setFinder(
+ PhpCsFixer\Finder::create()
+ ->in(__DIR__.'/src')
+ ->in(__DIR__.'/tests')
+ ->name('*.php')
+ )
+;
+
+return $config;
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/CHANGELOG.md b/tests/php_test_files/vendor/guzzlehttp/psr7/CHANGELOG.md
new file mode 100644
index 0000000..9b2b65c
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/CHANGELOG.md
@@ -0,0 +1,324 @@
+# Change Log
+
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+
+## Unreleased
+
+## 1.9.1 - 2023-04-17
+
+### Fixed
+
+- Fixed header validation issue
+
+## 1.9.0 - 2022-06-20
+
+### Added
+
+- Added `UriComparator::isCrossOrigin` method
+
+## 1.8.5 - 2022-03-20
+
+### Fixed
+
+- Correct header value validation
+
+## 1.8.4 - 2022-03-20
+
+### Fixed
+
+- Validate header values properly
+
+## 1.8.3 - 2021-10-05
+
+### Fixed
+
+- Return `null` in caching stream size if remote size is `null`
+
+## 1.8.2 - 2021-04-26
+
+### Fixed
+
+- Handle possibly unset `url` in `stream_get_meta_data`
+
+## 1.8.1 - 2021-03-21
+
+### Fixed
+
+- Issue parsing IPv6 URLs
+- Issue modifying ServerRequest lost all its attributes
+
+## 1.8.0 - 2021-03-21
+
+### Added
+
+- Locale independent URL parsing
+- Most classes got a `@final` annotation to prepare for 2.0
+
+### Fixed
+
+- Issue when creating stream from `php://input` and curl-ext is not installed
+- Broken `Utils::tryFopen()` on PHP 8
+
+## 1.7.0 - 2020-09-30
+
+### Added
+
+- Replaced functions by static methods
+
+### Fixed
+
+- Converting a non-seekable stream to a string
+- Handle multiple Set-Cookie correctly
+- Ignore array keys in header values when merging
+- Allow multibyte characters to be parsed in `Message:bodySummary()`
+
+### Changed
+
+- Restored partial HHVM 3 support
+
+
+## [1.6.1] - 2019-07-02
+
+### Fixed
+
+- Accept null and bool header values again
+
+
+## [1.6.0] - 2019-06-30
+
+### Added
+
+- Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244)
+- Added MIME type for WEBP image format (#246)
+- Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272)
+
+### Changed
+
+- Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262)
+- Accept port number 0 to be valid (#270)
+
+### Fixed
+
+- Fixed subsequent reads from `php://input` in ServerRequest (#247)
+- Fixed readable/writable detection for certain stream modes (#248)
+- Fixed encoding of special characters in the `userInfo` component of an URI (#253)
+
+
+## [1.5.2] - 2018-12-04
+
+### Fixed
+
+- Check body size when getting the message summary
+
+
+## [1.5.1] - 2018-12-04
+
+### Fixed
+
+- Get the summary of a body only if it is readable
+
+
+## [1.5.0] - 2018-12-03
+
+### Added
+
+- Response first-line to response string exception (fixes #145)
+- A test for #129 behavior
+- `get_message_body_summary` function in order to get the message summary
+- `3gp` and `mkv` mime types
+
+### Changed
+
+- Clarify exception message when stream is detached
+
+### Deprecated
+
+- Deprecated parsing folded header lines as per RFC 7230
+
+### Fixed
+
+- Fix `AppendStream::detach` to not close streams
+- `InflateStream` preserves `isSeekable` attribute of the underlying stream
+- `ServerRequest::getUriFromGlobals` to support URLs in query parameters
+
+
+Several other fixes and improvements.
+
+
+## [1.4.2] - 2017-03-20
+
+### Fixed
+
+- Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing
+ calls to `trigger_error` when deprecated methods are invoked.
+
+
+## [1.4.1] - 2017-02-27
+
+### Added
+
+- Rriggering of silenced deprecation warnings.
+
+### Fixed
+
+- Reverted BC break by reintroducing behavior to automagically fix a URI with a
+ relative path and an authority by adding a leading slash to the path. It's only
+ deprecated now.
+
+
+## [1.4.0] - 2017-02-21
+
+### Added
+
+- Added common URI utility methods based on RFC 3986 (see documentation in the readme):
+ - `Uri::isDefaultPort`
+ - `Uri::isAbsolute`
+ - `Uri::isNetworkPathReference`
+ - `Uri::isAbsolutePathReference`
+ - `Uri::isRelativePathReference`
+ - `Uri::isSameDocumentReference`
+ - `Uri::composeComponents`
+ - `UriNormalizer::normalize`
+ - `UriNormalizer::isEquivalent`
+ - `UriResolver::relativize`
+
+### Changed
+
+- Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form.
+- Allow `parse_response` to parse a response without delimiting space and reason.
+- Ensure each URI modification results in a valid URI according to PSR-7 discussions.
+ Invalid modifications will throw an exception instead of returning a wrong URI or
+ doing some magic.
+ - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception
+ because the path of a URI with an authority must start with a slash "/" or be empty
+ - `(new Uri())->withScheme('http')` will return `'http://localhost'`
+
+### Deprecated
+
+- `Uri::resolve` in favor of `UriResolver::resolve`
+- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments`
+
+### Fixed
+
+- `Stream::read` when length parameter <= 0.
+- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory.
+- `ServerRequest::getUriFromGlobals` when `Host` header contains port.
+- Compatibility of URIs with `file` scheme and empty host.
+
+
+## [1.3.1] - 2016-06-25
+
+### Fixed
+
+- `Uri::__toString` for network path references, e.g. `//example.org`.
+- Missing lowercase normalization for host.
+- Handling of URI components in case they are `'0'` in a lot of places,
+ e.g. as a user info password.
+- `Uri::withAddedHeader` to correctly merge headers with different case.
+- Trimming of header values in `Uri::withAddedHeader`. Header values may
+ be surrounded by whitespace which should be ignored according to RFC 7230
+ Section 3.2.4. This does not apply to header names.
+- `Uri::withAddedHeader` with an array of header values.
+- `Uri::resolve` when base path has no slash and handling of fragment.
+- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the
+ key/value both in encoded as well as decoded form to those methods. This is
+ consistent with withPath, withQuery etc.
+- `ServerRequest::withoutAttribute` when attribute value is null.
+
+
+## [1.3.0] - 2016-04-13
+
+### Added
+
+- Remaining interfaces needed for full PSR7 compatibility
+ (ServerRequestInterface, UploadedFileInterface, etc.).
+- Support for stream_for from scalars.
+
+### Changed
+
+- Can now extend Uri.
+
+### Fixed
+- A bug in validating request methods by making it more permissive.
+
+
+## [1.2.3] - 2016-02-18
+
+### Fixed
+
+- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote
+ streams, which can sometimes return fewer bytes than requested with `fread`.
+- Handling of gzipped responses with FNAME headers.
+
+
+## [1.2.2] - 2016-01-22
+
+### Added
+
+- Support for URIs without any authority.
+- Support for HTTP 451 'Unavailable For Legal Reasons.'
+- Support for using '0' as a filename.
+- Support for including non-standard ports in Host headers.
+
+
+## [1.2.1] - 2015-11-02
+
+### Changes
+
+- Now supporting negative offsets when seeking to SEEK_END.
+
+
+## [1.2.0] - 2015-08-15
+
+### Changed
+
+- Body as `"0"` is now properly added to a response.
+- Now allowing forward seeking in CachingStream.
+- Now properly parsing HTTP requests that contain proxy targets in
+ `parse_request`.
+- functions.php is now conditionally required.
+- user-info is no longer dropped when resolving URIs.
+
+
+## [1.1.0] - 2015-06-24
+
+### Changed
+
+- URIs can now be relative.
+- `multipart/form-data` headers are now overridden case-insensitively.
+- URI paths no longer encode the following characters because they are allowed
+ in URIs: "(", ")", "*", "!", "'"
+- A port is no longer added to a URI when the scheme is missing and no port is
+ present.
+
+
+## 1.0.0 - 2015-05-19
+
+Initial release.
+
+Currently unsupported:
+
+- `Psr\Http\Message\ServerRequestInterface`
+- `Psr\Http\Message\UploadedFileInterface`
+
+
+
+[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0
+[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
+[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1
+[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0
+[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2
+[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1
+[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0
+[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1
+[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0
+[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3
+[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2
+[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1
+[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0
+[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/LICENSE b/tests/php_test_files/vendor/guzzlehttp/psr7/LICENSE
new file mode 100644
index 0000000..51c7ec8
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/LICENSE
@@ -0,0 +1,26 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Michael Dowling
+Copyright (c) 2015 Mรกrk Sรกgi-Kazรกr
+Copyright (c) 2015 Graham Campbell
+Copyright (c) 2016 Tobias Schultze
+Copyright (c) 2016 George Mponos
+Copyright (c) 2018 Tobias Nyholm
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/README.md b/tests/php_test_files/vendor/guzzlehttp/psr7/README.md
new file mode 100644
index 0000000..64776cb
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/README.md
@@ -0,0 +1,844 @@
+# PSR-7 Message Implementation
+
+This repository contains a full [PSR-7](https://www.php-fig.org/psr/psr-7/)
+message implementation, several stream decorators, and some helpful
+functionality like query string parsing.
+
+
+[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7)
+
+
+# Stream implementation
+
+This package comes with a number of stream implementations and stream
+decorators.
+
+
+## AppendStream
+
+`GuzzleHttp\Psr7\AppendStream`
+
+Reads from multiple streams, one after the other.
+
+```php
+use GuzzleHttp\Psr7;
+
+$a = Psr7\Utils::streamFor('abc, ');
+$b = Psr7\Utils::streamFor('123.');
+$composed = new Psr7\AppendStream([$a, $b]);
+
+$composed->addStream(Psr7\Utils::streamFor(' Above all listen to me'));
+
+echo $composed; // abc, 123. Above all listen to me.
+```
+
+
+## BufferStream
+
+`GuzzleHttp\Psr7\BufferStream`
+
+Provides a buffer stream that can be written to fill a buffer, and read
+from to remove bytes from the buffer.
+
+This stream returns a "hwm" metadata value that tells upstream consumers
+what the configured high water mark of the stream is, or the maximum
+preferred size of the buffer.
+
+```php
+use GuzzleHttp\Psr7;
+
+// When more than 1024 bytes are in the buffer, it will begin returning
+// false to writes. This is an indication that writers should slow down.
+$buffer = new Psr7\BufferStream(1024);
+```
+
+
+## CachingStream
+
+The CachingStream is used to allow seeking over previously read bytes on
+non-seekable streams. This can be useful when transferring a non-seekable
+entity body fails due to needing to rewind the stream (for example, resulting
+from a redirect). Data that is read from the remote stream will be buffered in
+a PHP temp stream so that previously read bytes are cached first in memory,
+then on disk.
+
+```php
+use GuzzleHttp\Psr7;
+
+$original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r'));
+$stream = new Psr7\CachingStream($original);
+
+$stream->read(1024);
+echo $stream->tell();
+// 1024
+
+$stream->seek(0);
+echo $stream->tell();
+// 0
+```
+
+
+## DroppingStream
+
+`GuzzleHttp\Psr7\DroppingStream`
+
+Stream decorator that begins dropping data once the size of the underlying
+stream becomes too full.
+
+```php
+use GuzzleHttp\Psr7;
+
+// Create an empty stream
+$stream = Psr7\Utils::streamFor();
+
+// Start dropping data when the stream has more than 10 bytes
+$dropping = new Psr7\DroppingStream($stream, 10);
+
+$dropping->write('01234567890123456789');
+echo $stream; // 0123456789
+```
+
+
+## FnStream
+
+`GuzzleHttp\Psr7\FnStream`
+
+Compose stream implementations based on a hash of functions.
+
+Allows for easy testing and extension of a provided stream without needing
+to create a concrete class for a simple extension point.
+
+```php
+
+use GuzzleHttp\Psr7;
+
+$stream = Psr7\Utils::streamFor('hi');
+$fnStream = Psr7\FnStream::decorate($stream, [
+ 'rewind' => function () use ($stream) {
+ echo 'About to rewind - ';
+ $stream->rewind();
+ echo 'rewound!';
+ }
+]);
+
+$fnStream->rewind();
+// Outputs: About to rewind - rewound!
+```
+
+
+## InflateStream
+
+`GuzzleHttp\Psr7\InflateStream`
+
+Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.
+
+This stream decorator skips the first 10 bytes of the given stream to remove
+the gzip header, converts the provided stream to a PHP stream resource,
+then appends the zlib.inflate filter. The stream is then converted back
+to a Guzzle stream resource to be used as a Guzzle stream.
+
+
+## LazyOpenStream
+
+`GuzzleHttp\Psr7\LazyOpenStream`
+
+Lazily reads or writes to a file that is opened only after an IO operation
+take place on the stream.
+
+```php
+use GuzzleHttp\Psr7;
+
+$stream = new Psr7\LazyOpenStream('/path/to/file', 'r');
+// The file has not yet been opened...
+
+echo $stream->read(10);
+// The file is opened and read from only when needed.
+```
+
+
+## LimitStream
+
+`GuzzleHttp\Psr7\LimitStream`
+
+LimitStream can be used to read a subset or slice of an existing stream object.
+This can be useful for breaking a large file into smaller pieces to be sent in
+chunks (e.g. Amazon S3's multipart upload API).
+
+```php
+use GuzzleHttp\Psr7;
+
+$original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+'));
+echo $original->getSize();
+// >>> 1048576
+
+// Limit the size of the body to 1024 bytes and start reading from byte 2048
+$stream = new Psr7\LimitStream($original, 1024, 2048);
+echo $stream->getSize();
+// >>> 1024
+echo $stream->tell();
+// >>> 0
+```
+
+
+## MultipartStream
+
+`GuzzleHttp\Psr7\MultipartStream`
+
+Stream that when read returns bytes for a streaming multipart or
+multipart/form-data stream.
+
+
+## NoSeekStream
+
+`GuzzleHttp\Psr7\NoSeekStream`
+
+NoSeekStream wraps a stream and does not allow seeking.
+
+```php
+use GuzzleHttp\Psr7;
+
+$original = Psr7\Utils::streamFor('foo');
+$noSeek = new Psr7\NoSeekStream($original);
+
+echo $noSeek->read(3);
+// foo
+var_export($noSeek->isSeekable());
+// false
+$noSeek->seek(0);
+var_export($noSeek->read(3));
+// NULL
+```
+
+
+## PumpStream
+
+`GuzzleHttp\Psr7\PumpStream`
+
+Provides a read only stream that pumps data from a PHP callable.
+
+When invoking the provided callable, the PumpStream will pass the amount of
+data requested to read to the callable. The callable can choose to ignore
+this value and return fewer or more bytes than requested. Any extra data
+returned by the provided callable is buffered internally until drained using
+the read() function of the PumpStream. The provided callable MUST return
+false when there is no more data to read.
+
+
+## Implementing stream decorators
+
+Creating a stream decorator is very easy thanks to the
+`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that
+implement `Psr\Http\Message\StreamInterface` by proxying to an underlying
+stream. Just `use` the `StreamDecoratorTrait` and implement your custom
+methods.
+
+For example, let's say we wanted to call a specific function each time the last
+byte is read from a stream. This could be implemented by overriding the
+`read()` method.
+
+```php
+use Psr\Http\Message\StreamInterface;
+use GuzzleHttp\Psr7\StreamDecoratorTrait;
+
+class EofCallbackStream implements StreamInterface
+{
+ use StreamDecoratorTrait;
+
+ private $callback;
+
+ public function __construct(StreamInterface $stream, callable $cb)
+ {
+ $this->stream = $stream;
+ $this->callback = $cb;
+ }
+
+ public function read($length)
+ {
+ $result = $this->stream->read($length);
+
+ // Invoke the callback when EOF is hit.
+ if ($this->eof()) {
+ call_user_func($this->callback);
+ }
+
+ return $result;
+ }
+}
+```
+
+This decorator could be added to any existing stream and used like so:
+
+```php
+use GuzzleHttp\Psr7;
+
+$original = Psr7\Utils::streamFor('foo');
+
+$eofStream = new EofCallbackStream($original, function () {
+ echo 'EOF!';
+});
+
+$eofStream->read(2);
+$eofStream->read(1);
+// echoes "EOF!"
+$eofStream->seek(0);
+$eofStream->read(3);
+// echoes "EOF!"
+```
+
+
+## PHP StreamWrapper
+
+You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a
+PSR-7 stream as a PHP stream resource.
+
+Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP
+stream from a PSR-7 stream.
+
+```php
+use GuzzleHttp\Psr7\StreamWrapper;
+
+$stream = GuzzleHttp\Psr7\Utils::streamFor('hello!');
+$resource = StreamWrapper::getResource($stream);
+echo fread($resource, 6); // outputs hello!
+```
+
+
+# Static API
+
+There are various static methods available under the `GuzzleHttp\Psr7` namespace.
+
+
+## `GuzzleHttp\Psr7\Message::toString`
+
+`public static function toString(MessageInterface $message): string`
+
+Returns the string representation of an HTTP message.
+
+```php
+$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com');
+echo GuzzleHttp\Psr7\Message::toString($request);
+```
+
+
+## `GuzzleHttp\Psr7\Message::bodySummary`
+
+`public static function bodySummary(MessageInterface $message, int $truncateAt = 120): string|null`
+
+Get a short summary of the message body.
+
+Will return `null` if the response is not printable.
+
+
+## `GuzzleHttp\Psr7\Message::rewindBody`
+
+`public static function rewindBody(MessageInterface $message): void`
+
+Attempts to rewind a message body and throws an exception on failure.
+
+The body of the message will only be rewound if a call to `tell()`
+returns a value other than `0`.
+
+
+## `GuzzleHttp\Psr7\Message::parseMessage`
+
+`public static function parseMessage(string $message): array`
+
+Parses an HTTP message into an associative array.
+
+The array contains the "start-line" key containing the start line of
+the message, "headers" key containing an associative array of header
+array values, and a "body" key containing the body of the message.
+
+
+## `GuzzleHttp\Psr7\Message::parseRequestUri`
+
+`public static function parseRequestUri(string $path, array $headers): string`
+
+Constructs a URI for an HTTP request message.
+
+
+## `GuzzleHttp\Psr7\Message::parseRequest`
+
+`public static function parseRequest(string $message): Request`
+
+Parses a request message string into a request object.
+
+
+## `GuzzleHttp\Psr7\Message::parseResponse`
+
+`public static function parseResponse(string $message): Response`
+
+Parses a response message string into a response object.
+
+
+## `GuzzleHttp\Psr7\Header::parse`
+
+`public static function parse(string|array $header): array`
+
+Parse an array of header values containing ";" separated data into an
+array of associative arrays representing the header key value pair data
+of the header. When a parameter does not contain a value, but just
+contains a key, this function will inject a key with a '' string value.
+
+
+## `GuzzleHttp\Psr7\Header::normalize`
+
+`public static function normalize(string|array $header): array`
+
+Converts an array of header values that may contain comma separated
+headers into an array of headers with no comma separated values.
+
+
+## `GuzzleHttp\Psr7\Query::parse`
+
+`public static function parse(string $str, int|bool $urlEncoding = true): array`
+
+Parse a query string into an associative array.
+
+If multiple values are found for the same key, the value of that key
+value pair will become an array. This function does not parse nested
+PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2`
+will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`.
+
+
+## `GuzzleHttp\Psr7\Query::build`
+
+`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string`
+
+Build a query string from an array of key value pairs.
+
+This function can use the return value of `parse()` to build a query
+string. This function does not modify the provided keys when an array is
+encountered (like `http_build_query()` would).
+
+
+## `GuzzleHttp\Psr7\Utils::caselessRemove`
+
+`public static function caselessRemove(iterable $keys, $keys, array $data): array`
+
+Remove the items given by the keys, case insensitively from the data.
+
+
+## `GuzzleHttp\Psr7\Utils::copyToStream`
+
+`public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void`
+
+Copy the contents of a stream into another stream until the given number
+of bytes have been read.
+
+
+## `GuzzleHttp\Psr7\Utils::copyToString`
+
+`public static function copyToString(StreamInterface $stream, int $maxLen = -1): string`
+
+Copy the contents of a stream into a string until the given number of
+bytes have been read.
+
+
+## `GuzzleHttp\Psr7\Utils::hash`
+
+`public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string`
+
+Calculate a hash of a stream.
+
+This method reads the entire stream to calculate a rolling hash, based on
+PHP's `hash_init` functions.
+
+
+## `GuzzleHttp\Psr7\Utils::modifyRequest`
+
+`public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface`
+
+Clone and modify a request with the given changes.
+
+This method is useful for reducing the number of clones needed to mutate
+a message.
+
+- method: (string) Changes the HTTP method.
+- set_headers: (array) Sets the given headers.
+- remove_headers: (array) Remove the given headers.
+- body: (mixed) Sets the given body.
+- uri: (UriInterface) Set the URI.
+- query: (string) Set the query string value of the URI.
+- version: (string) Set the protocol version.
+
+
+## `GuzzleHttp\Psr7\Utils::readLine`
+
+`public static function readLine(StreamInterface $stream, int $maxLength = null): string`
+
+Read a line from the stream up to the maximum allowed buffer length.
+
+
+## `GuzzleHttp\Psr7\Utils::streamFor`
+
+`public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface`
+
+Create a new stream based on the input type.
+
+Options is an associative array that can contain the following keys:
+
+- metadata: Array of custom metadata.
+- size: Size of the stream.
+
+This method accepts the following `$resource` types:
+
+- `Psr\Http\Message\StreamInterface`: Returns the value as-is.
+- `string`: Creates a stream object that uses the given string as the contents.
+- `resource`: Creates a stream object that wraps the given PHP stream resource.
+- `Iterator`: If the provided value implements `Iterator`, then a read-only
+ stream object will be created that wraps the given iterable. Each time the
+ stream is read from, data from the iterator will fill a buffer and will be
+ continuously called until the buffer is equal to the requested read size.
+ Subsequent read calls will first read from the buffer and then call `next`
+ on the underlying iterator until it is exhausted.
+- `object` with `__toString()`: If the object has the `__toString()` method,
+ the object will be cast to a string and then a stream will be returned that
+ uses the string value.
+- `NULL`: When `null` is passed, an empty stream object is returned.
+- `callable` When a callable is passed, a read-only stream object will be
+ created that invokes the given callable. The callable is invoked with the
+ number of suggested bytes to read. The callable can return any number of
+ bytes, but MUST return `false` when there is no more data to return. The
+ stream object that wraps the callable will invoke the callable until the
+ number of requested bytes are available. Any additional bytes will be
+ buffered and used in subsequent reads.
+
+```php
+$stream = GuzzleHttp\Psr7\Utils::streamFor('foo');
+$stream = GuzzleHttp\Psr7\Utils::streamFor(fopen('/path/to/file', 'r'));
+
+$generator = function ($bytes) {
+ for ($i = 0; $i < $bytes; $i++) {
+ yield ' ';
+ }
+}
+
+$stream = GuzzleHttp\Psr7\Utils::streamFor($generator(100));
+```
+
+
+## `GuzzleHttp\Psr7\Utils::tryFopen`
+
+`public static function tryFopen(string $filename, string $mode): resource`
+
+Safely opens a PHP stream resource using a filename.
+
+When fopen fails, PHP normally raises a warning. This function adds an
+error handler that checks for errors and throws an exception instead.
+
+
+## `GuzzleHttp\Psr7\Utils::uriFor`
+
+`public static function uriFor(string|UriInterface $uri): UriInterface`
+
+Returns a UriInterface for the given value.
+
+This function accepts a string or UriInterface and returns a
+UriInterface for the given value. If the value is already a
+UriInterface, it is returned as-is.
+
+
+## `GuzzleHttp\Psr7\MimeType::fromFilename`
+
+`public static function fromFilename(string $filename): string|null`
+
+Determines the mimetype of a file by looking at its extension.
+
+
+## `GuzzleHttp\Psr7\MimeType::fromExtension`
+
+`public static function fromExtension(string $extension): string|null`
+
+Maps a file extensions to a mimetype.
+
+
+## Upgrading from Function API
+
+The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience:
+
+| Original Function | Replacement Method |
+|----------------|----------------|
+| `str` | `Message::toString` |
+| `uri_for` | `Utils::uriFor` |
+| `stream_for` | `Utils::streamFor` |
+| `parse_header` | `Header::parse` |
+| `normalize_header` | `Header::normalize` |
+| `modify_request` | `Utils::modifyRequest` |
+| `rewind_body` | `Message::rewindBody` |
+| `try_fopen` | `Utils::tryFopen` |
+| `copy_to_string` | `Utils::copyToString` |
+| `copy_to_stream` | `Utils::copyToStream` |
+| `hash` | `Utils::hash` |
+| `readline` | `Utils::readLine` |
+| `parse_request` | `Message::parseRequest` |
+| `parse_response` | `Message::parseResponse` |
+| `parse_query` | `Query::parse` |
+| `build_query` | `Query::build` |
+| `mimetype_from_filename` | `MimeType::fromFilename` |
+| `mimetype_from_extension` | `MimeType::fromExtension` |
+| `_parse_message` | `Message::parseMessage` |
+| `_parse_request_uri` | `Message::parseRequestUri` |
+| `get_message_body_summary` | `Message::bodySummary` |
+| `_caseless_remove` | `Utils::caselessRemove` |
+
+
+# Additional URI Methods
+
+Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class,
+this library also provides additional functionality when working with URIs as static methods.
+
+## URI Types
+
+An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference.
+An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI,
+the base URI. Relative references can be divided into several forms according to
+[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2):
+
+- network-path references, e.g. `//example.com/path`
+- absolute-path references, e.g. `/path`
+- relative-path references, e.g. `subpath`
+
+The following methods can be used to identify the type of the URI.
+
+### `GuzzleHttp\Psr7\Uri::isAbsolute`
+
+`public static function isAbsolute(UriInterface $uri): bool`
+
+Whether the URI is absolute, i.e. it has a scheme.
+
+### `GuzzleHttp\Psr7\Uri::isNetworkPathReference`
+
+`public static function isNetworkPathReference(UriInterface $uri): bool`
+
+Whether the URI is a network-path reference. A relative reference that begins with two slash characters is
+termed an network-path reference.
+
+### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference`
+
+`public static function isAbsolutePathReference(UriInterface $uri): bool`
+
+Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is
+termed an absolute-path reference.
+
+### `GuzzleHttp\Psr7\Uri::isRelativePathReference`
+
+`public static function isRelativePathReference(UriInterface $uri): bool`
+
+Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is
+termed a relative-path reference.
+
+### `GuzzleHttp\Psr7\Uri::isSameDocumentReference`
+
+`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool`
+
+Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its
+fragment component, identical to the base URI. When no base URI is given, only an empty URI reference
+(apart from its fragment) is considered a same-document reference.
+
+## URI Components
+
+Additional methods to work with URI components.
+
+### `GuzzleHttp\Psr7\Uri::isDefaultPort`
+
+`public static function isDefaultPort(UriInterface $uri): bool`
+
+Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null
+or the standard port. This method can be used independently of the implementation.
+
+### `GuzzleHttp\Psr7\Uri::composeComponents`
+
+`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string`
+
+Composes a URI reference string from its various components according to
+[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called
+manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`.
+
+### `GuzzleHttp\Psr7\Uri::fromParts`
+
+`public static function fromParts(array $parts): UriInterface`
+
+Creates a URI from a hash of [`parse_url`](https://www.php.net/manual/en/function.parse-url.php) components.
+
+
+### `GuzzleHttp\Psr7\Uri::withQueryValue`
+
+`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface`
+
+Creates a new URI with a specific query string value. Any existing query string values that exactly match the
+provided key are removed and replaced with the given key value pair. A value of null will set the query string
+key without a value, e.g. "key" instead of "key=value".
+
+### `GuzzleHttp\Psr7\Uri::withQueryValues`
+
+`public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface`
+
+Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an
+associative array of key => value.
+
+### `GuzzleHttp\Psr7\Uri::withoutQueryValue`
+
+`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface`
+
+Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the
+provided key are removed.
+
+## Cross-Origin Detection
+
+`GuzzleHttp\Psr7\UriComparator` provides methods to determine if a modified URL should be considered cross-origin.
+
+### `GuzzleHttp\Psr7\UriComparator::isCrossOrigin`
+
+`public static function isCrossOrigin(UriInterface $original, UriInterface $modified): bool`
+
+Determines if a modified URL should be considered cross-origin with respect to an original URL.
+
+## Reference Resolution
+
+`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according
+to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers
+do when resolving a link in a website based on the current request URI.
+
+### `GuzzleHttp\Psr7\UriResolver::resolve`
+
+`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface`
+
+Converts the relative URI into a new URI that is resolved against the base URI.
+
+### `GuzzleHttp\Psr7\UriResolver::removeDotSegments`
+
+`public static function removeDotSegments(string $path): string`
+
+Removes dot segments from a path and returns the new path according to
+[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4).
+
+### `GuzzleHttp\Psr7\UriResolver::relativize`
+
+`public static function relativize(UriInterface $base, UriInterface $target): UriInterface`
+
+Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve():
+
+```php
+(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target))
+```
+
+One use-case is to use the current request URI as base URI and then generate relative links in your documents
+to reduce the document size or offer self-contained downloadable document archives.
+
+```php
+$base = new Uri('http://example.com/a/b/');
+echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'.
+echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'.
+echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'.
+echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'.
+```
+
+## Normalization and Comparison
+
+`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to
+[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6).
+
+### `GuzzleHttp\Psr7\UriNormalizer::normalize`
+
+`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface`
+
+Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface.
+This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask
+of normalizations to apply. The following normalizations are available:
+
+- `UriNormalizer::PRESERVING_NORMALIZATIONS`
+
+ Default normalizations which only include the ones that preserve semantics.
+
+- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING`
+
+ All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized.
+
+ Example: `http://example.org/a%c2%b1b` โ `http://example.org/a%C2%B1b`
+
+- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS`
+
+ Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of
+ ALPHA (%41โ%5A and %61โ%7A), DIGIT (%30โ%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should
+ not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved
+ characters by URI normalizers.
+
+ Example: `http://example.org/%7Eusern%61me/` โ `http://example.org/~username/`
+
+- `UriNormalizer::CONVERT_EMPTY_PATH`
+
+ Converts the empty path to "/" for http and https URIs.
+
+ Example: `http://example.org` โ `http://example.org/`
+
+- `UriNormalizer::REMOVE_DEFAULT_HOST`
+
+ Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host
+ "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to
+ RFC 3986.
+
+ Example: `file://localhost/myfile` โ `file:///myfile`
+
+- `UriNormalizer::REMOVE_DEFAULT_PORT`
+
+ Removes the default port of the given URI scheme from the URI.
+
+ Example: `http://example.org:80/` โ `http://example.org/`
+
+- `UriNormalizer::REMOVE_DOT_SEGMENTS`
+
+ Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would
+ change the semantics of the URI reference.
+
+ Example: `http://example.org/../a/b/../c/./d.html` โ `http://example.org/a/c/d.html`
+
+- `UriNormalizer::REMOVE_DUPLICATE_SLASHES`
+
+ Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes
+ and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization
+ may change the semantics. Encoded slashes (%2F) are not removed.
+
+ Example: `http://example.org//foo///bar.html` โ `http://example.org/foo/bar.html`
+
+- `UriNormalizer::SORT_QUERY_PARAMETERS`
+
+ Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be
+ significant (this is not defined by the standard). So this normalization is not safe and may change the semantics
+ of the URI.
+
+ Example: `?lang=en&article=fred` โ `?article=fred&lang=en`
+
+### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent`
+
+`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool`
+
+Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given
+`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent.
+This of course assumes they will be resolved against the same base URI. If this is not the case, determination of
+equivalence or difference of relative references does not mean anything.
+
+
+## Version Guidance
+
+| Version | Status | PHP Version |
+|---------|----------------|------------------|
+| 1.x | Security fixes | >=5.4,<8.1 |
+| 2.x | Latest | ^7.2.5 \|\| ^8.0 |
+
+
+## Security
+
+If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information.
+
+
+## License
+
+Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.
+
+
+## For Enterprise
+
+Available as part of the Tidelift Subscription
+
+The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-psr7?utm_source=packagist-guzzlehttp-psr7&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/composer.json b/tests/php_test_files/vendor/guzzlehttp/psr7/composer.json
new file mode 100644
index 0000000..2607f22
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/composer.json
@@ -0,0 +1,71 @@
+{
+ "name": "guzzlehttp/psr7",
+ "description": "PSR-7 message implementation that also provides common utility methods",
+ "keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "George Mponos",
+ "email": "gmponos@gmail.com",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Mรกrk Sรกgi-Kazรกr",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "require": {
+ "php": ">=5.4.0",
+ "psr/http-message": "~1.0",
+ "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10",
+ "ext-zlib": "*"
+ },
+ "provide": {
+ "psr/http-message-implementation": "1.0"
+ },
+ "suggest": {
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ },
+ "files": ["src/functions_include.php"]
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "GuzzleHttp\\Tests\\Psr7\\": "tests/"
+ }
+ },
+ "config": {
+ "preferred-install": "dist",
+ "sort-packages": true,
+ "allow-plugins": {
+ "bamarni/composer-bin-plugin": true
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/AppendStream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/AppendStream.php
new file mode 100644
index 0000000..fa9153d
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/AppendStream.php
@@ -0,0 +1,246 @@
+addStream($stream);
+ }
+ }
+
+ public function __toString()
+ {
+ try {
+ $this->rewind();
+ return $this->getContents();
+ } catch (\Exception $e) {
+ return '';
+ }
+ }
+
+ /**
+ * Add a stream to the AppendStream
+ *
+ * @param StreamInterface $stream Stream to append. Must be readable.
+ *
+ * @throws \InvalidArgumentException if the stream is not readable
+ */
+ public function addStream(StreamInterface $stream)
+ {
+ if (!$stream->isReadable()) {
+ throw new \InvalidArgumentException('Each stream must be readable');
+ }
+
+ // The stream is only seekable if all streams are seekable
+ if (!$stream->isSeekable()) {
+ $this->seekable = false;
+ }
+
+ $this->streams[] = $stream;
+ }
+
+ public function getContents()
+ {
+ return Utils::copyToString($this);
+ }
+
+ /**
+ * Closes each attached stream.
+ *
+ * {@inheritdoc}
+ */
+ public function close()
+ {
+ $this->pos = $this->current = 0;
+ $this->seekable = true;
+
+ foreach ($this->streams as $stream) {
+ $stream->close();
+ }
+
+ $this->streams = [];
+ }
+
+ /**
+ * Detaches each attached stream.
+ *
+ * Returns null as it's not clear which underlying stream resource to return.
+ *
+ * {@inheritdoc}
+ */
+ public function detach()
+ {
+ $this->pos = $this->current = 0;
+ $this->seekable = true;
+
+ foreach ($this->streams as $stream) {
+ $stream->detach();
+ }
+
+ $this->streams = [];
+
+ return null;
+ }
+
+ public function tell()
+ {
+ return $this->pos;
+ }
+
+ /**
+ * Tries to calculate the size by adding the size of each stream.
+ *
+ * If any of the streams do not return a valid number, then the size of the
+ * append stream cannot be determined and null is returned.
+ *
+ * {@inheritdoc}
+ */
+ public function getSize()
+ {
+ $size = 0;
+
+ foreach ($this->streams as $stream) {
+ $s = $stream->getSize();
+ if ($s === null) {
+ return null;
+ }
+ $size += $s;
+ }
+
+ return $size;
+ }
+
+ public function eof()
+ {
+ return !$this->streams ||
+ ($this->current >= count($this->streams) - 1 &&
+ $this->streams[$this->current]->eof());
+ }
+
+ public function rewind()
+ {
+ $this->seek(0);
+ }
+
+ /**
+ * Attempts to seek to the given position. Only supports SEEK_SET.
+ *
+ * {@inheritdoc}
+ */
+ public function seek($offset, $whence = SEEK_SET)
+ {
+ if (!$this->seekable) {
+ throw new \RuntimeException('This AppendStream is not seekable');
+ } elseif ($whence !== SEEK_SET) {
+ throw new \RuntimeException('The AppendStream can only seek with SEEK_SET');
+ }
+
+ $this->pos = $this->current = 0;
+
+ // Rewind each stream
+ foreach ($this->streams as $i => $stream) {
+ try {
+ $stream->rewind();
+ } catch (\Exception $e) {
+ throw new \RuntimeException('Unable to seek stream '
+ . $i . ' of the AppendStream', 0, $e);
+ }
+ }
+
+ // Seek to the actual position by reading from each stream
+ while ($this->pos < $offset && !$this->eof()) {
+ $result = $this->read(min(8096, $offset - $this->pos));
+ if ($result === '') {
+ break;
+ }
+ }
+ }
+
+ /**
+ * Reads from all of the appended streams until the length is met or EOF.
+ *
+ * {@inheritdoc}
+ */
+ public function read($length)
+ {
+ $buffer = '';
+ $total = count($this->streams) - 1;
+ $remaining = $length;
+ $progressToNext = false;
+
+ while ($remaining > 0) {
+
+ // Progress to the next stream if needed.
+ if ($progressToNext || $this->streams[$this->current]->eof()) {
+ $progressToNext = false;
+ if ($this->current === $total) {
+ break;
+ }
+ $this->current++;
+ }
+
+ $result = $this->streams[$this->current]->read($remaining);
+
+ // Using a loose comparison here to match on '', false, and null
+ if ($result == null) {
+ $progressToNext = true;
+ continue;
+ }
+
+ $buffer .= $result;
+ $remaining = $length - strlen($buffer);
+ }
+
+ $this->pos += strlen($buffer);
+
+ return $buffer;
+ }
+
+ public function isReadable()
+ {
+ return true;
+ }
+
+ public function isWritable()
+ {
+ return false;
+ }
+
+ public function isSeekable()
+ {
+ return $this->seekable;
+ }
+
+ public function write($string)
+ {
+ throw new \RuntimeException('Cannot write to an AppendStream');
+ }
+
+ public function getMetadata($key = null)
+ {
+ return $key ? null : [];
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/BufferStream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/BufferStream.php
new file mode 100644
index 0000000..783859c
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/BufferStream.php
@@ -0,0 +1,142 @@
+hwm = $hwm;
+ }
+
+ public function __toString()
+ {
+ return $this->getContents();
+ }
+
+ public function getContents()
+ {
+ $buffer = $this->buffer;
+ $this->buffer = '';
+
+ return $buffer;
+ }
+
+ public function close()
+ {
+ $this->buffer = '';
+ }
+
+ public function detach()
+ {
+ $this->close();
+
+ return null;
+ }
+
+ public function getSize()
+ {
+ return strlen($this->buffer);
+ }
+
+ public function isReadable()
+ {
+ return true;
+ }
+
+ public function isWritable()
+ {
+ return true;
+ }
+
+ public function isSeekable()
+ {
+ return false;
+ }
+
+ public function rewind()
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET)
+ {
+ throw new \RuntimeException('Cannot seek a BufferStream');
+ }
+
+ public function eof()
+ {
+ return strlen($this->buffer) === 0;
+ }
+
+ public function tell()
+ {
+ throw new \RuntimeException('Cannot determine the position of a BufferStream');
+ }
+
+ /**
+ * Reads data from the buffer.
+ */
+ public function read($length)
+ {
+ $currentLength = strlen($this->buffer);
+
+ if ($length >= $currentLength) {
+ // No need to slice the buffer because we don't have enough data.
+ $result = $this->buffer;
+ $this->buffer = '';
+ } else {
+ // Slice up the result to provide a subset of the buffer.
+ $result = substr($this->buffer, 0, $length);
+ $this->buffer = substr($this->buffer, $length);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Writes data to the buffer.
+ */
+ public function write($string)
+ {
+ $this->buffer .= $string;
+
+ // TODO: What should happen here?
+ if (strlen($this->buffer) >= $this->hwm) {
+ return false;
+ }
+
+ return strlen($string);
+ }
+
+ public function getMetadata($key = null)
+ {
+ if ($key == 'hwm') {
+ return $this->hwm;
+ }
+
+ return $key ? null : [];
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/CachingStream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/CachingStream.php
new file mode 100644
index 0000000..febade9
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/CachingStream.php
@@ -0,0 +1,147 @@
+remoteStream = $stream;
+ $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+'));
+ }
+
+ public function getSize()
+ {
+ $remoteSize = $this->remoteStream->getSize();
+
+ if (null === $remoteSize) {
+ return null;
+ }
+
+ return max($this->stream->getSize(), $remoteSize);
+ }
+
+ public function rewind()
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET)
+ {
+ if ($whence == SEEK_SET) {
+ $byte = $offset;
+ } elseif ($whence == SEEK_CUR) {
+ $byte = $offset + $this->tell();
+ } elseif ($whence == SEEK_END) {
+ $size = $this->remoteStream->getSize();
+ if ($size === null) {
+ $size = $this->cacheEntireStream();
+ }
+ $byte = $size + $offset;
+ } else {
+ throw new \InvalidArgumentException('Invalid whence');
+ }
+
+ $diff = $byte - $this->stream->getSize();
+
+ if ($diff > 0) {
+ // Read the remoteStream until we have read in at least the amount
+ // of bytes requested, or we reach the end of the file.
+ while ($diff > 0 && !$this->remoteStream->eof()) {
+ $this->read($diff);
+ $diff = $byte - $this->stream->getSize();
+ }
+ } else {
+ // We can just do a normal seek since we've already seen this byte.
+ $this->stream->seek($byte);
+ }
+ }
+
+ public function read($length)
+ {
+ // Perform a regular read on any previously read data from the buffer
+ $data = $this->stream->read($length);
+ $remaining = $length - strlen($data);
+
+ // More data was requested so read from the remote stream
+ if ($remaining) {
+ // If data was written to the buffer in a position that would have
+ // been filled from the remote stream, then we must skip bytes on
+ // the remote stream to emulate overwriting bytes from that
+ // position. This mimics the behavior of other PHP stream wrappers.
+ $remoteData = $this->remoteStream->read(
+ $remaining + $this->skipReadBytes
+ );
+
+ if ($this->skipReadBytes) {
+ $len = strlen($remoteData);
+ $remoteData = substr($remoteData, $this->skipReadBytes);
+ $this->skipReadBytes = max(0, $this->skipReadBytes - $len);
+ }
+
+ $data .= $remoteData;
+ $this->stream->write($remoteData);
+ }
+
+ return $data;
+ }
+
+ public function write($string)
+ {
+ // When appending to the end of the currently read stream, you'll want
+ // to skip bytes from being read from the remote stream to emulate
+ // other stream wrappers. Basically replacing bytes of data of a fixed
+ // length.
+ $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell();
+ if ($overflow > 0) {
+ $this->skipReadBytes += $overflow;
+ }
+
+ return $this->stream->write($string);
+ }
+
+ public function eof()
+ {
+ return $this->stream->eof() && $this->remoteStream->eof();
+ }
+
+ /**
+ * Close both the remote stream and buffer stream
+ */
+ public function close()
+ {
+ $this->remoteStream->close() && $this->stream->close();
+ }
+
+ private function cacheEntireStream()
+ {
+ $target = new FnStream(['write' => 'strlen']);
+ Utils::copyToStream($this, $target);
+
+ return $this->tell();
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/DroppingStream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/DroppingStream.php
new file mode 100644
index 0000000..9f7420c
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/DroppingStream.php
@@ -0,0 +1,45 @@
+stream = $stream;
+ $this->maxLength = $maxLength;
+ }
+
+ public function write($string)
+ {
+ $diff = $this->maxLength - $this->stream->getSize();
+
+ // Begin returning 0 when the underlying stream is too large.
+ if ($diff <= 0) {
+ return 0;
+ }
+
+ // Write the stream or a subset of the stream if needed.
+ if (strlen($string) < $diff) {
+ return $this->stream->write($string);
+ }
+
+ return $this->stream->write(substr($string, 0, $diff));
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/FnStream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/FnStream.php
new file mode 100644
index 0000000..76a8cc7
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/FnStream.php
@@ -0,0 +1,163 @@
+methods = $methods;
+
+ // Create the functions on the class
+ foreach ($methods as $name => $fn) {
+ $this->{'_fn_' . $name} = $fn;
+ }
+ }
+
+ /**
+ * Lazily determine which methods are not implemented.
+ *
+ * @throws \BadMethodCallException
+ */
+ public function __get($name)
+ {
+ throw new \BadMethodCallException(str_replace('_fn_', '', $name)
+ . '() is not implemented in the FnStream');
+ }
+
+ /**
+ * The close method is called on the underlying stream only if possible.
+ */
+ public function __destruct()
+ {
+ if (isset($this->_fn_close)) {
+ call_user_func($this->_fn_close);
+ }
+ }
+
+ /**
+ * An unserialize would allow the __destruct to run when the unserialized value goes out of scope.
+ *
+ * @throws \LogicException
+ */
+ public function __wakeup()
+ {
+ throw new \LogicException('FnStream should never be unserialized');
+ }
+
+ /**
+ * Adds custom functionality to an underlying stream by intercepting
+ * specific method calls.
+ *
+ * @param StreamInterface $stream Stream to decorate
+ * @param array $methods Hash of method name to a closure
+ *
+ * @return FnStream
+ */
+ public static function decorate(StreamInterface $stream, array $methods)
+ {
+ // If any of the required methods were not provided, then simply
+ // proxy to the decorated stream.
+ foreach (array_diff(self::$slots, array_keys($methods)) as $diff) {
+ $methods[$diff] = [$stream, $diff];
+ }
+
+ return new self($methods);
+ }
+
+ public function __toString()
+ {
+ return call_user_func($this->_fn___toString);
+ }
+
+ public function close()
+ {
+ return call_user_func($this->_fn_close);
+ }
+
+ public function detach()
+ {
+ return call_user_func($this->_fn_detach);
+ }
+
+ public function getSize()
+ {
+ return call_user_func($this->_fn_getSize);
+ }
+
+ public function tell()
+ {
+ return call_user_func($this->_fn_tell);
+ }
+
+ public function eof()
+ {
+ return call_user_func($this->_fn_eof);
+ }
+
+ public function isSeekable()
+ {
+ return call_user_func($this->_fn_isSeekable);
+ }
+
+ public function rewind()
+ {
+ call_user_func($this->_fn_rewind);
+ }
+
+ public function seek($offset, $whence = SEEK_SET)
+ {
+ call_user_func($this->_fn_seek, $offset, $whence);
+ }
+
+ public function isWritable()
+ {
+ return call_user_func($this->_fn_isWritable);
+ }
+
+ public function write($string)
+ {
+ return call_user_func($this->_fn_write, $string);
+ }
+
+ public function isReadable()
+ {
+ return call_user_func($this->_fn_isReadable);
+ }
+
+ public function read($length)
+ {
+ return call_user_func($this->_fn_read, $length);
+ }
+
+ public function getContents()
+ {
+ return call_user_func($this->_fn_getContents);
+ }
+
+ public function getMetadata($key = null)
+ {
+ return call_user_func($this->_fn_getMetadata, $key);
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/Header.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Header.php
new file mode 100644
index 0000000..865d742
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Header.php
@@ -0,0 +1,71 @@
+]+>|[^=]+/', $kvp, $matches)) {
+ $m = $matches[0];
+ if (isset($m[1])) {
+ $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
+ } else {
+ $part[] = trim($m[0], $trimmed);
+ }
+ }
+ }
+ if ($part) {
+ $params[] = $part;
+ }
+ }
+
+ return $params;
+ }
+
+ /**
+ * Converts an array of header values that may contain comma separated
+ * headers into an array of headers with no comma separated values.
+ *
+ * @param string|array $header Header to normalize.
+ *
+ * @return array Returns the normalized header field values.
+ */
+ public static function normalize($header)
+ {
+ if (!is_array($header)) {
+ return array_map('trim', explode(',', $header));
+ }
+
+ $result = [];
+ foreach ($header as $value) {
+ foreach ((array) $value as $v) {
+ if (strpos($v, ',') === false) {
+ $result[] = $v;
+ continue;
+ }
+ foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
+ $result[] = trim($vv);
+ }
+ }
+ }
+
+ return $result;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/InflateStream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/InflateStream.php
new file mode 100644
index 0000000..0cbd2cc
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/InflateStream.php
@@ -0,0 +1,56 @@
+read(10);
+ $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header);
+ // Skip the header, that is 10 + length of filename + 1 (nil) bytes
+ $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength);
+ $resource = StreamWrapper::getResource($stream);
+ stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ);
+ $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource));
+ }
+
+ /**
+ * @param StreamInterface $stream
+ * @param $header
+ *
+ * @return int
+ */
+ private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)
+ {
+ $filename_header_length = 0;
+
+ if (substr(bin2hex($header), 6, 2) === '08') {
+ // we have a filename, read until nil
+ $filename_header_length = 1;
+ while ($stream->read(1) !== chr(0)) {
+ $filename_header_length++;
+ }
+ }
+
+ return $filename_header_length;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
new file mode 100644
index 0000000..911e127
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
@@ -0,0 +1,42 @@
+filename = $filename;
+ $this->mode = $mode;
+ }
+
+ /**
+ * Creates the underlying stream lazily when required.
+ *
+ * @return StreamInterface
+ */
+ protected function createStream()
+ {
+ return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/LimitStream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/LimitStream.php
new file mode 100644
index 0000000..1173ec4
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/LimitStream.php
@@ -0,0 +1,157 @@
+stream = $stream;
+ $this->setLimit($limit);
+ $this->setOffset($offset);
+ }
+
+ public function eof()
+ {
+ // Always return true if the underlying stream is EOF
+ if ($this->stream->eof()) {
+ return true;
+ }
+
+ // No limit and the underlying stream is not at EOF
+ if ($this->limit == -1) {
+ return false;
+ }
+
+ return $this->stream->tell() >= $this->offset + $this->limit;
+ }
+
+ /**
+ * Returns the size of the limited subset of data
+ * {@inheritdoc}
+ */
+ public function getSize()
+ {
+ if (null === ($length = $this->stream->getSize())) {
+ return null;
+ } elseif ($this->limit == -1) {
+ return $length - $this->offset;
+ } else {
+ return min($this->limit, $length - $this->offset);
+ }
+ }
+
+ /**
+ * Allow for a bounded seek on the read limited stream
+ * {@inheritdoc}
+ */
+ public function seek($offset, $whence = SEEK_SET)
+ {
+ if ($whence !== SEEK_SET || $offset < 0) {
+ throw new \RuntimeException(sprintf(
+ 'Cannot seek to offset %s with whence %s',
+ $offset,
+ $whence
+ ));
+ }
+
+ $offset += $this->offset;
+
+ if ($this->limit !== -1) {
+ if ($offset > $this->offset + $this->limit) {
+ $offset = $this->offset + $this->limit;
+ }
+ }
+
+ $this->stream->seek($offset);
+ }
+
+ /**
+ * Give a relative tell()
+ * {@inheritdoc}
+ */
+ public function tell()
+ {
+ return $this->stream->tell() - $this->offset;
+ }
+
+ /**
+ * Set the offset to start limiting from
+ *
+ * @param int $offset Offset to seek to and begin byte limiting from
+ *
+ * @throws \RuntimeException if the stream cannot be seeked.
+ */
+ public function setOffset($offset)
+ {
+ $current = $this->stream->tell();
+
+ if ($current !== $offset) {
+ // If the stream cannot seek to the offset position, then read to it
+ if ($this->stream->isSeekable()) {
+ $this->stream->seek($offset);
+ } elseif ($current > $offset) {
+ throw new \RuntimeException("Could not seek to stream offset $offset");
+ } else {
+ $this->stream->read($offset - $current);
+ }
+ }
+
+ $this->offset = $offset;
+ }
+
+ /**
+ * Set the limit of bytes that the decorator allows to be read from the
+ * stream.
+ *
+ * @param int $limit Number of bytes to allow to be read from the stream.
+ * Use -1 for no limit.
+ */
+ public function setLimit($limit)
+ {
+ $this->limit = $limit;
+ }
+
+ public function read($length)
+ {
+ if ($this->limit == -1) {
+ return $this->stream->read($length);
+ }
+
+ // Check if the current position is less than the total allowed
+ // bytes + original offset
+ $remaining = ($this->offset + $this->limit) - $this->stream->tell();
+ if ($remaining > 0) {
+ // Only return the amount of requested data, ensuring that the byte
+ // limit is not exceeded
+ return $this->stream->read(min($remaining, $length));
+ }
+
+ return '';
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/Message.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Message.php
new file mode 100644
index 0000000..516d1cb
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Message.php
@@ -0,0 +1,252 @@
+getMethod() . ' '
+ . $message->getRequestTarget())
+ . ' HTTP/' . $message->getProtocolVersion();
+ if (!$message->hasHeader('host')) {
+ $msg .= "\r\nHost: " . $message->getUri()->getHost();
+ }
+ } elseif ($message instanceof ResponseInterface) {
+ $msg = 'HTTP/' . $message->getProtocolVersion() . ' '
+ . $message->getStatusCode() . ' '
+ . $message->getReasonPhrase();
+ } else {
+ throw new \InvalidArgumentException('Unknown message type');
+ }
+
+ foreach ($message->getHeaders() as $name => $values) {
+ if (strtolower($name) === 'set-cookie') {
+ foreach ($values as $value) {
+ $msg .= "\r\n{$name}: " . $value;
+ }
+ } else {
+ $msg .= "\r\n{$name}: " . implode(', ', $values);
+ }
+ }
+
+ return "{$msg}\r\n\r\n" . $message->getBody();
+ }
+
+ /**
+ * Get a short summary of the message body.
+ *
+ * Will return `null` if the response is not printable.
+ *
+ * @param MessageInterface $message The message to get the body summary
+ * @param int $truncateAt The maximum allowed size of the summary
+ *
+ * @return string|null
+ */
+ public static function bodySummary(MessageInterface $message, $truncateAt = 120)
+ {
+ $body = $message->getBody();
+
+ if (!$body->isSeekable() || !$body->isReadable()) {
+ return null;
+ }
+
+ $size = $body->getSize();
+
+ if ($size === 0) {
+ return null;
+ }
+
+ $summary = $body->read($truncateAt);
+ $body->rewind();
+
+ if ($size > $truncateAt) {
+ $summary .= ' (truncated...)';
+ }
+
+ // Matches any printable character, including unicode characters:
+ // letters, marks, numbers, punctuation, spacing, and separators.
+ if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) {
+ return null;
+ }
+
+ return $summary;
+ }
+
+ /**
+ * Attempts to rewind a message body and throws an exception on failure.
+ *
+ * The body of the message will only be rewound if a call to `tell()`
+ * returns a value other than `0`.
+ *
+ * @param MessageInterface $message Message to rewind
+ *
+ * @throws \RuntimeException
+ */
+ public static function rewindBody(MessageInterface $message)
+ {
+ $body = $message->getBody();
+
+ if ($body->tell()) {
+ $body->rewind();
+ }
+ }
+
+ /**
+ * Parses an HTTP message into an associative array.
+ *
+ * The array contains the "start-line" key containing the start line of
+ * the message, "headers" key containing an associative array of header
+ * array values, and a "body" key containing the body of the message.
+ *
+ * @param string $message HTTP request or response to parse.
+ *
+ * @return array
+ */
+ public static function parseMessage($message)
+ {
+ if (!$message) {
+ throw new \InvalidArgumentException('Invalid message');
+ }
+
+ $message = ltrim($message, "\r\n");
+
+ $messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
+
+ if ($messageParts === false || count($messageParts) !== 2) {
+ throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
+ }
+
+ list($rawHeaders, $body) = $messageParts;
+ $rawHeaders .= "\r\n"; // Put back the delimiter we split previously
+ $headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
+
+ if ($headerParts === false || count($headerParts) !== 2) {
+ throw new \InvalidArgumentException('Invalid message: Missing status line');
+ }
+
+ list($startLine, $rawHeaders) = $headerParts;
+
+ if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
+ // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
+ $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
+ }
+
+ /** @var array[] $headerLines */
+ $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
+
+ // If these aren't the same, then one line didn't match and there's an invalid header.
+ if ($count !== substr_count($rawHeaders, "\n")) {
+ // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
+ if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
+ throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
+ }
+
+ throw new \InvalidArgumentException('Invalid header syntax');
+ }
+
+ $headers = [];
+
+ foreach ($headerLines as $headerLine) {
+ $headers[$headerLine[1]][] = $headerLine[2];
+ }
+
+ return [
+ 'start-line' => $startLine,
+ 'headers' => $headers,
+ 'body' => $body,
+ ];
+ }
+
+ /**
+ * Constructs a URI for an HTTP request message.
+ *
+ * @param string $path Path from the start-line
+ * @param array $headers Array of headers (each value an array).
+ *
+ * @return string
+ */
+ public static function parseRequestUri($path, array $headers)
+ {
+ $hostKey = array_filter(array_keys($headers), function ($k) {
+ return strtolower($k) === 'host';
+ });
+
+ // If no host is found, then a full URI cannot be constructed.
+ if (!$hostKey) {
+ return $path;
+ }
+
+ $host = $headers[reset($hostKey)][0];
+ $scheme = substr($host, -4) === ':443' ? 'https' : 'http';
+
+ return $scheme . '://' . $host . '/' . ltrim($path, '/');
+ }
+
+ /**
+ * Parses a request message string into a request object.
+ *
+ * @param string $message Request message string.
+ *
+ * @return Request
+ */
+ public static function parseRequest($message)
+ {
+ $data = self::parseMessage($message);
+ $matches = [];
+ if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
+ throw new \InvalidArgumentException('Invalid request string');
+ }
+ $parts = explode(' ', $data['start-line'], 3);
+ $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
+
+ $request = new Request(
+ $parts[0],
+ $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1],
+ $data['headers'],
+ $data['body'],
+ $version
+ );
+
+ return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
+ }
+
+ /**
+ * Parses a response message string into a response object.
+ *
+ * @param string $message Response message string.
+ *
+ * @return Response
+ */
+ public static function parseResponse($message)
+ {
+ $data = self::parseMessage($message);
+ // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
+ // between status-code and reason-phrase is required. But browsers accept
+ // responses without space and reason as well.
+ if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
+ throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
+ }
+ $parts = explode(' ', $data['start-line'], 3);
+
+ return new Response(
+ (int) $parts[1],
+ $data['headers'],
+ $data['body'],
+ explode('/', $parts[0])[1],
+ isset($parts[2]) ? $parts[2] : null
+ );
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/MessageTrait.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/MessageTrait.php
new file mode 100644
index 0000000..0bbd63e
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/MessageTrait.php
@@ -0,0 +1,269 @@
+ array of values */
+ private $headers = [];
+
+ /** @var array Map of lowercase header name => original name at registration */
+ private $headerNames = [];
+
+ /** @var string */
+ private $protocol = '1.1';
+
+ /** @var StreamInterface|null */
+ private $stream;
+
+ public function getProtocolVersion()
+ {
+ return $this->protocol;
+ }
+
+ public function withProtocolVersion($version)
+ {
+ if ($this->protocol === $version) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->protocol = $version;
+ return $new;
+ }
+
+ public function getHeaders()
+ {
+ return $this->headers;
+ }
+
+ public function hasHeader($header)
+ {
+ return isset($this->headerNames[strtolower($header)]);
+ }
+
+ public function getHeader($header)
+ {
+ $header = strtolower($header);
+
+ if (!isset($this->headerNames[$header])) {
+ return [];
+ }
+
+ $header = $this->headerNames[$header];
+
+ return $this->headers[$header];
+ }
+
+ public function getHeaderLine($header)
+ {
+ return implode(', ', $this->getHeader($header));
+ }
+
+ public function withHeader($header, $value)
+ {
+ $this->assertHeader($header);
+ $value = $this->normalizeHeaderValue($value);
+ $normalized = strtolower($header);
+
+ $new = clone $this;
+ if (isset($new->headerNames[$normalized])) {
+ unset($new->headers[$new->headerNames[$normalized]]);
+ }
+ $new->headerNames[$normalized] = $header;
+ $new->headers[$header] = $value;
+
+ return $new;
+ }
+
+ public function withAddedHeader($header, $value)
+ {
+ $this->assertHeader($header);
+ $value = $this->normalizeHeaderValue($value);
+ $normalized = strtolower($header);
+
+ $new = clone $this;
+ if (isset($new->headerNames[$normalized])) {
+ $header = $this->headerNames[$normalized];
+ $new->headers[$header] = array_merge($this->headers[$header], $value);
+ } else {
+ $new->headerNames[$normalized] = $header;
+ $new->headers[$header] = $value;
+ }
+
+ return $new;
+ }
+
+ public function withoutHeader($header)
+ {
+ $normalized = strtolower($header);
+
+ if (!isset($this->headerNames[$normalized])) {
+ return $this;
+ }
+
+ $header = $this->headerNames[$normalized];
+
+ $new = clone $this;
+ unset($new->headers[$header], $new->headerNames[$normalized]);
+
+ return $new;
+ }
+
+ public function getBody()
+ {
+ if (!$this->stream) {
+ $this->stream = Utils::streamFor('');
+ }
+
+ return $this->stream;
+ }
+
+ public function withBody(StreamInterface $body)
+ {
+ if ($body === $this->stream) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->stream = $body;
+ return $new;
+ }
+
+ private function setHeaders(array $headers)
+ {
+ $this->headerNames = $this->headers = [];
+ foreach ($headers as $header => $value) {
+ if (is_int($header)) {
+ // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec
+ // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass.
+ $header = (string) $header;
+ }
+ $this->assertHeader($header);
+ $value = $this->normalizeHeaderValue($value);
+ $normalized = strtolower($header);
+ if (isset($this->headerNames[$normalized])) {
+ $header = $this->headerNames[$normalized];
+ $this->headers[$header] = array_merge($this->headers[$header], $value);
+ } else {
+ $this->headerNames[$normalized] = $header;
+ $this->headers[$header] = $value;
+ }
+ }
+ }
+
+ /**
+ * @param mixed $value
+ *
+ * @return string[]
+ */
+ private function normalizeHeaderValue($value)
+ {
+ if (!is_array($value)) {
+ return $this->trimAndValidateHeaderValues([$value]);
+ }
+
+ if (count($value) === 0) {
+ throw new \InvalidArgumentException('Header value can not be an empty array.');
+ }
+
+ return $this->trimAndValidateHeaderValues($value);
+ }
+
+ /**
+ * Trims whitespace from the header values.
+ *
+ * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field.
+ *
+ * header-field = field-name ":" OWS field-value OWS
+ * OWS = *( SP / HTAB )
+ *
+ * @param mixed[] $values Header values
+ *
+ * @return string[] Trimmed header values
+ *
+ * @see https://tools.ietf.org/html/rfc7230#section-3.2.4
+ */
+ private function trimAndValidateHeaderValues(array $values)
+ {
+ return array_map(function ($value) {
+ if (!is_scalar($value) && null !== $value) {
+ throw new \InvalidArgumentException(sprintf(
+ 'Header value must be scalar or null but %s provided.',
+ is_object($value) ? get_class($value) : gettype($value)
+ ));
+ }
+
+ $trimmed = trim((string) $value, " \t");
+ $this->assertValue($trimmed);
+
+ return $trimmed;
+ }, array_values($values));
+ }
+
+ /**
+ * @see https://tools.ietf.org/html/rfc7230#section-3.2
+ *
+ * @param mixed $header
+ *
+ * @return void
+ */
+ private function assertHeader($header)
+ {
+ if (!is_string($header)) {
+ throw new \InvalidArgumentException(sprintf(
+ 'Header name must be a string but %s provided.',
+ is_object($header) ? get_class($header) : gettype($header)
+ ));
+ }
+
+ if ($header === '') {
+ throw new \InvalidArgumentException('Header name can not be empty.');
+ }
+
+ if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) {
+ throw new \InvalidArgumentException(
+ sprintf('"%s" is not valid header name.', $header)
+ );
+ }
+ }
+
+ /**
+ * @param string $value
+ *
+ * @return void
+ *
+ * @see https://tools.ietf.org/html/rfc7230#section-3.2
+ *
+ * field-value = *( field-content / obs-fold )
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
+ * field-vchar = VCHAR / obs-text
+ * VCHAR = %x21-7E
+ * obs-text = %x80-FF
+ * obs-fold = CRLF 1*( SP / HTAB )
+ */
+ private function assertValue($value)
+ {
+ // The regular expression intentionally does not support the obs-fold production, because as
+ // per RFC 7230#3.2.4:
+ //
+ // A sender MUST NOT generate a message that includes
+ // line folding (i.e., that has any field-value that contains a match to
+ // the obs-fold rule) unless the message is intended for packaging
+ // within the message/http media type.
+ //
+ // Clients must not send a request with line folding and a server sending folded headers is
+ // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
+ // folding is not likely to break any legitimate use case.
+ if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) {
+ throw new \InvalidArgumentException(
+ sprintf('"%s" is not valid header value.', $value)
+ );
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/MimeType.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/MimeType.php
new file mode 100644
index 0000000..205c7b1
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/MimeType.php
@@ -0,0 +1,140 @@
+ 'video/3gpp',
+ '7z' => 'application/x-7z-compressed',
+ 'aac' => 'audio/x-aac',
+ 'ai' => 'application/postscript',
+ 'aif' => 'audio/x-aiff',
+ 'asc' => 'text/plain',
+ 'asf' => 'video/x-ms-asf',
+ 'atom' => 'application/atom+xml',
+ 'avi' => 'video/x-msvideo',
+ 'bmp' => 'image/bmp',
+ 'bz2' => 'application/x-bzip2',
+ 'cer' => 'application/pkix-cert',
+ 'crl' => 'application/pkix-crl',
+ 'crt' => 'application/x-x509-ca-cert',
+ 'css' => 'text/css',
+ 'csv' => 'text/csv',
+ 'cu' => 'application/cu-seeme',
+ 'deb' => 'application/x-debian-package',
+ 'doc' => 'application/msword',
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'dvi' => 'application/x-dvi',
+ 'eot' => 'application/vnd.ms-fontobject',
+ 'eps' => 'application/postscript',
+ 'epub' => 'application/epub+zip',
+ 'etx' => 'text/x-setext',
+ 'flac' => 'audio/flac',
+ 'flv' => 'video/x-flv',
+ 'gif' => 'image/gif',
+ 'gz' => 'application/gzip',
+ 'htm' => 'text/html',
+ 'html' => 'text/html',
+ 'ico' => 'image/x-icon',
+ 'ics' => 'text/calendar',
+ 'ini' => 'text/plain',
+ 'iso' => 'application/x-iso9660-image',
+ 'jar' => 'application/java-archive',
+ 'jpe' => 'image/jpeg',
+ 'jpeg' => 'image/jpeg',
+ 'jpg' => 'image/jpeg',
+ 'js' => 'text/javascript',
+ 'json' => 'application/json',
+ 'latex' => 'application/x-latex',
+ 'log' => 'text/plain',
+ 'm4a' => 'audio/mp4',
+ 'm4v' => 'video/mp4',
+ 'mid' => 'audio/midi',
+ 'midi' => 'audio/midi',
+ 'mov' => 'video/quicktime',
+ 'mkv' => 'video/x-matroska',
+ 'mp3' => 'audio/mpeg',
+ 'mp4' => 'video/mp4',
+ 'mp4a' => 'audio/mp4',
+ 'mp4v' => 'video/mp4',
+ 'mpe' => 'video/mpeg',
+ 'mpeg' => 'video/mpeg',
+ 'mpg' => 'video/mpeg',
+ 'mpg4' => 'video/mp4',
+ 'oga' => 'audio/ogg',
+ 'ogg' => 'audio/ogg',
+ 'ogv' => 'video/ogg',
+ 'ogx' => 'application/ogg',
+ 'pbm' => 'image/x-portable-bitmap',
+ 'pdf' => 'application/pdf',
+ 'pgm' => 'image/x-portable-graymap',
+ 'png' => 'image/png',
+ 'pnm' => 'image/x-portable-anymap',
+ 'ppm' => 'image/x-portable-pixmap',
+ 'ppt' => 'application/vnd.ms-powerpoint',
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'ps' => 'application/postscript',
+ 'qt' => 'video/quicktime',
+ 'rar' => 'application/x-rar-compressed',
+ 'ras' => 'image/x-cmu-raster',
+ 'rss' => 'application/rss+xml',
+ 'rtf' => 'application/rtf',
+ 'sgm' => 'text/sgml',
+ 'sgml' => 'text/sgml',
+ 'svg' => 'image/svg+xml',
+ 'swf' => 'application/x-shockwave-flash',
+ 'tar' => 'application/x-tar',
+ 'tif' => 'image/tiff',
+ 'tiff' => 'image/tiff',
+ 'torrent' => 'application/x-bittorrent',
+ 'ttf' => 'application/x-font-ttf',
+ 'txt' => 'text/plain',
+ 'wav' => 'audio/x-wav',
+ 'webm' => 'video/webm',
+ 'webp' => 'image/webp',
+ 'wma' => 'audio/x-ms-wma',
+ 'wmv' => 'video/x-ms-wmv',
+ 'woff' => 'application/x-font-woff',
+ 'wsdl' => 'application/wsdl+xml',
+ 'xbm' => 'image/x-xbitmap',
+ 'xls' => 'application/vnd.ms-excel',
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'xml' => 'application/xml',
+ 'xpm' => 'image/x-xpixmap',
+ 'xwd' => 'image/x-xwindowdump',
+ 'yaml' => 'text/yaml',
+ 'yml' => 'text/yaml',
+ 'zip' => 'application/zip',
+ ];
+
+ $extension = strtolower($extension);
+
+ return isset($mimetypes[$extension])
+ ? $mimetypes[$extension]
+ : null;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/MultipartStream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/MultipartStream.php
new file mode 100644
index 0000000..5a6079a
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/MultipartStream.php
@@ -0,0 +1,158 @@
+boundary = $boundary ?: sha1(uniqid('', true));
+ $this->stream = $this->createStream($elements);
+ }
+
+ /**
+ * Get the boundary
+ *
+ * @return string
+ */
+ public function getBoundary()
+ {
+ return $this->boundary;
+ }
+
+ public function isWritable()
+ {
+ return false;
+ }
+
+ /**
+ * Get the headers needed before transferring the content of a POST file
+ */
+ private function getHeaders(array $headers)
+ {
+ $str = '';
+ foreach ($headers as $key => $value) {
+ $str .= "{$key}: {$value}\r\n";
+ }
+
+ return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n";
+ }
+
+ /**
+ * Create the aggregate stream that will be used to upload the POST data
+ */
+ protected function createStream(array $elements)
+ {
+ $stream = new AppendStream();
+
+ foreach ($elements as $element) {
+ $this->addElement($stream, $element);
+ }
+
+ // Add the trailing boundary with CRLF
+ $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n"));
+
+ return $stream;
+ }
+
+ private function addElement(AppendStream $stream, array $element)
+ {
+ foreach (['contents', 'name'] as $key) {
+ if (!array_key_exists($key, $element)) {
+ throw new \InvalidArgumentException("A '{$key}' key is required");
+ }
+ }
+
+ $element['contents'] = Utils::streamFor($element['contents']);
+
+ if (empty($element['filename'])) {
+ $uri = $element['contents']->getMetadata('uri');
+ if (substr($uri, 0, 6) !== 'php://') {
+ $element['filename'] = $uri;
+ }
+ }
+
+ list($body, $headers) = $this->createElement(
+ $element['name'],
+ $element['contents'],
+ isset($element['filename']) ? $element['filename'] : null,
+ isset($element['headers']) ? $element['headers'] : []
+ );
+
+ $stream->addStream(Utils::streamFor($this->getHeaders($headers)));
+ $stream->addStream($body);
+ $stream->addStream(Utils::streamFor("\r\n"));
+ }
+
+ /**
+ * @return array
+ */
+ private function createElement($name, StreamInterface $stream, $filename, array $headers)
+ {
+ // Set a default content-disposition header if one was no provided
+ $disposition = $this->getHeader($headers, 'content-disposition');
+ if (!$disposition) {
+ $headers['Content-Disposition'] = ($filename === '0' || $filename)
+ ? sprintf(
+ 'form-data; name="%s"; filename="%s"',
+ $name,
+ basename($filename)
+ )
+ : "form-data; name=\"{$name}\"";
+ }
+
+ // Set a default content-length header if one was no provided
+ $length = $this->getHeader($headers, 'content-length');
+ if (!$length) {
+ if ($length = $stream->getSize()) {
+ $headers['Content-Length'] = (string) $length;
+ }
+ }
+
+ // Set a default Content-Type if one was not supplied
+ $type = $this->getHeader($headers, 'content-type');
+ if (!$type && ($filename === '0' || $filename)) {
+ if ($type = MimeType::fromFilename($filename)) {
+ $headers['Content-Type'] = $type;
+ }
+ }
+
+ return [$stream, $headers];
+ }
+
+ private function getHeader(array $headers, $key)
+ {
+ $lowercaseHeader = strtolower($key);
+ foreach ($headers as $k => $v) {
+ if (strtolower($k) === $lowercaseHeader) {
+ return $v;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/NoSeekStream.php
new file mode 100644
index 0000000..d66bdde
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/NoSeekStream.php
@@ -0,0 +1,25 @@
+source = $source;
+ $this->size = isset($options['size']) ? $options['size'] : null;
+ $this->metadata = isset($options['metadata']) ? $options['metadata'] : [];
+ $this->buffer = new BufferStream();
+ }
+
+ public function __toString()
+ {
+ try {
+ return Utils::copyToString($this);
+ } catch (\Exception $e) {
+ return '';
+ }
+ }
+
+ public function close()
+ {
+ $this->detach();
+ }
+
+ public function detach()
+ {
+ $this->tellPos = false;
+ $this->source = null;
+
+ return null;
+ }
+
+ public function getSize()
+ {
+ return $this->size;
+ }
+
+ public function tell()
+ {
+ return $this->tellPos;
+ }
+
+ public function eof()
+ {
+ return !$this->source;
+ }
+
+ public function isSeekable()
+ {
+ return false;
+ }
+
+ public function rewind()
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET)
+ {
+ throw new \RuntimeException('Cannot seek a PumpStream');
+ }
+
+ public function isWritable()
+ {
+ return false;
+ }
+
+ public function write($string)
+ {
+ throw new \RuntimeException('Cannot write to a PumpStream');
+ }
+
+ public function isReadable()
+ {
+ return true;
+ }
+
+ public function read($length)
+ {
+ $data = $this->buffer->read($length);
+ $readLen = strlen($data);
+ $this->tellPos += $readLen;
+ $remaining = $length - $readLen;
+
+ if ($remaining) {
+ $this->pump($remaining);
+ $data .= $this->buffer->read($remaining);
+ $this->tellPos += strlen($data) - $readLen;
+ }
+
+ return $data;
+ }
+
+ public function getContents()
+ {
+ $result = '';
+ while (!$this->eof()) {
+ $result .= $this->read(1000000);
+ }
+
+ return $result;
+ }
+
+ public function getMetadata($key = null)
+ {
+ if (!$key) {
+ return $this->metadata;
+ }
+
+ return isset($this->metadata[$key]) ? $this->metadata[$key] : null;
+ }
+
+ private function pump($length)
+ {
+ if ($this->source) {
+ do {
+ $data = call_user_func($this->source, $length);
+ if ($data === false || $data === null) {
+ $this->source = null;
+ return;
+ }
+ $this->buffer->write($data);
+ $length -= strlen($data);
+ } while ($length > 0);
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/Query.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Query.php
new file mode 100644
index 0000000..5a7cc03
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Query.php
@@ -0,0 +1,113 @@
+ '1', 'foo[b]' => '2'])`.
+ *
+ * @param string $str Query string to parse
+ * @param int|bool $urlEncoding How the query string is encoded
+ *
+ * @return array
+ */
+ public static function parse($str, $urlEncoding = true)
+ {
+ $result = [];
+
+ if ($str === '') {
+ return $result;
+ }
+
+ if ($urlEncoding === true) {
+ $decoder = function ($value) {
+ return rawurldecode(str_replace('+', ' ', $value));
+ };
+ } elseif ($urlEncoding === PHP_QUERY_RFC3986) {
+ $decoder = 'rawurldecode';
+ } elseif ($urlEncoding === PHP_QUERY_RFC1738) {
+ $decoder = 'urldecode';
+ } else {
+ $decoder = function ($str) {
+ return $str;
+ };
+ }
+
+ foreach (explode('&', $str) as $kvp) {
+ $parts = explode('=', $kvp, 2);
+ $key = $decoder($parts[0]);
+ $value = isset($parts[1]) ? $decoder($parts[1]) : null;
+ if (!isset($result[$key])) {
+ $result[$key] = $value;
+ } else {
+ if (!is_array($result[$key])) {
+ $result[$key] = [$result[$key]];
+ }
+ $result[$key][] = $value;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Build a query string from an array of key value pairs.
+ *
+ * This function can use the return value of `parse()` to build a query
+ * string. This function does not modify the provided keys when an array is
+ * encountered (like `http_build_query()` would).
+ *
+ * @param array $params Query string parameters.
+ * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
+ * to encode using RFC3986, or PHP_QUERY_RFC1738
+ * to encode using RFC1738.
+ *
+ * @return string
+ */
+ public static function build(array $params, $encoding = PHP_QUERY_RFC3986)
+ {
+ if (!$params) {
+ return '';
+ }
+
+ if ($encoding === false) {
+ $encoder = function ($str) {
+ return $str;
+ };
+ } elseif ($encoding === PHP_QUERY_RFC3986) {
+ $encoder = 'rawurlencode';
+ } elseif ($encoding === PHP_QUERY_RFC1738) {
+ $encoder = 'urlencode';
+ } else {
+ throw new \InvalidArgumentException('Invalid type');
+ }
+
+ $qs = '';
+ foreach ($params as $k => $v) {
+ $k = $encoder($k);
+ if (!is_array($v)) {
+ $qs .= $k;
+ if ($v !== null) {
+ $qs .= '=' . $encoder($v);
+ }
+ $qs .= '&';
+ } else {
+ foreach ($v as $vv) {
+ $qs .= $k;
+ if ($vv !== null) {
+ $qs .= '=' . $encoder($vv);
+ }
+ $qs .= '&';
+ }
+ }
+ }
+
+ return $qs ? (string) substr($qs, 0, -1) : '';
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/Request.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Request.php
new file mode 100644
index 0000000..c1cdaeb
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Request.php
@@ -0,0 +1,152 @@
+assertMethod($method);
+ if (!($uri instanceof UriInterface)) {
+ $uri = new Uri($uri);
+ }
+
+ $this->method = strtoupper($method);
+ $this->uri = $uri;
+ $this->setHeaders($headers);
+ $this->protocol = $version;
+
+ if (!isset($this->headerNames['host'])) {
+ $this->updateHostFromUri();
+ }
+
+ if ($body !== '' && $body !== null) {
+ $this->stream = Utils::streamFor($body);
+ }
+ }
+
+ public function getRequestTarget()
+ {
+ if ($this->requestTarget !== null) {
+ return $this->requestTarget;
+ }
+
+ $target = $this->uri->getPath();
+ if ($target == '') {
+ $target = '/';
+ }
+ if ($this->uri->getQuery() != '') {
+ $target .= '?' . $this->uri->getQuery();
+ }
+
+ return $target;
+ }
+
+ public function withRequestTarget($requestTarget)
+ {
+ if (preg_match('#\s#', $requestTarget)) {
+ throw new InvalidArgumentException(
+ 'Invalid request target provided; cannot contain whitespace'
+ );
+ }
+
+ $new = clone $this;
+ $new->requestTarget = $requestTarget;
+ return $new;
+ }
+
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+ public function withMethod($method)
+ {
+ $this->assertMethod($method);
+ $new = clone $this;
+ $new->method = strtoupper($method);
+ return $new;
+ }
+
+ public function getUri()
+ {
+ return $this->uri;
+ }
+
+ public function withUri(UriInterface $uri, $preserveHost = false)
+ {
+ if ($uri === $this->uri) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->uri = $uri;
+
+ if (!$preserveHost || !isset($this->headerNames['host'])) {
+ $new->updateHostFromUri();
+ }
+
+ return $new;
+ }
+
+ private function updateHostFromUri()
+ {
+ $host = $this->uri->getHost();
+
+ if ($host == '') {
+ return;
+ }
+
+ if (($port = $this->uri->getPort()) !== null) {
+ $host .= ':' . $port;
+ }
+
+ if (isset($this->headerNames['host'])) {
+ $header = $this->headerNames['host'];
+ } else {
+ $header = 'Host';
+ $this->headerNames['host'] = 'Host';
+ }
+ // Ensure Host is the first header.
+ // See: http://tools.ietf.org/html/rfc7230#section-5.4
+ $this->headers = [$header => [$host]] + $this->headers;
+ }
+
+ private function assertMethod($method)
+ {
+ if (!is_string($method) || $method === '') {
+ throw new \InvalidArgumentException('Method must be a non-empty string.');
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/Response.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Response.php
new file mode 100644
index 0000000..8c01a0f
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Response.php
@@ -0,0 +1,155 @@
+ 'Continue',
+ 101 => 'Switching Protocols',
+ 102 => 'Processing',
+ 200 => 'OK',
+ 201 => 'Created',
+ 202 => 'Accepted',
+ 203 => 'Non-Authoritative Information',
+ 204 => 'No Content',
+ 205 => 'Reset Content',
+ 206 => 'Partial Content',
+ 207 => 'Multi-status',
+ 208 => 'Already Reported',
+ 300 => 'Multiple Choices',
+ 301 => 'Moved Permanently',
+ 302 => 'Found',
+ 303 => 'See Other',
+ 304 => 'Not Modified',
+ 305 => 'Use Proxy',
+ 306 => 'Switch Proxy',
+ 307 => 'Temporary Redirect',
+ 400 => 'Bad Request',
+ 401 => 'Unauthorized',
+ 402 => 'Payment Required',
+ 403 => 'Forbidden',
+ 404 => 'Not Found',
+ 405 => 'Method Not Allowed',
+ 406 => 'Not Acceptable',
+ 407 => 'Proxy Authentication Required',
+ 408 => 'Request Time-out',
+ 409 => 'Conflict',
+ 410 => 'Gone',
+ 411 => 'Length Required',
+ 412 => 'Precondition Failed',
+ 413 => 'Request Entity Too Large',
+ 414 => 'Request-URI Too Large',
+ 415 => 'Unsupported Media Type',
+ 416 => 'Requested range not satisfiable',
+ 417 => 'Expectation Failed',
+ 418 => 'I\'m a teapot',
+ 422 => 'Unprocessable Entity',
+ 423 => 'Locked',
+ 424 => 'Failed Dependency',
+ 425 => 'Unordered Collection',
+ 426 => 'Upgrade Required',
+ 428 => 'Precondition Required',
+ 429 => 'Too Many Requests',
+ 431 => 'Request Header Fields Too Large',
+ 451 => 'Unavailable For Legal Reasons',
+ 500 => 'Internal Server Error',
+ 501 => 'Not Implemented',
+ 502 => 'Bad Gateway',
+ 503 => 'Service Unavailable',
+ 504 => 'Gateway Time-out',
+ 505 => 'HTTP Version not supported',
+ 506 => 'Variant Also Negotiates',
+ 507 => 'Insufficient Storage',
+ 508 => 'Loop Detected',
+ 511 => 'Network Authentication Required',
+ ];
+
+ /** @var string */
+ private $reasonPhrase = '';
+
+ /** @var int */
+ private $statusCode = 200;
+
+ /**
+ * @param int $status Status code
+ * @param array $headers Response headers
+ * @param string|resource|StreamInterface|null $body Response body
+ * @param string $version Protocol version
+ * @param string|null $reason Reason phrase (when empty a default will be used based on the status code)
+ */
+ public function __construct(
+ $status = 200,
+ array $headers = [],
+ $body = null,
+ $version = '1.1',
+ $reason = null
+ ) {
+ $this->assertStatusCodeIsInteger($status);
+ $status = (int) $status;
+ $this->assertStatusCodeRange($status);
+
+ $this->statusCode = $status;
+
+ if ($body !== '' && $body !== null) {
+ $this->stream = Utils::streamFor($body);
+ }
+
+ $this->setHeaders($headers);
+ if ($reason == '' && isset(self::$phrases[$this->statusCode])) {
+ $this->reasonPhrase = self::$phrases[$this->statusCode];
+ } else {
+ $this->reasonPhrase = (string) $reason;
+ }
+
+ $this->protocol = $version;
+ }
+
+ public function getStatusCode()
+ {
+ return $this->statusCode;
+ }
+
+ public function getReasonPhrase()
+ {
+ return $this->reasonPhrase;
+ }
+
+ public function withStatus($code, $reasonPhrase = '')
+ {
+ $this->assertStatusCodeIsInteger($code);
+ $code = (int) $code;
+ $this->assertStatusCodeRange($code);
+
+ $new = clone $this;
+ $new->statusCode = $code;
+ if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
+ $reasonPhrase = self::$phrases[$new->statusCode];
+ }
+ $new->reasonPhrase = (string) $reasonPhrase;
+ return $new;
+ }
+
+ private function assertStatusCodeIsInteger($statusCode)
+ {
+ if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) {
+ throw new \InvalidArgumentException('Status code must be an integer value.');
+ }
+ }
+
+ private function assertStatusCodeRange($statusCode)
+ {
+ if ($statusCode < 100 || $statusCode >= 600) {
+ throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.');
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/Rfc7230.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Rfc7230.php
new file mode 100644
index 0000000..51b571f
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Rfc7230.php
@@ -0,0 +1,19 @@
+@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
+ const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)";
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/ServerRequest.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/ServerRequest.php
new file mode 100644
index 0000000..e6d26f5
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/ServerRequest.php
@@ -0,0 +1,379 @@
+serverParams = $serverParams;
+
+ parent::__construct($method, $uri, $headers, $body, $version);
+ }
+
+ /**
+ * Return an UploadedFile instance array.
+ *
+ * @param array $files A array which respect $_FILES structure
+ *
+ * @return array
+ *
+ * @throws InvalidArgumentException for unrecognized values
+ */
+ public static function normalizeFiles(array $files)
+ {
+ $normalized = [];
+
+ foreach ($files as $key => $value) {
+ if ($value instanceof UploadedFileInterface) {
+ $normalized[$key] = $value;
+ } elseif (is_array($value) && isset($value['tmp_name'])) {
+ $normalized[$key] = self::createUploadedFileFromSpec($value);
+ } elseif (is_array($value)) {
+ $normalized[$key] = self::normalizeFiles($value);
+ continue;
+ } else {
+ throw new InvalidArgumentException('Invalid value in files specification');
+ }
+ }
+
+ return $normalized;
+ }
+
+ /**
+ * Create and return an UploadedFile instance from a $_FILES specification.
+ *
+ * If the specification represents an array of values, this method will
+ * delegate to normalizeNestedFileSpec() and return that return value.
+ *
+ * @param array $value $_FILES struct
+ *
+ * @return array|UploadedFileInterface
+ */
+ private static function createUploadedFileFromSpec(array $value)
+ {
+ if (is_array($value['tmp_name'])) {
+ return self::normalizeNestedFileSpec($value);
+ }
+
+ return new UploadedFile(
+ $value['tmp_name'],
+ (int) $value['size'],
+ (int) $value['error'],
+ $value['name'],
+ $value['type']
+ );
+ }
+
+ /**
+ * Normalize an array of file specifications.
+ *
+ * Loops through all nested files and returns a normalized array of
+ * UploadedFileInterface instances.
+ *
+ * @param array $files
+ *
+ * @return UploadedFileInterface[]
+ */
+ private static function normalizeNestedFileSpec(array $files = [])
+ {
+ $normalizedFiles = [];
+
+ foreach (array_keys($files['tmp_name']) as $key) {
+ $spec = [
+ 'tmp_name' => $files['tmp_name'][$key],
+ 'size' => $files['size'][$key],
+ 'error' => $files['error'][$key],
+ 'name' => $files['name'][$key],
+ 'type' => $files['type'][$key],
+ ];
+ $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec);
+ }
+
+ return $normalizedFiles;
+ }
+
+ /**
+ * Return a ServerRequest populated with superglobals:
+ * $_GET
+ * $_POST
+ * $_COOKIE
+ * $_FILES
+ * $_SERVER
+ *
+ * @return ServerRequestInterface
+ */
+ public static function fromGlobals()
+ {
+ $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
+ $headers = getallheaders();
+ $uri = self::getUriFromGlobals();
+ $body = new CachingStream(new LazyOpenStream('php://input', 'r+'));
+ $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
+
+ $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER);
+
+ return $serverRequest
+ ->withCookieParams($_COOKIE)
+ ->withQueryParams($_GET)
+ ->withParsedBody($_POST)
+ ->withUploadedFiles(self::normalizeFiles($_FILES));
+ }
+
+ private static function extractHostAndPortFromAuthority($authority)
+ {
+ $uri = 'http://' . $authority;
+ $parts = parse_url($uri);
+ if (false === $parts) {
+ return [null, null];
+ }
+
+ $host = isset($parts['host']) ? $parts['host'] : null;
+ $port = isset($parts['port']) ? $parts['port'] : null;
+
+ return [$host, $port];
+ }
+
+ /**
+ * Get a Uri populated with values from $_SERVER.
+ *
+ * @return UriInterface
+ */
+ public static function getUriFromGlobals()
+ {
+ $uri = new Uri('');
+
+ $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http');
+
+ $hasPort = false;
+ if (isset($_SERVER['HTTP_HOST'])) {
+ list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']);
+ if ($host !== null) {
+ $uri = $uri->withHost($host);
+ }
+
+ if ($port !== null) {
+ $hasPort = true;
+ $uri = $uri->withPort($port);
+ }
+ } elseif (isset($_SERVER['SERVER_NAME'])) {
+ $uri = $uri->withHost($_SERVER['SERVER_NAME']);
+ } elseif (isset($_SERVER['SERVER_ADDR'])) {
+ $uri = $uri->withHost($_SERVER['SERVER_ADDR']);
+ }
+
+ if (!$hasPort && isset($_SERVER['SERVER_PORT'])) {
+ $uri = $uri->withPort($_SERVER['SERVER_PORT']);
+ }
+
+ $hasQuery = false;
+ if (isset($_SERVER['REQUEST_URI'])) {
+ $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2);
+ $uri = $uri->withPath($requestUriParts[0]);
+ if (isset($requestUriParts[1])) {
+ $hasQuery = true;
+ $uri = $uri->withQuery($requestUriParts[1]);
+ }
+ }
+
+ if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) {
+ $uri = $uri->withQuery($_SERVER['QUERY_STRING']);
+ }
+
+ return $uri;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getServerParams()
+ {
+ return $this->serverParams;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getUploadedFiles()
+ {
+ return $this->uploadedFiles;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function withUploadedFiles(array $uploadedFiles)
+ {
+ $new = clone $this;
+ $new->uploadedFiles = $uploadedFiles;
+
+ return $new;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCookieParams()
+ {
+ return $this->cookieParams;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function withCookieParams(array $cookies)
+ {
+ $new = clone $this;
+ $new->cookieParams = $cookies;
+
+ return $new;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getQueryParams()
+ {
+ return $this->queryParams;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function withQueryParams(array $query)
+ {
+ $new = clone $this;
+ $new->queryParams = $query;
+
+ return $new;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getParsedBody()
+ {
+ return $this->parsedBody;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function withParsedBody($data)
+ {
+ $new = clone $this;
+ $new->parsedBody = $data;
+
+ return $new;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAttribute($attribute, $default = null)
+ {
+ if (false === array_key_exists($attribute, $this->attributes)) {
+ return $default;
+ }
+
+ return $this->attributes[$attribute];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function withAttribute($attribute, $value)
+ {
+ $new = clone $this;
+ $new->attributes[$attribute] = $value;
+
+ return $new;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function withoutAttribute($attribute)
+ {
+ if (false === array_key_exists($attribute, $this->attributes)) {
+ return $this;
+ }
+
+ $new = clone $this;
+ unset($new->attributes[$attribute]);
+
+ return $new;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/Stream.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Stream.php
new file mode 100644
index 0000000..3865d6d
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Stream.php
@@ -0,0 +1,270 @@
+size = $options['size'];
+ }
+
+ $this->customMetadata = isset($options['metadata'])
+ ? $options['metadata']
+ : [];
+
+ $this->stream = $stream;
+ $meta = stream_get_meta_data($this->stream);
+ $this->seekable = $meta['seekable'];
+ $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']);
+ $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']);
+ $this->uri = $this->getMetadata('uri');
+ }
+
+ /**
+ * Closes the stream when the destructed
+ */
+ public function __destruct()
+ {
+ $this->close();
+ }
+
+ public function __toString()
+ {
+ try {
+ if ($this->isSeekable()) {
+ $this->seek(0);
+ }
+ return $this->getContents();
+ } catch (\Exception $e) {
+ return '';
+ }
+ }
+
+ public function getContents()
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+
+ $contents = stream_get_contents($this->stream);
+
+ if ($contents === false) {
+ throw new \RuntimeException('Unable to read stream contents');
+ }
+
+ return $contents;
+ }
+
+ public function close()
+ {
+ if (isset($this->stream)) {
+ if (is_resource($this->stream)) {
+ fclose($this->stream);
+ }
+ $this->detach();
+ }
+ }
+
+ public function detach()
+ {
+ if (!isset($this->stream)) {
+ return null;
+ }
+
+ $result = $this->stream;
+ unset($this->stream);
+ $this->size = $this->uri = null;
+ $this->readable = $this->writable = $this->seekable = false;
+
+ return $result;
+ }
+
+ public function getSize()
+ {
+ if ($this->size !== null) {
+ return $this->size;
+ }
+
+ if (!isset($this->stream)) {
+ return null;
+ }
+
+ // Clear the stat cache if the stream has a URI
+ if ($this->uri) {
+ clearstatcache(true, $this->uri);
+ }
+
+ $stats = fstat($this->stream);
+ if (isset($stats['size'])) {
+ $this->size = $stats['size'];
+ return $this->size;
+ }
+
+ return null;
+ }
+
+ public function isReadable()
+ {
+ return $this->readable;
+ }
+
+ public function isWritable()
+ {
+ return $this->writable;
+ }
+
+ public function isSeekable()
+ {
+ return $this->seekable;
+ }
+
+ public function eof()
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+
+ return feof($this->stream);
+ }
+
+ public function tell()
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+
+ $result = ftell($this->stream);
+
+ if ($result === false) {
+ throw new \RuntimeException('Unable to determine stream position');
+ }
+
+ return $result;
+ }
+
+ public function rewind()
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET)
+ {
+ $whence = (int) $whence;
+
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+ if (!$this->seekable) {
+ throw new \RuntimeException('Stream is not seekable');
+ }
+ if (fseek($this->stream, $offset, $whence) === -1) {
+ throw new \RuntimeException('Unable to seek to stream position '
+ . $offset . ' with whence ' . var_export($whence, true));
+ }
+ }
+
+ public function read($length)
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+ if (!$this->readable) {
+ throw new \RuntimeException('Cannot read from non-readable stream');
+ }
+ if ($length < 0) {
+ throw new \RuntimeException('Length parameter cannot be negative');
+ }
+
+ if (0 === $length) {
+ return '';
+ }
+
+ $string = fread($this->stream, $length);
+ if (false === $string) {
+ throw new \RuntimeException('Unable to read from stream');
+ }
+
+ return $string;
+ }
+
+ public function write($string)
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+ if (!$this->writable) {
+ throw new \RuntimeException('Cannot write to a non-writable stream');
+ }
+
+ // We can't know the size after writing anything
+ $this->size = null;
+ $result = fwrite($this->stream, $string);
+
+ if ($result === false) {
+ throw new \RuntimeException('Unable to write to stream');
+ }
+
+ return $result;
+ }
+
+ public function getMetadata($key = null)
+ {
+ if (!isset($this->stream)) {
+ return $key ? null : [];
+ } elseif (!$key) {
+ return $this->customMetadata + stream_get_meta_data($this->stream);
+ } elseif (isset($this->customMetadata[$key])) {
+ return $this->customMetadata[$key];
+ }
+
+ $meta = stream_get_meta_data($this->stream);
+
+ return isset($meta[$key]) ? $meta[$key] : null;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
new file mode 100644
index 0000000..5025dd6
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
@@ -0,0 +1,152 @@
+stream = $stream;
+ }
+
+ /**
+ * Magic method used to create a new stream if streams are not added in
+ * the constructor of a decorator (e.g., LazyOpenStream).
+ *
+ * @param string $name Name of the property (allows "stream" only).
+ *
+ * @return StreamInterface
+ */
+ public function __get($name)
+ {
+ if ($name == 'stream') {
+ $this->stream = $this->createStream();
+ return $this->stream;
+ }
+
+ throw new \UnexpectedValueException("$name not found on class");
+ }
+
+ public function __toString()
+ {
+ try {
+ if ($this->isSeekable()) {
+ $this->seek(0);
+ }
+ return $this->getContents();
+ } catch (\Exception $e) {
+ // Really, PHP? https://bugs.php.net/bug.php?id=53648
+ trigger_error('StreamDecorator::__toString exception: '
+ . (string) $e, E_USER_ERROR);
+ return '';
+ }
+ }
+
+ public function getContents()
+ {
+ return Utils::copyToString($this);
+ }
+
+ /**
+ * Allow decorators to implement custom methods
+ *
+ * @param string $method Missing method name
+ * @param array $args Method arguments
+ *
+ * @return mixed
+ */
+ public function __call($method, array $args)
+ {
+ $result = call_user_func_array([$this->stream, $method], $args);
+
+ // Always return the wrapped object if the result is a return $this
+ return $result === $this->stream ? $this : $result;
+ }
+
+ public function close()
+ {
+ $this->stream->close();
+ }
+
+ public function getMetadata($key = null)
+ {
+ return $this->stream->getMetadata($key);
+ }
+
+ public function detach()
+ {
+ return $this->stream->detach();
+ }
+
+ public function getSize()
+ {
+ return $this->stream->getSize();
+ }
+
+ public function eof()
+ {
+ return $this->stream->eof();
+ }
+
+ public function tell()
+ {
+ return $this->stream->tell();
+ }
+
+ public function isReadable()
+ {
+ return $this->stream->isReadable();
+ }
+
+ public function isWritable()
+ {
+ return $this->stream->isWritable();
+ }
+
+ public function isSeekable()
+ {
+ return $this->stream->isSeekable();
+ }
+
+ public function rewind()
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET)
+ {
+ $this->stream->seek($offset, $whence);
+ }
+
+ public function read($length)
+ {
+ return $this->stream->read($length);
+ }
+
+ public function write($string)
+ {
+ return $this->stream->write($string);
+ }
+
+ /**
+ * Implement in subclasses to dynamically create streams when requested.
+ *
+ * @return StreamInterface
+ *
+ * @throws \BadMethodCallException
+ */
+ protected function createStream()
+ {
+ throw new \BadMethodCallException('Not implemented');
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/StreamWrapper.php
new file mode 100644
index 0000000..fc7cb96
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/StreamWrapper.php
@@ -0,0 +1,165 @@
+isReadable()) {
+ $mode = $stream->isWritable() ? 'r+' : 'r';
+ } elseif ($stream->isWritable()) {
+ $mode = 'w';
+ } else {
+ throw new \InvalidArgumentException('The stream must be readable, '
+ . 'writable, or both.');
+ }
+
+ return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream));
+ }
+
+ /**
+ * Creates a stream context that can be used to open a stream as a php stream resource.
+ *
+ * @param StreamInterface $stream
+ *
+ * @return resource
+ */
+ public static function createStreamContext(StreamInterface $stream)
+ {
+ return stream_context_create([
+ 'guzzle' => ['stream' => $stream]
+ ]);
+ }
+
+ /**
+ * Registers the stream wrapper if needed
+ */
+ public static function register()
+ {
+ if (!in_array('guzzle', stream_get_wrappers())) {
+ stream_wrapper_register('guzzle', __CLASS__);
+ }
+ }
+
+ public function stream_open($path, $mode, $options, &$opened_path)
+ {
+ $options = stream_context_get_options($this->context);
+
+ if (!isset($options['guzzle']['stream'])) {
+ return false;
+ }
+
+ $this->mode = $mode;
+ $this->stream = $options['guzzle']['stream'];
+
+ return true;
+ }
+
+ public function stream_read($count)
+ {
+ return $this->stream->read($count);
+ }
+
+ public function stream_write($data)
+ {
+ return (int) $this->stream->write($data);
+ }
+
+ public function stream_tell()
+ {
+ return $this->stream->tell();
+ }
+
+ public function stream_eof()
+ {
+ return $this->stream->eof();
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ $this->stream->seek($offset, $whence);
+
+ return true;
+ }
+
+ public function stream_cast($cast_as)
+ {
+ $stream = clone($this->stream);
+
+ return $stream->detach();
+ }
+
+ public function stream_stat()
+ {
+ static $modeMap = [
+ 'r' => 33060,
+ 'rb' => 33060,
+ 'r+' => 33206,
+ 'w' => 33188,
+ 'wb' => 33188
+ ];
+
+ return [
+ 'dev' => 0,
+ 'ino' => 0,
+ 'mode' => $modeMap[$this->mode],
+ 'nlink' => 0,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'rdev' => 0,
+ 'size' => $this->stream->getSize() ?: 0,
+ 'atime' => 0,
+ 'mtime' => 0,
+ 'ctime' => 0,
+ 'blksize' => 0,
+ 'blocks' => 0
+ ];
+ }
+
+ public function url_stat($path, $flags)
+ {
+ return [
+ 'dev' => 0,
+ 'ino' => 0,
+ 'mode' => 0,
+ 'nlink' => 0,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'rdev' => 0,
+ 'size' => 0,
+ 'atime' => 0,
+ 'mtime' => 0,
+ 'ctime' => 0,
+ 'blksize' => 0,
+ 'blocks' => 0
+ ];
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/UploadedFile.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/UploadedFile.php
new file mode 100644
index 0000000..bf342c4
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/UploadedFile.php
@@ -0,0 +1,328 @@
+setError($errorStatus);
+ $this->setSize($size);
+ $this->setClientFilename($clientFilename);
+ $this->setClientMediaType($clientMediaType);
+
+ if ($this->isOk()) {
+ $this->setStreamOrFile($streamOrFile);
+ }
+ }
+
+ /**
+ * Depending on the value set file or stream variable
+ *
+ * @param mixed $streamOrFile
+ *
+ * @throws InvalidArgumentException
+ */
+ private function setStreamOrFile($streamOrFile)
+ {
+ if (is_string($streamOrFile)) {
+ $this->file = $streamOrFile;
+ } elseif (is_resource($streamOrFile)) {
+ $this->stream = new Stream($streamOrFile);
+ } elseif ($streamOrFile instanceof StreamInterface) {
+ $this->stream = $streamOrFile;
+ } else {
+ throw new InvalidArgumentException(
+ 'Invalid stream or file provided for UploadedFile'
+ );
+ }
+ }
+
+ /**
+ * @param int $error
+ *
+ * @throws InvalidArgumentException
+ */
+ private function setError($error)
+ {
+ if (false === is_int($error)) {
+ throw new InvalidArgumentException(
+ 'Upload file error status must be an integer'
+ );
+ }
+
+ if (false === in_array($error, UploadedFile::$errors)) {
+ throw new InvalidArgumentException(
+ 'Invalid error status for UploadedFile'
+ );
+ }
+
+ $this->error = $error;
+ }
+
+ /**
+ * @param int $size
+ *
+ * @throws InvalidArgumentException
+ */
+ private function setSize($size)
+ {
+ if (false === is_int($size)) {
+ throw new InvalidArgumentException(
+ 'Upload file size must be an integer'
+ );
+ }
+
+ $this->size = $size;
+ }
+
+ /**
+ * @param mixed $param
+ *
+ * @return bool
+ */
+ private function isStringOrNull($param)
+ {
+ return in_array(gettype($param), ['string', 'NULL']);
+ }
+
+ /**
+ * @param mixed $param
+ *
+ * @return bool
+ */
+ private function isStringNotEmpty($param)
+ {
+ return is_string($param) && false === empty($param);
+ }
+
+ /**
+ * @param string|null $clientFilename
+ *
+ * @throws InvalidArgumentException
+ */
+ private function setClientFilename($clientFilename)
+ {
+ if (false === $this->isStringOrNull($clientFilename)) {
+ throw new InvalidArgumentException(
+ 'Upload file client filename must be a string or null'
+ );
+ }
+
+ $this->clientFilename = $clientFilename;
+ }
+
+ /**
+ * @param string|null $clientMediaType
+ *
+ * @throws InvalidArgumentException
+ */
+ private function setClientMediaType($clientMediaType)
+ {
+ if (false === $this->isStringOrNull($clientMediaType)) {
+ throw new InvalidArgumentException(
+ 'Upload file client media type must be a string or null'
+ );
+ }
+
+ $this->clientMediaType = $clientMediaType;
+ }
+
+ /**
+ * Return true if there is no upload error
+ *
+ * @return bool
+ */
+ private function isOk()
+ {
+ return $this->error === UPLOAD_ERR_OK;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isMoved()
+ {
+ return $this->moved;
+ }
+
+ /**
+ * @throws RuntimeException if is moved or not ok
+ */
+ private function validateActive()
+ {
+ if (false === $this->isOk()) {
+ throw new RuntimeException('Cannot retrieve stream due to upload error');
+ }
+
+ if ($this->isMoved()) {
+ throw new RuntimeException('Cannot retrieve stream after it has already been moved');
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @throws RuntimeException if the upload was not successful.
+ */
+ public function getStream()
+ {
+ $this->validateActive();
+
+ if ($this->stream instanceof StreamInterface) {
+ return $this->stream;
+ }
+
+ return new LazyOpenStream($this->file, 'r+');
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @see http://php.net/is_uploaded_file
+ * @see http://php.net/move_uploaded_file
+ *
+ * @param string $targetPath Path to which to move the uploaded file.
+ *
+ * @throws RuntimeException if the upload was not successful.
+ * @throws InvalidArgumentException if the $path specified is invalid.
+ * @throws RuntimeException on any error during the move operation, or on
+ * the second or subsequent call to the method.
+ */
+ public function moveTo($targetPath)
+ {
+ $this->validateActive();
+
+ if (false === $this->isStringNotEmpty($targetPath)) {
+ throw new InvalidArgumentException(
+ 'Invalid path provided for move operation; must be a non-empty string'
+ );
+ }
+
+ if ($this->file) {
+ $this->moved = php_sapi_name() == 'cli'
+ ? rename($this->file, $targetPath)
+ : move_uploaded_file($this->file, $targetPath);
+ } else {
+ Utils::copyToStream(
+ $this->getStream(),
+ new LazyOpenStream($targetPath, 'w')
+ );
+
+ $this->moved = true;
+ }
+
+ if (false === $this->moved) {
+ throw new RuntimeException(
+ sprintf('Uploaded file could not be moved to %s', $targetPath)
+ );
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @return int|null The file size in bytes or null if unknown.
+ */
+ public function getSize()
+ {
+ return $this->size;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @see http://php.net/manual/en/features.file-upload.errors.php
+ *
+ * @return int One of PHP's UPLOAD_ERR_XXX constants.
+ */
+ public function getError()
+ {
+ return $this->error;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @return string|null The filename sent by the client or null if none
+ * was provided.
+ */
+ public function getClientFilename()
+ {
+ return $this->clientFilename;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getClientMediaType()
+ {
+ return $this->clientMediaType;
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/Uri.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Uri.php
new file mode 100644
index 0000000..0f9f020
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Uri.php
@@ -0,0 +1,810 @@
+ 80,
+ 'https' => 443,
+ 'ftp' => 21,
+ 'gopher' => 70,
+ 'nntp' => 119,
+ 'news' => 119,
+ 'telnet' => 23,
+ 'tn3270' => 23,
+ 'imap' => 143,
+ 'pop' => 110,
+ 'ldap' => 389,
+ ];
+
+ private static $charUnreserved = 'a-zA-Z0-9_\-\.~';
+ private static $charSubDelims = '!\$&\'\(\)\*\+,;=';
+ private static $replaceQuery = ['=' => '%3D', '&' => '%26'];
+
+ /** @var string Uri scheme. */
+ private $scheme = '';
+
+ /** @var string Uri user info. */
+ private $userInfo = '';
+
+ /** @var string Uri host. */
+ private $host = '';
+
+ /** @var int|null Uri port. */
+ private $port;
+
+ /** @var string Uri path. */
+ private $path = '';
+
+ /** @var string Uri query string. */
+ private $query = '';
+
+ /** @var string Uri fragment. */
+ private $fragment = '';
+
+ /**
+ * @param string $uri URI to parse
+ */
+ public function __construct($uri = '')
+ {
+ // weak type check to also accept null until we can add scalar type hints
+ if ($uri != '') {
+ $parts = self::parse($uri);
+ if ($parts === false) {
+ throw new \InvalidArgumentException("Unable to parse URI: $uri");
+ }
+ $this->applyParts($parts);
+ }
+ }
+
+ /**
+ * UTF-8 aware \parse_url() replacement.
+ *
+ * The internal function produces broken output for non ASCII domain names
+ * (IDN) when used with locales other than "C".
+ *
+ * On the other hand, cURL understands IDN correctly only when UTF-8 locale
+ * is configured ("C.UTF-8", "en_US.UTF-8", etc.).
+ *
+ * @see https://bugs.php.net/bug.php?id=52923
+ * @see https://www.php.net/manual/en/function.parse-url.php#114817
+ * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING
+ *
+ * @param string $url
+ *
+ * @return array|false
+ */
+ private static function parse($url)
+ {
+ // If IPv6
+ $prefix = '';
+ if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) {
+ $prefix = $matches[1];
+ $url = $matches[2];
+ }
+
+ $encodedUrl = preg_replace_callback(
+ '%[^:/@?&=#]+%usD',
+ static function ($matches) {
+ return urlencode($matches[0]);
+ },
+ $url
+ );
+
+ $result = parse_url($prefix . $encodedUrl);
+
+ if ($result === false) {
+ return false;
+ }
+
+ return array_map('urldecode', $result);
+ }
+
+ public function __toString()
+ {
+ return self::composeComponents(
+ $this->scheme,
+ $this->getAuthority(),
+ $this->path,
+ $this->query,
+ $this->fragment
+ );
+ }
+
+ /**
+ * Composes a URI reference string from its various components.
+ *
+ * Usually this method does not need to be called manually but instead is used indirectly via
+ * `Psr\Http\Message\UriInterface::__toString`.
+ *
+ * PSR-7 UriInterface treats an empty component the same as a missing component as
+ * getQuery(), getFragment() etc. always return a string. This explains the slight
+ * difference to RFC 3986 Section 5.3.
+ *
+ * Another adjustment is that the authority separator is added even when the authority is missing/empty
+ * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with
+ * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But
+ * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to
+ * that format).
+ *
+ * @param string $scheme
+ * @param string $authority
+ * @param string $path
+ * @param string $query
+ * @param string $fragment
+ *
+ * @return string
+ *
+ * @link https://tools.ietf.org/html/rfc3986#section-5.3
+ */
+ public static function composeComponents($scheme, $authority, $path, $query, $fragment)
+ {
+ $uri = '';
+
+ // weak type checks to also accept null until we can add scalar type hints
+ if ($scheme != '') {
+ $uri .= $scheme . ':';
+ }
+
+ if ($authority != ''|| $scheme === 'file') {
+ $uri .= '//' . $authority;
+ }
+
+ $uri .= $path;
+
+ if ($query != '') {
+ $uri .= '?' . $query;
+ }
+
+ if ($fragment != '') {
+ $uri .= '#' . $fragment;
+ }
+
+ return $uri;
+ }
+
+ /**
+ * Whether the URI has the default port of the current scheme.
+ *
+ * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used
+ * independently of the implementation.
+ *
+ * @param UriInterface $uri
+ *
+ * @return bool
+ */
+ public static function isDefaultPort(UriInterface $uri)
+ {
+ return $uri->getPort() === null
+ || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]);
+ }
+
+ /**
+ * Whether the URI is absolute, i.e. it has a scheme.
+ *
+ * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true
+ * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative
+ * to another URI, the base URI. Relative references can be divided into several forms:
+ * - network-path references, e.g. '//example.com/path'
+ * - absolute-path references, e.g. '/path'
+ * - relative-path references, e.g. 'subpath'
+ *
+ * @param UriInterface $uri
+ *
+ * @return bool
+ *
+ * @see Uri::isNetworkPathReference
+ * @see Uri::isAbsolutePathReference
+ * @see Uri::isRelativePathReference
+ * @link https://tools.ietf.org/html/rfc3986#section-4
+ */
+ public static function isAbsolute(UriInterface $uri)
+ {
+ return $uri->getScheme() !== '';
+ }
+
+ /**
+ * Whether the URI is a network-path reference.
+ *
+ * A relative reference that begins with two slash characters is termed an network-path reference.
+ *
+ * @param UriInterface $uri
+ *
+ * @return bool
+ *
+ * @link https://tools.ietf.org/html/rfc3986#section-4.2
+ */
+ public static function isNetworkPathReference(UriInterface $uri)
+ {
+ return $uri->getScheme() === '' && $uri->getAuthority() !== '';
+ }
+
+ /**
+ * Whether the URI is a absolute-path reference.
+ *
+ * A relative reference that begins with a single slash character is termed an absolute-path reference.
+ *
+ * @param UriInterface $uri
+ *
+ * @return bool
+ *
+ * @link https://tools.ietf.org/html/rfc3986#section-4.2
+ */
+ public static function isAbsolutePathReference(UriInterface $uri)
+ {
+ return $uri->getScheme() === ''
+ && $uri->getAuthority() === ''
+ && isset($uri->getPath()[0])
+ && $uri->getPath()[0] === '/';
+ }
+
+ /**
+ * Whether the URI is a relative-path reference.
+ *
+ * A relative reference that does not begin with a slash character is termed a relative-path reference.
+ *
+ * @param UriInterface $uri
+ *
+ * @return bool
+ *
+ * @link https://tools.ietf.org/html/rfc3986#section-4.2
+ */
+ public static function isRelativePathReference(UriInterface $uri)
+ {
+ return $uri->getScheme() === ''
+ && $uri->getAuthority() === ''
+ && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/');
+ }
+
+ /**
+ * Whether the URI is a same-document reference.
+ *
+ * A same-document reference refers to a URI that is, aside from its fragment
+ * component, identical to the base URI. When no base URI is given, only an empty
+ * URI reference (apart from its fragment) is considered a same-document reference.
+ *
+ * @param UriInterface $uri The URI to check
+ * @param UriInterface|null $base An optional base URI to compare against
+ *
+ * @return bool
+ *
+ * @link https://tools.ietf.org/html/rfc3986#section-4.4
+ */
+ public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null)
+ {
+ if ($base !== null) {
+ $uri = UriResolver::resolve($base, $uri);
+
+ return ($uri->getScheme() === $base->getScheme())
+ && ($uri->getAuthority() === $base->getAuthority())
+ && ($uri->getPath() === $base->getPath())
+ && ($uri->getQuery() === $base->getQuery());
+ }
+
+ return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === '';
+ }
+
+ /**
+ * Removes dot segments from a path and returns the new path.
+ *
+ * @param string $path
+ *
+ * @return string
+ *
+ * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead.
+ * @see UriResolver::removeDotSegments
+ */
+ public static function removeDotSegments($path)
+ {
+ return UriResolver::removeDotSegments($path);
+ }
+
+ /**
+ * Converts the relative URI into a new URI that is resolved against the base URI.
+ *
+ * @param UriInterface $base Base URI
+ * @param string|UriInterface $rel Relative URI
+ *
+ * @return UriInterface
+ *
+ * @deprecated since version 1.4. Use UriResolver::resolve instead.
+ * @see UriResolver::resolve
+ */
+ public static function resolve(UriInterface $base, $rel)
+ {
+ if (!($rel instanceof UriInterface)) {
+ $rel = new self($rel);
+ }
+
+ return UriResolver::resolve($base, $rel);
+ }
+
+ /**
+ * Creates a new URI with a specific query string value removed.
+ *
+ * Any existing query string values that exactly match the provided key are
+ * removed.
+ *
+ * @param UriInterface $uri URI to use as a base.
+ * @param string $key Query string key to remove.
+ *
+ * @return UriInterface
+ */
+ public static function withoutQueryValue(UriInterface $uri, $key)
+ {
+ $result = self::getFilteredQueryString($uri, [$key]);
+
+ return $uri->withQuery(implode('&', $result));
+ }
+
+ /**
+ * Creates a new URI with a specific query string value.
+ *
+ * Any existing query string values that exactly match the provided key are
+ * removed and replaced with the given key value pair.
+ *
+ * A value of null will set the query string key without a value, e.g. "key"
+ * instead of "key=value".
+ *
+ * @param UriInterface $uri URI to use as a base.
+ * @param string $key Key to set.
+ * @param string|null $value Value to set
+ *
+ * @return UriInterface
+ */
+ public static function withQueryValue(UriInterface $uri, $key, $value)
+ {
+ $result = self::getFilteredQueryString($uri, [$key]);
+
+ $result[] = self::generateQueryString($key, $value);
+
+ return $uri->withQuery(implode('&', $result));
+ }
+
+ /**
+ * Creates a new URI with multiple specific query string values.
+ *
+ * It has the same behavior as withQueryValue() but for an associative array of key => value.
+ *
+ * @param UriInterface $uri URI to use as a base.
+ * @param array $keyValueArray Associative array of key and values
+ *
+ * @return UriInterface
+ */
+ public static function withQueryValues(UriInterface $uri, array $keyValueArray)
+ {
+ $result = self::getFilteredQueryString($uri, array_keys($keyValueArray));
+
+ foreach ($keyValueArray as $key => $value) {
+ $result[] = self::generateQueryString($key, $value);
+ }
+
+ return $uri->withQuery(implode('&', $result));
+ }
+
+ /**
+ * Creates a URI from a hash of `parse_url` components.
+ *
+ * @param array $parts
+ *
+ * @return UriInterface
+ *
+ * @link http://php.net/manual/en/function.parse-url.php
+ *
+ * @throws \InvalidArgumentException If the components do not form a valid URI.
+ */
+ public static function fromParts(array $parts)
+ {
+ $uri = new self();
+ $uri->applyParts($parts);
+ $uri->validateState();
+
+ return $uri;
+ }
+
+ public function getScheme()
+ {
+ return $this->scheme;
+ }
+
+ public function getAuthority()
+ {
+ $authority = $this->host;
+ if ($this->userInfo !== '') {
+ $authority = $this->userInfo . '@' . $authority;
+ }
+
+ if ($this->port !== null) {
+ $authority .= ':' . $this->port;
+ }
+
+ return $authority;
+ }
+
+ public function getUserInfo()
+ {
+ return $this->userInfo;
+ }
+
+ public function getHost()
+ {
+ return $this->host;
+ }
+
+ public function getPort()
+ {
+ return $this->port;
+ }
+
+ public function getPath()
+ {
+ return $this->path;
+ }
+
+ public function getQuery()
+ {
+ return $this->query;
+ }
+
+ public function getFragment()
+ {
+ return $this->fragment;
+ }
+
+ public function withScheme($scheme)
+ {
+ $scheme = $this->filterScheme($scheme);
+
+ if ($this->scheme === $scheme) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->scheme = $scheme;
+ $new->removeDefaultPort();
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withUserInfo($user, $password = null)
+ {
+ $info = $this->filterUserInfoComponent($user);
+ if ($password !== null) {
+ $info .= ':' . $this->filterUserInfoComponent($password);
+ }
+
+ if ($this->userInfo === $info) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->userInfo = $info;
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withHost($host)
+ {
+ $host = $this->filterHost($host);
+
+ if ($this->host === $host) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->host = $host;
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withPort($port)
+ {
+ $port = $this->filterPort($port);
+
+ if ($this->port === $port) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->port = $port;
+ $new->removeDefaultPort();
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withPath($path)
+ {
+ $path = $this->filterPath($path);
+
+ if ($this->path === $path) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->path = $path;
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withQuery($query)
+ {
+ $query = $this->filterQueryAndFragment($query);
+
+ if ($this->query === $query) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->query = $query;
+
+ return $new;
+ }
+
+ public function withFragment($fragment)
+ {
+ $fragment = $this->filterQueryAndFragment($fragment);
+
+ if ($this->fragment === $fragment) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->fragment = $fragment;
+
+ return $new;
+ }
+
+ /**
+ * Apply parse_url parts to a URI.
+ *
+ * @param array $parts Array of parse_url parts to apply.
+ */
+ private function applyParts(array $parts)
+ {
+ $this->scheme = isset($parts['scheme'])
+ ? $this->filterScheme($parts['scheme'])
+ : '';
+ $this->userInfo = isset($parts['user'])
+ ? $this->filterUserInfoComponent($parts['user'])
+ : '';
+ $this->host = isset($parts['host'])
+ ? $this->filterHost($parts['host'])
+ : '';
+ $this->port = isset($parts['port'])
+ ? $this->filterPort($parts['port'])
+ : null;
+ $this->path = isset($parts['path'])
+ ? $this->filterPath($parts['path'])
+ : '';
+ $this->query = isset($parts['query'])
+ ? $this->filterQueryAndFragment($parts['query'])
+ : '';
+ $this->fragment = isset($parts['fragment'])
+ ? $this->filterQueryAndFragment($parts['fragment'])
+ : '';
+ if (isset($parts['pass'])) {
+ $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']);
+ }
+
+ $this->removeDefaultPort();
+ }
+
+ /**
+ * @param string $scheme
+ *
+ * @return string
+ *
+ * @throws \InvalidArgumentException If the scheme is invalid.
+ */
+ private function filterScheme($scheme)
+ {
+ if (!is_string($scheme)) {
+ throw new \InvalidArgumentException('Scheme must be a string');
+ }
+
+ return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
+ }
+
+ /**
+ * @param string $component
+ *
+ * @return string
+ *
+ * @throws \InvalidArgumentException If the user info is invalid.
+ */
+ private function filterUserInfoComponent($component)
+ {
+ if (!is_string($component)) {
+ throw new \InvalidArgumentException('User info must be a string');
+ }
+
+ return preg_replace_callback(
+ '/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/',
+ [$this, 'rawurlencodeMatchZero'],
+ $component
+ );
+ }
+
+ /**
+ * @param string $host
+ *
+ * @return string
+ *
+ * @throws \InvalidArgumentException If the host is invalid.
+ */
+ private function filterHost($host)
+ {
+ if (!is_string($host)) {
+ throw new \InvalidArgumentException('Host must be a string');
+ }
+
+ return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
+ }
+
+ /**
+ * @param int|null $port
+ *
+ * @return int|null
+ *
+ * @throws \InvalidArgumentException If the port is invalid.
+ */
+ private function filterPort($port)
+ {
+ if ($port === null) {
+ return null;
+ }
+
+ $port = (int) $port;
+ if (0 > $port || 0xffff < $port) {
+ throw new \InvalidArgumentException(
+ sprintf('Invalid port: %d. Must be between 0 and 65535', $port)
+ );
+ }
+
+ return $port;
+ }
+
+ /**
+ * @param UriInterface $uri
+ * @param array $keys
+ *
+ * @return array
+ */
+ private static function getFilteredQueryString(UriInterface $uri, array $keys)
+ {
+ $current = $uri->getQuery();
+
+ if ($current === '') {
+ return [];
+ }
+
+ $decodedKeys = array_map('rawurldecode', $keys);
+
+ return array_filter(explode('&', $current), function ($part) use ($decodedKeys) {
+ return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true);
+ });
+ }
+
+ /**
+ * @param string $key
+ * @param string|null $value
+ *
+ * @return string
+ */
+ private static function generateQueryString($key, $value)
+ {
+ // Query string separators ("=", "&") within the key or value need to be encoded
+ // (while preventing double-encoding) before setting the query string. All other
+ // chars that need percent-encoding will be encoded by withQuery().
+ $queryString = strtr($key, self::$replaceQuery);
+
+ if ($value !== null) {
+ $queryString .= '=' . strtr($value, self::$replaceQuery);
+ }
+
+ return $queryString;
+ }
+
+ private function removeDefaultPort()
+ {
+ if ($this->port !== null && self::isDefaultPort($this)) {
+ $this->port = null;
+ }
+ }
+
+ /**
+ * Filters the path of a URI
+ *
+ * @param string $path
+ *
+ * @return string
+ *
+ * @throws \InvalidArgumentException If the path is invalid.
+ */
+ private function filterPath($path)
+ {
+ if (!is_string($path)) {
+ throw new \InvalidArgumentException('Path must be a string');
+ }
+
+ return preg_replace_callback(
+ '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/',
+ [$this, 'rawurlencodeMatchZero'],
+ $path
+ );
+ }
+
+ /**
+ * Filters the query string or fragment of a URI.
+ *
+ * @param string $str
+ *
+ * @return string
+ *
+ * @throws \InvalidArgumentException If the query or fragment is invalid.
+ */
+ private function filterQueryAndFragment($str)
+ {
+ if (!is_string($str)) {
+ throw new \InvalidArgumentException('Query and fragment must be a string');
+ }
+
+ return preg_replace_callback(
+ '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/',
+ [$this, 'rawurlencodeMatchZero'],
+ $str
+ );
+ }
+
+ private function rawurlencodeMatchZero(array $match)
+ {
+ return rawurlencode($match[0]);
+ }
+
+ private function validateState()
+ {
+ if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) {
+ $this->host = self::HTTP_DEFAULT_HOST;
+ }
+
+ if ($this->getAuthority() === '') {
+ if (0 === strpos($this->path, '//')) {
+ throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"');
+ }
+ if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) {
+ throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon');
+ }
+ } elseif (isset($this->path[0]) && $this->path[0] !== '/') {
+ @trigger_error(
+ 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' .
+ 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.',
+ E_USER_DEPRECATED
+ );
+ $this->path = '/' . $this->path;
+ //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty');
+ }
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/UriComparator.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/UriComparator.php
new file mode 100644
index 0000000..ccf51ff
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/UriComparator.php
@@ -0,0 +1,55 @@
+getHost(), $modified->getHost()) !== 0) {
+ return true;
+ }
+
+ if ($original->getScheme() !== $modified->getScheme()) {
+ return true;
+ }
+
+ if (self::computePort($original) !== self::computePort($modified)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @return int
+ */
+ private static function computePort(UriInterface $uri)
+ {
+ $port = $uri->getPort();
+
+ if (null !== $port) {
+ return $port;
+ }
+
+ return 'https' === $uri->getScheme() ? 443 : 80;
+ }
+
+ private function __construct()
+ {
+ // cannot be instantiated
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/UriNormalizer.php
new file mode 100644
index 0000000..81419ea
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/UriNormalizer.php
@@ -0,0 +1,219 @@
+getPath() === '' &&
+ ($uri->getScheme() === 'http' || $uri->getScheme() === 'https')
+ ) {
+ $uri = $uri->withPath('/');
+ }
+
+ if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') {
+ $uri = $uri->withHost('');
+ }
+
+ if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) {
+ $uri = $uri->withPort(null);
+ }
+
+ if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) {
+ $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath()));
+ }
+
+ if ($flags & self::REMOVE_DUPLICATE_SLASHES) {
+ $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath()));
+ }
+
+ if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') {
+ $queryKeyValues = explode('&', $uri->getQuery());
+ sort($queryKeyValues);
+ $uri = $uri->withQuery(implode('&', $queryKeyValues));
+ }
+
+ return $uri;
+ }
+
+ /**
+ * Whether two URIs can be considered equivalent.
+ *
+ * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also
+ * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be
+ * resolved against the same base URI. If this is not the case, determination of equivalence or difference of
+ * relative references does not mean anything.
+ *
+ * @param UriInterface $uri1 An URI to compare
+ * @param UriInterface $uri2 An URI to compare
+ * @param int $normalizations A bitmask of normalizations to apply, see constants
+ *
+ * @return bool
+ *
+ * @link https://tools.ietf.org/html/rfc3986#section-6.1
+ */
+ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS)
+ {
+ return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations);
+ }
+
+ private static function capitalizePercentEncoding(UriInterface $uri)
+ {
+ $regex = '/(?:%[A-Fa-f0-9]{2})++/';
+
+ $callback = function (array $match) {
+ return strtoupper($match[0]);
+ };
+
+ return
+ $uri->withPath(
+ preg_replace_callback($regex, $callback, $uri->getPath())
+ )->withQuery(
+ preg_replace_callback($regex, $callback, $uri->getQuery())
+ );
+ }
+
+ private static function decodeUnreservedCharacters(UriInterface $uri)
+ {
+ $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i';
+
+ $callback = function (array $match) {
+ return rawurldecode($match[0]);
+ };
+
+ return
+ $uri->withPath(
+ preg_replace_callback($regex, $callback, $uri->getPath())
+ )->withQuery(
+ preg_replace_callback($regex, $callback, $uri->getQuery())
+ );
+ }
+
+ private function __construct()
+ {
+ // cannot be instantiated
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/UriResolver.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/UriResolver.php
new file mode 100644
index 0000000..a3cb15d
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/UriResolver.php
@@ -0,0 +1,222 @@
+getScheme() != '') {
+ return $rel->withPath(self::removeDotSegments($rel->getPath()));
+ }
+
+ if ($rel->getAuthority() != '') {
+ $targetAuthority = $rel->getAuthority();
+ $targetPath = self::removeDotSegments($rel->getPath());
+ $targetQuery = $rel->getQuery();
+ } else {
+ $targetAuthority = $base->getAuthority();
+ if ($rel->getPath() === '') {
+ $targetPath = $base->getPath();
+ $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery();
+ } else {
+ if ($rel->getPath()[0] === '/') {
+ $targetPath = $rel->getPath();
+ } else {
+ if ($targetAuthority != '' && $base->getPath() === '') {
+ $targetPath = '/' . $rel->getPath();
+ } else {
+ $lastSlashPos = strrpos($base->getPath(), '/');
+ if ($lastSlashPos === false) {
+ $targetPath = $rel->getPath();
+ } else {
+ $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath();
+ }
+ }
+ }
+ $targetPath = self::removeDotSegments($targetPath);
+ $targetQuery = $rel->getQuery();
+ }
+ }
+
+ return new Uri(Uri::composeComponents(
+ $base->getScheme(),
+ $targetAuthority,
+ $targetPath,
+ $targetQuery,
+ $rel->getFragment()
+ ));
+ }
+
+ /**
+ * Returns the target URI as a relative reference from the base URI.
+ *
+ * This method is the counterpart to resolve():
+ *
+ * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target))
+ *
+ * One use-case is to use the current request URI as base URI and then generate relative links in your documents
+ * to reduce the document size or offer self-contained downloadable document archives.
+ *
+ * $base = new Uri('http://example.com/a/b/');
+ * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'.
+ * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'.
+ * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'.
+ * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'.
+ *
+ * This method also accepts a target that is already relative and will try to relativize it further. Only a
+ * relative-path reference will be returned as-is.
+ *
+ * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well
+ *
+ * @param UriInterface $base Base URI
+ * @param UriInterface $target Target URI
+ *
+ * @return UriInterface The relative URI reference
+ */
+ public static function relativize(UriInterface $base, UriInterface $target)
+ {
+ if ($target->getScheme() !== '' &&
+ ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')
+ ) {
+ return $target;
+ }
+
+ if (Uri::isRelativePathReference($target)) {
+ // As the target is already highly relative we return it as-is. It would be possible to resolve
+ // the target with `$target = self::resolve($base, $target);` and then try make it more relative
+ // by removing a duplicate query. But let's not do that automatically.
+ return $target;
+ }
+
+ if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) {
+ return $target->withScheme('');
+ }
+
+ // We must remove the path before removing the authority because if the path starts with two slashes, the URI
+ // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also
+ // invalid.
+ $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost('');
+
+ if ($base->getPath() !== $target->getPath()) {
+ return $emptyPathUri->withPath(self::getRelativePath($base, $target));
+ }
+
+ if ($base->getQuery() === $target->getQuery()) {
+ // Only the target fragment is left. And it must be returned even if base and target fragment are the same.
+ return $emptyPathUri->withQuery('');
+ }
+
+ // If the base URI has a query but the target has none, we cannot return an empty path reference as it would
+ // inherit the base query component when resolving.
+ if ($target->getQuery() === '') {
+ $segments = explode('/', $target->getPath());
+ $lastSegment = end($segments);
+
+ return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment);
+ }
+
+ return $emptyPathUri;
+ }
+
+ private static function getRelativePath(UriInterface $base, UriInterface $target)
+ {
+ $sourceSegments = explode('/', $base->getPath());
+ $targetSegments = explode('/', $target->getPath());
+ array_pop($sourceSegments);
+ $targetLastSegment = array_pop($targetSegments);
+ foreach ($sourceSegments as $i => $segment) {
+ if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) {
+ unset($sourceSegments[$i], $targetSegments[$i]);
+ } else {
+ break;
+ }
+ }
+ $targetSegments[] = $targetLastSegment;
+ $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments);
+
+ // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./".
+ // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used
+ // as the first segment of a relative-path reference, as it would be mistaken for a scheme name.
+ if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) {
+ $relativePath = "./$relativePath";
+ } elseif ('/' === $relativePath[0]) {
+ if ($base->getAuthority() != '' && $base->getPath() === '') {
+ // In this case an extra slash is added by resolve() automatically. So we must not add one here.
+ $relativePath = ".$relativePath";
+ } else {
+ $relativePath = "./$relativePath";
+ }
+ }
+
+ return $relativePath;
+ }
+
+ private function __construct()
+ {
+ // cannot be instantiated
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/Utils.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Utils.php
new file mode 100644
index 0000000..6b6c8cc
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/Utils.php
@@ -0,0 +1,428 @@
+ $keys
+ *
+ * @return array
+ */
+ public static function caselessRemove($keys, array $data)
+ {
+ $result = [];
+
+ foreach ($keys as &$key) {
+ $key = strtolower($key);
+ }
+
+ foreach ($data as $k => $v) {
+ if (!in_array(strtolower($k), $keys)) {
+ $result[$k] = $v;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Copy the contents of a stream into another stream until the given number
+ * of bytes have been read.
+ *
+ * @param StreamInterface $source Stream to read from
+ * @param StreamInterface $dest Stream to write to
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
+ * to read the entire stream.
+ *
+ * @throws \RuntimeException on error.
+ */
+ public static function copyToStream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
+ {
+ $bufferSize = 8192;
+
+ if ($maxLen === -1) {
+ while (!$source->eof()) {
+ if (!$dest->write($source->read($bufferSize))) {
+ break;
+ }
+ }
+ } else {
+ $remaining = $maxLen;
+ while ($remaining > 0 && !$source->eof()) {
+ $buf = $source->read(min($bufferSize, $remaining));
+ $len = strlen($buf);
+ if (!$len) {
+ break;
+ }
+ $remaining -= $len;
+ $dest->write($buf);
+ }
+ }
+ }
+
+ /**
+ * Copy the contents of a stream into a string until the given number of
+ * bytes have been read.
+ *
+ * @param StreamInterface $stream Stream to read
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
+ * to read the entire stream.
+ *
+ * @return string
+ *
+ * @throws \RuntimeException on error.
+ */
+ public static function copyToString(StreamInterface $stream, $maxLen = -1)
+ {
+ $buffer = '';
+
+ if ($maxLen === -1) {
+ while (!$stream->eof()) {
+ $buf = $stream->read(1048576);
+ // Using a loose equality here to match on '' and false.
+ if ($buf == null) {
+ break;
+ }
+ $buffer .= $buf;
+ }
+ return $buffer;
+ }
+
+ $len = 0;
+ while (!$stream->eof() && $len < $maxLen) {
+ $buf = $stream->read($maxLen - $len);
+ // Using a loose equality here to match on '' and false.
+ if ($buf == null) {
+ break;
+ }
+ $buffer .= $buf;
+ $len = strlen($buffer);
+ }
+
+ return $buffer;
+ }
+
+ /**
+ * Calculate a hash of a stream.
+ *
+ * This method reads the entire stream to calculate a rolling hash, based
+ * on PHP's `hash_init` functions.
+ *
+ * @param StreamInterface $stream Stream to calculate the hash for
+ * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
+ * @param bool $rawOutput Whether or not to use raw output
+ *
+ * @return string Returns the hash of the stream
+ *
+ * @throws \RuntimeException on error.
+ */
+ public static function hash(StreamInterface $stream, $algo, $rawOutput = false)
+ {
+ $pos = $stream->tell();
+
+ if ($pos > 0) {
+ $stream->rewind();
+ }
+
+ $ctx = hash_init($algo);
+ while (!$stream->eof()) {
+ hash_update($ctx, $stream->read(1048576));
+ }
+
+ $out = hash_final($ctx, (bool) $rawOutput);
+ $stream->seek($pos);
+
+ return $out;
+ }
+
+ /**
+ * Clone and modify a request with the given changes.
+ *
+ * This method is useful for reducing the number of clones needed to mutate
+ * a message.
+ *
+ * The changes can be one of:
+ * - method: (string) Changes the HTTP method.
+ * - set_headers: (array) Sets the given headers.
+ * - remove_headers: (array) Remove the given headers.
+ * - body: (mixed) Sets the given body.
+ * - uri: (UriInterface) Set the URI.
+ * - query: (string) Set the query string value of the URI.
+ * - version: (string) Set the protocol version.
+ *
+ * @param RequestInterface $request Request to clone and modify.
+ * @param array $changes Changes to apply.
+ *
+ * @return RequestInterface
+ */
+ public static function modifyRequest(RequestInterface $request, array $changes)
+ {
+ if (!$changes) {
+ return $request;
+ }
+
+ $headers = $request->getHeaders();
+
+ if (!isset($changes['uri'])) {
+ $uri = $request->getUri();
+ } else {
+ // Remove the host header if one is on the URI
+ if ($host = $changes['uri']->getHost()) {
+ $changes['set_headers']['Host'] = $host;
+
+ if ($port = $changes['uri']->getPort()) {
+ $standardPorts = ['http' => 80, 'https' => 443];
+ $scheme = $changes['uri']->getScheme();
+ if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
+ $changes['set_headers']['Host'] .= ':' . $port;
+ }
+ }
+ }
+ $uri = $changes['uri'];
+ }
+
+ if (!empty($changes['remove_headers'])) {
+ $headers = self::caselessRemove($changes['remove_headers'], $headers);
+ }
+
+ if (!empty($changes['set_headers'])) {
+ $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers);
+ $headers = $changes['set_headers'] + $headers;
+ }
+
+ if (isset($changes['query'])) {
+ $uri = $uri->withQuery($changes['query']);
+ }
+
+ if ($request instanceof ServerRequestInterface) {
+ $new = (new ServerRequest(
+ isset($changes['method']) ? $changes['method'] : $request->getMethod(),
+ $uri,
+ $headers,
+ isset($changes['body']) ? $changes['body'] : $request->getBody(),
+ isset($changes['version'])
+ ? $changes['version']
+ : $request->getProtocolVersion(),
+ $request->getServerParams()
+ ))
+ ->withParsedBody($request->getParsedBody())
+ ->withQueryParams($request->getQueryParams())
+ ->withCookieParams($request->getCookieParams())
+ ->withUploadedFiles($request->getUploadedFiles());
+
+ foreach ($request->getAttributes() as $key => $value) {
+ $new = $new->withAttribute($key, $value);
+ }
+
+ return $new;
+ }
+
+ return new Request(
+ isset($changes['method']) ? $changes['method'] : $request->getMethod(),
+ $uri,
+ $headers,
+ isset($changes['body']) ? $changes['body'] : $request->getBody(),
+ isset($changes['version'])
+ ? $changes['version']
+ : $request->getProtocolVersion()
+ );
+ }
+
+ /**
+ * Read a line from the stream up to the maximum allowed buffer length.
+ *
+ * @param StreamInterface $stream Stream to read from
+ * @param int|null $maxLength Maximum buffer length
+ *
+ * @return string
+ */
+ public static function readLine(StreamInterface $stream, $maxLength = null)
+ {
+ $buffer = '';
+ $size = 0;
+
+ while (!$stream->eof()) {
+ // Using a loose equality here to match on '' and false.
+ if (null == ($byte = $stream->read(1))) {
+ return $buffer;
+ }
+ $buffer .= $byte;
+ // Break when a new line is found or the max length - 1 is reached
+ if ($byte === "\n" || ++$size === $maxLength - 1) {
+ break;
+ }
+ }
+
+ return $buffer;
+ }
+
+ /**
+ * Create a new stream based on the input type.
+ *
+ * Options is an associative array that can contain the following keys:
+ * - metadata: Array of custom metadata.
+ * - size: Size of the stream.
+ *
+ * This method accepts the following `$resource` types:
+ * - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
+ * - `string`: Creates a stream object that uses the given string as the contents.
+ * - `resource`: Creates a stream object that wraps the given PHP stream resource.
+ * - `Iterator`: If the provided value implements `Iterator`, then a read-only
+ * stream object will be created that wraps the given iterable. Each time the
+ * stream is read from, data from the iterator will fill a buffer and will be
+ * continuously called until the buffer is equal to the requested read size.
+ * Subsequent read calls will first read from the buffer and then call `next`
+ * on the underlying iterator until it is exhausted.
+ * - `object` with `__toString()`: If the object has the `__toString()` method,
+ * the object will be cast to a string and then a stream will be returned that
+ * uses the string value.
+ * - `NULL`: When `null` is passed, an empty stream object is returned.
+ * - `callable` When a callable is passed, a read-only stream object will be
+ * created that invokes the given callable. The callable is invoked with the
+ * number of suggested bytes to read. The callable can return any number of
+ * bytes, but MUST return `false` when there is no more data to return. The
+ * stream object that wraps the callable will invoke the callable until the
+ * number of requested bytes are available. Any additional bytes will be
+ * buffered and used in subsequent reads.
+ *
+ * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data
+ * @param array $options Additional options
+ *
+ * @return StreamInterface
+ *
+ * @throws \InvalidArgumentException if the $resource arg is not valid.
+ */
+ public static function streamFor($resource = '', array $options = [])
+ {
+ if (is_scalar($resource)) {
+ $stream = self::tryFopen('php://temp', 'r+');
+ if ($resource !== '') {
+ fwrite($stream, $resource);
+ fseek($stream, 0);
+ }
+ return new Stream($stream, $options);
+ }
+
+ switch (gettype($resource)) {
+ case 'resource':
+ /*
+ * The 'php://input' is a special stream with quirks and inconsistencies.
+ * We avoid using that stream by reading it into php://temp
+ */
+ $metaData = \stream_get_meta_data($resource);
+ if (isset($metaData['uri']) && $metaData['uri'] === 'php://input') {
+ $stream = self::tryFopen('php://temp', 'w+');
+ fwrite($stream, stream_get_contents($resource));
+ fseek($stream, 0);
+ $resource = $stream;
+ }
+ return new Stream($resource, $options);
+ case 'object':
+ if ($resource instanceof StreamInterface) {
+ return $resource;
+ } elseif ($resource instanceof \Iterator) {
+ return new PumpStream(function () use ($resource) {
+ if (!$resource->valid()) {
+ return false;
+ }
+ $result = $resource->current();
+ $resource->next();
+ return $result;
+ }, $options);
+ } elseif (method_exists($resource, '__toString')) {
+ return Utils::streamFor((string) $resource, $options);
+ }
+ break;
+ case 'NULL':
+ return new Stream(self::tryFopen('php://temp', 'r+'), $options);
+ }
+
+ if (is_callable($resource)) {
+ return new PumpStream($resource, $options);
+ }
+
+ throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
+ }
+
+ /**
+ * Safely opens a PHP stream resource using a filename.
+ *
+ * When fopen fails, PHP normally raises a warning. This function adds an
+ * error handler that checks for errors and throws an exception instead.
+ *
+ * @param string $filename File to open
+ * @param string $mode Mode used to open the file
+ *
+ * @return resource
+ *
+ * @throws \RuntimeException if the file cannot be opened
+ */
+ public static function tryFopen($filename, $mode)
+ {
+ $ex = null;
+ set_error_handler(function () use ($filename, $mode, &$ex) {
+ $ex = new \RuntimeException(sprintf(
+ 'Unable to open "%s" using mode "%s": %s',
+ $filename,
+ $mode,
+ func_get_args()[1]
+ ));
+
+ return true;
+ });
+
+ try {
+ $handle = fopen($filename, $mode);
+ } catch (\Throwable $e) {
+ $ex = new \RuntimeException(sprintf(
+ 'Unable to open "%s" using mode "%s": %s',
+ $filename,
+ $mode,
+ $e->getMessage()
+ ), 0, $e);
+ }
+
+ restore_error_handler();
+
+ if ($ex) {
+ /** @var $ex \RuntimeException */
+ throw $ex;
+ }
+
+ return $handle;
+ }
+
+ /**
+ * Returns a UriInterface for the given value.
+ *
+ * This function accepts a string or UriInterface and returns a
+ * UriInterface for the given value. If the value is already a
+ * UriInterface, it is returned as-is.
+ *
+ * @param string|UriInterface $uri
+ *
+ * @return UriInterface
+ *
+ * @throws \InvalidArgumentException
+ */
+ public static function uriFor($uri)
+ {
+ if ($uri instanceof UriInterface) {
+ return $uri;
+ }
+
+ if (is_string($uri)) {
+ return new Uri($uri);
+ }
+
+ throw new \InvalidArgumentException('URI must be a string or UriInterface');
+ }
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/functions.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/functions.php
new file mode 100644
index 0000000..b0901fa
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/functions.php
@@ -0,0 +1,422 @@
+ '1', 'foo[b]' => '2'])`.
+ *
+ * @param string $str Query string to parse
+ * @param int|bool $urlEncoding How the query string is encoded
+ *
+ * @return array
+ *
+ * @deprecated parse_query will be removed in guzzlehttp/psr7:2.0. Use Query::parse instead.
+ */
+function parse_query($str, $urlEncoding = true)
+{
+ return Query::parse($str, $urlEncoding);
+}
+
+/**
+ * Build a query string from an array of key value pairs.
+ *
+ * This function can use the return value of `parse_query()` to build a query
+ * string. This function does not modify the provided keys when an array is
+ * encountered (like `http_build_query()` would).
+ *
+ * @param array $params Query string parameters.
+ * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
+ * to encode using RFC3986, or PHP_QUERY_RFC1738
+ * to encode using RFC1738.
+ *
+ * @return string
+ *
+ * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead.
+ */
+function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
+{
+ return Query::build($params, $encoding);
+}
+
+/**
+ * Determines the mimetype of a file by looking at its extension.
+ *
+ * @param string $filename
+ *
+ * @return string|null
+ *
+ * @deprecated mimetype_from_filename will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromFilename instead.
+ */
+function mimetype_from_filename($filename)
+{
+ return MimeType::fromFilename($filename);
+}
+
+/**
+ * Maps a file extensions to a mimetype.
+ *
+ * @param $extension string The file extension.
+ *
+ * @return string|null
+ *
+ * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
+ * @deprecated mimetype_from_extension will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromExtension instead.
+ */
+function mimetype_from_extension($extension)
+{
+ return MimeType::fromExtension($extension);
+}
+
+/**
+ * Parses an HTTP message into an associative array.
+ *
+ * The array contains the "start-line" key containing the start line of
+ * the message, "headers" key containing an associative array of header
+ * array values, and a "body" key containing the body of the message.
+ *
+ * @param string $message HTTP request or response to parse.
+ *
+ * @return array
+ *
+ * @internal
+ *
+ * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead.
+ */
+function _parse_message($message)
+{
+ return Message::parseMessage($message);
+}
+
+/**
+ * Constructs a URI for an HTTP request message.
+ *
+ * @param string $path Path from the start-line
+ * @param array $headers Array of headers (each value an array).
+ *
+ * @return string
+ *
+ * @internal
+ *
+ * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead.
+ */
+function _parse_request_uri($path, array $headers)
+{
+ return Message::parseRequestUri($path, $headers);
+}
+
+/**
+ * Get a short summary of the message body.
+ *
+ * Will return `null` if the response is not printable.
+ *
+ * @param MessageInterface $message The message to get the body summary
+ * @param int $truncateAt The maximum allowed size of the summary
+ *
+ * @return string|null
+ *
+ * @deprecated get_message_body_summary will be removed in guzzlehttp/psr7:2.0. Use Message::bodySummary instead.
+ */
+function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
+{
+ return Message::bodySummary($message, $truncateAt);
+}
+
+/**
+ * Remove the items given by the keys, case insensitively from the data.
+ *
+ * @param iterable $keys
+ *
+ * @return array
+ *
+ * @internal
+ *
+ * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead.
+ */
+function _caseless_remove($keys, array $data)
+{
+ return Utils::caselessRemove($keys, $data);
+}
diff --git a/tests/php_test_files/vendor/guzzlehttp/psr7/src/functions_include.php b/tests/php_test_files/vendor/guzzlehttp/psr7/src/functions_include.php
new file mode 100644
index 0000000..96a4a83
--- /dev/null
+++ b/tests/php_test_files/vendor/guzzlehttp/psr7/src/functions_include.php
@@ -0,0 +1,6 @@
+setBasePath(...)` (and `JsonFormatter` by extension) that allows removing the project's path from the stack trace output (47e301d3e)
+ * Fixed JsonFormatter handling of incomplete classes (#1834)
+ * Fixed private error handlers causing problems with custom StreamHandler implementations (#1866)
+
+### 3.6.0 (2024-04-12)
+
+ * Added `LineFormatter->setBasePath(...)` that allows removing the project's path from the stack trace output (#1873)
+ * Added `$includeExtra` option in `PsrHandler` to also use extra data to replace placeholder values in the message (#1852)
+ * Added ability to customize what is a duplicated message by extending the `DeduplicationHandler` (#1879)
+ * Added handling for using `GelfMessageFormatter` together with the `AmqpHandler` (#1869)
+ * Added ability to extend `GoogleCloudLoggingFormatter` (#1859)
+ * Fixed `__toString` failures in context data crashing the normalization process (#1868)
+ * Fixed PHP 8.4 deprecation warnings (#1874)
+
+### 3.5.0 (2023-10-27)
+
+ * Added ability to indent stack traces in LineFormatter via e.g. `indentStacktraces(' ')` (#1835)
+ * Added ability to configure a max level name length in LineFormatter via e.g. `setMaxLevelNameLength(3)` (#1850)
+ * Added support for indexed arrays (i.e. `[]` and not `{}` arrays once json serialized) containing inline linebreaks in LineFormatter (#1818)
+ * Added `WithMonologChannel` attribute for integrators to use to configure autowiring (#1847)
+ * Fixed log record `extra` data leaking between handlers that have handler-specific processors set (#1819)
+ * Fixed LogglyHandler issue with record level filtering (#1841)
+ * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804)
+ * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815)
+ * Fixed normalization error when normalizing incomplete classes (#1833)
+
+### 3.4.0 (2023-06-21)
+
+ * Added `LoadAverageProcessor` to track one of the 1, 5 or 15min load averages (#1803)
+ * Added support for priority to the `AsMonologProcessor` attribute (#1797)
+ * Added `TelegramBotHandler` `topic`/`message_thread_id` support (#1802)
+ * Fixed `FingersCrossedHandler` passthruLevel checking (#1801)
+ * Fixed support of yearly and monthly rotation log file to rotate only once a month/year (#1805)
+ * Fixed `TestHandler` method docs (#1794)
+ * Fixed handling of falsey `display_errors` string values (#1804)
+
+### 3.3.1 (2023-02-06)
+
+ * Fixed Logger not being serializable anymore (#1792)
+
+### 3.3.0 (2023-02-06)
+
+ * Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748)
+ * Added `ClosureContextProcessor` to allow delaying the creation of context data by setting a Closure in context which is called when the log record is used (#1745)
+ * Added an ElasticsearchHandler option to set the `op_type` to `create` instead of the default `index` (#1766)
+ * Added support for enum context values in PsrLogMessageProcessor (#1773)
+ * Added graylog2/gelf-php 2.x support (#1747)
+ * Improved `BrowserConsoleHandler` logging to use more appropriate methods than just console.log in the browser (#1739)
+ * Fixed GitProcessor not filtering correctly based on Level (#1749)
+ * Fixed `WhatFailureGroupHandler` not catching errors happening inside `close()` (#1791)
+ * Fixed datetime field in `GoogleCloudLoggingFormatter` (#1758)
+ * Fixed infinite loop detection within Fibers (#1753)
+ * Fixed `AmqpHandler->setExtraAttributes` not working with buffering handler wrappers (#1781)
+
+### 3.2.0 (2022-07-24)
+
+ * Deprecated `CubeHandler` and `PHPConsoleHandler` as both projects are abandoned and those should not be used anymore (#1734)
+ * Marked `Logger` `@final` as it should not be extended, prefer composition or talk to us if you are missing something
+ * Added RFC 5424 level (`7` to `0`) support to `Logger::log` and `Logger::addRecord` to increase interoperability (#1723)
+ * Added `SyslogFormatter` to output syslog-like files which can be consumed by tools like [lnav](https://lnav.org/) (#1689)
+ * Added support for `__toString` for objects which are not json serializable in `JsonFormatter` (#1733)
+ * Added `GoogleCloudLoggingFormatter` (#1719)
+ * Added support for Predis 2.x (#1732)
+ * Added `AmqpHandler->setExtraAttributes` to allow configuring attributes when using an AMQPExchange (#1724)
+ * Fixed serialization/unserialization of handlers to make sure private properties are included (#1727)
+ * Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing `\n` or `\r` sequences (#1720)
+ * Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726)
+ * Fixed PHP 8.2 deprecation warnings (#1722)
+ * Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678)
+
+### 3.1.0 (2022-06-09)
+
+ * Added `$datetime` parameter to `Logger::addRecord` as low level API to allow logging into the past or future (#1682)
+ * Added `Logger::useLoggingLoopDetection` to allow disabling cyclic logging detection in concurrent frameworks (#1681)
+ * Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670)
+ * Fixed interop issue by removing the need for a return type in ProcessorInterface (#1680)
+ * Marked the reusable `Monolog\Test\TestCase` class as `@internal` to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677)
+ * Fixed RotatingFileHandler issue when the date format contained slashes (#1671)
+
+### 3.0.0 (2022-05-10)
+
+Changes from RC1
+
+- The `Monolog\LevelName` enum does not exist anymore, use `Monolog\Level->getName()` instead.
+
+### 3.0.0-RC1 (2022-05-08)
+
+This is mostly a cleanup release offering stronger type guarantees for integrators with the
+array->object/enum changes, but there is no big new feature for end users.
+
+See [UPGRADE notes](UPGRADE.md#300) for details on all breaking changes especially if you are extending/implementing Monolog classes/interfaces.
+
+Noteworthy BC Breaks:
+
+- The minimum supported PHP version is now `8.1.0`.
+- Log records have been converted from an array to a [`Monolog\LogRecord` object](src/Monolog/LogRecord.php)
+ with public (and mostly readonly) properties. e.g. instead of doing
+ `$record['context']` use `$record->context`.
+ In formatters or handlers if you rather need an array to work with you can use `$record->toArray()`
+ to get back a Monolog 1/2 style record array. This will contain the enum values instead of enum cases
+ in the `level` and `level_name` keys to be more backwards compatible and use simpler data types.
+- `FormatterInterface`, `HandlerInterface`, `ProcessorInterface`, etc. changed to contain `LogRecord $record`
+ instead of `array $record` parameter types. If you want to support multiple Monolog versions this should
+ be possible by type-hinting nothing, or `array|LogRecord` if you support PHP 8.0+. You can then code
+ against the $record using Monolog 2 style as LogRecord implements ArrayAccess for BC.
+ The interfaces do not require a `LogRecord` return type even where it would be applicable, but if you only
+ support Monolog 3 in integration code I would recommend you use `LogRecord` return types wherever fitting
+ to ensure forward compatibility as it may be added in Monolog 4.
+- Log levels are now enums [`Monolog\Level`](src/Monolog/Level.php) and [`Monolog\LevelName`](src/Monolog/LevelName.php)
+- Removed deprecated SwiftMailerHandler, migrate to SymfonyMailerHandler instead.
+- `ResettableInterface::reset()` now requires a void return type.
+- All properties have had types added, which may require you to do so as well if you extended
+ a Monolog class and declared the same property.
+
+New deprecations:
+
+- `Logger::DEBUG`, `Logger::ERROR`, etc. are now deprecated in favor of the `Monolog\Level` enum.
+ e.g. instead of `Logger::WARNING` use `Level::Warning` if you need to pass the enum case
+ to Monolog or one of its handlers, or `Level::Warning->value` if you need the integer
+ value equal to what `Logger::WARNING` was giving you.
+- `Logger::getLevelName()` is now deprecated.
+
+### 2.9.3 (2024-04-12)
+
+ * Fixed PHP 8.4 deprecation warnings (#1874)
+
+### 2.9.2 (2023-10-27)
+
+ * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804)
+ * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815)
+ * Fixed normalization error when normalizing incomplete classes (#1833)
+
+### 2.9.1 (2023-02-06)
+
+ * Fixed Logger not being serializable anymore (#1792)
+
+### 2.9.0 (2023-02-05)
+
+ * Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748)
+ * Added support for enum context values in PsrLogMessageProcessor (#1773)
+ * Added graylog2/gelf-php 2.x support (#1747)
+ * Improved `BrowserConsoleHandler` logging to use more appropriate methods than just console.log in the browser (#1739)
+ * Fixed `WhatFailureGroupHandler` not catching errors happening inside `close()` (#1791)
+ * Fixed datetime field in `GoogleCloudLoggingFormatter` (#1758)
+ * Fixed infinite loop detection within Fibers (#1753)
+ * Fixed `AmqpHandler->setExtraAttributes` not working with buffering handler wrappers (#1781)
+
+### 2.8.0 (2022-07-24)
+
+ * Deprecated `CubeHandler` and `PHPConsoleHandler` as both projects are abandoned and those should not be used anymore (#1734)
+ * Added RFC 5424 level (`7` to `0`) support to `Logger::log` and `Logger::addRecord` to increase interoperability (#1723)
+ * Added support for `__toString` for objects which are not json serializable in `JsonFormatter` (#1733)
+ * Added `GoogleCloudLoggingFormatter` (#1719)
+ * Added support for Predis 2.x (#1732)
+ * Added `AmqpHandler->setExtraAttributes` to allow configuring attributes when using an AMQPExchange (#1724)
+ * Fixed serialization/unserialization of handlers to make sure private properties are included (#1727)
+ * Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing `\n` or `\r` sequences (#1720)
+ * Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726)
+ * Fixed PHP 8.2 deprecation warnings (#1722)
+ * Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678)
+
+### 2.7.0 (2022-06-09)
+
+ * Added `$datetime` parameter to `Logger::addRecord` as low level API to allow logging into the past or future (#1682)
+ * Added `Logger::useLoggingLoopDetection` to allow disabling cyclic logging detection in concurrent frameworks (#1681)
+ * Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670)
+ * Marked the reusable `Monolog\Test\TestCase` class as `@internal` to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677)
+ * Fixed RotatingFileHandler issue when the date format contained slashes (#1671)
+
+### 2.6.0 (2022-05-10)
+
+ * Deprecated `SwiftMailerHandler`, use `SymfonyMailerHandler` instead
+ * Added `SymfonyMailerHandler` (#1663)
+ * Added ElasticSearch 8.x support to the ElasticsearchHandler (#1662)
+ * Added a way to filter/modify stack traces in LineFormatter (#1665)
+ * Fixed UdpSocket not being able to reopen/reconnect after close()
+ * Fixed infinite loops if a Handler is triggering logging while handling log records
+
+### 2.5.0 (2022-04-08)
+
+ * Added `callType` to IntrospectionProcessor (#1612)
+ * Fixed AsMonologProcessor syntax to be compatible with PHP 7.2 (#1651)
+
+### 2.4.0 (2022-03-14)
+
+ * Added [`Monolog\LogRecord`](src/Monolog/LogRecord.php) interface that can be used to type-hint records like `array|\Monolog\LogRecord $record` to be forward compatible with the upcoming Monolog 3 changes
+ * Added `includeStacktraces` constructor params to LineFormatter & JsonFormatter (#1603)
+ * Added `persistent`, `timeout`, `writingTimeout`, `connectionTimeout`, `chunkSize` constructor params to SocketHandler and derivatives (#1600)
+ * Added `AsMonologProcessor` PHP attribute which can help autowiring / autoconfiguration of processors if frameworks / integrations decide to make use of it. This is useless when used purely with Monolog (#1637)
+ * Added support for keeping native BSON types as is in MongoDBFormatter (#1620)
+ * Added support for a `user_agent` key in WebProcessor, disabled by default but you can use it by configuring the $extraFields you want (#1613)
+ * Added support for username/userIcon in SlackWebhookHandler (#1617)
+ * Added extension points to BrowserConsoleHandler (#1593)
+ * Added record message/context/extra info to exceptions thrown when a StreamHandler cannot open its stream to avoid completely losing the data logged (#1630)
+ * Fixed error handler signature to accept a null $context which happens with internal PHP errors (#1614)
+ * Fixed a few setter methods not returning `self` (#1609)
+ * Fixed handling of records going over the max Telegram message length (#1616)
+
+### 2.3.5 (2021-10-01)
+
+ * Fixed regression in StreamHandler since 2.3.3 on systems with the memory_limit set to >=20GB (#1592)
+
+### 2.3.4 (2021-09-15)
+
+ * Fixed support for psr/log 3.x (#1589)
+
+### 2.3.3 (2021-09-14)
+
+ * Fixed memory usage when using StreamHandler and calling stream_get_contents on the resource you passed to it (#1578, #1577)
+ * Fixed support for psr/log 2.x (#1587)
+ * Fixed some type annotations
+
+### 2.3.2 (2021-07-23)
+
+ * Fixed compatibility with PHP 7.2 - 7.4 when experiencing PCRE errors (#1568)
+
+### 2.3.1 (2021-07-14)
+
+ * Fixed Utils::getClass handling of anonymous classes not being fully compatible with PHP 8 (#1563)
+ * Fixed some `@inheritDoc` annotations having the wrong case
+
+### 2.3.0 (2021-07-05)
+
+ * Added a ton of PHPStan type annotations as well as type aliases on Monolog\Logger for Record, Level and LevelName that you can import (#1557)
+ * Added ability to customize date format when using JsonFormatter (#1561)
+ * Fixed FilterHandler not calling reset on its internal handler when reset() is called on it (#1531)
+ * Fixed SyslogUdpHandler not setting the timezone correctly on DateTimeImmutable instances (#1540)
+ * Fixed StreamHandler thread safety - chunk size set to 2GB now to avoid interlacing when doing concurrent writes (#1553)
+
+### 2.2.0 (2020-12-14)
+
+ * Added JSON_PARTIAL_OUTPUT_ON_ERROR to default json encoding flags, to avoid dropping entire context data or even records due to an invalid subset of it somewhere
+ * Added setDateFormat to NormalizerFormatter (and Line/Json formatters by extension) to allow changing this after object creation
+ * Added RedisPubSubHandler to log records to a Redis channel using PUBLISH
+ * Added support for Elastica 7, and deprecated the $type argument of ElasticaFormatter which is not in use anymore as of Elastica 7
+ * Added support for millisecond write timeouts in SocketHandler, you can now pass floats to setWritingTimeout, e.g. 0.2 is 200ms
+ * Added support for unix sockets in SyslogUdpHandler (set $port to 0 to make the $host a unix socket)
+ * Added handleBatch support for TelegramBotHandler
+ * Added RFC5424e extended date format including milliseconds to SyslogUdpHandler
+ * Added support for configuring handlers with numeric level values in strings (coming from e.g. env vars)
+ * Fixed Wildfire/FirePHP/ChromePHP handling of unicode characters
+ * Fixed PHP 8 issues in SyslogUdpHandler
+ * Fixed internal type error when mbstring is missing
+
+### 2.1.1 (2020-07-23)
+
+ * Fixed removing of json encoding options
+ * Fixed type hint of $level not accepting strings in SendGridHandler and OverflowHandler
+ * Fixed SwiftMailerHandler not accepting email templates with an empty subject
+ * Fixed array access on null in RavenHandler
+ * Fixed unique_id in WebProcessor not being disableable
+
+### 2.1.0 (2020-05-22)
+
+ * Added `JSON_INVALID_UTF8_SUBSTITUTE` to default json flags, so that invalid UTF8 characters now get converted to [๏ฟฝ](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) instead of being converted from ISO-8859-15 to UTF8 as it was before, which was hardly a comprehensive solution
+ * Added `$ignoreEmptyContextAndExtra` option to JsonFormatter to skip empty context/extra entirely from the output
+ * Added `$parseMode`, `$disableWebPagePreview` and `$disableNotification` options to TelegramBotHandler
+ * Added tentative support for PHP 8
+ * NormalizerFormatter::addJsonEncodeOption and removeJsonEncodeOption are now public to allow modifying default json flags
+ * Fixed GitProcessor type error when there is no git repo present
+ * Fixed normalization of SoapFault objects containing deeply nested objects as "detail"
+ * Fixed support for relative paths in RotatingFileHandler
+
+### 2.0.2 (2019-12-20)
+
+ * Fixed ElasticsearchHandler swallowing exceptions details when failing to index log records
+ * Fixed normalization of SoapFault objects containing non-strings as "detail" in LineFormatter
+ * Fixed formatting of resources in JsonFormatter
+ * Fixed RedisHandler failing to use MULTI properly when passed a proxied Redis instance (e.g. in Symfony with lazy services)
+ * Fixed FilterHandler triggering a notice when handleBatch was filtering all records passed to it
+ * Fixed Turkish locale messing up the conversion of level names to their constant values
+
+### 2.0.1 (2019-11-13)
+
+ * Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable
+ * Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler, OverflowHandler and SamplingHandler
+ * Fixed BrowserConsoleHandler formatting when using multiple styles
+ * Fixed normalization of exception codes to be always integers even for PDOException which have them as numeric strings
+ * Fixed normalization of SoapFault objects containing non-strings as "detail"
+ * Fixed json encoding across all handlers to always attempt recovery of non-UTF-8 strings instead of failing the whole encoding
+ * Fixed ChromePHPHandler to avoid sending more data than latest Chrome versions allow in headers (4KB down from 256KB).
+ * Fixed type error in BrowserConsoleHandler when the context array of log records was not associative.
+
+### 2.0.0 (2019-08-30)
+
+ * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release
+ * BC Break: Logger methods log/debug/info/notice/warning/error/critical/alert/emergency now have explicit void return types
+ * Added FallbackGroupHandler which works like the WhatFailureGroupHandler but stops dispatching log records as soon as one handler accepted it
+ * Fixed support for UTF-8 when cutting strings to avoid cutting a multibyte-character in half
+ * Fixed normalizers handling of exception backtraces to avoid serializing arguments in some cases
+ * Fixed date timezone handling in SyslogUdpHandler
+
+### 2.0.0-beta2 (2019-07-06)
+
+ * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release
+ * BC Break: PHP 7.2 is now the minimum required PHP version.
+ * BC Break: Removed SlackbotHandler, RavenHandler and HipChatHandler, see [UPGRADE.md](UPGRADE.md) for details
+ * Added OverflowHandler which will only flush log records to its nested handler when reaching a certain amount of logs (i.e. only pass through when things go really bad)
+ * Added TelegramBotHandler to log records to a [Telegram](https://core.telegram.org/bots/api) bot account
+ * Added support for JsonSerializable when normalizing exceptions
+ * Added support for RFC3164 (outdated BSD syslog protocol) to SyslogUdpHandler
+ * Added SoapFault details to formatted exceptions
+ * Fixed DeduplicationHandler silently failing to start when file could not be opened
+ * Fixed issue in GroupHandler and WhatFailureGroupHandler where setting multiple processors would duplicate records
+ * Fixed GelfFormatter losing some data when one attachment was too long
+ * Fixed issue in SignalHandler restarting syscalls functionality
+ * Improved performance of LogglyHandler when sending multiple logs in a single request
+
+### 2.0.0-beta1 (2018-12-08)
+
+ * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release
+ * BC Break: PHP 7.1 is now the minimum required PHP version.
+ * BC Break: Quite a few interface changes, only relevant if you implemented your own handlers/processors/formatters
+ * BC Break: Removed non-PSR-3 methods to add records, all the `add*` (e.g. `addWarning`) methods as well as `emerg`, `crit`, `err` and `warn`
+ * BC Break: The record timezone is now set per Logger instance and not statically anymore
+ * BC Break: There is no more default handler configured on empty Logger instances
+ * BC Break: ElasticSearchHandler renamed to ElasticaHandler
+ * BC Break: Various handler-specific breaks, see [UPGRADE.md](UPGRADE.md) for details
+ * Added scalar type hints and return hints in all the places it was possible. Switched strict_types on for more reliability.
+ * Added DateTimeImmutable support, all record datetime are now immutable, and will toString/json serialize with the correct date format, including microseconds (unless disabled)
+ * Added timezone and microseconds to the default date format
+ * Added SendGridHandler to use the SendGrid API to send emails
+ * Added LogmaticHandler to use the Logmatic.io API to store log records
+ * Added SqsHandler to send log records to an AWS SQS queue
+ * Added ElasticsearchHandler to send records via the official ES library. Elastica users should now use ElasticaHandler instead of ElasticSearchHandler
+ * Added NoopHandler which is similar to the NullHandle but does not prevent the bubbling of log records to handlers further down the configuration, useful for temporarily disabling a handler in configuration files
+ * Added ProcessHandler to write log output to the STDIN of a given process
+ * Added HostnameProcessor that adds the machine's hostname to log records
+ * Added a `$dateFormat` option to the PsrLogMessageProcessor which lets you format DateTime instances nicely
+ * Added support for the PHP 7.x `mongodb` extension in the MongoDBHandler
+ * Fixed many minor issues in various handlers, and probably added a few regressions too
+
+### 1.26.1 (2021-05-28)
+
+ * Fixed PHP 8.1 deprecation warning
+
+### 1.26.0 (2020-12-14)
+
+ * Added $dateFormat and $removeUsedContextFields arguments to PsrLogMessageProcessor (backport from 2.x)
+
+### 1.25.5 (2020-07-23)
+
+ * Fixed array access on null in RavenHandler
+ * Fixed unique_id in WebProcessor not being disableable
+
+### 1.25.4 (2020-05-22)
+
+ * Fixed GitProcessor type error when there is no git repo present
+ * Fixed normalization of SoapFault objects containing deeply nested objects as "detail"
+ * Fixed support for relative paths in RotatingFileHandler
+
+### 1.25.3 (2019-12-20)
+
+ * Fixed formatting of resources in JsonFormatter
+ * Fixed RedisHandler failing to use MULTI properly when passed a proxied Redis instance (e.g. in Symfony with lazy services)
+ * Fixed FilterHandler triggering a notice when handleBatch was filtering all records passed to it
+ * Fixed Turkish locale messing up the conversion of level names to their constant values
+
+### 1.25.2 (2019-11-13)
+
+ * Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable
+ * Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler and SamplingHandler
+ * Fixed BrowserConsoleHandler formatting when using multiple styles
+ * Fixed normalization of exception codes to be always integers even for PDOException which have them as numeric strings
+ * Fixed normalization of SoapFault objects containing non-strings as "detail"
+ * Fixed json encoding across all handlers to always attempt recovery of non-UTF-8 strings instead of failing the whole encoding
+
+### 1.25.1 (2019-09-06)
+
+ * Fixed forward-compatible interfaces to be compatible with Monolog 1.x too.
+
+### 1.25.0 (2019-09-06)
+
+ * Deprecated SlackbotHandler, use SlackWebhookHandler or SlackHandler instead
+ * Deprecated RavenHandler, use sentry/sentry 2.x and their Sentry\Monolog\Handler instead
+ * Deprecated HipChatHandler, migrate to Slack and use SlackWebhookHandler or SlackHandler instead
+ * Added forward-compatible interfaces and traits FormattableHandlerInterface, FormattableHandlerTrait, ProcessableHandlerInterface, ProcessableHandlerTrait. If you use modern PHP and want to make code compatible with Monolog 1 and 2 this can help. You will have to require at least Monolog 1.25 though.
+ * Added support for RFC3164 (outdated BSD syslog protocol) to SyslogUdpHandler
+ * Fixed issue in GroupHandler and WhatFailureGroupHandler where setting multiple processors would duplicate records
+ * Fixed issue in SignalHandler restarting syscalls functionality
+ * Fixed normalizers handling of exception backtraces to avoid serializing arguments in some cases
+ * Fixed ZendMonitorHandler to work with the latest Zend Server versions
+ * Fixed ChromePHPHandler to avoid sending more data than latest Chrome versions allow in headers (4KB down from 256KB).
+
+### 1.24.0 (2018-11-05)
+
+ * BC Notice: If you are extending any of the Monolog's Formatters' `normalize` method, make sure you add the new `$depth = 0` argument to your function signature to avoid strict PHP warnings.
+ * Added a `ResettableInterface` in order to reset/reset/clear/flush handlers and processors
+ * Added a `ProcessorInterface` as an optional way to label a class as being a processor (mostly useful for autowiring dependency containers)
+ * Added a way to log signals being received using Monolog\SignalHandler
+ * Added ability to customize error handling at the Logger level using Logger::setExceptionHandler
+ * Added InsightOpsHandler to migrate users of the LogEntriesHandler
+ * Added protection to NormalizerFormatter against circular and very deep structures, it now stops normalizing at a depth of 9
+ * Added capture of stack traces to ErrorHandler when logging PHP errors
+ * Added RavenHandler support for a `contexts` context or extra key to forward that to Sentry's contexts
+ * Added forwarding of context info to FluentdFormatter
+ * Added SocketHandler::setChunkSize to override the default chunk size in case you must send large log lines to rsyslog for example
+ * Added ability to extend/override BrowserConsoleHandler
+ * Added SlackWebhookHandler::getWebhookUrl and SlackHandler::getToken to enable class extensibility
+ * Added SwiftMailerHandler::getSubjectFormatter to enable class extensibility
+ * Dropped official support for HHVM in test builds
+ * Fixed normalization of exception traces when call_user_func is used to avoid serializing objects and the data they contain
+ * Fixed naming of fields in Slack handler, all field names are now capitalized in all cases
+ * Fixed HipChatHandler bug where slack dropped messages randomly
+ * Fixed normalization of objects in Slack handlers
+ * Fixed support for PHP7's Throwable in NewRelicHandler
+ * Fixed race bug when StreamHandler sometimes incorrectly reported it failed to create a directory
+ * Fixed table row styling issues in HtmlFormatter
+ * Fixed RavenHandler dropping the message when logging exception
+ * Fixed WhatFailureGroupHandler skipping processors when using handleBatch
+ and implement it where possible
+ * Fixed display of anonymous class names
+
+### 1.23.0 (2017-06-19)
+
+ * Improved SyslogUdpHandler's support for RFC5424 and added optional `$ident` argument
+ * Fixed GelfHandler truncation to be per field and not per message
+ * Fixed compatibility issue with PHP <5.3.6
+ * Fixed support for headless Chrome in ChromePHPHandler
+ * Fixed support for latest Aws SDK in DynamoDbHandler
+ * Fixed support for SwiftMailer 6.0+ in SwiftMailerHandler
+
+### 1.22.1 (2017-03-13)
+
+ * Fixed lots of minor issues in the new Slack integrations
+ * Fixed support for allowInlineLineBreaks in LineFormatter when formatting exception backtraces
+
+### 1.22.0 (2016-11-26)
+
+ * Added SlackbotHandler and SlackWebhookHandler to set up Slack integration more easily
+ * Added MercurialProcessor to add mercurial revision and branch names to log records
+ * Added support for AWS SDK v3 in DynamoDbHandler
+ * Fixed fatal errors occurring when normalizing generators that have been fully consumed
+ * Fixed RollbarHandler to include a level (rollbar level), monolog_level (original name), channel and datetime (unix)
+ * Fixed RollbarHandler not flushing records automatically, calling close() explicitly is not necessary anymore
+ * Fixed SyslogUdpHandler to avoid sending empty frames
+ * Fixed a few PHP 7.0 and 7.1 compatibility issues
+
+### 1.21.0 (2016-07-29)
+
+ * Break: Reverted the addition of $context when the ErrorHandler handles regular php errors from 1.20.0 as it was causing issues
+ * Added support for more formats in RotatingFileHandler::setFilenameFormat as long as they have Y, m and d in order
+ * Added ability to format the main line of text the SlackHandler sends by explicitly setting a formatter on the handler
+ * Added information about SoapFault instances in NormalizerFormatter
+ * Added $handleOnlyReportedErrors option on ErrorHandler::registerErrorHandler (default true) to allow logging of all errors no matter the error_reporting level
+
+### 1.20.0 (2016-07-02)
+
+ * Added FingersCrossedHandler::activate() to manually trigger the handler regardless of the activation policy
+ * Added StreamHandler::getUrl to retrieve the stream's URL
+ * Added ability to override addRow/addTitle in HtmlFormatter
+ * Added the $context to context information when the ErrorHandler handles a regular php error
+ * Deprecated RotatingFileHandler::setFilenameFormat to only support 3 formats: Y, Y-m and Y-m-d
+ * Fixed WhatFailureGroupHandler to work with PHP7 throwables
+ * Fixed a few minor bugs
+
+### 1.19.0 (2016-04-12)
+
+ * Break: StreamHandler will not close streams automatically that it does not own. If you pass in a stream (not a path/url), then it will not close it for you. You can retrieve those using getStream() if needed
+ * Added DeduplicationHandler to remove duplicate records from notifications across multiple requests, useful for email or other notifications on errors
+ * Added ability to use `%message%` and other LineFormatter replacements in the subject line of emails sent with NativeMailHandler and SwiftMailerHandler
+ * Fixed HipChatHandler handling of long messages
+
+### 1.18.2 (2016-04-02)
+
+ * Fixed ElasticaFormatter to use more precise dates
+ * Fixed GelfMessageFormatter sending too long messages
+
+### 1.18.1 (2016-03-13)
+
+ * Fixed SlackHandler bug where slack dropped messages randomly
+ * Fixed RedisHandler issue when using with the PHPRedis extension
+ * Fixed AmqpHandler content-type being incorrectly set when using with the AMQP extension
+ * Fixed BrowserConsoleHandler regression
+
+### 1.18.0 (2016-03-01)
+
+ * Added optional reduction of timestamp precision via `Logger->useMicrosecondTimestamps(false)`, disabling it gets you a bit of performance boost but reduces the precision to the second instead of microsecond
+ * Added possibility to skip some extra stack frames in IntrospectionProcessor if you have some library wrapping Monolog that is always adding frames
+ * Added `Logger->withName` to clone a logger (keeping all handlers) with a new name
+ * Added FluentdFormatter for the Fluentd unix socket protocol
+ * Added HandlerWrapper base class to ease the creation of handler wrappers, just extend it and override as needed
+ * Added support for replacing context sub-keys using `%context.*%` in LineFormatter
+ * Added support for `payload` context value in RollbarHandler
+ * Added setRelease to RavenHandler to describe the application version, sent with every log
+ * Added support for `fingerprint` context value in RavenHandler
+ * Fixed JSON encoding errors that would gobble up the whole log record, we now handle those more gracefully by dropping chars as needed
+ * Fixed write timeouts in SocketHandler and derivatives, set to 10sec by default, lower it with `setWritingTimeout()`
+ * Fixed PHP7 compatibility with regard to Exception/Throwable handling in a few places
+
+### 1.17.2 (2015-10-14)
+
+ * Fixed ErrorHandler compatibility with non-Monolog PSR-3 loggers
+ * Fixed SlackHandler handling to use slack functionalities better
+ * Fixed SwiftMailerHandler bug when sending multiple emails they all had the same id
+ * Fixed 5.3 compatibility regression
+
+### 1.17.1 (2015-08-31)
+
+ * Fixed RollbarHandler triggering PHP notices
+
+### 1.17.0 (2015-08-30)
+
+ * Added support for `checksum` and `release` context/extra values in RavenHandler
+ * Added better support for exceptions in RollbarHandler
+ * Added UidProcessor::getUid
+ * Added support for showing the resource type in NormalizedFormatter
+ * Fixed IntrospectionProcessor triggering PHP notices
+
+### 1.16.0 (2015-08-09)
+
+ * Added IFTTTHandler to notify ifttt.com triggers
+ * Added Logger::setHandlers() to allow setting/replacing all handlers
+ * Added $capSize in RedisHandler to cap the log size
+ * Fixed StreamHandler creation of directory to only trigger when the first log write happens
+ * Fixed bug in the handling of curl failures
+ * Fixed duplicate logging of fatal errors when both error and fatal error handlers are registered in monolog's ErrorHandler
+ * Fixed missing fatal errors records with handlers that need to be closed to flush log records
+ * Fixed TagProcessor::addTags support for associative arrays
+
+### 1.15.0 (2015-07-12)
+
+ * Added addTags and setTags methods to change a TagProcessor
+ * Added automatic creation of directories if they are missing for a StreamHandler to open a log file
+ * Added retry functionality to Loggly, Cube and Mandrill handlers so they retry up to 5 times in case of network failure
+ * Fixed process exit code being incorrectly reset to 0 if ErrorHandler::registerExceptionHandler was used
+ * Fixed HTML/JS escaping in BrowserConsoleHandler
+ * Fixed JSON encoding errors being silently suppressed (PHP 5.5+ only)
+
+### 1.14.0 (2015-06-19)
+
+ * Added PHPConsoleHandler to send record to Chrome's PHP Console extension and library
+ * Added support for objects implementing __toString in the NormalizerFormatter
+ * Added support for HipChat's v2 API in HipChatHandler
+ * Added Logger::setTimezone() to initialize the timezone monolog should use in case date.timezone isn't correct for your app
+ * Added an option to send formatted message instead of the raw record on PushoverHandler via ->useFormattedMessage(true)
+ * Fixed curl errors being silently suppressed
+
+### 1.13.1 (2015-03-09)
+
+ * Fixed regression in HipChat requiring a new token to be created
+
+### 1.13.0 (2015-03-05)
+
+ * Added Registry::hasLogger to check for the presence of a logger instance
+ * Added context.user support to RavenHandler
+ * Added HipChat API v2 support in the HipChatHandler
+ * Added NativeMailerHandler::addParameter to pass params to the mail() process
+ * Added context data to SlackHandler when $includeContextAndExtra is true
+ * Added ability to customize the Swift_Message per-email in SwiftMailerHandler
+ * Fixed SwiftMailerHandler to lazily create message instances if a callback is provided
+ * Fixed serialization of INF and NaN values in Normalizer and LineFormatter
+
+### 1.12.0 (2014-12-29)
+
+ * Break: HandlerInterface::isHandling now receives a partial record containing only a level key. This was always the intent and does not break any Monolog handler but is strictly speaking a BC break and you should check if you relied on any other field in your own handlers.
+ * Added PsrHandler to forward records to another PSR-3 logger
+ * Added SamplingHandler to wrap around a handler and include only every Nth record
+ * Added MongoDBFormatter to support better storage with MongoDBHandler (it must be enabled manually for now)
+ * Added exception codes in the output of most formatters
+ * Added LineFormatter::includeStacktraces to enable exception stack traces in logs (uses more than one line)
+ * Added $useShortAttachment to SlackHandler to minify attachment size and $includeExtra to append extra data
+ * Added $host to HipChatHandler for users of private instances
+ * Added $transactionName to NewRelicHandler and support for a transaction_name context value
+ * Fixed MandrillHandler to avoid outputting API call responses
+ * Fixed some non-standard behaviors in SyslogUdpHandler
+
+### 1.11.0 (2014-09-30)
+
+ * Break: The NewRelicHandler extra and context data are now prefixed with extra_ and context_ to avoid clashes. Watch out if you have scripts reading those from the API and rely on names
+ * Added WhatFailureGroupHandler to suppress any exception coming from the wrapped handlers and avoid chain failures if a logging service fails
+ * Added MandrillHandler to send emails via the Mandrillapp.com API
+ * Added SlackHandler to log records to a Slack.com account
+ * Added FleepHookHandler to log records to a Fleep.io account
+ * Added LogglyHandler::addTag to allow adding tags to an existing handler
+ * Added $ignoreEmptyContextAndExtra to LineFormatter to avoid empty [] at the end
+ * Added $useLocking to StreamHandler and RotatingFileHandler to enable flock() while writing
+ * Added support for PhpAmqpLib in the AmqpHandler
+ * Added FingersCrossedHandler::clear and BufferHandler::clear to reset them between batches in long running jobs
+ * Added support for adding extra fields from $_SERVER in the WebProcessor
+ * Fixed support for non-string values in PrsLogMessageProcessor
+ * Fixed SwiftMailer messages being sent with the wrong date in long running scripts
+ * Fixed minor PHP 5.6 compatibility issues
+ * Fixed BufferHandler::close being called twice
+
+### 1.10.0 (2014-06-04)
+
+ * Added Logger::getHandlers() and Logger::getProcessors() methods
+ * Added $passthruLevel argument to FingersCrossedHandler to let it always pass some records through even if the trigger level is not reached
+ * Added support for extra data in NewRelicHandler
+ * Added $expandNewlines flag to the ErrorLogHandler to create multiple log entries when a message has multiple lines
+
+### 1.9.1 (2014-04-24)
+
+ * Fixed regression in RotatingFileHandler file permissions
+ * Fixed initialization of the BufferHandler to make sure it gets flushed after receiving records
+ * Fixed ChromePHPHandler and FirePHPHandler's activation strategies to be more conservative
+
+### 1.9.0 (2014-04-20)
+
+ * Added LogEntriesHandler to send logs to a LogEntries account
+ * Added $filePermissions to tweak file mode on StreamHandler and RotatingFileHandler
+ * Added $useFormatting flag to MemoryProcessor to make it send raw data in bytes
+ * Added support for table formatting in FirePHPHandler via the table context key
+ * Added a TagProcessor to add tags to records, and support for tags in RavenHandler
+ * Added $appendNewline flag to the JsonFormatter to enable using it when logging to files
+ * Added sound support to the PushoverHandler
+ * Fixed multi-threading support in StreamHandler
+ * Fixed empty headers issue when ChromePHPHandler received no records
+ * Fixed default format of the ErrorLogHandler
+
+### 1.8.0 (2014-03-23)
+
+ * Break: the LineFormatter now strips newlines by default because this was a bug, set $allowInlineLineBreaks to true if you need them
+ * Added BrowserConsoleHandler to send logs to any browser's console via console.log() injection in the output
+ * Added FilterHandler to filter records and only allow those of a given list of levels through to the wrapped handler
+ * Added FlowdockHandler to send logs to a Flowdock account
+ * Added RollbarHandler to send logs to a Rollbar account
+ * Added HtmlFormatter to send prettier log emails with colors for each log level
+ * Added GitProcessor to add the current branch/commit to extra record data
+ * Added a Monolog\Registry class to allow easier global access to pre-configured loggers
+ * Added support for the new official graylog2/gelf-php lib for GelfHandler, upgrade if you can by replacing the mlehner/gelf-php requirement
+ * Added support for HHVM
+ * Added support for Loggly batch uploads
+ * Added support for tweaking the content type and encoding in NativeMailerHandler
+ * Added $skipClassesPartials to tweak the ignored classes in the IntrospectionProcessor
+ * Fixed batch request support in GelfHandler
+
+### 1.7.0 (2013-11-14)
+
+ * Added ElasticSearchHandler to send logs to an Elastic Search server
+ * Added DynamoDbHandler and ScalarFormatter to send logs to Amazon's Dynamo DB
+ * Added SyslogUdpHandler to send logs to a remote syslogd server
+ * Added LogglyHandler to send logs to a Loggly account
+ * Added $level to IntrospectionProcessor so it only adds backtraces when needed
+ * Added $version to LogstashFormatter to allow using the new v1 Logstash format
+ * Added $appName to NewRelicHandler
+ * Added configuration of Pushover notification retries/expiry
+ * Added $maxColumnWidth to NativeMailerHandler to change the 70 chars default
+ * Added chainability to most setters for all handlers
+ * Fixed RavenHandler batch processing so it takes the message from the record with highest priority
+ * Fixed HipChatHandler batch processing so it sends all messages at once
+ * Fixed issues with eAccelerator
+ * Fixed and improved many small things
+
+### 1.6.0 (2013-07-29)
+
+ * Added HipChatHandler to send logs to a HipChat chat room
+ * Added ErrorLogHandler to send logs to PHP's error_log function
+ * Added NewRelicHandler to send logs to NewRelic's service
+ * Added Monolog\ErrorHandler helper class to register a Logger as exception/error/fatal handler
+ * Added ChannelLevelActivationStrategy for the FingersCrossedHandler to customize levels by channel
+ * Added stack traces output when normalizing exceptions (json output & co)
+ * Added Monolog\Logger::API constant (currently 1)
+ * Added support for ChromePHP's v4.0 extension
+ * Added support for message priorities in PushoverHandler, see $highPriorityLevel and $emergencyLevel
+ * Added support for sending messages to multiple users at once with the PushoverHandler
+ * Fixed RavenHandler's support for batch sending of messages (when behind a Buffer or FingersCrossedHandler)
+ * Fixed normalization of Traversables with very large data sets, only the first 1000 items are shown now
+ * Fixed issue in RotatingFileHandler when an open_basedir restriction is active
+ * Fixed minor issues in RavenHandler and bumped the API to Raven 0.5.0
+ * Fixed SyslogHandler issue when many were used concurrently with different facilities
+
+### 1.5.0 (2013-04-23)
+
+ * Added ProcessIdProcessor to inject the PID in log records
+ * Added UidProcessor to inject a unique identifier to all log records of one request/run
+ * Added support for previous exceptions in the LineFormatter exception serialization
+ * Added Monolog\Logger::getLevels() to get all available levels
+ * Fixed ChromePHPHandler so it avoids sending headers larger than Chrome can handle
+
+### 1.4.1 (2013-04-01)
+
+ * Fixed exception formatting in the LineFormatter to be more minimalistic
+ * Fixed RavenHandler's handling of context/extra data, requires Raven client >0.1.0
+ * Fixed log rotation in RotatingFileHandler to work with long running scripts spanning multiple days
+ * Fixed WebProcessor array access so it checks for data presence
+ * Fixed Buffer, Group and FingersCrossed handlers to make use of their processors
+
+### 1.4.0 (2013-02-13)
+
+ * Added RedisHandler to log to Redis via the Predis library or the phpredis extension
+ * Added ZendMonitorHandler to log to the Zend Server monitor
+ * Added the possibility to pass arrays of handlers and processors directly in the Logger constructor
+ * Added `$useSSL` option to the PushoverHandler which is enabled by default
+ * Fixed ChromePHPHandler and FirePHPHandler issue when multiple instances are used simultaneously
+ * Fixed header injection capability in the NativeMailHandler
+
+### 1.3.1 (2013-01-11)
+
+ * Fixed LogstashFormatter to be usable with stream handlers
+ * Fixed GelfMessageFormatter levels on Windows
+
+### 1.3.0 (2013-01-08)
+
+ * Added PSR-3 compliance, the `Monolog\Logger` class is now an instance of `Psr\Log\LoggerInterface`
+ * Added PsrLogMessageProcessor that you can selectively enable for full PSR-3 compliance
+ * Added LogstashFormatter (combine with SocketHandler or StreamHandler to send logs to Logstash)
+ * Added PushoverHandler to send mobile notifications
+ * Added CouchDBHandler and DoctrineCouchDBHandler
+ * Added RavenHandler to send data to Sentry servers
+ * Added support for the new MongoClient class in MongoDBHandler
+ * Added microsecond precision to log records' timestamps
+ * Added `$flushOnOverflow` param to BufferHandler to flush by batches instead of losing
+ the oldest entries
+ * Fixed normalization of objects with cyclic references
+
+### 1.2.1 (2012-08-29)
+
+ * Added new $logopts arg to SyslogHandler to provide custom openlog options
+ * Fixed fatal error in SyslogHandler
+
+### 1.2.0 (2012-08-18)
+
+ * Added AmqpHandler (for use with AMQP servers)
+ * Added CubeHandler
+ * Added NativeMailerHandler::addHeader() to send custom headers in mails
+ * Added the possibility to specify more than one recipient in NativeMailerHandler
+ * Added the possibility to specify float timeouts in SocketHandler
+ * Added NOTICE and EMERGENCY levels to conform with RFC 5424
+ * Fixed the log records to use the php default timezone instead of UTC
+ * Fixed BufferHandler not being flushed properly on PHP fatal errors
+ * Fixed normalization of exotic resource types
+ * Fixed the default format of the SyslogHandler to avoid duplicating datetimes in syslog
+
+### 1.1.0 (2012-04-23)
+
+ * Added Monolog\Logger::isHandling() to check if a handler will
+ handle the given log level
+ * Added ChromePHPHandler
+ * Added MongoDBHandler
+ * Added GelfHandler (for use with Graylog2 servers)
+ * Added SocketHandler (for use with syslog-ng for example)
+ * Added NormalizerFormatter
+ * Added the possibility to change the activation strategy of the FingersCrossedHandler
+ * Added possibility to show microseconds in logs
+ * Added `server` and `referer` to WebProcessor output
+
+### 1.0.2 (2011-10-24)
+
+ * Fixed bug in IE with large response headers and FirePHPHandler
+
+### 1.0.1 (2011-08-25)
+
+ * Added MemoryPeakUsageProcessor and MemoryUsageProcessor
+ * Added Monolog\Logger::getName() to get a logger's channel name
+
+### 1.0.0 (2011-07-06)
+
+ * Added IntrospectionProcessor to get info from where the logger was called
+ * Fixed WebProcessor in CLI
+
+### 1.0.0-RC1 (2011-07-01)
+
+ * Initial release
diff --git a/tests/php_test_files/vendor/monolog/monolog/LICENSE b/tests/php_test_files/vendor/monolog/monolog/LICENSE
new file mode 100644
index 0000000..aa2a042
--- /dev/null
+++ b/tests/php_test_files/vendor/monolog/monolog/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2011-2020 Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tests/php_test_files/vendor/monolog/monolog/README.md b/tests/php_test_files/vendor/monolog/monolog/README.md
new file mode 100644
index 0000000..c54d83c
--- /dev/null
+++ b/tests/php_test_files/vendor/monolog/monolog/README.md
@@ -0,0 +1,136 @@
+![Monolog](logo.jpg)
+
+# Monolog - Logging for PHP [![Continuous Integration](https://github.com/Seldaek/monolog/workflows/Continuous%20Integration/badge.svg?branch=main)](https://github.com/Seldaek/monolog/actions)
+
+[![Total Downloads](https://img.shields.io/packagist/dt/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog)
+[![Latest Stable Version](https://img.shields.io/packagist/v/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog)
+
+>**Note** This is the **documentation for Monolog 3.x**, if you are using older releases
+>see the documentation for [Monolog 2.x](https://github.com/Seldaek/monolog/blob/2.x/README.md) or [Monolog 1.x](https://github.com/Seldaek/monolog/blob/1.x/README.md)
+
+Monolog sends your logs to files, sockets, inboxes, databases and various
+web services. See the complete list of handlers below. Special handlers
+allow you to build advanced logging strategies.
+
+This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
+interface that you can type-hint against in your own libraries to keep
+a maximum of interoperability. You can also use it in your applications to
+make sure you can always use another compatible logger at a later time.
+As of 1.11.0 Monolog public APIs will also accept PSR-3 log levels.
+Internally Monolog still uses its own level scheme since it predates PSR-3.
+
+